- removed get_fs/set_fs
- removed broken/unmaintained MIPS KVM trap and emulate support - added support for Loongson-2K1000 - fixes and cleanups -----BEGIN PGP SIGNATURE----- iQJOBAABCAA4FiEEbt46xwy6kEcDOXoUeZbBVTGwZHAFAmCJS6oaHHRzYm9nZW5k QGFscGhhLmZyYW5rZW4uZGUACgkQeZbBVTGwZHDnbBAAnfVnVgjRZZ1y+oX9siFk xrQUVJMxEl02272yptB6VtWOLhTnFnJ2xNyjb4EcoCbTiBReSNQ8ee4WYYdCgSXh soDW6wYrlpcZau5sRg72xybmmYo4aUEh3D9PWNpCaDXFaSpnbXv28ccCTb0yLvCL 4s72wl+hLGAygJMlA6gkQ3mN3XblRk+ci1MLQOr4WpxCmWx0ozKKnHnlt21rw26w kokJRsqKAOgzzB5LIBgFBdlNKXMd+Xq8BhDXvilNbH2+LtrNIIbyJDPReZBkkO/T JWGbcNJMox/lBzqtM+eIMvuf/2QHtUAB4xXSAH+oAno6PlV0S73Oo5E+tI++ax9j WmdN3nwjhpEmwyovZwZtl+b0P14NXXAYKYOYClaRn3dFxEXnS7Fiq+EyGuOEQYBS oTa2VXQrFZfpN55wtdwmXdwWDwNuE8UtEbkSpblyTw9HQqh3jnl8xKGnaWzw7HMN D1yycBxMzuOrMiY5UBcfuzdU1K9Dgxn+ur8IfraXjjcEmZB+1TEB74/GCLK1/UJM lBUrW9ZrE5e3COA/gqPq5ZQf4W9cp8xLBMWWXxnMSBEErpePDtt3EZP2H62sK+3a wuyvEwRuiFskeUi/Tr7t89u4oXrcIZ7Q3bM3LKj3IWbsk/Znk8X03GCF86QU27zP wlrVT2ef0/8DHEI7btraCb4= =w/c4 -----END PGP SIGNATURE----- Merge tag 'mips_5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS updates from Thomas Bogendoerfer: - removed get_fs/set_fs - removed broken/unmaintained MIPS KVM trap and emulate support - added support for Loongson-2K1000 - fixes and cleanups * tag 'mips_5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (107 commits) MIPS: BCM63XX: Use BUG_ON instead of condition followed by BUG. MIPS: select ARCH_KEEP_MEMBLOCK unconditionally mips: Do not include hi and lo in clobber list for R6 MIPS:DTS:Correct the license for Loongson-2K MIPS:DTS:Fix label name and interrupt number of ohci for Loongson-2K MIPS: Avoid handcoded DIVU in `__div64_32' altogether lib/math/test_div64: Correct the spelling of "dividend" lib/math/test_div64: Fix error message formatting mips/bootinfo:correct some comments of fw_arg MIPS: Avoid DIVU in `__div64_32' is result would be zero MIPS: Reinstate platform `__div64_32' handler div64: Correct inline documentation for `do_div' lib/math: Add a `do_div' test module MIPS: Makefile: Replace -pg with CC_FLAGS_FTRACE MIPS: pci-legacy: revert "use generic pci_enable_resources" MIPS: Loongson64: Add kexec/kdump support MIPS: pci-legacy: use generic pci_enable_resources MIPS: pci-legacy: remove busn_resource field MIPS: pci-legacy: remove redundant info messages MIPS: pci-legacy: stop using of_pci_range_to_resource ...
This commit is contained in:
commit
77d51337d6
|
@ -47,7 +47,6 @@ examples:
|
|||
|
||||
spi-max-frequency = <3125000>;
|
||||
spi-3wire;
|
||||
spi-cs-high;
|
||||
|
||||
reset-gpios = <&gpe 2 GPIO_ACTIVE_LOW>;
|
||||
|
||||
|
|
|
@ -10,9 +10,9 @@ maintainers:
|
|||
- Jiaxun Yang <jiaxun.yang@flygoat.com>
|
||||
|
||||
description: |
|
||||
This interrupt controller is found in the Loongson-3 family of chips as the primary
|
||||
package interrupt controller which can route local I/O interrupt to interrupt lines
|
||||
of cores.
|
||||
This interrupt controller is found in the Loongson-3 family of chips and
|
||||
Loongson-2K1000 chip, as the primary package interrupt controller which
|
||||
can route local I/O interrupt to interrupt lines of cores.
|
||||
|
||||
allOf:
|
||||
- $ref: /schemas/interrupt-controller.yaml#
|
||||
|
@ -22,9 +22,17 @@ properties:
|
|||
oneOf:
|
||||
- const: loongson,liointc-1.0
|
||||
- const: loongson,liointc-1.0a
|
||||
- const: loongson,liointc-2.0
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
minItems: 1
|
||||
maxItems: 3
|
||||
|
||||
reg-names:
|
||||
items:
|
||||
- const: main
|
||||
- const: isr0
|
||||
- const: isr1
|
||||
|
||||
interrupt-controller: true
|
||||
|
||||
|
@ -69,6 +77,26 @@ required:
|
|||
|
||||
unevaluatedProperties: false
|
||||
|
||||
if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- loongson,liointc-2.0
|
||||
|
||||
then:
|
||||
properties:
|
||||
reg:
|
||||
minItems: 3
|
||||
|
||||
required:
|
||||
- reg-names
|
||||
|
||||
else:
|
||||
properties:
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
examples:
|
||||
- |
|
||||
iointc: interrupt-controller@3ff01400 {
|
||||
|
|
|
@ -4,13 +4,15 @@ config MIPS
|
|||
default y
|
||||
select ARCH_32BIT_OFF_T if !64BIT
|
||||
select ARCH_BINFMT_ELF_STATE if MIPS_FP_SUPPORT
|
||||
select ARCH_HAS_DEBUG_VIRTUAL if !64BIT
|
||||
select ARCH_HAS_FORTIFY_SOURCE
|
||||
select ARCH_HAS_KCOV
|
||||
select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE if !EVA
|
||||
select ARCH_HAS_PTE_SPECIAL if !(32BIT && CPU_HAS_RIXI)
|
||||
select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
|
||||
select ARCH_HAS_UBSAN_SANITIZE_ALL
|
||||
select ARCH_HAS_GCOV_PROFILE_ALL
|
||||
select ARCH_KEEP_MEMBLOCK if DEBUG_KERNEL
|
||||
select ARCH_KEEP_MEMBLOCK
|
||||
select ARCH_SUPPORTS_UPROBES
|
||||
select ARCH_USE_BUILTIN_BSWAP
|
||||
select ARCH_USE_CMPXCHG_LOCKREF if 64BIT
|
||||
|
@ -26,6 +28,7 @@ config MIPS
|
|||
select GENERIC_ATOMIC64 if !64BIT
|
||||
select GENERIC_CMOS_UPDATE
|
||||
select GENERIC_CPU_AUTOPROBE
|
||||
select GENERIC_FIND_FIRST_BIT
|
||||
select GENERIC_GETTIMEOFDAY
|
||||
select GENERIC_IOMAP
|
||||
select GENERIC_IRQ_PROBE
|
||||
|
@ -91,7 +94,6 @@ config MIPS
|
|||
select PERF_USE_VMALLOC
|
||||
select PCI_MSI_ARCH_FALLBACKS if PCI_MSI
|
||||
select RTC_LIB
|
||||
select SET_FS
|
||||
select SYSCTL_EXCEPTION_TRACE
|
||||
select VIRT_TO_BUS
|
||||
select ARCH_HAS_ELFCORE_COMPAT
|
||||
|
@ -712,6 +714,7 @@ config SGI_IP27
|
|||
select ARC_CMDLINE_ONLY
|
||||
select BOOT_ELF64
|
||||
select DEFAULT_SGI_PARTITION
|
||||
select FORCE_PCI
|
||||
select SYS_HAS_EARLY_PRINTK
|
||||
select HAVE_PCI
|
||||
select IRQ_MIPS_CPU
|
||||
|
@ -774,6 +777,7 @@ config SGI_IP30
|
|||
select BOOT_ELF64
|
||||
select CEVT_R4K
|
||||
select CSRC_R4K
|
||||
select FORCE_PCI
|
||||
select SYNC_R4K if SMP
|
||||
select ZONE_DMA32
|
||||
select HAVE_PCI
|
||||
|
@ -998,6 +1002,7 @@ config CAVIUM_OCTEON_SOC
|
|||
select NR_CPUS_DEFAULT_64
|
||||
select MIPS_NR_CPU_NR_MAP_1024
|
||||
select BUILTIN_DTB
|
||||
select MTD
|
||||
select MTD_COMPLEX_MAPPINGS
|
||||
select SWIOTLB
|
||||
select SYS_SUPPORTS_RELOCATABLE
|
||||
|
@ -2118,7 +2123,7 @@ config CPU_MIPS32
|
|||
config CPU_MIPS64
|
||||
bool
|
||||
default y if CPU_MIPS64_R1 || CPU_MIPS64_R2 || CPU_MIPS64_R5 || \
|
||||
CPU_MIPS64_R6
|
||||
CPU_MIPS64_R6 || CPU_LOONGSON64 || CPU_CAVIUM_OCTEON
|
||||
|
||||
#
|
||||
# These indicate the revision of the architecture
|
||||
|
@ -2185,7 +2190,8 @@ config CPU_SUPPORTS_HUGEPAGES
|
|||
depends on !(32BIT && (ARCH_PHYS_ADDR_T_64BIT || EVA))
|
||||
config MIPS_PGD_C0_CONTEXT
|
||||
bool
|
||||
default y if 64BIT && (CPU_MIPSR2 || CPU_MIPSR6) && !CPU_XLP
|
||||
depends on 64BIT
|
||||
default y if (CPU_MIPSR2 || CPU_MIPSR6) && !CPU_XLP
|
||||
|
||||
#
|
||||
# Set to y for ptrace access to watch registers.
|
||||
|
@ -2219,23 +2225,6 @@ config 64BIT
|
|||
|
||||
endchoice
|
||||
|
||||
config KVM_GUEST
|
||||
bool "KVM Guest Kernel"
|
||||
depends on CPU_MIPS32_R2
|
||||
depends on !64BIT && BROKEN_ON_SMP
|
||||
help
|
||||
Select this option if building a guest kernel for KVM (Trap & Emulate)
|
||||
mode.
|
||||
|
||||
config KVM_GUEST_TIMER_FREQ
|
||||
int "Count/Compare Timer Frequency (MHz)"
|
||||
depends on KVM_GUEST
|
||||
default 100
|
||||
help
|
||||
Set this to non-zero if building a guest kernel for KVM to skip RTC
|
||||
emulation when determining guest CPU Frequency. Instead, the guest's
|
||||
timer frequency is specified directly.
|
||||
|
||||
config MIPS_VA_BITS_48
|
||||
bool "48 bits virtual memory"
|
||||
depends on 64BIT
|
||||
|
|
|
@ -77,6 +77,7 @@ config CMDLINE_OVERRIDE
|
|||
config SB1XXX_CORELIS
|
||||
bool "Corelis Debugger"
|
||||
depends on SIBYTE_SB1xxx_SOC
|
||||
select DEBUG_KERNEL if !COMPILE_TEST
|
||||
select DEBUG_INFO if !COMPILE_TEST
|
||||
help
|
||||
Select compile flags that produce code that can be processed by the
|
||||
|
|
|
@ -111,7 +111,7 @@ static struct clk_aliastable {
|
|||
/* access locks to SYS_FREQCTRL0/1 and SYS_CLKSRC registers */
|
||||
static spinlock_t alchemy_clk_fg0_lock;
|
||||
static spinlock_t alchemy_clk_fg1_lock;
|
||||
static spinlock_t alchemy_clk_csrc_lock;
|
||||
static DEFINE_SPINLOCK(alchemy_clk_csrc_lock);
|
||||
|
||||
/* CPU Core clock *****************************************************/
|
||||
|
||||
|
@ -996,7 +996,6 @@ static int __init alchemy_clk_setup_imux(int ctype)
|
|||
if (!a)
|
||||
return -ENOMEM;
|
||||
|
||||
spin_lock_init(&alchemy_clk_csrc_lock);
|
||||
ret = 0;
|
||||
|
||||
for (i = 0; i < 6; i++) {
|
||||
|
|
|
@ -76,7 +76,7 @@ static struct clk clk_enet_misc = {
|
|||
};
|
||||
|
||||
/*
|
||||
* Ethernet MAC clocks: only revelant on 6358, silently enable misc
|
||||
* Ethernet MAC clocks: only relevant on 6358, silently enable misc
|
||||
* clocks
|
||||
*/
|
||||
static void enetx_set(struct clk *clk, int enable)
|
||||
|
|
|
@ -43,8 +43,7 @@ static void bcm63xx_gpio_set(struct gpio_chip *chip,
|
|||
u32 *v;
|
||||
unsigned long flags;
|
||||
|
||||
if (gpio >= chip->ngpio)
|
||||
BUG();
|
||||
BUG_ON(gpio >= chip->ngpio);
|
||||
|
||||
if (gpio < 32) {
|
||||
reg = gpio_out_low_reg;
|
||||
|
@ -70,8 +69,7 @@ static int bcm63xx_gpio_get(struct gpio_chip *chip, unsigned gpio)
|
|||
u32 reg;
|
||||
u32 mask;
|
||||
|
||||
if (gpio >= chip->ngpio)
|
||||
BUG();
|
||||
BUG_ON(gpio >= chip->ngpio);
|
||||
|
||||
if (gpio < 32) {
|
||||
reg = gpio_out_low_reg;
|
||||
|
@ -92,8 +90,7 @@ static int bcm63xx_gpio_set_direction(struct gpio_chip *chip,
|
|||
u32 tmp;
|
||||
unsigned long flags;
|
||||
|
||||
if (gpio >= chip->ngpio)
|
||||
BUG();
|
||||
BUG_ON(gpio >= chip->ngpio);
|
||||
|
||||
if (gpio < 32) {
|
||||
reg = GPIO_CTL_LO_REG;
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#include <linux/device.h>
|
||||
#include <linux/dma-direction.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/dma-direct.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/of.h>
|
||||
|
|
|
@ -18,7 +18,7 @@ include $(srctree)/arch/mips/Kbuild.platforms
|
|||
BOOT_HEAP_SIZE := 0x400000
|
||||
|
||||
# Disable Function Tracer
|
||||
KBUILD_CFLAGS := $(filter-out -pg, $(KBUILD_CFLAGS))
|
||||
KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_FTRACE), $(KBUILD_CFLAGS))
|
||||
|
||||
KBUILD_CFLAGS := $(filter-out -fstack-protector, $(KBUILD_CFLAGS))
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "bcm3368.dtsi"
|
||||
#include "bcm3368.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "netgear,cvg834g", "brcm,bcm3368";
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
#include "dt-bindings/clock/bcm3368-clock.h"
|
||||
|
||||
/ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
@ -59,7 +62,7 @@
|
|||
|
||||
periph_cntl: syscon@fff8c008 {
|
||||
compatible = "syscon";
|
||||
reg = <0xfff8c000 0x4>;
|
||||
reg = <0xfff8c008 0x4>;
|
||||
native-endian;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "bcm63268.dtsi"
|
||||
#include "bcm63268.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "comtrend,vr-3032u", "brcm,bcm63268";
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
#include "dt-bindings/clock/bcm63268-clock.h"
|
||||
#include "dt-bindings/reset/bcm63268-reset.h"
|
||||
#include "dt-bindings/soc/bcm63268-pm.h"
|
||||
|
||||
/ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
@ -24,16 +29,29 @@
|
|||
};
|
||||
|
||||
clocks {
|
||||
periph_clk: periph-clk {
|
||||
periph_osc: periph-osc {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <50000000>;
|
||||
clock-output-names = "periph";
|
||||
};
|
||||
|
||||
hsspi_osc: hsspi-osc {
|
||||
compatible = "fixed-clock";
|
||||
|
||||
#clock-cells = <0>;
|
||||
|
||||
clock-frequency = <400000000>;
|
||||
clock-output-names = "hsspi_osc";
|
||||
};
|
||||
};
|
||||
|
||||
aliases {
|
||||
nflash = &nflash;
|
||||
serial0 = &uart0;
|
||||
serial1 = &uart1;
|
||||
spi0 = &lsspi;
|
||||
spi1 = &hsspi;
|
||||
};
|
||||
|
||||
cpu_intc: interrupt-controller {
|
||||
|
@ -51,23 +69,22 @@
|
|||
compatible = "simple-bus";
|
||||
ranges;
|
||||
|
||||
clkctl: clock-controller@10000004 {
|
||||
periph_clk: clock-controller@10000004 {
|
||||
compatible = "brcm,bcm63268-clocks";
|
||||
reg = <0x10000004 0x4>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
periph_cntl: syscon@10000008 {
|
||||
pll_cntl: syscon@10000008 {
|
||||
compatible = "syscon";
|
||||
reg = <0x10000000 0xc>;
|
||||
reg = <0x10000008 0x4>;
|
||||
native-endian;
|
||||
};
|
||||
|
||||
reboot: syscon-reboot@10000008 {
|
||||
compatible = "syscon-reboot";
|
||||
regmap = <&periph_cntl>;
|
||||
offset = <0x0>;
|
||||
mask = <0x1>;
|
||||
reboot {
|
||||
compatible = "syscon-reboot";
|
||||
offset = <0x0>;
|
||||
mask = <0x1>;
|
||||
};
|
||||
};
|
||||
|
||||
periph_rst: reset-controller@10000010 {
|
||||
|
@ -88,6 +105,16 @@
|
|||
interrupts = <2>, <3>;
|
||||
};
|
||||
|
||||
wdt: watchdog@1000009c {
|
||||
compatible = "brcm,bcm7038-wdt";
|
||||
reg = <0x1000009c 0xc>;
|
||||
|
||||
clocks = <&periph_osc>;
|
||||
clock-names = "refclk";
|
||||
|
||||
timeout-sec = <30>;
|
||||
};
|
||||
|
||||
uart0: serial@10000180 {
|
||||
compatible = "brcm,bcm6345-uart";
|
||||
reg = <0x10000180 0x18>;
|
||||
|
@ -95,12 +122,34 @@
|
|||
interrupt-parent = <&periph_intc>;
|
||||
interrupts = <5>;
|
||||
|
||||
clocks = <&periph_clk>;
|
||||
clocks = <&periph_osc>;
|
||||
clock-names = "refclk";
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
nflash: nand@10000200 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "brcm,nand-bcm6368",
|
||||
"brcm,brcmnand-v4.0",
|
||||
"brcm,brcmnand";
|
||||
reg = <0x10000200 0x180>,
|
||||
<0x10000600 0x200>,
|
||||
<0x100000b0 0x10>;
|
||||
reg-names = "nand",
|
||||
"nand-cache",
|
||||
"nand-int-base";
|
||||
|
||||
interrupt-parent = <&periph_intc>;
|
||||
interrupts = <50>;
|
||||
|
||||
clocks = <&periph_clk BCM63268_CLK_NAND>;
|
||||
clock-names = "nand";
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
uart1: serial@100001a0 {
|
||||
compatible = "brcm,bcm6345-uart";
|
||||
reg = <0x100001a0 0x18>;
|
||||
|
@ -108,12 +157,54 @@
|
|||
interrupt-parent = <&periph_intc>;
|
||||
interrupts = <34>;
|
||||
|
||||
clocks = <&periph_clk>;
|
||||
clocks = <&periph_osc>;
|
||||
clock-names = "refclk";
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
lsspi: spi@10000800 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "brcm,bcm6358-spi";
|
||||
reg = <0x10000800 0x70c>;
|
||||
|
||||
interrupt-parent = <&periph_intc>;
|
||||
interrupts = <80>;
|
||||
|
||||
clocks = <&periph_clk BCM63268_CLK_SPI>;
|
||||
clock-names = "spi";
|
||||
|
||||
resets = <&periph_rst BCM63268_RST_SPI>;
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
hsspi: spi@10001000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "brcm,bcm6328-hsspi";
|
||||
reg = <0x10001000 0x600>;
|
||||
|
||||
interrupt-parent = <&periph_intc>;
|
||||
interrupts = <6>;
|
||||
|
||||
clocks = <&periph_clk BCM63268_CLK_HSSPI>,
|
||||
<&hsspi_osc>;
|
||||
clock-names = "hsspi",
|
||||
"pll";
|
||||
|
||||
resets = <&periph_rst BCM63268_RST_SPI>;
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
periph_pwr: power-controller@1000184c {
|
||||
compatible = "brcm,bcm6328-power-controller";
|
||||
reg = <0x1000184c 0x4>;
|
||||
#power-domain-cells = <1>;
|
||||
};
|
||||
|
||||
leds0: led-controller@10001900 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
@ -123,12 +214,6 @@
|
|||
status = "disabled";
|
||||
};
|
||||
|
||||
periph_pwr: power-controller@1000184c {
|
||||
compatible = "brcm,bcm6328-power-controller";
|
||||
reg = <0x1000184c 0x4>;
|
||||
#power-domain-cells = <1>;
|
||||
};
|
||||
|
||||
ehci: usb@10002500 {
|
||||
compatible = "brcm,bcm63268-ehci", "generic-ehci";
|
||||
reg = <0x10002500 0x100>;
|
||||
|
@ -137,6 +222,9 @@
|
|||
interrupt-parent = <&periph_intc>;
|
||||
interrupts = <10>;
|
||||
|
||||
phys = <&usbh 0>;
|
||||
phy-names = "usb";
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -149,6 +237,25 @@
|
|||
interrupt-parent = <&periph_intc>;
|
||||
interrupts = <9>;
|
||||
|
||||
phys = <&usbh 0>;
|
||||
phy-names = "usb";
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
usbh: usb-phy@10002700 {
|
||||
compatible = "brcm,bcm63268-usbh-phy";
|
||||
reg = <0x10002700 0x38>;
|
||||
#phy-cells = <1>;
|
||||
|
||||
clocks = <&periph_clk BCM63268_CLK_USBH>;
|
||||
clock-names = "usbh";
|
||||
|
||||
power-domains = <&periph_pwr BCM63268_POWER_DOMAIN_USBH>;
|
||||
|
||||
resets = <&periph_rst BCM63268_RST_USBH>;
|
||||
reset-names = "usbh";
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
#include "dt-bindings/clock/bcm6328-clock.h"
|
||||
#include "dt-bindings/reset/bcm6328-reset.h"
|
||||
#include "dt-bindings/soc/bcm6328-pm.h"
|
||||
|
||||
/ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
@ -24,16 +29,26 @@
|
|||
};
|
||||
|
||||
clocks {
|
||||
periph_clk: periph-clk {
|
||||
periph_osc: periph-osc {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <50000000>;
|
||||
clock-output-names = "periph";
|
||||
};
|
||||
|
||||
hsspi_osc: hsspi-osc {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <133333333>;
|
||||
clock-output-names = "hsspi_osc";
|
||||
};
|
||||
};
|
||||
|
||||
aliases {
|
||||
nflash = &nflash;
|
||||
serial0 = &uart0;
|
||||
serial1 = &uart1;
|
||||
spi1 = &hsspi;
|
||||
};
|
||||
|
||||
cpu_intc: interrupt-controller {
|
||||
|
@ -51,7 +66,7 @@
|
|||
compatible = "simple-bus";
|
||||
ranges;
|
||||
|
||||
clkctl: clock-controller@10000004 {
|
||||
periph_clk: clock-controller@10000004 {
|
||||
compatible = "brcm,bcm6328-clocks";
|
||||
reg = <0x10000004 0x4>;
|
||||
#clock-cells = <1>;
|
||||
|
@ -75,37 +90,71 @@
|
|||
interrupts = <2>, <3>;
|
||||
};
|
||||
|
||||
wdt: watchdog@1000005c {
|
||||
compatible = "brcm,bcm7038-wdt";
|
||||
reg = <0x1000005c 0xc>;
|
||||
|
||||
clocks = <&periph_osc>;
|
||||
clock-names = "refclk";
|
||||
|
||||
timeout-sec = <30>;
|
||||
};
|
||||
|
||||
soft_reset: syscon@10000068 {
|
||||
compatible = "syscon";
|
||||
reg = <0x10000068 0x4>;
|
||||
native-endian;
|
||||
|
||||
reboot {
|
||||
compatible = "syscon-reboot";
|
||||
offset = <0x0>;
|
||||
mask = <0x1>;
|
||||
};
|
||||
};
|
||||
|
||||
uart0: serial@10000100 {
|
||||
compatible = "brcm,bcm6345-uart";
|
||||
reg = <0x10000100 0x18>;
|
||||
|
||||
interrupt-parent = <&periph_intc>;
|
||||
interrupts = <28>;
|
||||
clocks = <&periph_clk>;
|
||||
|
||||
clocks = <&periph_osc>;
|
||||
clock-names = "refclk";
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
uart1: serial@10000120 {
|
||||
compatible = "brcm,bcm6345-uart";
|
||||
reg = <0x10000120 0x18>;
|
||||
|
||||
interrupt-parent = <&periph_intc>;
|
||||
interrupts = <39>;
|
||||
clocks = <&periph_clk>;
|
||||
|
||||
clocks = <&periph_osc>;
|
||||
clock-names = "refclk";
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
timer: syscon@10000040 {
|
||||
compatible = "syscon";
|
||||
reg = <0x10000040 0x2c>;
|
||||
native-endian;
|
||||
};
|
||||
nflash: nand@10000200 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "brcm,nand-bcm6368",
|
||||
"brcm,brcmnand-v2.2",
|
||||
"brcm,brcmnand";
|
||||
reg = <0x10000200 0x180>,
|
||||
<0x10000400 0x200>,
|
||||
<0x10000070 0x10>;
|
||||
reg-names = "nand",
|
||||
"nand-cache",
|
||||
"nand-int-base";
|
||||
|
||||
reboot: syscon-reboot@10000068 {
|
||||
compatible = "syscon-reboot";
|
||||
regmap = <&timer>;
|
||||
offset = <0x28>;
|
||||
mask = <0x1>;
|
||||
interrupt-parent = <&periph_intc>;
|
||||
interrupts = <0>;
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
leds0: led-controller@10000800 {
|
||||
|
@ -113,6 +162,27 @@
|
|||
#size-cells = <0>;
|
||||
compatible = "brcm,bcm6328-leds";
|
||||
reg = <0x10000800 0x24>;
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
hsspi: spi@10001000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "brcm,bcm6328-hsspi";
|
||||
reg = <0x10001000 0x600>;
|
||||
|
||||
interrupt-parent = <&periph_intc>;
|
||||
interrupts = <29>;
|
||||
|
||||
clocks = <&periph_clk BCM6328_CLK_HSSPI>,
|
||||
<&hsspi_osc>;
|
||||
clock-names = "hsspi",
|
||||
"pll";
|
||||
|
||||
resets = <&periph_rst BCM6328_RST_SPI>;
|
||||
reset-names = "hsspi";
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -126,8 +196,13 @@
|
|||
compatible = "brcm,bcm6328-ehci", "generic-ehci";
|
||||
reg = <0x10002500 0x100>;
|
||||
big-endian;
|
||||
|
||||
interrupt-parent = <&periph_intc>;
|
||||
interrupts = <42>;
|
||||
|
||||
phys = <&usbh 0>;
|
||||
phy-names = "usb";
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -136,8 +211,29 @@
|
|||
reg = <0x10002600 0x100>;
|
||||
big-endian;
|
||||
no-big-frame-no;
|
||||
|
||||
interrupt-parent = <&periph_intc>;
|
||||
interrupts = <41>;
|
||||
|
||||
phys = <&usbh 0>;
|
||||
phy-names = "usb";
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
usbh: usb-phy@10002700 {
|
||||
compatible = "brcm,bcm6328-usbh-phy";
|
||||
reg = <0x10002700 0x38>;
|
||||
#phy-cells = <1>;
|
||||
|
||||
clocks = <&periph_clk BCM6328_CLK_USBH>;
|
||||
clock-names = "usbh";
|
||||
|
||||
power-domains = <&periph_pwr BCM6328_POWER_DOMAIN_USBH>;
|
||||
|
||||
resets = <&periph_rst BCM6328_RST_USBH>;
|
||||
reset-names = "usbh";
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "bcm6358.dtsi"
|
||||
#include "bcm6358.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "sfr,nb4-ser", "brcm,bcm6358";
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
#include "dt-bindings/clock/bcm6358-clock.h"
|
||||
#include "dt-bindings/reset/bcm6358-reset.h"
|
||||
|
||||
/ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
@ -24,16 +28,19 @@
|
|||
};
|
||||
|
||||
clocks {
|
||||
periph_clk: periph-clk {
|
||||
periph_osc: periph-osc {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <50000000>;
|
||||
clock-output-names = "periph";
|
||||
};
|
||||
};
|
||||
|
||||
aliases {
|
||||
pflash = &pflash;
|
||||
serial0 = &uart0;
|
||||
serial1 = &uart1;
|
||||
spi0 = &lsspi;
|
||||
};
|
||||
|
||||
cpu_intc: interrupt-controller {
|
||||
|
@ -51,23 +58,22 @@
|
|||
compatible = "simple-bus";
|
||||
ranges;
|
||||
|
||||
clkctl: clock-controller@fffe0004 {
|
||||
periph_clk: clock-controller@fffe0004 {
|
||||
compatible = "brcm,bcm6358-clocks";
|
||||
reg = <0xfffe0004 0x4>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
periph_cntl: syscon@fffe0008 {
|
||||
pll_cntl: syscon@fffe0008 {
|
||||
compatible = "syscon";
|
||||
reg = <0xfffe0000 0x4>;
|
||||
reg = <0xfffe0008 0x4>;
|
||||
native-endian;
|
||||
};
|
||||
|
||||
reboot: syscon-reboot@fffe0008 {
|
||||
compatible = "syscon-reboot";
|
||||
regmap = <&periph_cntl>;
|
||||
offset = <0x0>;
|
||||
mask = <0x1>;
|
||||
reboot {
|
||||
compatible = "syscon-reboot";
|
||||
offset = <0x0>;
|
||||
mask = <0x1>;
|
||||
};
|
||||
};
|
||||
|
||||
periph_intc: interrupt-controller@fffe000c {
|
||||
|
@ -88,6 +94,16 @@
|
|||
#reset-cells = <1>;
|
||||
};
|
||||
|
||||
wdt: watchdog@fffe005c {
|
||||
compatible = "brcm,bcm7038-wdt";
|
||||
reg = <0xfffe005c 0xc>;
|
||||
|
||||
clocks = <&periph_osc>;
|
||||
clock-names = "refclk";
|
||||
|
||||
timeout-sec = <30>;
|
||||
};
|
||||
|
||||
leds0: led-controller@fffe00d0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
@ -104,7 +120,7 @@
|
|||
interrupt-parent = <&periph_intc>;
|
||||
interrupts = <2>;
|
||||
|
||||
clocks = <&periph_clk>;
|
||||
clocks = <&periph_osc>;
|
||||
clock-names = "refclk";
|
||||
|
||||
status = "disabled";
|
||||
|
@ -117,18 +133,41 @@
|
|||
interrupt-parent = <&periph_intc>;
|
||||
interrupts = <3>;
|
||||
|
||||
clocks = <&periph_clk>;
|
||||
clocks = <&periph_osc>;
|
||||
clock-names = "refclk";
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
lsspi: spi@fffe0800 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "brcm,bcm6358-spi";
|
||||
reg = <0xfffe0800 0x70c>;
|
||||
|
||||
interrupt-parent = <&periph_intc>;
|
||||
interrupts = <1>;
|
||||
|
||||
clocks = <&periph_clk BCM6358_CLK_SPI>;
|
||||
clock-names = "spi";
|
||||
|
||||
resets = <&periph_rst BCM6358_RST_SPI>;
|
||||
reset-names = "spi";
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
ehci: usb@fffe1300 {
|
||||
compatible = "brcm,bcm6358-ehci", "generic-ehci";
|
||||
reg = <0xfffe1300 0x100>;
|
||||
big-endian;
|
||||
|
||||
interrupt-parent = <&periph_intc>;
|
||||
interrupts = <10>;
|
||||
|
||||
phys = <&usbh 0>;
|
||||
phy-names = "usb";
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -137,9 +176,35 @@
|
|||
reg = <0xfffe1400 0x100>;
|
||||
big-endian;
|
||||
no-big-frame-no;
|
||||
|
||||
interrupt-parent = <&periph_intc>;
|
||||
interrupts = <5>;
|
||||
|
||||
phys = <&usbh 0>;
|
||||
phy-names = "usb";
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
usbh: usb-phy@fffe1500 {
|
||||
compatible = "brcm,bcm6358-usbh-phy";
|
||||
reg = <0xfffe1500 0x38>;
|
||||
#phy-cells = <1>;
|
||||
|
||||
resets = <&periph_rst BCM6358_RST_USBH>;
|
||||
reset-names = "usbh";
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
pflash: nor@1e000000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "cfi-flash";
|
||||
reg = <0x1e000000 0x2000000>;
|
||||
bank-width = <2>;
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "bcm6362.dtsi"
|
||||
#include "bcm6362.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "sfr,nb6-ser", "brcm,bcm6362";
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
#include "dt-bindings/clock/bcm6362-clock.h"
|
||||
#include "dt-bindings/reset/bcm6362-reset.h"
|
||||
#include "dt-bindings/soc/bcm6362-pm.h"
|
||||
|
||||
/ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
@ -24,16 +29,29 @@
|
|||
};
|
||||
|
||||
clocks {
|
||||
periph_clk: periph-clk {
|
||||
periph_osc: periph-osc {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <50000000>;
|
||||
clock-output-names = "periph";
|
||||
};
|
||||
|
||||
hsspi_osc: hsspi-osc {
|
||||
compatible = "fixed-clock";
|
||||
|
||||
#clock-cells = <0>;
|
||||
|
||||
clock-frequency = <400000000>;
|
||||
clock-output-names = "hsspi_osc";
|
||||
};
|
||||
};
|
||||
|
||||
aliases {
|
||||
nflash = &nflash;
|
||||
serial0 = &uart0;
|
||||
serial1 = &uart1;
|
||||
spi0 = &lsspi;
|
||||
spi1 = &hsspi;
|
||||
};
|
||||
|
||||
cpu_intc: interrupt-controller {
|
||||
|
@ -51,23 +69,22 @@
|
|||
compatible = "simple-bus";
|
||||
ranges;
|
||||
|
||||
clkctl: clock-controller@10000004 {
|
||||
periph_clk: clock-controller@10000004 {
|
||||
compatible = "brcm,bcm6362-clocks";
|
||||
reg = <0x10000004 0x4>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
periph_cntl: syscon@10000008 {
|
||||
pll_cntl: syscon@10000008 {
|
||||
compatible = "syscon";
|
||||
reg = <0x10000000 0xc>;
|
||||
reg = <0x10000008 0x4>;
|
||||
native-endian;
|
||||
};
|
||||
|
||||
reboot: syscon-reboot@10000008 {
|
||||
compatible = "syscon-reboot";
|
||||
regmap = <&periph_cntl>;
|
||||
offset = <0x0>;
|
||||
mask = <0x1>;
|
||||
reboot {
|
||||
compatible = "syscon-reboot";
|
||||
offset = <0x0>;
|
||||
mask = <0x1>;
|
||||
};
|
||||
};
|
||||
|
||||
periph_rst: reset-controller@10000010 {
|
||||
|
@ -88,6 +105,16 @@
|
|||
interrupts = <2>, <3>;
|
||||
};
|
||||
|
||||
wdt: watchdog@1000005c {
|
||||
compatible = "brcm,bcm7038-wdt";
|
||||
reg = <0x1000005c 0xc>;
|
||||
|
||||
clocks = <&periph_osc>;
|
||||
clock-names = "refclk";
|
||||
|
||||
timeout-sec = <30>;
|
||||
};
|
||||
|
||||
uart0: serial@10000100 {
|
||||
compatible = "brcm,bcm6345-uart";
|
||||
reg = <0x10000100 0x18>;
|
||||
|
@ -95,7 +122,7 @@
|
|||
interrupt-parent = <&periph_intc>;
|
||||
interrupts = <3>;
|
||||
|
||||
clocks = <&periph_clk>;
|
||||
clocks = <&periph_osc>;
|
||||
clock-names = "refclk";
|
||||
|
||||
status = "disabled";
|
||||
|
@ -108,12 +135,72 @@
|
|||
interrupt-parent = <&periph_intc>;
|
||||
interrupts = <4>;
|
||||
|
||||
clocks = <&periph_clk>;
|
||||
clocks = <&periph_osc>;
|
||||
clock-names = "refclk";
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
nflash: nand@10000200 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "brcm,nand-bcm6368",
|
||||
"brcm,brcmnand-v2.2",
|
||||
"brcm,brcmnand";
|
||||
reg = <0x10000200 0x180>,
|
||||
<0x10000600 0x200>,
|
||||
<0x10000070 0x10>;
|
||||
reg-names = "nand",
|
||||
"nand-cache",
|
||||
"nand-int-base";
|
||||
|
||||
interrupt-parent = <&periph_intc>;
|
||||
interrupts = <12>;
|
||||
|
||||
clocks = <&periph_clk BCM6362_CLK_NAND>;
|
||||
clock-names = "nand";
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
lsspi: spi@10000800 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "brcm,bcm6358-spi";
|
||||
reg = <0x10000800 0x70c>;
|
||||
|
||||
interrupt-parent = <&periph_intc>;
|
||||
interrupts = <2>;
|
||||
|
||||
clocks = <&periph_clk BCM6362_CLK_SPI>;
|
||||
clock-names = "spi";
|
||||
|
||||
resets = <&periph_rst BCM6362_RST_SPI>;
|
||||
reset-names = "spi";
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
hsspi: spi@10001000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "brcm,bcm6328-hsspi";
|
||||
reg = <0x10001000 0x600>;
|
||||
|
||||
interrupt-parent = <&periph_intc>;
|
||||
interrupts = <5>;
|
||||
|
||||
clocks = <&periph_clk BCM6362_CLK_HSSPI>,
|
||||
<&hsspi_osc>;
|
||||
clock-names = "hsspi",
|
||||
"pll";
|
||||
|
||||
resets = <&periph_rst BCM6362_RST_SPI>;
|
||||
reset-names = "hsspi";
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
periph_pwr: power-controller@10001848 {
|
||||
compatible = "brcm,bcm6362-power-controller";
|
||||
reg = <0x10001848 0x4>;
|
||||
|
@ -137,6 +224,9 @@
|
|||
interrupt-parent = <&periph_intc>;
|
||||
interrupts = <10>;
|
||||
|
||||
phys = <&usbh 0>;
|
||||
phy-names = "usb";
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -149,6 +239,26 @@
|
|||
interrupt-parent = <&periph_intc>;
|
||||
interrupts = <9>;
|
||||
|
||||
phys = <&usbh 0>;
|
||||
phy-names = "usb";
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
usbh: usb-phy@10002700 {
|
||||
compatible = "brcm,bcm6362-usbh-phy";
|
||||
reg = <0x10002700 0x38>;
|
||||
|
||||
#phy-cells = <1>;
|
||||
|
||||
clocks = <&periph_clk BCM6362_CLK_USBH>;
|
||||
clock-names = "usbh";
|
||||
|
||||
power-domains = <&periph_pwr BCM6362_POWER_DOMAIN_USBH>;
|
||||
|
||||
resets = <&periph_rst BCM6362_RST_USBH>;
|
||||
reset-names = "usbh";
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
#include "dt-bindings/clock/bcm6368-clock.h"
|
||||
#include "dt-bindings/reset/bcm6368-reset.h"
|
||||
|
||||
/ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
@ -24,16 +28,20 @@
|
|||
};
|
||||
|
||||
clocks {
|
||||
periph_clk: periph-clk {
|
||||
periph_osc: periph-osc {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <50000000>;
|
||||
clock-output-names = "periph";
|
||||
};
|
||||
};
|
||||
|
||||
aliases {
|
||||
nflash = &nflash;
|
||||
pflash = &pflash;
|
||||
serial0 = &uart0;
|
||||
serial1 = &uart1;
|
||||
spi0 = &lsspi;
|
||||
};
|
||||
|
||||
cpu_intc: interrupt-controller {
|
||||
|
@ -51,23 +59,22 @@
|
|||
compatible = "simple-bus";
|
||||
ranges;
|
||||
|
||||
clkctl: clock-controller@10000004 {
|
||||
periph_clk: clock-controller@10000004 {
|
||||
compatible = "brcm,bcm6368-clocks";
|
||||
reg = <0x10000004 0x4>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
periph_cntl: syscon@100000008 {
|
||||
pll_cntl: syscon@100000008 {
|
||||
compatible = "syscon";
|
||||
reg = <0x10000000 0xc>;
|
||||
reg = <0x10000008 0x4>;
|
||||
native-endian;
|
||||
};
|
||||
|
||||
reboot: syscon-reboot@10000008 {
|
||||
compatible = "syscon-reboot";
|
||||
regmap = <&periph_cntl>;
|
||||
offset = <0x0>;
|
||||
mask = <0x1>;
|
||||
reboot {
|
||||
compatible = "syscon-reboot";
|
||||
offset = <0x0>;
|
||||
mask = <0x1>;
|
||||
};
|
||||
};
|
||||
|
||||
periph_rst: reset-controller@10000010 {
|
||||
|
@ -88,31 +95,88 @@
|
|||
interrupts = <2>, <3>;
|
||||
};
|
||||
|
||||
wdt: watchdog@1000005c {
|
||||
compatible = "brcm,bcm7038-wdt";
|
||||
reg = <0x1000005c 0xc>;
|
||||
|
||||
clocks = <&periph_osc>;
|
||||
clock-names = "refclk";
|
||||
|
||||
timeout-sec = <30>;
|
||||
};
|
||||
|
||||
leds0: led-controller@100000d0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "brcm,bcm6358-leds";
|
||||
reg = <0x100000d0 0x8>;
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
uart0: serial@10000100 {
|
||||
compatible = "brcm,bcm6345-uart";
|
||||
reg = <0x10000100 0x18>;
|
||||
|
||||
interrupt-parent = <&periph_intc>;
|
||||
interrupts = <2>;
|
||||
clocks = <&periph_clk>;
|
||||
|
||||
clocks = <&periph_osc>;
|
||||
clock-names = "refclk";
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
uart1: serial@10000120 {
|
||||
compatible = "brcm,bcm6345-uart";
|
||||
reg = <0x10000120 0x18>;
|
||||
|
||||
interrupt-parent = <&periph_intc>;
|
||||
interrupts = <3>;
|
||||
clocks = <&periph_clk>;
|
||||
|
||||
clocks = <&periph_osc>;
|
||||
clock-names = "refclk";
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
nflash: nand@10000200 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "brcm,nand-bcm6368",
|
||||
"brcm,brcmnand-v2.1",
|
||||
"brcm,brcmnand";
|
||||
reg = <0x10000200 0x180>,
|
||||
<0x10000600 0x200>,
|
||||
<0x10000070 0x10>;
|
||||
reg-names = "nand",
|
||||
"nand-cache",
|
||||
"nand-int-base";
|
||||
|
||||
interrupt-parent = <&periph_intc>;
|
||||
interrupts = <10>;
|
||||
|
||||
clocks = <&periph_clk BCM6368_CLK_NAND>;
|
||||
clock-names = "nand";
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
lsspi: spi@10000800 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "brcm,bcm6358-spi";
|
||||
reg = <0x10000800 0x70c>;
|
||||
|
||||
interrupt-parent = <&periph_intc>;
|
||||
interrupts = <1>;
|
||||
|
||||
clocks = <&periph_clk BCM6368_CLK_SPI>;
|
||||
clock-names = "spi";
|
||||
|
||||
resets = <&periph_rst BCM6368_RST_SPI>;
|
||||
reset-names = "spi";
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -120,8 +184,13 @@
|
|||
compatible = "brcm,bcm6368-ehci", "generic-ehci";
|
||||
reg = <0x10001500 0x100>;
|
||||
big-endian;
|
||||
|
||||
interrupt-parent = <&periph_intc>;
|
||||
interrupts = <7>;
|
||||
|
||||
phys = <&usbh 0>;
|
||||
phy-names = "usb";
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -130,9 +199,49 @@
|
|||
reg = <0x10001600 0x100>;
|
||||
big-endian;
|
||||
no-big-frame-no;
|
||||
|
||||
interrupt-parent = <&periph_intc>;
|
||||
interrupts = <5>;
|
||||
|
||||
phys = <&usbh 0>;
|
||||
phy-names = "usb";
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
usbh: usb-phy@10001700 {
|
||||
compatible = "brcm,bcm6368-usbh-phy";
|
||||
reg = <0x10001700 0x38>;
|
||||
#phy-cells = <1>;
|
||||
|
||||
clocks = <&periph_clk BCM6368_CLK_USBH>;
|
||||
clock-names = "usbh";
|
||||
|
||||
resets = <&periph_rst BCM6368_RST_USBH>;
|
||||
reset-names = "usbh";
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
random: rng@10004180 {
|
||||
compatible = "brcm,bcm6368-rng";
|
||||
reg = <0x10004180 0x14>;
|
||||
|
||||
clocks = <&periph_clk BCM6368_CLK_IPSEC>;
|
||||
clock-names = "ipsec";
|
||||
|
||||
resets = <&periph_rst BCM6368_RST_IPSEC>;
|
||||
reset-names = "ipsec";
|
||||
};
|
||||
};
|
||||
|
||||
pflash: nor@18000000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "cfi-flash";
|
||||
reg = <0x18000000 0x2000000>;
|
||||
bank-width = <2>;
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "bcm3384_zephyr.dtsi"
|
||||
#include "bcm3384_zephyr.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "brcm,bcm93384wvg", "brcm,bcm3384";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "bcm3384_viper.dtsi"
|
||||
#include "bcm3384_viper.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "brcm,bcm93384wvg-viper", "brcm,bcm3384-viper";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "bcm6368.dtsi"
|
||||
#include "bcm6368.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "brcm,bcm96368mvwg", "brcm,bcm6368";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "bcm7125.dtsi"
|
||||
#include "bcm7125.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "brcm,bcm97125cbmb", "brcm,bcm7125";
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "bcm7346.dtsi"
|
||||
/include/ "bcm97xxx-nand-cs1-bch24.dtsi"
|
||||
#include "bcm7346.dtsi"
|
||||
#include "bcm97xxx-nand-cs1-bch24.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "brcm,bcm97346dbsmb", "brcm,bcm7346";
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "bcm7358.dtsi"
|
||||
/include/ "bcm97xxx-nand-cs1-bch4.dtsi"
|
||||
#include "bcm7358.dtsi"
|
||||
#include "bcm97xxx-nand-cs1-bch4.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "brcm,bcm97358svmb", "brcm,bcm7358";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "bcm7360.dtsi"
|
||||
#include "bcm7360.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "brcm,bcm97360svmb", "brcm,bcm7360";
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "bcm7362.dtsi"
|
||||
/include/ "bcm97xxx-nand-cs1-bch4.dtsi"
|
||||
#include "bcm7362.dtsi"
|
||||
#include "bcm97xxx-nand-cs1-bch4.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "brcm,bcm97362svmb", "brcm,bcm7362";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "bcm7420.dtsi"
|
||||
#include "bcm7420.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "brcm,bcm97420c", "brcm,bcm7420";
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "bcm7425.dtsi"
|
||||
/include/ "bcm97xxx-nand-cs1-bch24.dtsi"
|
||||
#include "bcm7425.dtsi"
|
||||
#include "bcm97xxx-nand-cs1-bch24.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "brcm,bcm97425svmb", "brcm,bcm7425";
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "bcm7435.dtsi"
|
||||
/include/ "bcm97xxx-nand-cs1-bch24.dtsi"
|
||||
#include "bcm7435.dtsi"
|
||||
#include "bcm97xxx-nand-cs1-bch24.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "brcm,bcm97435svmb", "brcm,bcm7435";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "bcm6328.dtsi"
|
||||
#include "bcm6328.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "brcm,bcm9ejtagprb", "brcm,bcm6328";
|
||||
|
|
|
@ -345,7 +345,6 @@
|
|||
|
||||
spi-max-frequency = <3125000>;
|
||||
spi-3wire;
|
||||
spi-cs-high;
|
||||
|
||||
reset-gpios = <&gpe 2 GPIO_ACTIVE_LOW>;
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
# SPDX_License_Identifier: GPL_2.0
|
||||
dtb-$(CONFIG_MACH_LOONGSON64) += loongson64_2core_2k1000.dtb
|
||||
dtb-$(CONFIG_MACH_LOONGSON64) += loongson64c_4core_ls7a.dtb
|
||||
dtb-$(CONFIG_MACH_LOONGSON64) += loongson64c_4core_rs780e.dtb
|
||||
dtb-$(CONFIG_MACH_LOONGSON64) += loongson64c_8core_rs780e.dtb
|
||||
|
|
|
@ -0,0 +1,243 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
/ {
|
||||
compatible = "loongson,loongson2k1000";
|
||||
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
|
||||
cpus {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
cpu0: cpu@0 {
|
||||
device_type = "cpu";
|
||||
compatible = "loongson,gs264";
|
||||
reg = <0x0>;
|
||||
#clock-cells = <1>;
|
||||
clocks = <&cpu_clk>;
|
||||
};
|
||||
};
|
||||
|
||||
memory {
|
||||
compatible = "memory";
|
||||
device_type = "memory";
|
||||
reg = <0x00000000 0x00200000 0x00000000 0x0ee00000>, /* 238 MB at 2 MB */
|
||||
<0x00000000 0x20000000 0x00000000 0x1f000000>, /* 496 MB at 512 MB */
|
||||
<0x00000001 0x10000000 0x00000001 0xb0000000>; /* 6912 MB at 4352MB */
|
||||
};
|
||||
|
||||
cpu_clk: cpu_clk {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <800000000>;
|
||||
};
|
||||
|
||||
cpuintc: interrupt-controller {
|
||||
#address-cells = <0>;
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-controller;
|
||||
compatible = "mti,cpu-interrupt-controller";
|
||||
};
|
||||
|
||||
package0: bus@10000000 {
|
||||
compatible = "simple-bus";
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
ranges = <0 0x10000000 0 0x10000000 0 0x10000000 /* ioports */
|
||||
0 0x40000000 0 0x40000000 0 0x40000000
|
||||
0xfe 0x00000000 0xfe 0x00000000 0 0x40000000>;
|
||||
|
||||
liointc0: interrupt-controller@1fe11400 {
|
||||
compatible = "loongson,liointc-2.0";
|
||||
reg = <0 0x1fe11400 0 0x40>,
|
||||
<0 0x1fe11040 0 0x8>,
|
||||
<0 0x1fe11140 0 0x8>;
|
||||
reg-names = "main", "isr0", "isr1";
|
||||
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
|
||||
interrupt-parent = <&cpuintc>;
|
||||
interrupts = <2>;
|
||||
interrupt-names = "int0";
|
||||
|
||||
loongson,parent_int_map = <0xffffffff>, /* int0 */
|
||||
<0x00000000>, /* int1 */
|
||||
<0x00000000>, /* int2 */
|
||||
<0x00000000>; /* int3 */
|
||||
};
|
||||
|
||||
liointc1: interrupt-controller@1fe11440 {
|
||||
compatible = "loongson,liointc-2.0";
|
||||
reg = <0 0x1fe11440 0 0x40>,
|
||||
<0 0x1fe11048 0 0x8>,
|
||||
<0 0x1fe11148 0 0x8>;
|
||||
reg-names = "main", "isr0", "isr1";
|
||||
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
|
||||
interrupt-parent = <&cpuintc>;
|
||||
interrupts = <3>;
|
||||
interrupt-names = "int1";
|
||||
|
||||
loongson,parent_int_map = <0x00000000>, /* int0 */
|
||||
<0xffffffff>, /* int1 */
|
||||
<0x00000000>, /* int2 */
|
||||
<0x00000000>; /* int3 */
|
||||
};
|
||||
|
||||
uart0: serial@1fe00000 {
|
||||
compatible = "ns16550a";
|
||||
reg = <0 0x1fe00000 0 0x8>;
|
||||
clock-frequency = <125000000>;
|
||||
interrupt-parent = <&liointc0>;
|
||||
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
|
||||
no-loopback-test;
|
||||
};
|
||||
|
||||
pci@1a000000 {
|
||||
compatible = "loongson,ls2k-pci";
|
||||
device_type = "pci";
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
#interrupt-cells = <2>;
|
||||
|
||||
reg = <0 0x1a000000 0 0x02000000>,
|
||||
<0xfe 0x00000000 0 0x20000000>;
|
||||
|
||||
ranges = <0x01000000 0x0 0x00000000 0x0 0x18000000 0x0 0x00010000>,
|
||||
<0x02000000 0x0 0x40000000 0x0 0x40000000 0x0 0x40000000>;
|
||||
|
||||
ehci@4,1 {
|
||||
compatible = "pci0014,7a14.0",
|
||||
"pci0014,7a14",
|
||||
"pciclass0c0320",
|
||||
"pciclass0c03";
|
||||
|
||||
reg = <0x2100 0x0 0x0 0x0 0x0>;
|
||||
interrupts = <18 IRQ_TYPE_LEVEL_LOW>;
|
||||
interrupt-parent = <&liointc1>;
|
||||
};
|
||||
|
||||
ohci@4,2 {
|
||||
compatible = "pci0014,7a24.0",
|
||||
"pci0014,7a24",
|
||||
"pciclass0c0310",
|
||||
"pciclass0c03";
|
||||
|
||||
reg = <0x2200 0x0 0x0 0x0 0x0>;
|
||||
interrupts = <19 IRQ_TYPE_LEVEL_LOW>;
|
||||
interrupt-parent = <&liointc1>;
|
||||
};
|
||||
|
||||
sata@8,0 {
|
||||
compatible = "pci0014,7a08.0",
|
||||
"pci0014,7a08",
|
||||
"pciclass010601",
|
||||
"pciclass0106";
|
||||
|
||||
reg = <0x4000 0x0 0x0 0x0 0x0>;
|
||||
interrupts = <19 IRQ_TYPE_LEVEL_LOW>;
|
||||
interrupt-parent = <&liointc0>;
|
||||
};
|
||||
|
||||
pci_bridge@9,0 {
|
||||
compatible = "pci0014,7a19.0",
|
||||
"pci0014,7a19",
|
||||
"pciclass060400",
|
||||
"pciclass0604";
|
||||
|
||||
reg = <0x4800 0x0 0x0 0x0 0x0>;
|
||||
#interrupt-cells = <1>;
|
||||
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
|
||||
interrupt-parent = <&liointc1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &liointc1 0 IRQ_TYPE_LEVEL_LOW>;
|
||||
external-facing;
|
||||
};
|
||||
|
||||
pci_bridge@a,0 {
|
||||
compatible = "pci0014,7a19.0",
|
||||
"pci0014,7a19",
|
||||
"pciclass060400",
|
||||
"pciclass0604";
|
||||
|
||||
reg = <0x5000 0x0 0x0 0x0 0x0>;
|
||||
#interrupt-cells = <1>;
|
||||
interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
|
||||
interrupt-parent = <&liointc1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &liointc1 1 IRQ_TYPE_LEVEL_LOW>;
|
||||
external-facing;
|
||||
};
|
||||
|
||||
pci_bridge@b,0 {
|
||||
compatible = "pci0014,7a19.0",
|
||||
"pci0014,7a19",
|
||||
"pciclass060400",
|
||||
"pciclass0604";
|
||||
|
||||
reg = <0x5800 0x0 0x0 0x0 0x0>;
|
||||
#interrupt-cells = <1>;
|
||||
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
|
||||
interrupt-parent = <&liointc1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &liointc1 2 IRQ_TYPE_LEVEL_LOW>;
|
||||
external-facing;
|
||||
};
|
||||
|
||||
pci_bridge@c,0 {
|
||||
compatible = "pci0014,7a19.0",
|
||||
"pci0014,7a19",
|
||||
"pciclass060400",
|
||||
"pciclass0604";
|
||||
|
||||
reg = <0x6000 0x0 0x0 0x0 0x0>;
|
||||
#interrupt-cells = <1>;
|
||||
interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
|
||||
interrupt-parent = <&liointc1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &liointc1 3 IRQ_TYPE_LEVEL_LOW>;
|
||||
external-facing;
|
||||
};
|
||||
|
||||
pci_bridge@d,0 {
|
||||
compatible = "pci0014,7a19.0",
|
||||
"pci0014,7a19",
|
||||
"pciclass060400",
|
||||
"pciclass0604";
|
||||
|
||||
reg = <0x6800 0x0 0x0 0x0 0x0>;
|
||||
#interrupt-cells = <1>;
|
||||
interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
|
||||
interrupt-parent = <&liointc1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &liointc1 4 IRQ_TYPE_LEVEL_LOW>;
|
||||
external-facing;
|
||||
};
|
||||
|
||||
pci_bridge@e,0 {
|
||||
compatible = "pci0014,7a19.0",
|
||||
"pci0014,7a19",
|
||||
"pciclass060400",
|
||||
"pciclass0604";
|
||||
|
||||
reg = <0x7000 0x0 0x0 0x0 0x0>;
|
||||
#interrupt-cells = <1>;
|
||||
interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
|
||||
interrupt-parent = <&liointc1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &liointc1 5 IRQ_TYPE_LEVEL_LOW>;
|
||||
external-facing;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include "loongson64-2k1000.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "loongson,loongson64-2core-2k1000";
|
||||
};
|
||||
|
|
@ -62,7 +62,7 @@ static int reset_statistics(void *data, u64 value)
|
|||
return 0;
|
||||
}
|
||||
|
||||
DEFINE_SIMPLE_ATTRIBUTE(reset_statistics_ops, NULL, reset_statistics, "%llu\n");
|
||||
DEFINE_DEBUGFS_ATTRIBUTE(reset_statistics_ops, NULL, reset_statistics, "%llu\n");
|
||||
|
||||
static void init_debugfs(void)
|
||||
{
|
||||
|
|
|
@ -150,8 +150,12 @@ LEAF(memcpy) /* a0=dst a1=src a2=len */
|
|||
EXPORT_SYMBOL(memcpy)
|
||||
move v0, dst /* return value */
|
||||
__memcpy:
|
||||
FEXPORT(__copy_user)
|
||||
EXPORT_SYMBOL(__copy_user)
|
||||
FEXPORT(__raw_copy_from_user)
|
||||
EXPORT_SYMBOL(__raw_copy_from_user)
|
||||
FEXPORT(__raw_copy_to_user)
|
||||
EXPORT_SYMBOL(__raw_copy_to_user)
|
||||
FEXPORT(__raw_copy_in_user)
|
||||
EXPORT_SYMBOL(__raw_copy_in_user)
|
||||
/*
|
||||
* Note: dst & src may be unaligned, len may be 0
|
||||
* Temps
|
||||
|
|
|
@ -105,10 +105,6 @@ CONFIG_BLK_DEV_CRYPTOLOOP=m
|
|||
CONFIG_BLK_DEV_NBD=m
|
||||
CONFIG_EEPROM_LEGACY=y
|
||||
CONFIG_EEPROM_MAX6875=y
|
||||
CONFIG_IDE=y
|
||||
CONFIG_BLK_DEV_IDECD=y
|
||||
CONFIG_BLK_DEV_IDETAPE=y
|
||||
CONFIG_BLK_DEV_TC86C001=m
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_CHR_DEV_ST=y
|
||||
CONFIG_BLK_DEV_SR=y
|
||||
|
|
|
@ -0,0 +1,353 @@
|
|||
# CONFIG_LOCALVERSION_AUTO is not set
|
||||
CONFIG_KERNEL_LZMA=y
|
||||
CONFIG_SYSVIPC=y
|
||||
CONFIG_POSIX_MQUEUE=y
|
||||
CONFIG_AUDIT=y
|
||||
CONFIG_NO_HZ=y
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
CONFIG_PREEMPT=y
|
||||
CONFIG_BSD_PROCESS_ACCT=y
|
||||
CONFIG_BSD_PROCESS_ACCT_V3=y
|
||||
CONFIG_TASKSTATS=y
|
||||
CONFIG_TASK_DELAY_ACCT=y
|
||||
CONFIG_TASK_XACCT=y
|
||||
CONFIG_TASK_IO_ACCOUNTING=y
|
||||
CONFIG_MEMCG=y
|
||||
CONFIG_BLK_CGROUP=y
|
||||
CONFIG_SCHED_AUTOGROUP=y
|
||||
CONFIG_SYSFS_DEPRECATED=y
|
||||
CONFIG_RELAY=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_EMBEDDED=y
|
||||
CONFIG_MACH_LOONGSON64=y
|
||||
# CONFIG_CPU_LOONGSON3_CPUCFG_EMULATION is not set
|
||||
CONFIG_HZ_256=y
|
||||
CONFIG_MIPS32_O32=y
|
||||
CONFIG_MIPS32_N32=y
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_FORCE_LOAD=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
CONFIG_MODULE_FORCE_UNLOAD=y
|
||||
CONFIG_MODVERSIONS=y
|
||||
CONFIG_PARTITION_ADVANCED=y
|
||||
CONFIG_MQ_IOSCHED_DEADLINE=m
|
||||
CONFIG_IOSCHED_BFQ=y
|
||||
CONFIG_BFQ_GROUP_IOSCHED=y
|
||||
CONFIG_BINFMT_MISC=m
|
||||
CONFIG_KSM=y
|
||||
CONFIG_NET=y
|
||||
CONFIG_PACKET=y
|
||||
CONFIG_UNIX=y
|
||||
CONFIG_XFRM_USER=y
|
||||
CONFIG_NET_KEY=y
|
||||
CONFIG_INET=y
|
||||
CONFIG_IP_MULTICAST=y
|
||||
CONFIG_IP_ADVANCED_ROUTER=y
|
||||
CONFIG_IP_MULTIPLE_TABLES=y
|
||||
CONFIG_IP_ROUTE_MULTIPATH=y
|
||||
CONFIG_IP_ROUTE_VERBOSE=y
|
||||
CONFIG_NETFILTER=y
|
||||
CONFIG_NETFILTER_NETLINK_LOG=m
|
||||
CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
|
||||
CONFIG_NETFILTER_XT_TARGET_MARK=m
|
||||
CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
|
||||
CONFIG_NETFILTER_XT_MATCH_COMMENT=m
|
||||
CONFIG_NETFILTER_XT_MATCH_DCCP=m
|
||||
CONFIG_NETFILTER_XT_MATCH_ESP=m
|
||||
CONFIG_NETFILTER_XT_MATCH_LENGTH=m
|
||||
CONFIG_NETFILTER_XT_MATCH_LIMIT=m
|
||||
CONFIG_NETFILTER_XT_MATCH_MAC=m
|
||||
CONFIG_NETFILTER_XT_MATCH_MARK=m
|
||||
CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
|
||||
CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
|
||||
CONFIG_NETFILTER_XT_MATCH_QUOTA=m
|
||||
CONFIG_NETFILTER_XT_MATCH_REALM=m
|
||||
CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
|
||||
CONFIG_NETFILTER_XT_MATCH_STRING=m
|
||||
CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
|
||||
CONFIG_IP_VS=m
|
||||
CONFIG_IP_NF_IPTABLES=m
|
||||
CONFIG_IP_NF_MATCH_AH=m
|
||||
CONFIG_IP_NF_MATCH_ECN=m
|
||||
CONFIG_IP_NF_MATCH_TTL=m
|
||||
CONFIG_IP_NF_FILTER=m
|
||||
CONFIG_IP_NF_TARGET_REJECT=m
|
||||
CONFIG_IP_NF_MANGLE=m
|
||||
CONFIG_IP_NF_TARGET_ECN=m
|
||||
CONFIG_IP_NF_TARGET_TTL=m
|
||||
CONFIG_IP_NF_RAW=m
|
||||
CONFIG_IP_NF_ARPTABLES=m
|
||||
CONFIG_IP_NF_ARPFILTER=m
|
||||
CONFIG_IP_NF_ARP_MANGLE=m
|
||||
CONFIG_IP_SCTP=m
|
||||
CONFIG_L2TP=m
|
||||
CONFIG_BRIDGE=m
|
||||
CONFIG_CFG80211=m
|
||||
CONFIG_CFG80211_WEXT=y
|
||||
CONFIG_MAC80211=m
|
||||
CONFIG_RFKILL=m
|
||||
CONFIG_RFKILL_INPUT=y
|
||||
CONFIG_PCIEPORTBUS=y
|
||||
CONFIG_HOTPLUG_PCI_PCIE=y
|
||||
CONFIG_PCIEASPM_PERFORMANCE=y
|
||||
CONFIG_HOTPLUG_PCI=y
|
||||
CONFIG_DEVTMPFS=y
|
||||
CONFIG_DEVTMPFS_MOUNT=y
|
||||
CONFIG_MTD=m
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
CONFIG_BLK_DEV_CRYPTOLOOP=y
|
||||
CONFIG_BLK_DEV_RAM=y
|
||||
CONFIG_BLK_DEV_RAM_SIZE=8192
|
||||
CONFIG_RAID_ATTRS=m
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_BLK_DEV_SR=y
|
||||
CONFIG_CHR_DEV_SG=y
|
||||
CONFIG_CHR_DEV_SCH=m
|
||||
CONFIG_SCSI_CONSTANTS=y
|
||||
CONFIG_SCSI_LOGGING=y
|
||||
CONFIG_SCSI_SPI_ATTRS=m
|
||||
CONFIG_SCSI_FC_ATTRS=m
|
||||
CONFIG_ISCSI_TCP=m
|
||||
CONFIG_MEGARAID_NEWGEN=y
|
||||
CONFIG_MEGARAID_MM=y
|
||||
CONFIG_MEGARAID_MAILBOX=y
|
||||
CONFIG_MEGARAID_LEGACY=y
|
||||
CONFIG_MEGARAID_SAS=y
|
||||
CONFIG_ATA=y
|
||||
CONFIG_SATA_AHCI=y
|
||||
CONFIG_PATA_ATIIXP=y
|
||||
CONFIG_MD=y
|
||||
CONFIG_BLK_DEV_MD=m
|
||||
CONFIG_MD_LINEAR=m
|
||||
CONFIG_MD_RAID0=m
|
||||
CONFIG_MD_RAID1=m
|
||||
CONFIG_MD_RAID10=m
|
||||
CONFIG_MD_RAID456=m
|
||||
CONFIG_MD_MULTIPATH=m
|
||||
CONFIG_BLK_DEV_DM=m
|
||||
CONFIG_DM_CRYPT=m
|
||||
CONFIG_DM_SNAPSHOT=m
|
||||
CONFIG_DM_MIRROR=m
|
||||
CONFIG_DM_ZERO=m
|
||||
CONFIG_TARGET_CORE=m
|
||||
CONFIG_TCM_IBLOCK=m
|
||||
CONFIG_TCM_FILEIO=m
|
||||
CONFIG_TCM_PSCSI=m
|
||||
CONFIG_LOOPBACK_TARGET=m
|
||||
CONFIG_ISCSI_TARGET=m
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_TUN=m
|
||||
# CONFIG_NET_VENDOR_3COM is not set
|
||||
# CONFIG_NET_VENDOR_ADAPTEC is not set
|
||||
# CONFIG_NET_VENDOR_ALTEON is not set
|
||||
# CONFIG_NET_VENDOR_AMD is not set
|
||||
# CONFIG_NET_VENDOR_ARC is not set
|
||||
# CONFIG_NET_VENDOR_ATHEROS is not set
|
||||
# CONFIG_NET_VENDOR_BROADCOM is not set
|
||||
# CONFIG_NET_VENDOR_BROCADE is not set
|
||||
# CONFIG_NET_VENDOR_CHELSIO is not set
|
||||
# CONFIG_NET_VENDOR_CIRRUS is not set
|
||||
# CONFIG_NET_VENDOR_CISCO is not set
|
||||
# CONFIG_NET_VENDOR_DEC is not set
|
||||
# CONFIG_NET_VENDOR_DLINK is not set
|
||||
# CONFIG_NET_VENDOR_EMULEX is not set
|
||||
# CONFIG_NET_VENDOR_I825XX is not set
|
||||
CONFIG_E1000=y
|
||||
CONFIG_E1000E=y
|
||||
CONFIG_IGB=y
|
||||
CONFIG_IXGB=y
|
||||
CONFIG_IXGBE=y
|
||||
# CONFIG_NET_VENDOR_MARVELL is not set
|
||||
# CONFIG_NET_VENDOR_MELLANOX is not set
|
||||
# CONFIG_NET_VENDOR_MICREL is not set
|
||||
# CONFIG_NET_VENDOR_MICROCHIP is not set
|
||||
# CONFIG_NET_VENDOR_MICROSEMI is not set
|
||||
# CONFIG_NET_VENDOR_MYRI is not set
|
||||
# CONFIG_NET_VENDOR_NATSEMI is not set
|
||||
# CONFIG_NET_VENDOR_NETERION is not set
|
||||
# CONFIG_NET_VENDOR_NETRONOME is not set
|
||||
# CONFIG_NET_VENDOR_NI is not set
|
||||
# CONFIG_NET_VENDOR_NVIDIA is not set
|
||||
# CONFIG_NET_VENDOR_OKI is not set
|
||||
# CONFIG_NET_VENDOR_PACKET_ENGINES is not set
|
||||
# CONFIG_NET_VENDOR_PENSANDO is not set
|
||||
# CONFIG_NET_VENDOR_QLOGIC is not set
|
||||
# CONFIG_NET_VENDOR_QUALCOMM is not set
|
||||
# CONFIG_NET_VENDOR_RDC is not set
|
||||
CONFIG_8139CP=y
|
||||
CONFIG_8139TOO=y
|
||||
# CONFIG_8139TOO_PIO is not set
|
||||
CONFIG_R8169=y
|
||||
# CONFIG_NET_VENDOR_RENESAS is not set
|
||||
# CONFIG_NET_VENDOR_ROCKER is not set
|
||||
# CONFIG_NET_VENDOR_SAMSUNG is not set
|
||||
# CONFIG_NET_VENDOR_SEEQ is not set
|
||||
# CONFIG_NET_VENDOR_SOLARFLARE is not set
|
||||
# CONFIG_NET_VENDOR_SILAN is not set
|
||||
# CONFIG_NET_VENDOR_SIS is not set
|
||||
# CONFIG_NET_VENDOR_SMSC is not set
|
||||
CONFIG_STMMAC_ETH=y
|
||||
# CONFIG_NET_VENDOR_SUN is not set
|
||||
# CONFIG_NET_VENDOR_TEHUTI is not set
|
||||
# CONFIG_NET_VENDOR_TI is not set
|
||||
# CONFIG_NET_VENDOR_TOSHIBA is not set
|
||||
# CONFIG_NET_VENDOR_VIA is not set
|
||||
# CONFIG_NET_VENDOR_WIZNET is not set
|
||||
CONFIG_PPP=m
|
||||
CONFIG_PPP_BSDCOMP=m
|
||||
CONFIG_PPP_DEFLATE=m
|
||||
CONFIG_PPP_FILTER=y
|
||||
CONFIG_PPP_MPPE=m
|
||||
CONFIG_PPP_MULTILINK=y
|
||||
CONFIG_PPPOE=m
|
||||
CONFIG_PPPOL2TP=m
|
||||
CONFIG_PPP_ASYNC=m
|
||||
CONFIG_PPP_SYNC_TTY=m
|
||||
CONFIG_ATH9K=m
|
||||
CONFIG_HOSTAP=m
|
||||
CONFIG_INPUT_LEDS=m
|
||||
CONFIG_INPUT_SPARSEKMAP=y
|
||||
CONFIG_INPUT_EVDEV=y
|
||||
# CONFIG_KEYBOARD_ATKBD is not set
|
||||
CONFIG_KEYBOARD_XTKBD=m
|
||||
# CONFIG_MOUSE_PS2 is not set
|
||||
CONFIG_INPUT_MISC=y
|
||||
CONFIG_INPUT_UINPUT=m
|
||||
# CONFIG_SERIO_I8042 is not set
|
||||
CONFIG_SERIO_SERPORT=m
|
||||
CONFIG_SERIO_LIBPS2=y
|
||||
CONFIG_SERIO_RAW=m
|
||||
CONFIG_LEGACY_PTY_COUNT=16
|
||||
CONFIG_SERIAL_8250=y
|
||||
# CONFIG_SERIAL_8250_16550A_VARIANTS is not set
|
||||
CONFIG_SERIAL_8250_CONSOLE=y
|
||||
CONFIG_SERIAL_8250_NR_UARTS=16
|
||||
CONFIG_SERIAL_8250_EXTENDED=y
|
||||
CONFIG_SERIAL_8250_MANY_PORTS=y
|
||||
CONFIG_SERIAL_8250_SHARE_IRQ=y
|
||||
CONFIG_SERIAL_8250_RSA=y
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
CONFIG_SERIAL_NONSTANDARD=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_RAW_DRIVER=m
|
||||
CONFIG_I2C_CHARDEV=y
|
||||
CONFIG_I2C_PIIX4=y
|
||||
CONFIG_GPIO_LOONGSON=y
|
||||
CONFIG_SENSORS_LM75=m
|
||||
CONFIG_SENSORS_LM93=m
|
||||
CONFIG_SENSORS_W83627HF=m
|
||||
# CONFIG_MEDIA_CEC_SUPPORT is not set
|
||||
CONFIG_MEDIA_SUPPORT=m
|
||||
# CONFIG_MEDIA_CONTROLLER is not set
|
||||
CONFIG_MEDIA_USB_SUPPORT=y
|
||||
CONFIG_USB_VIDEO_CLASS=m
|
||||
CONFIG_DRM=y
|
||||
CONFIG_DRM_RADEON=y
|
||||
CONFIG_FB_RADEON=y
|
||||
CONFIG_LCD_CLASS_DEVICE=y
|
||||
CONFIG_LCD_PLATFORM=m
|
||||
# CONFIG_VGA_CONSOLE is not set
|
||||
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
|
||||
CONFIG_LOGO=y
|
||||
CONFIG_SOUND=y
|
||||
CONFIG_SND=y
|
||||
CONFIG_SND_VERBOSE_PRINTK=y
|
||||
CONFIG_SND_SEQUENCER=y
|
||||
CONFIG_SND_SEQ_DUMMY=m
|
||||
# CONFIG_SND_ISA is not set
|
||||
CONFIG_SND_HDA_INTEL=y
|
||||
CONFIG_SND_HDA_HWDEP=y
|
||||
CONFIG_SND_HDA_PATCH_LOADER=y
|
||||
CONFIG_SND_HDA_CODEC_REALTEK=y
|
||||
CONFIG_SND_HDA_CODEC_ANALOG=y
|
||||
CONFIG_SND_HDA_CODEC_SIGMATEL=y
|
||||
CONFIG_SND_HDA_CODEC_VIA=y
|
||||
CONFIG_SND_HDA_CODEC_CONEXANT=y
|
||||
# CONFIG_SND_USB is not set
|
||||
CONFIG_SND_SOC=y
|
||||
CONFIG_HID_A4TECH=m
|
||||
CONFIG_HID_SUNPLUS=m
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_MON=y
|
||||
CONFIG_USB_XHCI_HCD=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_EHCI_ROOT_HUB_TT=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_USB_UHCI_HCD=m
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_SERIAL=m
|
||||
CONFIG_USB_SERIAL_OPTION=m
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_DRV_CMOS=y
|
||||
CONFIG_DMADEVICES=y
|
||||
# CONFIG_CPU_HWMON is not set
|
||||
CONFIG_PM_DEVFREQ=y
|
||||
CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y
|
||||
CONFIG_DEVFREQ_GOV_PERFORMANCE=y
|
||||
CONFIG_DEVFREQ_GOV_POWERSAVE=y
|
||||
CONFIG_DEVFREQ_GOV_USERSPACE=y
|
||||
CONFIG_EXT2_FS=y
|
||||
CONFIG_EXT2_FS_XATTR=y
|
||||
CONFIG_EXT2_FS_POSIX_ACL=y
|
||||
CONFIG_EXT2_FS_SECURITY=y
|
||||
CONFIG_EXT3_FS=y
|
||||
CONFIG_EXT3_FS_POSIX_ACL=y
|
||||
CONFIG_EXT3_FS_SECURITY=y
|
||||
CONFIG_XFS_FS=y
|
||||
CONFIG_XFS_QUOTA=y
|
||||
CONFIG_XFS_POSIX_ACL=y
|
||||
CONFIG_QUOTA=y
|
||||
# CONFIG_PRINT_QUOTA_WARNING is not set
|
||||
CONFIG_AUTOFS4_FS=y
|
||||
CONFIG_FUSE_FS=m
|
||||
CONFIG_ISO9660_FS=m
|
||||
CONFIG_JOLIET=y
|
||||
CONFIG_MSDOS_FS=y
|
||||
CONFIG_VFAT_FS=y
|
||||
CONFIG_FAT_DEFAULT_CODEPAGE=936
|
||||
CONFIG_FAT_DEFAULT_IOCHARSET="gb2312"
|
||||
CONFIG_PROC_KCORE=y
|
||||
CONFIG_TMPFS=y
|
||||
CONFIG_TMPFS_POSIX_ACL=y
|
||||
CONFIG_CONFIGFS_FS=y
|
||||
CONFIG_CRAMFS=m
|
||||
CONFIG_SQUASHFS=y
|
||||
CONFIG_SQUASHFS_XATTR=y
|
||||
CONFIG_NFS_FS=m
|
||||
CONFIG_NFS_V3_ACL=y
|
||||
CONFIG_NFS_V4=m
|
||||
CONFIG_NFSD=m
|
||||
CONFIG_NFSD_V3_ACL=y
|
||||
CONFIG_NFSD_V4=y
|
||||
CONFIG_CIFS=m
|
||||
CONFIG_NLS_CODEPAGE_437=y
|
||||
CONFIG_NLS_CODEPAGE_936=y
|
||||
CONFIG_NLS_ASCII=y
|
||||
CONFIG_NLS_UTF8=y
|
||||
CONFIG_SECURITY=y
|
||||
CONFIG_SECURITYFS=y
|
||||
CONFIG_SECURITY_NETWORK=y
|
||||
CONFIG_SECURITY_PATH=y
|
||||
CONFIG_SECURITY_SELINUX=y
|
||||
CONFIG_SECURITY_SELINUX_BOOTPARAM=y
|
||||
CONFIG_SECURITY_SELINUX_DISABLE=y
|
||||
CONFIG_DEFAULT_SECURITY_DAC=y
|
||||
CONFIG_CRYPTO_SEQIV=m
|
||||
CONFIG_CRYPTO_HMAC=y
|
||||
CONFIG_CRYPTO_MD5=y
|
||||
CONFIG_CRYPTO_TGR192=m
|
||||
CONFIG_CRYPTO_WP512=m
|
||||
CONFIG_CRYPTO_BLOWFISH=m
|
||||
CONFIG_CRYPTO_CAST5=m
|
||||
CONFIG_CRYPTO_CAST6=m
|
||||
CONFIG_CRYPTO_SERPENT=m
|
||||
CONFIG_CRYPTO_TWOFISH=m
|
||||
CONFIG_CRYPTO_DEFLATE=m
|
||||
CONFIG_PRINTK_TIME=y
|
||||
CONFIG_FRAME_WARN=1024
|
||||
CONFIG_STRIP_ASM_SYMS=y
|
||||
CONFIG_MAGIC_SYSRQ=y
|
||||
# CONFIG_SCHED_DEBUG is not set
|
||||
# CONFIG_DEBUG_PREEMPT is not set
|
||||
# CONFIG_FTRACE is not set
|
|
@ -26,6 +26,7 @@ CONFIG_SCHED_AUTOGROUP=y
|
|||
CONFIG_SYSFS_DEPRECATED=y
|
||||
CONFIG_RELAY=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_BPF_SYSCALL=y
|
||||
CONFIG_EMBEDDED=y
|
||||
CONFIG_PERF_EVENTS=y
|
||||
CONFIG_MACH_LOONGSON64=y
|
||||
|
@ -39,7 +40,7 @@ CONFIG_MIPS32_O32=y
|
|||
CONFIG_MIPS32_N32=y
|
||||
CONFIG_VIRTUALIZATION=y
|
||||
CONFIG_KVM=m
|
||||
CONFIG_KVM_MIPS_VZ=y
|
||||
CONFIG_KPROBES=y
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_FORCE_LOAD=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
|
@ -129,6 +130,7 @@ CONFIG_L2TP=m
|
|||
CONFIG_BRIDGE=m
|
||||
CONFIG_VSOCKETS=m
|
||||
CONFIG_VIRTIO_VSOCKETS=m
|
||||
CONFIG_BPF_JIT=y
|
||||
CONFIG_CFG80211=m
|
||||
CONFIG_CFG80211_WEXT=y
|
||||
CONFIG_MAC80211=m
|
||||
|
@ -318,6 +320,7 @@ CONFIG_USB_OHCI_HCD=y
|
|||
CONFIG_USB_UHCI_HCD=m
|
||||
CONFIG_USB_STORAGE=m
|
||||
CONFIG_USB_SERIAL=m
|
||||
CONFIG_USB_SERIAL_PL2303=m
|
||||
CONFIG_USB_SERIAL_OPTION=m
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_DRV_CMOS=y
|
||||
|
@ -405,8 +408,10 @@ CONFIG_CRYPTO_DEFLATE=m
|
|||
CONFIG_PRINTK_TIME=y
|
||||
CONFIG_STRIP_ASM_SYMS=y
|
||||
CONFIG_MAGIC_SYSRQ=y
|
||||
CONFIG_DEBUG_FS=y
|
||||
# CONFIG_SCHED_DEBUG is not set
|
||||
# CONFIG_DEBUG_PREEMPT is not set
|
||||
# CONFIG_FTRACE is not set
|
||||
CONFIG_FUNCTION_TRACER=y
|
||||
CONFIG_FTRACE_SYSCALLS=y
|
||||
CONFIG_CMDLINE_BOOL=y
|
||||
CONFIG_CMDLINE="ieee754=relaxed"
|
||||
|
|
|
@ -238,9 +238,6 @@ CONFIG_BLK_DEV_NBD=m
|
|||
CONFIG_BLK_DEV_RAM=y
|
||||
CONFIG_CDROM_PKTCDVD=m
|
||||
CONFIG_ATA_OVER_ETH=m
|
||||
CONFIG_IDE=y
|
||||
CONFIG_BLK_DEV_IDECD=y
|
||||
CONFIG_BLK_DEV_TC86C001=m
|
||||
CONFIG_RAID_ATTRS=m
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_CHR_DEV_ST=m
|
||||
|
|
|
@ -1,436 +0,0 @@
|
|||
CONFIG_SYSVIPC=y
|
||||
CONFIG_NO_HZ=y
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
CONFIG_LOG_BUF_SHIFT=15
|
||||
CONFIG_NAMESPACES=y
|
||||
CONFIG_RELAY=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_EXPERT=y
|
||||
# CONFIG_COMPAT_BRK is not set
|
||||
CONFIG_SLAB=y
|
||||
CONFIG_MIPS_MALTA=y
|
||||
CONFIG_CPU_LITTLE_ENDIAN=y
|
||||
CONFIG_CPU_MIPS32_R2=y
|
||||
CONFIG_KVM_GUEST=y
|
||||
CONFIG_PAGE_SIZE_16KB=y
|
||||
# CONFIG_MIPS_MT_SMP is not set
|
||||
CONFIG_HZ_100=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
CONFIG_MODVERSIONS=y
|
||||
CONFIG_MODULE_SRCVERSION_ALL=y
|
||||
CONFIG_NET=y
|
||||
CONFIG_PACKET=y
|
||||
CONFIG_UNIX=y
|
||||
CONFIG_XFRM_USER=m
|
||||
CONFIG_NET_KEY=y
|
||||
CONFIG_NET_KEY_MIGRATE=y
|
||||
CONFIG_INET=y
|
||||
CONFIG_IP_MULTICAST=y
|
||||
CONFIG_IP_ADVANCED_ROUTER=y
|
||||
CONFIG_IP_MULTIPLE_TABLES=y
|
||||
CONFIG_IP_ROUTE_MULTIPATH=y
|
||||
CONFIG_IP_ROUTE_VERBOSE=y
|
||||
CONFIG_IP_PNP=y
|
||||
CONFIG_IP_PNP_DHCP=y
|
||||
CONFIG_IP_PNP_BOOTP=y
|
||||
CONFIG_NET_IPIP=m
|
||||
CONFIG_IP_MROUTE=y
|
||||
CONFIG_IP_PIMSM_V1=y
|
||||
CONFIG_IP_PIMSM_V2=y
|
||||
CONFIG_SYN_COOKIES=y
|
||||
CONFIG_INET_AH=m
|
||||
CONFIG_INET_ESP=m
|
||||
CONFIG_INET_IPCOMP=m
|
||||
CONFIG_INET_XFRM_MODE_TRANSPORT=m
|
||||
CONFIG_INET_XFRM_MODE_TUNNEL=m
|
||||
CONFIG_TCP_MD5SIG=y
|
||||
CONFIG_IPV6_ROUTER_PREF=y
|
||||
CONFIG_IPV6_ROUTE_INFO=y
|
||||
CONFIG_IPV6_OPTIMISTIC_DAD=y
|
||||
CONFIG_INET6_AH=m
|
||||
CONFIG_INET6_ESP=m
|
||||
CONFIG_INET6_IPCOMP=m
|
||||
CONFIG_IPV6_TUNNEL=m
|
||||
CONFIG_IPV6_MROUTE=y
|
||||
CONFIG_IPV6_PIMSM_V2=y
|
||||
CONFIG_NETWORK_SECMARK=y
|
||||
CONFIG_NETFILTER=y
|
||||
CONFIG_NF_CONNTRACK=m
|
||||
CONFIG_NF_CONNTRACK_SECMARK=y
|
||||
CONFIG_NF_CONNTRACK_EVENTS=y
|
||||
CONFIG_NF_CONNTRACK_AMANDA=m
|
||||
CONFIG_NF_CONNTRACK_FTP=m
|
||||
CONFIG_NF_CONNTRACK_H323=m
|
||||
CONFIG_NF_CONNTRACK_IRC=m
|
||||
CONFIG_NF_CONNTRACK_PPTP=m
|
||||
CONFIG_NF_CONNTRACK_SANE=m
|
||||
CONFIG_NF_CONNTRACK_SIP=m
|
||||
CONFIG_NF_CONNTRACK_TFTP=m
|
||||
CONFIG_NF_CT_NETLINK=m
|
||||
CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
|
||||
CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
|
||||
CONFIG_NETFILTER_XT_TARGET_MARK=m
|
||||
CONFIG_NETFILTER_XT_TARGET_NFLOG=m
|
||||
CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
|
||||
CONFIG_NETFILTER_XT_TARGET_TPROXY=m
|
||||
CONFIG_NETFILTER_XT_TARGET_TRACE=m
|
||||
CONFIG_NETFILTER_XT_TARGET_SECMARK=m
|
||||
CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
|
||||
CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m
|
||||
CONFIG_NETFILTER_XT_MATCH_COMMENT=m
|
||||
CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
|
||||
CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
|
||||
CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
|
||||
CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
|
||||
CONFIG_NETFILTER_XT_MATCH_DCCP=m
|
||||
CONFIG_NETFILTER_XT_MATCH_ESP=m
|
||||
CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
|
||||
CONFIG_NETFILTER_XT_MATCH_HELPER=m
|
||||
CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
|
||||
CONFIG_NETFILTER_XT_MATCH_LENGTH=m
|
||||
CONFIG_NETFILTER_XT_MATCH_LIMIT=m
|
||||
CONFIG_NETFILTER_XT_MATCH_MAC=m
|
||||
CONFIG_NETFILTER_XT_MATCH_MARK=m
|
||||
CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
|
||||
CONFIG_NETFILTER_XT_MATCH_OWNER=m
|
||||
CONFIG_NETFILTER_XT_MATCH_POLICY=m
|
||||
CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
|
||||
CONFIG_NETFILTER_XT_MATCH_QUOTA=m
|
||||
CONFIG_NETFILTER_XT_MATCH_RATEEST=m
|
||||
CONFIG_NETFILTER_XT_MATCH_REALM=m
|
||||
CONFIG_NETFILTER_XT_MATCH_RECENT=m
|
||||
CONFIG_NETFILTER_XT_MATCH_SOCKET=m
|
||||
CONFIG_NETFILTER_XT_MATCH_STATE=m
|
||||
CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
|
||||
CONFIG_NETFILTER_XT_MATCH_STRING=m
|
||||
CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
|
||||
CONFIG_NETFILTER_XT_MATCH_TIME=m
|
||||
CONFIG_NETFILTER_XT_MATCH_U32=m
|
||||
CONFIG_IP_VS=m
|
||||
CONFIG_IP_VS_IPV6=y
|
||||
CONFIG_IP_VS_PROTO_TCP=y
|
||||
CONFIG_IP_VS_PROTO_UDP=y
|
||||
CONFIG_IP_VS_PROTO_ESP=y
|
||||
CONFIG_IP_VS_PROTO_AH=y
|
||||
CONFIG_IP_VS_RR=m
|
||||
CONFIG_IP_VS_WRR=m
|
||||
CONFIG_IP_VS_LC=m
|
||||
CONFIG_IP_VS_WLC=m
|
||||
CONFIG_IP_VS_LBLC=m
|
||||
CONFIG_IP_VS_LBLCR=m
|
||||
CONFIG_IP_VS_DH=m
|
||||
CONFIG_IP_VS_SH=m
|
||||
CONFIG_IP_VS_SED=m
|
||||
CONFIG_IP_VS_NQ=m
|
||||
CONFIG_IP_NF_IPTABLES=m
|
||||
CONFIG_IP_NF_MATCH_AH=m
|
||||
CONFIG_IP_NF_MATCH_ECN=m
|
||||
CONFIG_IP_NF_MATCH_TTL=m
|
||||
CONFIG_IP_NF_FILTER=m
|
||||
CONFIG_IP_NF_TARGET_REJECT=m
|
||||
CONFIG_IP_NF_MANGLE=m
|
||||
CONFIG_IP_NF_TARGET_CLUSTERIP=m
|
||||
CONFIG_IP_NF_TARGET_ECN=m
|
||||
CONFIG_IP_NF_TARGET_TTL=m
|
||||
CONFIG_IP_NF_RAW=m
|
||||
CONFIG_IP_NF_ARPTABLES=m
|
||||
CONFIG_IP_NF_ARPFILTER=m
|
||||
CONFIG_IP_NF_ARP_MANGLE=m
|
||||
CONFIG_IP6_NF_MATCH_AH=m
|
||||
CONFIG_IP6_NF_MATCH_EUI64=m
|
||||
CONFIG_IP6_NF_MATCH_FRAG=m
|
||||
CONFIG_IP6_NF_MATCH_OPTS=m
|
||||
CONFIG_IP6_NF_MATCH_HL=m
|
||||
CONFIG_IP6_NF_MATCH_IPV6HEADER=m
|
||||
CONFIG_IP6_NF_MATCH_MH=m
|
||||
CONFIG_IP6_NF_MATCH_RT=m
|
||||
CONFIG_IP6_NF_TARGET_HL=m
|
||||
CONFIG_IP6_NF_FILTER=m
|
||||
CONFIG_IP6_NF_TARGET_REJECT=m
|
||||
CONFIG_IP6_NF_MANGLE=m
|
||||
CONFIG_IP6_NF_RAW=m
|
||||
CONFIG_BRIDGE_NF_EBTABLES=m
|
||||
CONFIG_BRIDGE_EBT_BROUTE=m
|
||||
CONFIG_BRIDGE_EBT_T_FILTER=m
|
||||
CONFIG_BRIDGE_EBT_T_NAT=m
|
||||
CONFIG_BRIDGE_EBT_802_3=m
|
||||
CONFIG_BRIDGE_EBT_AMONG=m
|
||||
CONFIG_BRIDGE_EBT_ARP=m
|
||||
CONFIG_BRIDGE_EBT_IP=m
|
||||
CONFIG_BRIDGE_EBT_IP6=m
|
||||
CONFIG_BRIDGE_EBT_LIMIT=m
|
||||
CONFIG_BRIDGE_EBT_MARK=m
|
||||
CONFIG_BRIDGE_EBT_PKTTYPE=m
|
||||
CONFIG_BRIDGE_EBT_STP=m
|
||||
CONFIG_BRIDGE_EBT_VLAN=m
|
||||
CONFIG_BRIDGE_EBT_ARPREPLY=m
|
||||
CONFIG_BRIDGE_EBT_DNAT=m
|
||||
CONFIG_BRIDGE_EBT_MARK_T=m
|
||||
CONFIG_BRIDGE_EBT_REDIRECT=m
|
||||
CONFIG_BRIDGE_EBT_SNAT=m
|
||||
CONFIG_BRIDGE_EBT_LOG=m
|
||||
CONFIG_BRIDGE_EBT_NFLOG=m
|
||||
CONFIG_IP_SCTP=m
|
||||
CONFIG_BRIDGE=m
|
||||
CONFIG_VLAN_8021Q=m
|
||||
CONFIG_VLAN_8021Q_GVRP=y
|
||||
CONFIG_ATALK=m
|
||||
CONFIG_DEV_APPLETALK=m
|
||||
CONFIG_IPDDP=m
|
||||
CONFIG_IPDDP_ENCAP=y
|
||||
CONFIG_PHONET=m
|
||||
CONFIG_NET_SCHED=y
|
||||
CONFIG_NET_SCH_CBQ=m
|
||||
CONFIG_NET_SCH_HTB=m
|
||||
CONFIG_NET_SCH_HFSC=m
|
||||
CONFIG_NET_SCH_PRIO=m
|
||||
CONFIG_NET_SCH_RED=m
|
||||
CONFIG_NET_SCH_SFQ=m
|
||||
CONFIG_NET_SCH_TEQL=m
|
||||
CONFIG_NET_SCH_TBF=m
|
||||
CONFIG_NET_SCH_GRED=m
|
||||
CONFIG_NET_SCH_DSMARK=m
|
||||
CONFIG_NET_SCH_NETEM=m
|
||||
CONFIG_NET_SCH_INGRESS=m
|
||||
CONFIG_NET_CLS_BASIC=m
|
||||
CONFIG_NET_CLS_TCINDEX=m
|
||||
CONFIG_NET_CLS_ROUTE4=m
|
||||
CONFIG_NET_CLS_FW=m
|
||||
CONFIG_NET_CLS_U32=m
|
||||
CONFIG_NET_CLS_RSVP=m
|
||||
CONFIG_NET_CLS_RSVP6=m
|
||||
CONFIG_NET_CLS_FLOW=m
|
||||
CONFIG_NET_CLS_ACT=y
|
||||
CONFIG_NET_ACT_POLICE=y
|
||||
CONFIG_NET_ACT_GACT=m
|
||||
CONFIG_GACT_PROB=y
|
||||
CONFIG_NET_ACT_MIRRED=m
|
||||
CONFIG_NET_ACT_IPT=m
|
||||
CONFIG_NET_ACT_NAT=m
|
||||
CONFIG_NET_ACT_PEDIT=m
|
||||
CONFIG_NET_ACT_SIMP=m
|
||||
CONFIG_NET_ACT_SKBEDIT=m
|
||||
CONFIG_CFG80211=m
|
||||
CONFIG_MAC80211=m
|
||||
CONFIG_MAC80211_MESH=y
|
||||
CONFIG_RFKILL=m
|
||||
CONFIG_DEVTMPFS=y
|
||||
CONFIG_CONNECTOR=m
|
||||
CONFIG_MTD=y
|
||||
CONFIG_MTD_BLOCK=y
|
||||
CONFIG_MTD_OOPS=m
|
||||
CONFIG_MTD_CFI=y
|
||||
CONFIG_MTD_CFI_INTELEXT=y
|
||||
CONFIG_MTD_CFI_AMDSTD=y
|
||||
CONFIG_MTD_CFI_STAA=y
|
||||
CONFIG_MTD_PHYSMAP_OF=y
|
||||
CONFIG_MTD_UBI=m
|
||||
CONFIG_MTD_UBI_GLUEBI=m
|
||||
CONFIG_BLK_DEV_FD=m
|
||||
CONFIG_BLK_DEV_UMEM=m
|
||||
CONFIG_BLK_DEV_LOOP=m
|
||||
CONFIG_BLK_DEV_CRYPTOLOOP=m
|
||||
CONFIG_BLK_DEV_NBD=m
|
||||
CONFIG_BLK_DEV_RAM=y
|
||||
CONFIG_CDROM_PKTCDVD=m
|
||||
CONFIG_ATA_OVER_ETH=m
|
||||
CONFIG_VIRTIO_BLK=y
|
||||
CONFIG_IDE=y
|
||||
CONFIG_BLK_DEV_IDECD=y
|
||||
CONFIG_BLK_DEV_TC86C001=m
|
||||
CONFIG_RAID_ATTRS=m
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_CHR_DEV_ST=m
|
||||
CONFIG_CHR_DEV_OSST=m
|
||||
CONFIG_BLK_DEV_SR=y
|
||||
CONFIG_CHR_DEV_SG=m
|
||||
CONFIG_SCSI_CONSTANTS=y
|
||||
CONFIG_SCSI_LOGGING=y
|
||||
CONFIG_SCSI_SCAN_ASYNC=y
|
||||
CONFIG_SCSI_FC_ATTRS=m
|
||||
CONFIG_ISCSI_TCP=m
|
||||
CONFIG_BLK_DEV_3W_XXXX_RAID=m
|
||||
CONFIG_SCSI_3W_9XXX=m
|
||||
CONFIG_SCSI_ACARD=m
|
||||
CONFIG_SCSI_AACRAID=m
|
||||
CONFIG_SCSI_AIC7XXX=m
|
||||
CONFIG_AIC7XXX_RESET_DELAY_MS=15000
|
||||
# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
|
||||
CONFIG_ATA=y
|
||||
CONFIG_ATA_PIIX=y
|
||||
CONFIG_PATA_IT8213=m
|
||||
CONFIG_PATA_OLDPIIX=y
|
||||
CONFIG_PATA_MPIIX=y
|
||||
CONFIG_ATA_GENERIC=y
|
||||
CONFIG_PATA_LEGACY=y
|
||||
CONFIG_MD=y
|
||||
CONFIG_BLK_DEV_MD=m
|
||||
CONFIG_MD_LINEAR=m
|
||||
CONFIG_MD_RAID0=m
|
||||
CONFIG_MD_RAID1=m
|
||||
CONFIG_MD_RAID10=m
|
||||
CONFIG_MD_RAID456=m
|
||||
CONFIG_MD_MULTIPATH=m
|
||||
CONFIG_MD_FAULTY=m
|
||||
CONFIG_BLK_DEV_DM=m
|
||||
CONFIG_DM_CRYPT=m
|
||||
CONFIG_DM_SNAPSHOT=m
|
||||
CONFIG_DM_MIRROR=m
|
||||
CONFIG_DM_ZERO=m
|
||||
CONFIG_DM_MULTIPATH=m
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_BONDING=m
|
||||
CONFIG_DUMMY=m
|
||||
CONFIG_EQUALIZER=m
|
||||
CONFIG_IFB=m
|
||||
CONFIG_MACVLAN=m
|
||||
CONFIG_TUN=m
|
||||
CONFIG_VETH=m
|
||||
CONFIG_VIRTIO_NET=y
|
||||
CONFIG_PCNET32=y
|
||||
CONFIG_CHELSIO_T3=m
|
||||
CONFIG_AX88796=m
|
||||
CONFIG_NETXEN_NIC=m
|
||||
CONFIG_TC35815=m
|
||||
CONFIG_BROADCOM_PHY=m
|
||||
CONFIG_CICADA_PHY=m
|
||||
CONFIG_DAVICOM_PHY=m
|
||||
CONFIG_ICPLUS_PHY=m
|
||||
CONFIG_LXT_PHY=m
|
||||
CONFIG_MARVELL_PHY=m
|
||||
CONFIG_QSEMI_PHY=m
|
||||
CONFIG_REALTEK_PHY=m
|
||||
CONFIG_SMSC_PHY=m
|
||||
CONFIG_VITESSE_PHY=m
|
||||
CONFIG_ATMEL=m
|
||||
CONFIG_PCI_ATMEL=m
|
||||
CONFIG_IPW2100=m
|
||||
CONFIG_IPW2100_MONITOR=y
|
||||
CONFIG_HOSTAP=m
|
||||
CONFIG_HOSTAP_FIRMWARE=y
|
||||
CONFIG_HOSTAP_FIRMWARE_NVRAM=y
|
||||
CONFIG_HOSTAP_PLX=m
|
||||
CONFIG_HOSTAP_PCI=m
|
||||
CONFIG_PRISM54=m
|
||||
CONFIG_LIBERTAS=m
|
||||
CONFIG_INPUT_MOUSEDEV=y
|
||||
CONFIG_SERIAL_8250=y
|
||||
CONFIG_SERIAL_8250_CONSOLE=y
|
||||
CONFIG_POWER_RESET=y
|
||||
CONFIG_POWER_RESET_PIIX4_POWEROFF=y
|
||||
CONFIG_POWER_RESET_SYSCON=y
|
||||
# CONFIG_HWMON is not set
|
||||
CONFIG_FB=y
|
||||
CONFIG_FB_CIRRUS=y
|
||||
# CONFIG_VGA_CONSOLE is not set
|
||||
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||
CONFIG_HID=m
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_DRV_CMOS=y
|
||||
CONFIG_UIO=m
|
||||
CONFIG_UIO_CIF=m
|
||||
CONFIG_VIRTIO_PCI=y
|
||||
CONFIG_VIRTIO_BALLOON=y
|
||||
CONFIG_VIRTIO_MMIO=y
|
||||
CONFIG_EXT2_FS=y
|
||||
CONFIG_EXT3_FS=y
|
||||
CONFIG_REISERFS_FS=m
|
||||
CONFIG_REISERFS_PROC_INFO=y
|
||||
CONFIG_REISERFS_FS_XATTR=y
|
||||
CONFIG_REISERFS_FS_POSIX_ACL=y
|
||||
CONFIG_REISERFS_FS_SECURITY=y
|
||||
CONFIG_JFS_FS=m
|
||||
CONFIG_JFS_POSIX_ACL=y
|
||||
CONFIG_JFS_SECURITY=y
|
||||
CONFIG_XFS_FS=m
|
||||
CONFIG_XFS_QUOTA=y
|
||||
CONFIG_XFS_POSIX_ACL=y
|
||||
CONFIG_QUOTA=y
|
||||
CONFIG_QFMT_V2=y
|
||||
CONFIG_FUSE_FS=m
|
||||
CONFIG_ISO9660_FS=m
|
||||
CONFIG_JOLIET=y
|
||||
CONFIG_ZISOFS=y
|
||||
CONFIG_UDF_FS=m
|
||||
CONFIG_MSDOS_FS=m
|
||||
CONFIG_VFAT_FS=m
|
||||
CONFIG_PROC_KCORE=y
|
||||
CONFIG_TMPFS=y
|
||||
CONFIG_AFFS_FS=m
|
||||
CONFIG_HFS_FS=m
|
||||
CONFIG_HFSPLUS_FS=m
|
||||
CONFIG_BEFS_FS=m
|
||||
CONFIG_BFS_FS=m
|
||||
CONFIG_EFS_FS=m
|
||||
CONFIG_JFFS2_FS=m
|
||||
CONFIG_JFFS2_FS_XATTR=y
|
||||
CONFIG_JFFS2_COMPRESSION_OPTIONS=y
|
||||
CONFIG_JFFS2_RUBIN=y
|
||||
CONFIG_CRAMFS=m
|
||||
CONFIG_VXFS_FS=m
|
||||
CONFIG_MINIX_FS=m
|
||||
CONFIG_ROMFS_FS=m
|
||||
CONFIG_SYSV_FS=m
|
||||
CONFIG_UFS_FS=m
|
||||
CONFIG_NFS_FS=y
|
||||
CONFIG_ROOT_NFS=y
|
||||
CONFIG_NFSD=y
|
||||
CONFIG_NFSD_V3=y
|
||||
CONFIG_NLS_CODEPAGE_437=m
|
||||
CONFIG_NLS_CODEPAGE_737=m
|
||||
CONFIG_NLS_CODEPAGE_775=m
|
||||
CONFIG_NLS_CODEPAGE_850=m
|
||||
CONFIG_NLS_CODEPAGE_852=m
|
||||
CONFIG_NLS_CODEPAGE_855=m
|
||||
CONFIG_NLS_CODEPAGE_857=m
|
||||
CONFIG_NLS_CODEPAGE_860=m
|
||||
CONFIG_NLS_CODEPAGE_861=m
|
||||
CONFIG_NLS_CODEPAGE_862=m
|
||||
CONFIG_NLS_CODEPAGE_863=m
|
||||
CONFIG_NLS_CODEPAGE_864=m
|
||||
CONFIG_NLS_CODEPAGE_865=m
|
||||
CONFIG_NLS_CODEPAGE_866=m
|
||||
CONFIG_NLS_CODEPAGE_869=m
|
||||
CONFIG_NLS_CODEPAGE_936=m
|
||||
CONFIG_NLS_CODEPAGE_950=m
|
||||
CONFIG_NLS_CODEPAGE_932=m
|
||||
CONFIG_NLS_CODEPAGE_949=m
|
||||
CONFIG_NLS_CODEPAGE_874=m
|
||||
CONFIG_NLS_ISO8859_8=m
|
||||
CONFIG_NLS_CODEPAGE_1250=m
|
||||
CONFIG_NLS_CODEPAGE_1251=m
|
||||
CONFIG_NLS_ASCII=m
|
||||
CONFIG_NLS_ISO8859_1=m
|
||||
CONFIG_NLS_ISO8859_2=m
|
||||
CONFIG_NLS_ISO8859_3=m
|
||||
CONFIG_NLS_ISO8859_4=m
|
||||
CONFIG_NLS_ISO8859_5=m
|
||||
CONFIG_NLS_ISO8859_6=m
|
||||
CONFIG_NLS_ISO8859_7=m
|
||||
CONFIG_NLS_ISO8859_9=m
|
||||
CONFIG_NLS_ISO8859_13=m
|
||||
CONFIG_NLS_ISO8859_14=m
|
||||
CONFIG_NLS_ISO8859_15=m
|
||||
CONFIG_NLS_KOI8_R=m
|
||||
CONFIG_NLS_KOI8_U=m
|
||||
CONFIG_CRYPTO_CRYPTD=m
|
||||
CONFIG_CRYPTO_LRW=m
|
||||
CONFIG_CRYPTO_PCBC=m
|
||||
CONFIG_CRYPTO_HMAC=y
|
||||
CONFIG_CRYPTO_XCBC=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
|
||||
CONFIG_CRYPTO_CAMELLIA=m
|
||||
CONFIG_CRYPTO_CAST5=m
|
||||
CONFIG_CRYPTO_CAST6=m
|
||||
CONFIG_CRYPTO_FCRYPT=m
|
||||
CONFIG_CRYPTO_KHAZAD=m
|
||||
CONFIG_CRYPTO_SERPENT=m
|
||||
CONFIG_CRYPTO_TEA=m
|
||||
CONFIG_CRYPTO_TWOFISH=m
|
|
@ -236,9 +236,6 @@ CONFIG_BLK_DEV_NBD=m
|
|||
CONFIG_BLK_DEV_RAM=y
|
||||
CONFIG_CDROM_PKTCDVD=m
|
||||
CONFIG_ATA_OVER_ETH=m
|
||||
CONFIG_IDE=y
|
||||
CONFIG_BLK_DEV_IDECD=y
|
||||
CONFIG_BLK_DEV_TC86C001=m
|
||||
CONFIG_RAID_ATTRS=m
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_CHR_DEV_ST=m
|
||||
|
|
|
@ -44,9 +44,6 @@ CONFIG_MTD_NAND_TXX9NDFMC=m
|
|||
CONFIG_BLK_DEV_LOOP=y
|
||||
CONFIG_BLK_DEV_RAM=y
|
||||
CONFIG_BLK_DEV_RAM_SIZE=8192
|
||||
CONFIG_IDE=y
|
||||
CONFIG_BLK_DEV_IDE_TX4938=y
|
||||
CONFIG_BLK_DEV_IDE_TX4939=y
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_NE2000=y
|
||||
CONFIG_SMC91X=y
|
||||
|
|
|
@ -17,7 +17,6 @@ CONFIG_64BIT=y
|
|||
CONFIG_SMP=y
|
||||
CONFIG_NR_CPUS=2
|
||||
CONFIG_HZ_1000=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_MIPS32_O32=y
|
||||
CONFIG_PM=y
|
||||
CONFIG_MODULES=y
|
||||
|
@ -34,25 +33,28 @@ CONFIG_INET=y
|
|||
CONFIG_IP_PNP=y
|
||||
CONFIG_IP_PNP_DHCP=y
|
||||
CONFIG_IP_PNP_BOOTP=y
|
||||
CONFIG_INET_XFRM_MODE_TRANSPORT=m
|
||||
CONFIG_INET_XFRM_MODE_TUNNEL=m
|
||||
CONFIG_INET_XFRM_MODE_BEET=m
|
||||
CONFIG_TCP_MD5SIG=y
|
||||
# CONFIG_IPV6 is not set
|
||||
CONFIG_NETWORK_SECMARK=y
|
||||
CONFIG_CFG80211=m
|
||||
CONFIG_MAC80211=m
|
||||
CONFIG_RFKILL=m
|
||||
CONFIG_PCI=y
|
||||
CONFIG_FW_LOADER=m
|
||||
CONFIG_CONNECTOR=m
|
||||
CONFIG_BLK_DEV_RAM=y
|
||||
CONFIG_BLK_DEV_RAM_SIZE=9220
|
||||
CONFIG_CDROM_PKTCDVD=m
|
||||
CONFIG_ATA_OVER_ETH=m
|
||||
CONFIG_IDE=y
|
||||
CONFIG_BLK_DEV_IDECD=y
|
||||
CONFIG_BLK_DEV_IDETAPE=y
|
||||
CONFIG_RAID_ATTRS=m
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_BLK_DEV_SR=y
|
||||
CONFIG_CHR_DEV_SG=y
|
||||
CONFIG_SCSI_CONSTANTS=y
|
||||
# CONFIG_SCSI_LOWLEVEL is not set
|
||||
CONFIG_ATA=y
|
||||
# CONFIG_ATA_BMDMA is not set
|
||||
CONFIG_PATA_PLATFORM=y
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_MACVLAN=m
|
||||
CONFIG_SB1250_MAC=y
|
||||
|
@ -88,18 +90,14 @@ 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_CAMELLIA=m
|
||||
CONFIG_CRYPTO_CAST5=m
|
||||
CONFIG_CRYPTO_CAST6=m
|
||||
CONFIG_CRYPTO_DES=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
|
||||
CONFIG_CRYPTO_TWOFISH=m
|
||||
CONFIG_CRYPTO_DEFLATE=m
|
||||
CONFIG_CRYPTO_LZO=m
|
||||
|
|
|
@ -26,9 +26,12 @@ CONFIG_IP_MULTICAST=y
|
|||
# CONFIG_IPV6 is not set
|
||||
CONFIG_NETWORK_SECMARK=y
|
||||
CONFIG_BLK_DEV_RAM=m
|
||||
CONFIG_IDE=y
|
||||
CONFIG_BLK_DEV_IDECS=m
|
||||
CONFIG_IDE_GENERIC=y
|
||||
# CONFIG_SCSI_PROC_FS is not set
|
||||
# CONFIG_SCSI_LOWLEVEL is not set
|
||||
CONFIG_ATA=y
|
||||
# CONFIG_ATA_VERBOSE_ERROR is not set
|
||||
# CONFIG_ATA_FORCE is not set
|
||||
# CONFIG_ATA_BMDMA is not set
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_PCMCIA_3C574=m
|
||||
CONFIG_PCMCIA_3C589=m
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
poly1305-core.S
|
|
@ -1,22 +1,22 @@
|
|||
/ {
|
||||
images {
|
||||
fdt@boston {
|
||||
fdt-boston {
|
||||
description = "img,boston Device Tree";
|
||||
data = /incbin/("boot/dts/img/boston.dtb");
|
||||
type = "flat_dt";
|
||||
arch = "mips";
|
||||
compression = "none";
|
||||
hash@0 {
|
||||
hash {
|
||||
algo = "sha1";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
configurations {
|
||||
conf@boston {
|
||||
conf-boston {
|
||||
description = "Boston Linux kernel";
|
||||
kernel = "kernel@0";
|
||||
fdt = "fdt@boston";
|
||||
kernel = "kernel";
|
||||
fdt = "fdt-boston";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
|
||||
/ {
|
||||
images {
|
||||
fdt@jaguar2_pcb110 {
|
||||
fdt-jaguar2_pcb110 {
|
||||
description = "MSCC Jaguar2 PCB110 Device Tree";
|
||||
data = /incbin/("boot/dts/mscc/jaguar2_pcb110.dtb");
|
||||
type = "flat_dt";
|
||||
arch = "mips";
|
||||
compression = "none";
|
||||
hash@0 {
|
||||
hash {
|
||||
algo = "sha1";
|
||||
};
|
||||
};
|
||||
fdt@jaguar2_pcb111 {
|
||||
fdt-jaguar2_pcb111 {
|
||||
description = "MSCC Jaguar2 PCB111 Device Tree";
|
||||
data = /incbin/("boot/dts/mscc/jaguar2_pcb111.dtb");
|
||||
type = "flat_dt";
|
||||
arch = "mips";
|
||||
compression = "none";
|
||||
hash@0 {
|
||||
hash {
|
||||
algo = "sha1";
|
||||
};
|
||||
};
|
||||
|
@ -26,14 +26,14 @@
|
|||
configurations {
|
||||
pcb110 {
|
||||
description = "Jaguar2 Linux kernel";
|
||||
kernel = "kernel@0";
|
||||
fdt = "fdt@jaguar2_pcb110";
|
||||
kernel = "kernel";
|
||||
fdt = "fdt-jaguar2_pcb110";
|
||||
ramdisk = "ramdisk";
|
||||
};
|
||||
pcb111 {
|
||||
description = "Jaguar2 Linux kernel";
|
||||
kernel = "kernel@0";
|
||||
fdt = "fdt@jaguar2_pcb111";
|
||||
kernel = "kernel";
|
||||
fdt = "fdt-jaguar2_pcb111";
|
||||
ramdisk = "ramdisk";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
|
||||
/ {
|
||||
images {
|
||||
fdt@luton_pcb091 {
|
||||
fdt-luton_pcb091 {
|
||||
description = "MSCC Luton PCB091 Device Tree";
|
||||
data = /incbin/("boot/dts/mscc/luton_pcb091.dtb");
|
||||
type = "flat_dt";
|
||||
arch = "mips";
|
||||
compression = "none";
|
||||
hash@0 {
|
||||
hash {
|
||||
algo = "sha1";
|
||||
};
|
||||
};
|
||||
|
@ -16,8 +16,8 @@
|
|||
configurations {
|
||||
pcb091 {
|
||||
description = "Luton Linux kernel";
|
||||
kernel = "kernel@0";
|
||||
fdt = "fdt@luton_pcb091";
|
||||
kernel = "kernel";
|
||||
fdt = "fdt-luton_pcb091";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
/ {
|
||||
images {
|
||||
fdt@ni169445 {
|
||||
fdt-ni169445 {
|
||||
description = "NI 169445 device tree";
|
||||
data = /incbin/("boot/dts/ni/169445.dtb");
|
||||
type = "flat_dt";
|
||||
arch = "mips";
|
||||
compression = "none";
|
||||
hash@0 {
|
||||
hash {
|
||||
algo = "sha1";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
configurations {
|
||||
conf@ni169445 {
|
||||
conf-ni169445 {
|
||||
description = "NI 169445 Linux Kernel";
|
||||
kernel = "kernel@0";
|
||||
fdt = "fdt@ni169445";
|
||||
kernel = "kernel";
|
||||
fdt = "fdt-ni169445";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,40 +1,40 @@
|
|||
/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
|
||||
/ {
|
||||
images {
|
||||
fdt@ocelot_pcb123 {
|
||||
fdt-ocelot_pcb123 {
|
||||
description = "MSCC Ocelot PCB123 Device Tree";
|
||||
data = /incbin/("boot/dts/mscc/ocelot_pcb123.dtb");
|
||||
type = "flat_dt";
|
||||
arch = "mips";
|
||||
compression = "none";
|
||||
hash@0 {
|
||||
hash {
|
||||
algo = "sha1";
|
||||
};
|
||||
};
|
||||
|
||||
fdt@ocelot_pcb120 {
|
||||
fdt-ocelot_pcb120 {
|
||||
description = "MSCC Ocelot PCB120 Device Tree";
|
||||
data = /incbin/("boot/dts/mscc/ocelot_pcb120.dtb");
|
||||
type = "flat_dt";
|
||||
arch = "mips";
|
||||
compression = "none";
|
||||
hash@0 {
|
||||
hash {
|
||||
algo = "sha1";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
configurations {
|
||||
conf@ocelot_pcb123 {
|
||||
conf-ocelot_pcb123 {
|
||||
description = "Ocelot Linux kernel";
|
||||
kernel = "kernel@0";
|
||||
fdt = "fdt@ocelot_pcb123";
|
||||
kernel = "kernel";
|
||||
fdt = "fdt-ocelot_pcb123";
|
||||
};
|
||||
|
||||
conf@ocelot_pcb120 {
|
||||
conf-ocelot_pcb120 {
|
||||
description = "Ocelot Linux kernel";
|
||||
kernel = "kernel@0";
|
||||
fdt = "fdt@ocelot_pcb120";
|
||||
kernel = "kernel";
|
||||
fdt = "fdt-ocelot_pcb120";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
|
||||
/ {
|
||||
images {
|
||||
fdt@serval_pcb105 {
|
||||
fdt-serval_pcb105 {
|
||||
description = "MSCC Serval PCB105 Device Tree";
|
||||
data = /incbin/("boot/dts/mscc/serval_pcb105.dtb");
|
||||
type = "flat_dt";
|
||||
arch = "mips";
|
||||
compression = "none";
|
||||
hash@0 {
|
||||
hash {
|
||||
algo = "sha1";
|
||||
};
|
||||
};
|
||||
|
@ -16,8 +16,8 @@
|
|||
configurations {
|
||||
pcb105 {
|
||||
description = "Serval Linux kernel";
|
||||
kernel = "kernel@0";
|
||||
fdt = "fdt@serval_pcb105";
|
||||
kernel = "kernel";
|
||||
fdt = "fdt-serval_pcb105";
|
||||
ramdisk = "ramdisk";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
/ {
|
||||
images {
|
||||
fdt@xilfpga {
|
||||
fdt-xilfpga {
|
||||
description = "MIPSfpga (xilfpga) Device Tree";
|
||||
data = /incbin/("boot/dts/xilfpga/nexys4ddr.dtb");
|
||||
type = "flat_dt";
|
||||
arch = "mips";
|
||||
compression = "none";
|
||||
hash@0 {
|
||||
hash {
|
||||
algo = "sha1";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
configurations {
|
||||
conf@xilfpga {
|
||||
conf-xilfpga {
|
||||
description = "MIPSfpga Linux kernel";
|
||||
kernel = "kernel@0";
|
||||
fdt = "fdt@xilfpga";
|
||||
kernel = "kernel";
|
||||
fdt = "fdt-xilfpga";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#address-cells = <ADDR_CELLS>;
|
||||
|
||||
images {
|
||||
kernel@0 {
|
||||
kernel {
|
||||
description = KERNEL_NAME;
|
||||
data = /incbin/(VMLINUX_BINARY);
|
||||
type = "kernel";
|
||||
|
@ -15,18 +15,18 @@
|
|||
compression = VMLINUX_COMPRESSION;
|
||||
load = /bits/ ADDR_BITS <VMLINUX_LOAD_ADDRESS>;
|
||||
entry = /bits/ ADDR_BITS <VMLINUX_ENTRY_ADDRESS>;
|
||||
hash@0 {
|
||||
hash {
|
||||
algo = "sha1";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
configurations {
|
||||
default = "conf@default";
|
||||
default = "conf-default";
|
||||
|
||||
conf@default {
|
||||
conf-default {
|
||||
description = "Generic Linux kernel";
|
||||
kernel = "kernel@0";
|
||||
kernel = "kernel";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
# MIPS headers
|
||||
generated-y += syscall_table_32_o32.h
|
||||
generated-y += syscall_table_64_n32.h
|
||||
generated-y += syscall_table_64_n64.h
|
||||
generated-y += syscall_table_64_o32.h
|
||||
generated-y += syscall_table_n32.h
|
||||
generated-y += syscall_table_n64.h
|
||||
generated-y += syscall_table_o32.h
|
||||
generated-y += unistd_nr_n32.h
|
||||
generated-y += unistd_nr_n64.h
|
||||
generated-y += unistd_nr_o32.h
|
||||
|
|
|
@ -44,8 +44,7 @@
|
|||
.endm
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_MIPSR5) || \
|
||||
defined(CONFIG_CPU_MIPSR6)
|
||||
#ifdef CONFIG_CPU_HAS_DIEI
|
||||
.macro local_irq_enable reg=t0
|
||||
ei
|
||||
irq_enable_hazard
|
||||
|
|
|
@ -107,7 +107,7 @@ extern void (*free_init_pages_eva)(void *begin, void *end);
|
|||
extern char arcs_cmdline[COMMAND_LINE_SIZE];
|
||||
|
||||
/*
|
||||
* Registers a0, a1, a3 and a4 as passed to the kernel entry by firmware
|
||||
* Registers a0, a1, a2 and a3 as passed to the kernel entry by firmware
|
||||
*/
|
||||
extern unsigned long fw_arg0, fw_arg1, fw_arg2, fw_arg3;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2000, 2004 Maciej W. Rozycki
|
||||
* Copyright (C) 2000, 2004, 2021 Maciej W. Rozycki
|
||||
* Copyright (C) 2003, 07 Ralf Baechle (ralf@linux-mips.org)
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
|
@ -9,25 +9,18 @@
|
|||
#ifndef __ASM_DIV64_H
|
||||
#define __ASM_DIV64_H
|
||||
|
||||
#include <asm-generic/div64.h>
|
||||
#include <asm/bitsperlong.h>
|
||||
|
||||
#if BITS_PER_LONG == 64
|
||||
|
||||
#include <linux/types.h>
|
||||
#if BITS_PER_LONG == 32
|
||||
|
||||
/*
|
||||
* No traps on overflows for any of these...
|
||||
*/
|
||||
|
||||
#define __div64_32(n, base) \
|
||||
({ \
|
||||
#define do_div64_32(res, high, low, base) ({ \
|
||||
unsigned long __cf, __tmp, __tmp2, __i; \
|
||||
unsigned long __quot32, __mod32; \
|
||||
unsigned long __high, __low; \
|
||||
unsigned long long __n; \
|
||||
\
|
||||
__high = *__n >> 32; \
|
||||
__low = __n; \
|
||||
__asm__( \
|
||||
" .set push \n" \
|
||||
" .set noat \n" \
|
||||
|
@ -51,18 +44,48 @@
|
|||
" subu %0, %0, %z6 \n" \
|
||||
" addiu %2, %2, 1 \n" \
|
||||
"3: \n" \
|
||||
" bnez %4, 0b\n\t" \
|
||||
" srl %5, %1, 0x1f\n\t" \
|
||||
" bnez %4, 0b \n" \
|
||||
" srl %5, %1, 0x1f \n" \
|
||||
" .set pop" \
|
||||
: "=&r" (__mod32), "=&r" (__tmp), \
|
||||
"=&r" (__quot32), "=&r" (__cf), \
|
||||
"=&r" (__i), "=&r" (__tmp2) \
|
||||
: "Jr" (base), "0" (__high), "1" (__low)); \
|
||||
: "Jr" (base), "0" (high), "1" (low)); \
|
||||
\
|
||||
(__n) = __quot32; \
|
||||
(res) = __quot32; \
|
||||
__mod32; \
|
||||
})
|
||||
|
||||
#endif /* BITS_PER_LONG == 64 */
|
||||
#define __div64_32(n, base) ({ \
|
||||
unsigned long __upper, __low, __high, __radix; \
|
||||
unsigned long long __quot; \
|
||||
unsigned long long __div; \
|
||||
unsigned long __mod; \
|
||||
\
|
||||
__div = (*n); \
|
||||
__radix = (base); \
|
||||
\
|
||||
__high = __div >> 32; \
|
||||
__low = __div; \
|
||||
\
|
||||
if (__high < __radix) { \
|
||||
__upper = __high; \
|
||||
__high = 0; \
|
||||
} else { \
|
||||
__upper = __high % __radix; \
|
||||
__high /= __radix; \
|
||||
} \
|
||||
\
|
||||
__mod = do_div64_32(__low, __upper, __low, __radix); \
|
||||
\
|
||||
__quot = __high; \
|
||||
__quot = __quot << 32 | __low; \
|
||||
(*n) = __quot; \
|
||||
__mod; \
|
||||
})
|
||||
|
||||
#endif /* BITS_PER_LONG == 32 */
|
||||
|
||||
#include <asm-generic/div64.h>
|
||||
|
||||
#endif /* __ASM_DIV64_H */
|
||||
|
|
|
@ -100,11 +100,23 @@ static inline void set_io_port_base(unsigned long base)
|
|||
* almost all conceivable cases a device driver should not be using
|
||||
* this function
|
||||
*/
|
||||
static inline unsigned long virt_to_phys(volatile const void *address)
|
||||
static inline unsigned long __virt_to_phys_nodebug(volatile const void *address)
|
||||
{
|
||||
return __pa(address);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DEBUG_VIRTUAL
|
||||
extern phys_addr_t __virt_to_phys(volatile const void *x);
|
||||
#else
|
||||
#define __virt_to_phys(x) __virt_to_phys_nodebug(x)
|
||||
#endif
|
||||
|
||||
#define virt_to_phys virt_to_phys
|
||||
static inline phys_addr_t virt_to_phys(const volatile void *x)
|
||||
{
|
||||
return __virt_to_phys(x);
|
||||
}
|
||||
|
||||
/*
|
||||
* phys_to_virt - map physical address to virtual
|
||||
* @address: address to remap
|
||||
|
|
|
@ -88,44 +88,10 @@
|
|||
|
||||
#define KVM_HALT_POLL_NS_DEFAULT 500000
|
||||
|
||||
#ifdef CONFIG_KVM_MIPS_VZ
|
||||
extern unsigned long GUESTID_MASK;
|
||||
extern unsigned long GUESTID_FIRST_VERSION;
|
||||
extern unsigned long GUESTID_VERSION_MASK;
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Special address that contains the comm page, used for reducing # of traps
|
||||
* This needs to be within 32Kb of 0x0 (so the zero register can be used), but
|
||||
* preferably not at 0x0 so that most kernel NULL pointer dereferences can be
|
||||
* caught.
|
||||
*/
|
||||
#define KVM_GUEST_COMMPAGE_ADDR ((PAGE_SIZE > 0x8000) ? 0 : \
|
||||
(0x8000 - PAGE_SIZE))
|
||||
|
||||
#define KVM_GUEST_KERNEL_MODE(vcpu) ((kvm_read_c0_guest_status(vcpu->arch.cop0) & (ST0_EXL | ST0_ERL)) || \
|
||||
((kvm_read_c0_guest_status(vcpu->arch.cop0) & KSU_USER) == 0))
|
||||
|
||||
#define KVM_GUEST_KUSEG 0x00000000UL
|
||||
#define KVM_GUEST_KSEG0 0x40000000UL
|
||||
#define KVM_GUEST_KSEG1 0x40000000UL
|
||||
#define KVM_GUEST_KSEG23 0x60000000UL
|
||||
#define KVM_GUEST_KSEGX(a) ((_ACAST32_(a)) & 0xe0000000)
|
||||
#define KVM_GUEST_CPHYSADDR(a) ((_ACAST32_(a)) & 0x1fffffff)
|
||||
|
||||
#define KVM_GUEST_CKSEG0ADDR(a) (KVM_GUEST_CPHYSADDR(a) | KVM_GUEST_KSEG0)
|
||||
#define KVM_GUEST_CKSEG1ADDR(a) (KVM_GUEST_CPHYSADDR(a) | KVM_GUEST_KSEG1)
|
||||
#define KVM_GUEST_CKSEG23ADDR(a) (KVM_GUEST_CPHYSADDR(a) | KVM_GUEST_KSEG23)
|
||||
|
||||
/*
|
||||
* Map an address to a certain kernel segment
|
||||
*/
|
||||
#define KVM_GUEST_KSEG0ADDR(a) (KVM_GUEST_CPHYSADDR(a) | KVM_GUEST_KSEG0)
|
||||
#define KVM_GUEST_KSEG1ADDR(a) (KVM_GUEST_CPHYSADDR(a) | KVM_GUEST_KSEG1)
|
||||
#define KVM_GUEST_KSEG23ADDR(a) (KVM_GUEST_CPHYSADDR(a) | KVM_GUEST_KSEG23)
|
||||
|
||||
#define KVM_INVALID_PAGE 0xdeadbeef
|
||||
#define KVM_INVALID_ADDR 0xdeadbeef
|
||||
|
||||
/*
|
||||
|
@ -165,7 +131,6 @@ struct kvm_vcpu_stat {
|
|||
u64 fpe_exits;
|
||||
u64 msa_disabled_exits;
|
||||
u64 flush_dcache_exits;
|
||||
#ifdef CONFIG_KVM_MIPS_VZ
|
||||
u64 vz_gpsi_exits;
|
||||
u64 vz_gsfc_exits;
|
||||
u64 vz_hc_exits;
|
||||
|
@ -176,7 +141,6 @@ struct kvm_vcpu_stat {
|
|||
u64 vz_resvd_exits;
|
||||
#ifdef CONFIG_CPU_LOONGSON64
|
||||
u64 vz_cpucfg_exits;
|
||||
#endif
|
||||
#endif
|
||||
u64 halt_successful_poll;
|
||||
u64 halt_attempted_poll;
|
||||
|
@ -303,14 +267,6 @@ enum emulation_result {
|
|||
EMULATE_HYPERCALL, /* HYPCALL instruction */
|
||||
};
|
||||
|
||||
#define mips3_paddr_to_tlbpfn(x) \
|
||||
(((unsigned long)(x) >> MIPS3_PG_SHIFT) & MIPS3_PG_FRAME)
|
||||
#define mips3_tlbpfn_to_paddr(x) \
|
||||
((unsigned long)((x) & MIPS3_PG_FRAME) << MIPS3_PG_SHIFT)
|
||||
|
||||
#define MIPS3_PG_SHIFT 6
|
||||
#define MIPS3_PG_FRAME 0x3fffffc0
|
||||
|
||||
#if defined(CONFIG_64BIT)
|
||||
#define VPN2_MASK GENMASK(cpu_vmbits - 1, 13)
|
||||
#else
|
||||
|
@ -337,7 +293,6 @@ struct kvm_mips_tlb {
|
|||
#define KVM_MIPS_AUX_FPU 0x1
|
||||
#define KVM_MIPS_AUX_MSA 0x2
|
||||
|
||||
#define KVM_MIPS_GUEST_TLB_SIZE 64
|
||||
struct kvm_vcpu_arch {
|
||||
void *guest_ebase;
|
||||
int (*vcpu_run)(struct kvm_vcpu *vcpu);
|
||||
|
@ -370,9 +325,6 @@ struct kvm_vcpu_arch {
|
|||
/* COP0 State */
|
||||
struct mips_coproc *cop0;
|
||||
|
||||
/* Host KSEG0 address of the EI/DI offset */
|
||||
void *kseg0_commpage;
|
||||
|
||||
/* Resume PC after MMIO completion */
|
||||
unsigned long io_pc;
|
||||
/* GPR used as IO source/target */
|
||||
|
@ -398,19 +350,9 @@ struct kvm_vcpu_arch {
|
|||
/* Bitmask of pending exceptions to be cleared */
|
||||
unsigned long pending_exceptions_clr;
|
||||
|
||||
/* S/W Based TLB for guest */
|
||||
struct kvm_mips_tlb guest_tlb[KVM_MIPS_GUEST_TLB_SIZE];
|
||||
|
||||
/* Guest kernel/user [partial] mm */
|
||||
struct mm_struct guest_kernel_mm, guest_user_mm;
|
||||
|
||||
/* Guest ASID of last user mode execution */
|
||||
unsigned int last_user_gasid;
|
||||
|
||||
/* Cache some mmu pages needed inside spinlock regions */
|
||||
struct kvm_mmu_memory_cache mmu_page_cache;
|
||||
|
||||
#ifdef CONFIG_KVM_MIPS_VZ
|
||||
/* vcpu's vzguestid is different on each host cpu in an smp system */
|
||||
u32 vzguestid[NR_CPUS];
|
||||
|
||||
|
@ -421,7 +363,6 @@ struct kvm_vcpu_arch {
|
|||
|
||||
/* emulated guest MAAR registers */
|
||||
unsigned long maar[6];
|
||||
#endif
|
||||
|
||||
/* Last CPU the VCPU state was loaded on */
|
||||
int last_sched_cpu;
|
||||
|
@ -651,20 +592,6 @@ static inline void kvm_change_##name1(struct mips_coproc *cop0, \
|
|||
__BUILD_KVM_ATOMIC_SAVED(name, type, _reg, sel) \
|
||||
__BUILD_KVM_SET_WRAP(c0_guest_##name, sw_gc0_##name, type)
|
||||
|
||||
#ifndef CONFIG_KVM_MIPS_VZ
|
||||
|
||||
/*
|
||||
* T&E (trap & emulate software based virtualisation)
|
||||
* We generate the common accessors operating exclusively on the saved context
|
||||
* in RAM.
|
||||
*/
|
||||
|
||||
#define __BUILD_KVM_RW_HW __BUILD_KVM_RW_SW
|
||||
#define __BUILD_KVM_SET_HW __BUILD_KVM_SET_SW
|
||||
#define __BUILD_KVM_ATOMIC_HW __BUILD_KVM_ATOMIC_SW
|
||||
|
||||
#else
|
||||
|
||||
/*
|
||||
* VZ (hardware assisted virtualisation)
|
||||
* These macros use the active guest state in VZ mode (hardware registers),
|
||||
|
@ -697,8 +624,6 @@ static inline void kvm_change_##name1(struct mips_coproc *cop0, \
|
|||
*/
|
||||
#define __BUILD_KVM_ATOMIC_HW __BUILD_KVM_SET_HW
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Define accessors for CP0 registers that are accessible to the guest. These
|
||||
* are primarily used by common emulation code, which may need to access the
|
||||
|
@ -874,42 +799,9 @@ void kvm_drop_fpu(struct kvm_vcpu *vcpu);
|
|||
void kvm_lose_fpu(struct kvm_vcpu *vcpu);
|
||||
|
||||
/* TLB handling */
|
||||
u32 kvm_get_kernel_asid(struct kvm_vcpu *vcpu);
|
||||
|
||||
u32 kvm_get_user_asid(struct kvm_vcpu *vcpu);
|
||||
|
||||
u32 kvm_get_commpage_asid (struct kvm_vcpu *vcpu);
|
||||
|
||||
#ifdef CONFIG_KVM_MIPS_VZ
|
||||
int kvm_mips_handle_vz_root_tlb_fault(unsigned long badvaddr,
|
||||
struct kvm_vcpu *vcpu, bool write_fault);
|
||||
#endif
|
||||
extern int kvm_mips_handle_kseg0_tlb_fault(unsigned long badbaddr,
|
||||
struct kvm_vcpu *vcpu,
|
||||
bool write_fault);
|
||||
|
||||
extern int kvm_mips_handle_commpage_tlb_fault(unsigned long badvaddr,
|
||||
struct kvm_vcpu *vcpu);
|
||||
|
||||
extern int kvm_mips_handle_mapped_seg_tlb_fault(struct kvm_vcpu *vcpu,
|
||||
struct kvm_mips_tlb *tlb,
|
||||
unsigned long gva,
|
||||
bool write_fault);
|
||||
|
||||
extern enum emulation_result kvm_mips_handle_tlbmiss(u32 cause,
|
||||
u32 *opc,
|
||||
struct kvm_vcpu *vcpu,
|
||||
bool write_fault);
|
||||
|
||||
extern void kvm_mips_dump_host_tlbs(void);
|
||||
extern void kvm_mips_dump_guest_tlbs(struct kvm_vcpu *vcpu);
|
||||
extern int kvm_mips_host_tlb_inv(struct kvm_vcpu *vcpu, unsigned long entryhi,
|
||||
bool user, bool kernel);
|
||||
|
||||
extern int kvm_mips_guest_tlb_lookup(struct kvm_vcpu *vcpu,
|
||||
unsigned long entryhi);
|
||||
|
||||
#ifdef CONFIG_KVM_MIPS_VZ
|
||||
int kvm_vz_host_tlb_inv(struct kvm_vcpu *vcpu, unsigned long entryhi);
|
||||
int kvm_vz_guest_tlb_lookup(struct kvm_vcpu *vcpu, unsigned long gva,
|
||||
unsigned long *gpa);
|
||||
|
@ -923,48 +815,13 @@ void kvm_vz_load_guesttlb(const struct kvm_mips_tlb *buf, unsigned int index,
|
|||
void kvm_loongson_clear_guest_vtlb(void);
|
||||
void kvm_loongson_clear_guest_ftlb(void);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void kvm_mips_suspend_mm(int cpu);
|
||||
void kvm_mips_resume_mm(int cpu);
|
||||
|
||||
/* MMU handling */
|
||||
|
||||
/**
|
||||
* enum kvm_mips_flush - Types of MMU flushes.
|
||||
* @KMF_USER: Flush guest user virtual memory mappings.
|
||||
* Guest USeg only.
|
||||
* @KMF_KERN: Flush guest kernel virtual memory mappings.
|
||||
* Guest USeg and KSeg2/3.
|
||||
* @KMF_GPA: Flush guest physical memory mappings.
|
||||
* Also includes KSeg0 if KMF_KERN is set.
|
||||
*/
|
||||
enum kvm_mips_flush {
|
||||
KMF_USER = 0x0,
|
||||
KMF_KERN = 0x1,
|
||||
KMF_GPA = 0x2,
|
||||
};
|
||||
void kvm_mips_flush_gva_pt(pgd_t *pgd, enum kvm_mips_flush flags);
|
||||
bool kvm_mips_flush_gpa_pt(struct kvm *kvm, gfn_t start_gfn, gfn_t end_gfn);
|
||||
int kvm_mips_mkclean_gpa_pt(struct kvm *kvm, gfn_t start_gfn, gfn_t end_gfn);
|
||||
pgd_t *kvm_pgd_alloc(void);
|
||||
void kvm_mmu_free_memory_caches(struct kvm_vcpu *vcpu);
|
||||
void kvm_trap_emul_invalidate_gva(struct kvm_vcpu *vcpu, unsigned long addr,
|
||||
bool user);
|
||||
void kvm_trap_emul_gva_lockless_begin(struct kvm_vcpu *vcpu);
|
||||
void kvm_trap_emul_gva_lockless_end(struct kvm_vcpu *vcpu);
|
||||
|
||||
enum kvm_mips_fault_result {
|
||||
KVM_MIPS_MAPPED = 0,
|
||||
KVM_MIPS_GVA,
|
||||
KVM_MIPS_GPA,
|
||||
KVM_MIPS_TLB,
|
||||
KVM_MIPS_TLBINV,
|
||||
KVM_MIPS_TLBMOD,
|
||||
};
|
||||
enum kvm_mips_fault_result kvm_trap_emul_gva_fault(struct kvm_vcpu *vcpu,
|
||||
unsigned long gva,
|
||||
bool write);
|
||||
|
||||
#define KVM_ARCH_WANT_MMU_NOTIFIER
|
||||
int kvm_unmap_hva_range(struct kvm *kvm,
|
||||
|
@ -974,7 +831,6 @@ int kvm_age_hva(struct kvm *kvm, unsigned long start, unsigned long end);
|
|||
int kvm_test_age_hva(struct kvm *kvm, unsigned long hva);
|
||||
|
||||
/* Emulation */
|
||||
int kvm_get_inst(u32 *opc, struct kvm_vcpu *vcpu, u32 *out);
|
||||
enum emulation_result update_pc(struct kvm_vcpu *vcpu, u32 cause);
|
||||
int kvm_get_badinstr(u32 *opc, struct kvm_vcpu *vcpu, u32 *out);
|
||||
int kvm_get_badinstrp(u32 *opc, struct kvm_vcpu *vcpu, u32 *out);
|
||||
|
@ -1006,68 +862,6 @@ static inline bool kvm_is_ifetch_fault(struct kvm_vcpu_arch *vcpu)
|
|||
return false;
|
||||
}
|
||||
|
||||
extern enum emulation_result kvm_mips_emulate_inst(u32 cause,
|
||||
u32 *opc,
|
||||
struct kvm_vcpu *vcpu);
|
||||
|
||||
long kvm_mips_guest_exception_base(struct kvm_vcpu *vcpu);
|
||||
|
||||
extern enum emulation_result kvm_mips_emulate_syscall(u32 cause,
|
||||
u32 *opc,
|
||||
struct kvm_vcpu *vcpu);
|
||||
|
||||
extern enum emulation_result kvm_mips_emulate_tlbmiss_ld(u32 cause,
|
||||
u32 *opc,
|
||||
struct kvm_vcpu *vcpu);
|
||||
|
||||
extern enum emulation_result kvm_mips_emulate_tlbinv_ld(u32 cause,
|
||||
u32 *opc,
|
||||
struct kvm_vcpu *vcpu);
|
||||
|
||||
extern enum emulation_result kvm_mips_emulate_tlbmiss_st(u32 cause,
|
||||
u32 *opc,
|
||||
struct kvm_vcpu *vcpu);
|
||||
|
||||
extern enum emulation_result kvm_mips_emulate_tlbinv_st(u32 cause,
|
||||
u32 *opc,
|
||||
struct kvm_vcpu *vcpu);
|
||||
|
||||
extern enum emulation_result kvm_mips_emulate_tlbmod(u32 cause,
|
||||
u32 *opc,
|
||||
struct kvm_vcpu *vcpu);
|
||||
|
||||
extern enum emulation_result kvm_mips_emulate_fpu_exc(u32 cause,
|
||||
u32 *opc,
|
||||
struct kvm_vcpu *vcpu);
|
||||
|
||||
extern enum emulation_result kvm_mips_handle_ri(u32 cause,
|
||||
u32 *opc,
|
||||
struct kvm_vcpu *vcpu);
|
||||
|
||||
extern enum emulation_result kvm_mips_emulate_ri_exc(u32 cause,
|
||||
u32 *opc,
|
||||
struct kvm_vcpu *vcpu);
|
||||
|
||||
extern enum emulation_result kvm_mips_emulate_bp_exc(u32 cause,
|
||||
u32 *opc,
|
||||
struct kvm_vcpu *vcpu);
|
||||
|
||||
extern enum emulation_result kvm_mips_emulate_trap_exc(u32 cause,
|
||||
u32 *opc,
|
||||
struct kvm_vcpu *vcpu);
|
||||
|
||||
extern enum emulation_result kvm_mips_emulate_msafpe_exc(u32 cause,
|
||||
u32 *opc,
|
||||
struct kvm_vcpu *vcpu);
|
||||
|
||||
extern enum emulation_result kvm_mips_emulate_fpe_exc(u32 cause,
|
||||
u32 *opc,
|
||||
struct kvm_vcpu *vcpu);
|
||||
|
||||
extern enum emulation_result kvm_mips_emulate_msadis_exc(u32 cause,
|
||||
u32 *opc,
|
||||
struct kvm_vcpu *vcpu);
|
||||
|
||||
extern enum emulation_result kvm_mips_complete_mmio_load(struct kvm_vcpu *vcpu);
|
||||
|
||||
u32 kvm_mips_read_count(struct kvm_vcpu *vcpu);
|
||||
|
@ -1087,26 +881,9 @@ ktime_t kvm_mips_freeze_hrtimer(struct kvm_vcpu *vcpu, u32 *count);
|
|||
int kvm_mips_restore_hrtimer(struct kvm_vcpu *vcpu, ktime_t before,
|
||||
u32 count, int min_drift);
|
||||
|
||||
#ifdef CONFIG_KVM_MIPS_VZ
|
||||
void kvm_vz_acquire_htimer(struct kvm_vcpu *vcpu);
|
||||
void kvm_vz_lose_htimer(struct kvm_vcpu *vcpu);
|
||||
#else
|
||||
static inline void kvm_vz_acquire_htimer(struct kvm_vcpu *vcpu) {}
|
||||
static inline void kvm_vz_lose_htimer(struct kvm_vcpu *vcpu) {}
|
||||
#endif
|
||||
|
||||
enum emulation_result kvm_mips_check_privilege(u32 cause,
|
||||
u32 *opc,
|
||||
struct kvm_vcpu *vcpu);
|
||||
|
||||
enum emulation_result kvm_mips_emulate_cache(union mips_instruction inst,
|
||||
u32 *opc,
|
||||
u32 cause,
|
||||
struct kvm_vcpu *vcpu);
|
||||
enum emulation_result kvm_mips_emulate_CP0(union mips_instruction inst,
|
||||
u32 *opc,
|
||||
u32 cause,
|
||||
struct kvm_vcpu *vcpu);
|
||||
enum emulation_result kvm_mips_emulate_store(union mips_instruction inst,
|
||||
u32 cause,
|
||||
struct kvm_vcpu *vcpu);
|
||||
|
@ -1117,27 +894,12 @@ enum emulation_result kvm_mips_emulate_load(union mips_instruction inst,
|
|||
/* COP0 */
|
||||
enum emulation_result kvm_mips_emul_wait(struct kvm_vcpu *vcpu);
|
||||
|
||||
unsigned int kvm_mips_config1_wrmask(struct kvm_vcpu *vcpu);
|
||||
unsigned int kvm_mips_config3_wrmask(struct kvm_vcpu *vcpu);
|
||||
unsigned int kvm_mips_config4_wrmask(struct kvm_vcpu *vcpu);
|
||||
unsigned int kvm_mips_config5_wrmask(struct kvm_vcpu *vcpu);
|
||||
|
||||
/* Hypercalls (hypcall.c) */
|
||||
|
||||
enum emulation_result kvm_mips_emul_hypcall(struct kvm_vcpu *vcpu,
|
||||
union mips_instruction inst);
|
||||
int kvm_mips_handle_hypcall(struct kvm_vcpu *vcpu);
|
||||
|
||||
/* Dynamic binary translation */
|
||||
extern int kvm_mips_trans_cache_index(union mips_instruction inst,
|
||||
u32 *opc, struct kvm_vcpu *vcpu);
|
||||
extern int kvm_mips_trans_cache_va(union mips_instruction inst, u32 *opc,
|
||||
struct kvm_vcpu *vcpu);
|
||||
extern int kvm_mips_trans_mfc0(union mips_instruction inst, u32 *opc,
|
||||
struct kvm_vcpu *vcpu);
|
||||
extern int kvm_mips_trans_mtc0(union mips_instruction inst, u32 *opc,
|
||||
struct kvm_vcpu *vcpu);
|
||||
|
||||
/* Misc */
|
||||
extern void kvm_mips_dump_stats(struct kvm_vcpu *vcpu);
|
||||
extern unsigned long kvm_mips_get_ramsize(struct kvm *kvm);
|
||||
|
|
|
@ -157,4 +157,12 @@ octeon_main_processor:
|
|||
.macro smp_slave_setup
|
||||
.endm
|
||||
|
||||
#define USE_KEXEC_SMP_WAIT_FINAL
|
||||
.macro kexec_smp_wait_final
|
||||
.set push
|
||||
.set noreorder
|
||||
synci 0($0)
|
||||
.set pop
|
||||
.endm
|
||||
|
||||
#endif /* __ASM_MACH_CAVIUM_OCTEON_KERNEL_ENTRY_H */
|
||||
|
|
|
@ -30,11 +30,7 @@
|
|||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#ifdef CONFIG_32BIT
|
||||
#ifdef CONFIG_KVM_GUEST
|
||||
#define CAC_BASE _AC(0x40000000, UL)
|
||||
#else
|
||||
#define CAC_BASE _AC(0x80000000, UL)
|
||||
#endif
|
||||
#ifndef IO_BASE
|
||||
#define IO_BASE _AC(0xa0000000, UL)
|
||||
#endif
|
||||
|
@ -43,12 +39,8 @@
|
|||
#endif
|
||||
|
||||
#ifndef MAP_BASE
|
||||
#ifdef CONFIG_KVM_GUEST
|
||||
#define MAP_BASE _AC(0x60000000, UL)
|
||||
#else
|
||||
#define MAP_BASE _AC(0xc0000000, UL)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Memory above this physical address will be considered highmem.
|
||||
|
@ -100,11 +92,7 @@
|
|||
#endif
|
||||
|
||||
#ifndef FIXADDR_TOP
|
||||
#ifdef CONFIG_KVM_GUEST
|
||||
#define FIXADDR_TOP ((unsigned long)(long)(int)0x7ffe0000)
|
||||
#else
|
||||
#define FIXADDR_TOP ((unsigned long)(long)(int)0xfffe0000)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* __ASM_MACH_GENERIC_SPACES_H */
|
||||
|
|
|
@ -198,33 +198,6 @@ enum loongson_bridge_type {
|
|||
VIRTUAL = 3
|
||||
};
|
||||
|
||||
struct loongson_system_configuration {
|
||||
u32 nr_cpus;
|
||||
u32 nr_nodes;
|
||||
int cores_per_node;
|
||||
int cores_per_package;
|
||||
u16 boot_cpu_id;
|
||||
u16 reserved_cpus_mask;
|
||||
enum loongson_cpu_type cputype;
|
||||
enum loongson_bridge_type bridgetype;
|
||||
u64 ht_control_base;
|
||||
u64 pci_mem_start_addr;
|
||||
u64 pci_mem_end_addr;
|
||||
u64 pci_io_base;
|
||||
u64 restart_addr;
|
||||
u64 poweroff_addr;
|
||||
u64 suspend_addr;
|
||||
u64 vgabios_addr;
|
||||
u32 dma_mask_bits;
|
||||
char ecname[32];
|
||||
u32 nr_uarts;
|
||||
struct uart_device uarts[MAX_UARTS];
|
||||
u32 nr_sensors;
|
||||
struct sensor_device sensors[MAX_SENSORS];
|
||||
u64 workarounds;
|
||||
void (*early_config)(void);
|
||||
};
|
||||
|
||||
extern struct efi_memory_map_loongson *loongson_memmap;
|
||||
extern struct loongson_system_configuration loongson_sysconf;
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#ifndef __ASM_MACH_LOONGSON64_BUILTIN_DTBS_H_
|
||||
#define __ASM_MACH_LOONGSON64_BUILTIN_DTBS_H_
|
||||
|
||||
extern u32 __dtb_loongson64_2core_2k1000_begin[];
|
||||
extern u32 __dtb_loongson64c_4core_ls7a_begin[];
|
||||
extern u32 __dtb_loongson64c_4core_rs780e_begin[];
|
||||
extern u32 __dtb_loongson64c_8core_rs780e_begin[];
|
||||
|
|
|
@ -75,4 +75,31 @@
|
|||
.set pop
|
||||
.endm
|
||||
|
||||
#define USE_KEXEC_SMP_WAIT_FINAL
|
||||
.macro kexec_smp_wait_final
|
||||
/* s0:prid s1:initfn */
|
||||
/* a0:base t1:cpuid t2:node t9:count */
|
||||
mfc0 t1, CP0_EBASE
|
||||
andi t1, MIPS_EBASE_CPUNUM
|
||||
dins a0, t1, 8, 2 /* insert core id*/
|
||||
dext t2, t1, 2, 2
|
||||
dins a0, t2, 44, 2 /* insert node id */
|
||||
mfc0 s0, CP0_PRID
|
||||
andi s0, s0, (PRID_IMP_MASK | PRID_REV_MASK)
|
||||
beq s0, (PRID_IMP_LOONGSON_64C | PRID_REV_LOONGSON3B_R1), 1f
|
||||
beq s0, (PRID_IMP_LOONGSON_64C | PRID_REV_LOONGSON3B_R2), 1f
|
||||
b 2f /* Loongson-3A1000/3A2000/3A3000/3A4000 */
|
||||
1: dins a0, t2, 14, 2 /* Loongson-3B1000/3B1500 need bit 15~14 */
|
||||
2: li t9, 0x100 /* wait for init loop */
|
||||
3: addiu t9, -1 /* limit mailbox access */
|
||||
bnez t9, 3b
|
||||
lw s1, 0x20(a0) /* check PC as an indicator */
|
||||
beqz s1, 2b
|
||||
ld s1, 0x20(a0) /* get PC via mailbox reg0 */
|
||||
ld sp, 0x28(a0) /* get SP via mailbox reg1 */
|
||||
ld gp, 0x30(a0) /* get GP via mailbox reg2 */
|
||||
ld a1, 0x38(a0)
|
||||
jr s1 /* jump to initial PC */
|
||||
.endm
|
||||
|
||||
#endif /* __ASM_MACH_LOONGSON64_KERNEL_ENTRY_H */
|
||||
|
|
|
@ -12,6 +12,30 @@
|
|||
#include <linux/irq.h>
|
||||
#include <boot_param.h>
|
||||
|
||||
enum loongson_fw_interface {
|
||||
LOONGSON_LEFI,
|
||||
LOONGSON_DTB,
|
||||
};
|
||||
|
||||
/* machine-specific boot configuration */
|
||||
struct loongson_system_configuration {
|
||||
enum loongson_fw_interface fw_interface;
|
||||
u32 nr_cpus;
|
||||
u32 nr_nodes;
|
||||
int cores_per_node;
|
||||
int cores_per_package;
|
||||
u16 boot_cpu_id;
|
||||
u16 reserved_cpus_mask;
|
||||
enum loongson_cpu_type cputype;
|
||||
enum loongson_bridge_type bridgetype;
|
||||
u64 restart_addr;
|
||||
u64 poweroff_addr;
|
||||
u64 suspend_addr;
|
||||
u64 vgabios_addr;
|
||||
u32 dma_mask_bits;
|
||||
u64 workarounds;
|
||||
void (*early_config)(void);
|
||||
};
|
||||
|
||||
/* machine-specific reboot/halt operation */
|
||||
extern void mach_prepare_reboot(void);
|
||||
|
@ -23,7 +47,8 @@ extern u32 memsize, highmemsize;
|
|||
extern const struct plat_smp_ops loongson3_smp_ops;
|
||||
|
||||
/* loongson-specific command line, env and memory initialization */
|
||||
extern void __init prom_init_env(void);
|
||||
extern void __init prom_dtb_init_env(void);
|
||||
extern void __init prom_lefi_init_env(void);
|
||||
extern void __init szmem(unsigned int node);
|
||||
extern void *loongson_fdt_blob;
|
||||
|
||||
|
|
|
@ -24,9 +24,10 @@
|
|||
#define CHIP_REV_VER_SHIFT 8
|
||||
#define CHIP_REV_ECO_MASK 0xf
|
||||
|
||||
#define MT7621_DRAM_BASE 0x0
|
||||
#define MT7621_DDR2_SIZE_MIN 32
|
||||
#define MT7621_DDR2_SIZE_MAX 256
|
||||
#define MT7621_LOWMEM_BASE 0x0
|
||||
#define MT7621_LOWMEM_MAX_SIZE 0x1C000000
|
||||
#define MT7621_HIGHMEM_BASE 0x20000000
|
||||
#define MT7621_HIGHMEM_SIZE 0x4000000
|
||||
|
||||
#define MT7621_CHIP_NAME0 0x3637544D
|
||||
#define MT7621_CHIP_NAME1 0x20203132
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
#include <linux/io.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#include <asm/mips-boards/launch.h>
|
||||
|
||||
extern unsigned long __cps_access_bad_size(void)
|
||||
__compiletime_error("Bad size for CPS accessor");
|
||||
|
||||
|
@ -165,11 +167,30 @@ static inline uint64_t mips_cps_cluster_config(unsigned int cluster)
|
|||
*/
|
||||
static inline unsigned int mips_cps_numcores(unsigned int cluster)
|
||||
{
|
||||
unsigned int ncores;
|
||||
|
||||
if (!mips_cm_present())
|
||||
return 0;
|
||||
|
||||
/* Add one before masking to handle 0xff indicating no cores */
|
||||
return (mips_cps_cluster_config(cluster) + 1) & CM_GCR_CONFIG_PCORES;
|
||||
ncores = (mips_cps_cluster_config(cluster) + 1) & CM_GCR_CONFIG_PCORES;
|
||||
|
||||
if (IS_ENABLED(CONFIG_SOC_MT7621)) {
|
||||
struct cpulaunch *launch;
|
||||
|
||||
/*
|
||||
* Ralink MT7621S SoC is single core, but the GCR_CONFIG method
|
||||
* always reports 2 cores. Check the second core's LAUNCH_FREADY
|
||||
* flag to detect if the second core is missing. This method
|
||||
* only works before the core has been started.
|
||||
*/
|
||||
launch = (struct cpulaunch *)CKSEG0ADDR(CPULAUNCH);
|
||||
launch += 2; /* MT7621 has 2 VPEs per core */
|
||||
if (!(launch->flags & LAUNCH_FREADY))
|
||||
ncores = 1;
|
||||
}
|
||||
|
||||
return ncores;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -152,7 +152,7 @@ typedef union {
|
|||
|
||||
/* physical mem address */
|
||||
struct {
|
||||
/* techically, <47:40> are dont-cares */
|
||||
/* technically, <47:40> are dont-cares */
|
||||
uint64_t zeroes:24;
|
||||
/* the hardware ignores <39:36> in Octeon I */
|
||||
uint64_t unaddr:4;
|
||||
|
|
|
@ -298,6 +298,7 @@ enum cvmx_board_types_enum {
|
|||
CVMX_BOARD_TYPE_UBNT_E200 = 20003,
|
||||
CVMX_BOARD_TYPE_UBNT_E220 = 20005,
|
||||
CVMX_BOARD_TYPE_CUST_DSR1000N = 20006,
|
||||
CVMX_BOARD_TYPE_UBNT_E300 = 20300,
|
||||
CVMX_BOARD_TYPE_KONTRON_S1901 = 21901,
|
||||
CVMX_BOARD_TYPE_CUST_PRIVATE_MAX = 30000,
|
||||
|
||||
|
@ -401,6 +402,7 @@ static inline const char *cvmx_board_type_to_string(enum
|
|||
ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_UBNT_E200)
|
||||
ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_UBNT_E220)
|
||||
ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_DSR1000N)
|
||||
ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_UBNT_E300)
|
||||
ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_KONTRON_S1901)
|
||||
ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_PRIVATE_MAX)
|
||||
}
|
||||
|
|
|
@ -210,9 +210,16 @@ static inline unsigned long ___pa(unsigned long x)
|
|||
* also affect MIPS so we keep this one until GCC 3.x has been retired
|
||||
* before we can apply https://patchwork.linux-mips.org/patch/1541/
|
||||
*/
|
||||
#define __pa_symbol_nodebug(x) __pa(RELOC_HIDE((unsigned long)(x), 0))
|
||||
|
||||
#ifdef CONFIG_DEBUG_VIRTUAL
|
||||
extern phys_addr_t __phys_addr_symbol(unsigned long x);
|
||||
#else
|
||||
#define __phys_addr_symbol(x) __pa_symbol_nodebug(x)
|
||||
#endif
|
||||
|
||||
#ifndef __pa_symbol
|
||||
#define __pa_symbol(x) __pa(RELOC_HIDE((unsigned long)(x), 0))
|
||||
#define __pa_symbol(x) __phys_addr_symbol((unsigned long)(x))
|
||||
#endif
|
||||
|
||||
#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
|
||||
|
|
|
@ -38,7 +38,6 @@ struct pci_controller {
|
|||
struct resource *io_resource;
|
||||
unsigned long io_offset;
|
||||
unsigned long io_map_base;
|
||||
struct resource *busn_resource;
|
||||
|
||||
#ifndef CONFIG_PCI_DOMAINS_GENERIC
|
||||
unsigned int index;
|
||||
|
|
|
@ -32,16 +32,11 @@ extern unsigned int vced_count, vcei_count;
|
|||
extern int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src);
|
||||
|
||||
#ifdef CONFIG_32BIT
|
||||
#ifdef CONFIG_KVM_GUEST
|
||||
/* User space process size is limited to 1GB in KVM Guest Mode */
|
||||
#define TASK_SIZE 0x3fff8000UL
|
||||
#else
|
||||
/*
|
||||
* User space process size: 2GB. This is hardcoded into a few places,
|
||||
* so don't change it unless you know what you are doing.
|
||||
*/
|
||||
#define TASK_SIZE 0x80000000UL
|
||||
#endif
|
||||
|
||||
#define STACK_TOP_MAX TASK_SIZE
|
||||
|
||||
|
@ -226,10 +221,6 @@ struct nlm_cop2_state {
|
|||
#define COP2_INIT
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
unsigned long seg;
|
||||
} mm_segment_t;
|
||||
|
||||
#ifdef CONFIG_CPU_HAS_MSA
|
||||
# define ARCH_MIN_TASKALIGN 16
|
||||
# define FPU_ALIGN __aligned(16)
|
||||
|
|
|
@ -28,11 +28,6 @@ struct thread_info {
|
|||
unsigned long tp_value; /* thread pointer */
|
||||
__u32 cpu; /* current CPU */
|
||||
int preempt_count; /* 0 => preemptable, <0 => BUG */
|
||||
mm_segment_t addr_limit; /*
|
||||
* thread address space limit:
|
||||
* 0x7fffffff for user-thead
|
||||
* 0xffffffff for kernel-thread
|
||||
*/
|
||||
struct pt_regs *regs;
|
||||
long syscall; /* syscall number */
|
||||
};
|
||||
|
@ -46,7 +41,6 @@ struct thread_info {
|
|||
.flags = _TIF_FIXADE, \
|
||||
.cpu = 0, \
|
||||
.preempt_count = INIT_PREEMPT_COUNT, \
|
||||
.addr_limit = KERNEL_DS, \
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -16,20 +16,9 @@
|
|||
#include <asm/asm-eva.h>
|
||||
#include <asm/extable.h>
|
||||
|
||||
/*
|
||||
* The fs value determines whether argument validity checking should be
|
||||
* performed or not. If get_fs() == USER_DS, checking is performed, with
|
||||
* get_fs() == KERNEL_DS, checking is bypassed.
|
||||
*
|
||||
* For historical reasons, these macros are grossly misnamed.
|
||||
*/
|
||||
#ifdef CONFIG_32BIT
|
||||
|
||||
#ifdef CONFIG_KVM_GUEST
|
||||
#define __UA_LIMIT 0x40000000UL
|
||||
#else
|
||||
#define __UA_LIMIT 0x80000000UL
|
||||
#endif
|
||||
|
||||
#define __UA_ADDR ".word"
|
||||
#define __UA_LA "la"
|
||||
|
@ -53,43 +42,6 @@ extern u64 __ua_limit;
|
|||
|
||||
#endif /* CONFIG_64BIT */
|
||||
|
||||
/*
|
||||
* USER_DS is a bitmask that has the bits set that may not be set in a valid
|
||||
* userspace address. Note that we limit 32-bit userspace to 0x7fff8000 but
|
||||
* the arithmetic we're doing only works if the limit is a power of two, so
|
||||
* we use 0x80000000 here on 32-bit kernels. If a process passes an invalid
|
||||
* address in this range it's the process's problem, not ours :-)
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_KVM_GUEST
|
||||
#define KERNEL_DS ((mm_segment_t) { 0x80000000UL })
|
||||
#define USER_DS ((mm_segment_t) { 0xC0000000UL })
|
||||
#else
|
||||
#define KERNEL_DS ((mm_segment_t) { 0UL })
|
||||
#define USER_DS ((mm_segment_t) { __UA_LIMIT })
|
||||
#endif
|
||||
|
||||
#define get_fs() (current_thread_info()->addr_limit)
|
||||
#define set_fs(x) (current_thread_info()->addr_limit = (x))
|
||||
|
||||
#define uaccess_kernel() (get_fs().seg == KERNEL_DS.seg)
|
||||
|
||||
/*
|
||||
* eva_kernel_access() - determine whether kernel memory access on an EVA system
|
||||
*
|
||||
* Determines whether memory accesses should be performed to kernel memory
|
||||
* on a system using Extended Virtual Addressing (EVA).
|
||||
*
|
||||
* Return: true if a kernel memory access on an EVA system, else false.
|
||||
*/
|
||||
static inline bool eva_kernel_access(void)
|
||||
{
|
||||
if (!IS_ENABLED(CONFIG_EVA))
|
||||
return false;
|
||||
|
||||
return uaccess_kernel();
|
||||
}
|
||||
|
||||
/*
|
||||
* Is a address valid? This does a straightforward calculation rather
|
||||
* than tests.
|
||||
|
@ -127,7 +79,9 @@ static inline bool eva_kernel_access(void)
|
|||
static inline int __access_ok(const void __user *p, unsigned long size)
|
||||
{
|
||||
unsigned long addr = (unsigned long)p;
|
||||
return (get_fs().seg & (addr | (addr + size) | __ua_size(size))) == 0;
|
||||
unsigned long end = addr + size - !!size;
|
||||
|
||||
return (__UA_LIMIT & (addr | end | __ua_size(size))) == 0;
|
||||
}
|
||||
|
||||
#define access_ok(addr, size) \
|
||||
|
@ -150,8 +104,13 @@ static inline int __access_ok(const void __user *p, unsigned long size)
|
|||
*
|
||||
* Returns zero on success, or -EFAULT on error.
|
||||
*/
|
||||
#define put_user(x,ptr) \
|
||||
__put_user_check((x), (ptr), sizeof(*(ptr)))
|
||||
#define put_user(x, ptr) \
|
||||
({ \
|
||||
__typeof__(*(ptr)) __user *__p = (ptr); \
|
||||
\
|
||||
might_fault(); \
|
||||
access_ok(__p, sizeof(*__p)) ? __put_user((x), __p) : -EFAULT; \
|
||||
})
|
||||
|
||||
/*
|
||||
* get_user: - Get a simple variable from user space.
|
||||
|
@ -171,8 +130,14 @@ static inline int __access_ok(const void __user *p, unsigned long size)
|
|||
* Returns zero on success, or -EFAULT on error.
|
||||
* On error, the variable @x is set to zero.
|
||||
*/
|
||||
#define get_user(x,ptr) \
|
||||
__get_user_check((x), (ptr), sizeof(*(ptr)))
|
||||
#define get_user(x, ptr) \
|
||||
({ \
|
||||
const __typeof__(*(ptr)) __user *__p = (ptr); \
|
||||
\
|
||||
might_fault(); \
|
||||
access_ok(__p, sizeof(*__p)) ? __get_user((x), __p) : \
|
||||
((x) = 0, -EFAULT); \
|
||||
})
|
||||
|
||||
/*
|
||||
* __put_user: - Write a simple value into user space, with less checking.
|
||||
|
@ -194,8 +159,32 @@ static inline int __access_ok(const void __user *p, unsigned long size)
|
|||
*
|
||||
* Returns zero on success, or -EFAULT on error.
|
||||
*/
|
||||
#define __put_user(x,ptr) \
|
||||
__put_user_nocheck((x), (ptr), sizeof(*(ptr)))
|
||||
#define __put_user(x, ptr) \
|
||||
({ \
|
||||
__typeof__(*(ptr)) __user *__pu_ptr = (ptr); \
|
||||
__typeof__(*(ptr)) __pu_val = (x); \
|
||||
int __pu_err = 0; \
|
||||
\
|
||||
__chk_user_ptr(__pu_ptr); \
|
||||
switch (sizeof(*__pu_ptr)) { \
|
||||
case 1: \
|
||||
__put_data_asm(user_sb, __pu_ptr); \
|
||||
break; \
|
||||
case 2: \
|
||||
__put_data_asm(user_sh, __pu_ptr); \
|
||||
break; \
|
||||
case 4: \
|
||||
__put_data_asm(user_sw, __pu_ptr); \
|
||||
break; \
|
||||
case 8: \
|
||||
__PUT_DW(user_sd, __pu_ptr); \
|
||||
break; \
|
||||
default: \
|
||||
BUILD_BUG(); \
|
||||
} \
|
||||
\
|
||||
__pu_err; \
|
||||
})
|
||||
|
||||
/*
|
||||
* __get_user: - Get a simple variable from user space, with less checking.
|
||||
|
@ -218,49 +207,35 @@ static inline int __access_ok(const void __user *p, unsigned long size)
|
|||
* Returns zero on success, or -EFAULT on error.
|
||||
* On error, the variable @x is set to zero.
|
||||
*/
|
||||
#define __get_user(x,ptr) \
|
||||
__get_user_nocheck((x), (ptr), sizeof(*(ptr)))
|
||||
#define __get_user(x, ptr) \
|
||||
({ \
|
||||
const __typeof__(*(ptr)) __user *__gu_ptr = (ptr); \
|
||||
int __gu_err = 0; \
|
||||
\
|
||||
__chk_user_ptr(__gu_ptr); \
|
||||
switch (sizeof(*__gu_ptr)) { \
|
||||
case 1: \
|
||||
__get_data_asm((x), user_lb, __gu_ptr); \
|
||||
break; \
|
||||
case 2: \
|
||||
__get_data_asm((x), user_lh, __gu_ptr); \
|
||||
break; \
|
||||
case 4: \
|
||||
__get_data_asm((x), user_lw, __gu_ptr); \
|
||||
break; \
|
||||
case 8: \
|
||||
__GET_DW((x), user_ld, __gu_ptr); \
|
||||
break; \
|
||||
default: \
|
||||
BUILD_BUG(); \
|
||||
} \
|
||||
\
|
||||
__gu_err; \
|
||||
})
|
||||
|
||||
struct __large_struct { unsigned long buf[100]; };
|
||||
#define __m(x) (*(struct __large_struct __user *)(x))
|
||||
|
||||
/*
|
||||
* Yuck. We need two variants, one for 64bit operation and one
|
||||
* for 32 bit mode and old iron.
|
||||
*/
|
||||
#ifndef CONFIG_EVA
|
||||
#define __get_kernel_common(val, size, ptr) __get_user_common(val, size, ptr)
|
||||
#else
|
||||
/*
|
||||
* Kernel specific functions for EVA. We need to use normal load instructions
|
||||
* to read data from kernel when operating in EVA mode. We use these macros to
|
||||
* avoid redefining __get_user_asm for EVA.
|
||||
*/
|
||||
#undef _loadd
|
||||
#undef _loadw
|
||||
#undef _loadh
|
||||
#undef _loadb
|
||||
#ifdef CONFIG_32BIT
|
||||
#define _loadd _loadw
|
||||
#else
|
||||
#define _loadd(reg, addr) "ld " reg ", " addr
|
||||
#endif
|
||||
#define _loadw(reg, addr) "lw " reg ", " addr
|
||||
#define _loadh(reg, addr) "lh " reg ", " addr
|
||||
#define _loadb(reg, addr) "lb " reg ", " addr
|
||||
|
||||
#define __get_kernel_common(val, size, ptr) \
|
||||
do { \
|
||||
switch (size) { \
|
||||
case 1: __get_data_asm(val, _loadb, ptr); break; \
|
||||
case 2: __get_data_asm(val, _loadh, ptr); break; \
|
||||
case 4: __get_data_asm(val, _loadw, ptr); break; \
|
||||
case 8: __GET_DW(val, _loadd, ptr); break; \
|
||||
default: __get_user_unknown(); break; \
|
||||
} \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_32BIT
|
||||
#define __GET_DW(val, insn, ptr) __get_data_asm_ll32(val, insn, ptr)
|
||||
#endif
|
||||
|
@ -268,49 +243,6 @@ do { \
|
|||
#define __GET_DW(val, insn, ptr) __get_data_asm(val, insn, ptr)
|
||||
#endif
|
||||
|
||||
extern void __get_user_unknown(void);
|
||||
|
||||
#define __get_user_common(val, size, ptr) \
|
||||
do { \
|
||||
switch (size) { \
|
||||
case 1: __get_data_asm(val, user_lb, ptr); break; \
|
||||
case 2: __get_data_asm(val, user_lh, ptr); break; \
|
||||
case 4: __get_data_asm(val, user_lw, ptr); break; \
|
||||
case 8: __GET_DW(val, user_ld, ptr); break; \
|
||||
default: __get_user_unknown(); break; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define __get_user_nocheck(x, ptr, size) \
|
||||
({ \
|
||||
int __gu_err; \
|
||||
\
|
||||
if (eva_kernel_access()) { \
|
||||
__get_kernel_common((x), size, ptr); \
|
||||
} else { \
|
||||
__chk_user_ptr(ptr); \
|
||||
__get_user_common((x), size, ptr); \
|
||||
} \
|
||||
__gu_err; \
|
||||
})
|
||||
|
||||
#define __get_user_check(x, ptr, size) \
|
||||
({ \
|
||||
int __gu_err = -EFAULT; \
|
||||
const __typeof__(*(ptr)) __user * __gu_ptr = (ptr); \
|
||||
\
|
||||
might_fault(); \
|
||||
if (likely(access_ok( __gu_ptr, size))) { \
|
||||
if (eva_kernel_access()) \
|
||||
__get_kernel_common((x), size, __gu_ptr); \
|
||||
else \
|
||||
__get_user_common((x), size, __gu_ptr); \
|
||||
} else \
|
||||
(x) = 0; \
|
||||
\
|
||||
__gu_err; \
|
||||
})
|
||||
|
||||
#define __get_data_asm(val, insn, addr) \
|
||||
{ \
|
||||
long __gu_tmp; \
|
||||
|
@ -364,39 +296,36 @@ do { \
|
|||
(val) = __gu_tmp.t; \
|
||||
}
|
||||
|
||||
#ifndef CONFIG_EVA
|
||||
#define __put_kernel_common(ptr, size) __put_user_common(ptr, size)
|
||||
#else
|
||||
/*
|
||||
* Kernel specific functions for EVA. We need to use normal load instructions
|
||||
* to read data from kernel when operating in EVA mode. We use these macros to
|
||||
* avoid redefining __get_data_asm for EVA.
|
||||
*/
|
||||
#undef _stored
|
||||
#undef _storew
|
||||
#undef _storeh
|
||||
#undef _storeb
|
||||
#ifdef CONFIG_32BIT
|
||||
#define _stored _storew
|
||||
#else
|
||||
#define _stored(reg, addr) "ld " reg ", " addr
|
||||
#endif
|
||||
#define HAVE_GET_KERNEL_NOFAULT
|
||||
|
||||
#define _storew(reg, addr) "sw " reg ", " addr
|
||||
#define _storeh(reg, addr) "sh " reg ", " addr
|
||||
#define _storeb(reg, addr) "sb " reg ", " addr
|
||||
|
||||
#define __put_kernel_common(ptr, size) \
|
||||
#define __get_kernel_nofault(dst, src, type, err_label) \
|
||||
do { \
|
||||
switch (size) { \
|
||||
case 1: __put_data_asm(_storeb, ptr); break; \
|
||||
case 2: __put_data_asm(_storeh, ptr); break; \
|
||||
case 4: __put_data_asm(_storew, ptr); break; \
|
||||
case 8: __PUT_DW(_stored, ptr); break; \
|
||||
default: __put_user_unknown(); break; \
|
||||
int __gu_err; \
|
||||
\
|
||||
switch (sizeof(type)) { \
|
||||
case 1: \
|
||||
__get_data_asm(*(type *)(dst), kernel_lb, \
|
||||
(__force type *)(src)); \
|
||||
break; \
|
||||
case 2: \
|
||||
__get_data_asm(*(type *)(dst), kernel_lh, \
|
||||
(__force type *)(src)); \
|
||||
break; \
|
||||
case 4: \
|
||||
__get_data_asm(*(type *)(dst), kernel_lw, \
|
||||
(__force type *)(src)); \
|
||||
break; \
|
||||
case 8: \
|
||||
__GET_DW(*(type *)(dst), kernel_ld, \
|
||||
(__force type *)(src)); \
|
||||
break; \
|
||||
default: \
|
||||
BUILD_BUG(); \
|
||||
break; \
|
||||
} \
|
||||
} while(0)
|
||||
#endif
|
||||
if (unlikely(__gu_err)) \
|
||||
goto err_label; \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
* Yuck. We need two variants, one for 64bit operation and one
|
||||
|
@ -409,49 +338,6 @@ do { \
|
|||
#define __PUT_DW(insn, ptr) __put_data_asm(insn, ptr)
|
||||
#endif
|
||||
|
||||
#define __put_user_common(ptr, size) \
|
||||
do { \
|
||||
switch (size) { \
|
||||
case 1: __put_data_asm(user_sb, ptr); break; \
|
||||
case 2: __put_data_asm(user_sh, ptr); break; \
|
||||
case 4: __put_data_asm(user_sw, ptr); break; \
|
||||
case 8: __PUT_DW(user_sd, ptr); break; \
|
||||
default: __put_user_unknown(); break; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define __put_user_nocheck(x, ptr, size) \
|
||||
({ \
|
||||
__typeof__(*(ptr)) __pu_val; \
|
||||
int __pu_err = 0; \
|
||||
\
|
||||
__pu_val = (x); \
|
||||
if (eva_kernel_access()) { \
|
||||
__put_kernel_common(ptr, size); \
|
||||
} else { \
|
||||
__chk_user_ptr(ptr); \
|
||||
__put_user_common(ptr, size); \
|
||||
} \
|
||||
__pu_err; \
|
||||
})
|
||||
|
||||
#define __put_user_check(x, ptr, size) \
|
||||
({ \
|
||||
__typeof__(*(ptr)) __user *__pu_addr = (ptr); \
|
||||
__typeof__(*(ptr)) __pu_val = (x); \
|
||||
int __pu_err = -EFAULT; \
|
||||
\
|
||||
might_fault(); \
|
||||
if (likely(access_ok( __pu_addr, size))) { \
|
||||
if (eva_kernel_access()) \
|
||||
__put_kernel_common(__pu_addr, size); \
|
||||
else \
|
||||
__put_user_common(__pu_addr, size); \
|
||||
} \
|
||||
\
|
||||
__pu_err; \
|
||||
})
|
||||
|
||||
#define __put_data_asm(insn, ptr) \
|
||||
{ \
|
||||
__asm__ __volatile__( \
|
||||
|
@ -490,7 +376,33 @@ do { \
|
|||
"i" (-EFAULT)); \
|
||||
}
|
||||
|
||||
extern void __put_user_unknown(void);
|
||||
#define __put_kernel_nofault(dst, src, type, err_label) \
|
||||
do { \
|
||||
type __pu_val; \
|
||||
int __pu_err = 0; \
|
||||
\
|
||||
__pu_val = *(__force type *)(src); \
|
||||
switch (sizeof(type)) { \
|
||||
case 1: \
|
||||
__put_data_asm(kernel_sb, (type *)(dst)); \
|
||||
break; \
|
||||
case 2: \
|
||||
__put_data_asm(kernel_sh, (type *)(dst)); \
|
||||
break; \
|
||||
case 4: \
|
||||
__put_data_asm(kernel_sw, (type *)(dst)) \
|
||||
break; \
|
||||
case 8: \
|
||||
__PUT_DW(kernel_sd, (type *)(dst)); \
|
||||
break; \
|
||||
default: \
|
||||
BUILD_BUG(); \
|
||||
break; \
|
||||
} \
|
||||
if (unlikely(__pu_err)) \
|
||||
goto err_label; \
|
||||
} while (0)
|
||||
|
||||
|
||||
/*
|
||||
* We're generating jump to subroutines which will be outside the range of
|
||||
|
@ -514,124 +426,85 @@ extern void __put_user_unknown(void);
|
|||
#define DADDI_SCRATCH "$0"
|
||||
#endif
|
||||
|
||||
extern size_t __copy_user(void *__to, const void *__from, size_t __n);
|
||||
|
||||
#define __invoke_copy_from(func, to, from, n) \
|
||||
({ \
|
||||
register void *__cu_to_r __asm__("$4"); \
|
||||
register const void __user *__cu_from_r __asm__("$5"); \
|
||||
register long __cu_len_r __asm__("$6"); \
|
||||
\
|
||||
__cu_to_r = (to); \
|
||||
__cu_from_r = (from); \
|
||||
__cu_len_r = (n); \
|
||||
__asm__ __volatile__( \
|
||||
".set\tnoreorder\n\t" \
|
||||
__MODULE_JAL(func) \
|
||||
".set\tnoat\n\t" \
|
||||
__UA_ADDU "\t$1, %1, %2\n\t" \
|
||||
".set\tat\n\t" \
|
||||
".set\treorder" \
|
||||
: "+r" (__cu_to_r), "+r" (__cu_from_r), "+r" (__cu_len_r) \
|
||||
: \
|
||||
: "$8", "$9", "$10", "$11", "$12", "$14", "$15", "$24", "$31", \
|
||||
DADDI_SCRATCH, "memory"); \
|
||||
__cu_len_r; \
|
||||
})
|
||||
|
||||
#define __invoke_copy_to(func, to, from, n) \
|
||||
({ \
|
||||
register void __user *__cu_to_r __asm__("$4"); \
|
||||
register const void *__cu_from_r __asm__("$5"); \
|
||||
register long __cu_len_r __asm__("$6"); \
|
||||
\
|
||||
__cu_to_r = (to); \
|
||||
__cu_from_r = (from); \
|
||||
__cu_len_r = (n); \
|
||||
__asm__ __volatile__( \
|
||||
__MODULE_JAL(func) \
|
||||
: "+r" (__cu_to_r), "+r" (__cu_from_r), "+r" (__cu_len_r) \
|
||||
: \
|
||||
: "$8", "$9", "$10", "$11", "$12", "$14", "$15", "$24", "$31", \
|
||||
DADDI_SCRATCH, "memory"); \
|
||||
__cu_len_r; \
|
||||
})
|
||||
|
||||
#define __invoke_copy_from_kernel(to, from, n) \
|
||||
__invoke_copy_from(__copy_user, to, from, n)
|
||||
|
||||
#define __invoke_copy_to_kernel(to, from, n) \
|
||||
__invoke_copy_to(__copy_user, to, from, n)
|
||||
|
||||
#define ___invoke_copy_in_kernel(to, from, n) \
|
||||
__invoke_copy_from(__copy_user, to, from, n)
|
||||
|
||||
#ifndef CONFIG_EVA
|
||||
#define __invoke_copy_from_user(to, from, n) \
|
||||
__invoke_copy_from(__copy_user, to, from, n)
|
||||
|
||||
#define __invoke_copy_to_user(to, from, n) \
|
||||
__invoke_copy_to(__copy_user, to, from, n)
|
||||
|
||||
#define ___invoke_copy_in_user(to, from, n) \
|
||||
__invoke_copy_from(__copy_user, to, from, n)
|
||||
|
||||
#else
|
||||
|
||||
/* EVA specific functions */
|
||||
|
||||
extern size_t __copy_from_user_eva(void *__to, const void *__from,
|
||||
size_t __n);
|
||||
extern size_t __copy_to_user_eva(void *__to, const void *__from,
|
||||
size_t __n);
|
||||
extern size_t __copy_in_user_eva(void *__to, const void *__from, size_t __n);
|
||||
|
||||
/*
|
||||
* Source or destination address is in userland. We need to go through
|
||||
* the TLB
|
||||
*/
|
||||
#define __invoke_copy_from_user(to, from, n) \
|
||||
__invoke_copy_from(__copy_from_user_eva, to, from, n)
|
||||
|
||||
#define __invoke_copy_to_user(to, from, n) \
|
||||
__invoke_copy_to(__copy_to_user_eva, to, from, n)
|
||||
|
||||
#define ___invoke_copy_in_user(to, from, n) \
|
||||
__invoke_copy_from(__copy_in_user_eva, to, from, n)
|
||||
|
||||
#endif /* CONFIG_EVA */
|
||||
|
||||
static inline unsigned long
|
||||
raw_copy_to_user(void __user *to, const void *from, unsigned long n)
|
||||
{
|
||||
if (eva_kernel_access())
|
||||
return __invoke_copy_to_kernel(to, from, n);
|
||||
else
|
||||
return __invoke_copy_to_user(to, from, n);
|
||||
}
|
||||
extern size_t __raw_copy_from_user(void *__to, const void *__from, size_t __n);
|
||||
extern size_t __raw_copy_to_user(void *__to, const void *__from, size_t __n);
|
||||
extern size_t __raw_copy_in_user(void *__to, const void *__from, size_t __n);
|
||||
|
||||
static inline unsigned long
|
||||
raw_copy_from_user(void *to, const void __user *from, unsigned long n)
|
||||
{
|
||||
if (eva_kernel_access())
|
||||
return __invoke_copy_from_kernel(to, from, n);
|
||||
else
|
||||
return __invoke_copy_from_user(to, from, n);
|
||||
register void *__cu_to_r __asm__("$4");
|
||||
register const void __user *__cu_from_r __asm__("$5");
|
||||
register long __cu_len_r __asm__("$6");
|
||||
|
||||
__cu_to_r = to;
|
||||
__cu_from_r = from;
|
||||
__cu_len_r = n;
|
||||
|
||||
__asm__ __volatile__(
|
||||
".set\tnoreorder\n\t"
|
||||
__MODULE_JAL(__raw_copy_from_user)
|
||||
".set\tnoat\n\t"
|
||||
__UA_ADDU "\t$1, %1, %2\n\t"
|
||||
".set\tat\n\t"
|
||||
".set\treorder"
|
||||
: "+r" (__cu_to_r), "+r" (__cu_from_r), "+r" (__cu_len_r)
|
||||
:
|
||||
: "$8", "$9", "$10", "$11", "$12", "$14", "$15", "$24", "$31",
|
||||
DADDI_SCRATCH, "memory");
|
||||
|
||||
return __cu_len_r;
|
||||
}
|
||||
|
||||
static inline unsigned long
|
||||
raw_copy_to_user(void __user *to, const void *from, unsigned long n)
|
||||
{
|
||||
register void __user *__cu_to_r __asm__("$4");
|
||||
register const void *__cu_from_r __asm__("$5");
|
||||
register long __cu_len_r __asm__("$6");
|
||||
|
||||
__cu_to_r = (to);
|
||||
__cu_from_r = (from);
|
||||
__cu_len_r = (n);
|
||||
|
||||
__asm__ __volatile__(
|
||||
__MODULE_JAL(__raw_copy_to_user)
|
||||
: "+r" (__cu_to_r), "+r" (__cu_from_r), "+r" (__cu_len_r)
|
||||
:
|
||||
: "$8", "$9", "$10", "$11", "$12", "$14", "$15", "$24", "$31",
|
||||
DADDI_SCRATCH, "memory");
|
||||
|
||||
return __cu_len_r;
|
||||
}
|
||||
|
||||
#define INLINE_COPY_FROM_USER
|
||||
#define INLINE_COPY_TO_USER
|
||||
|
||||
static inline unsigned long
|
||||
raw_copy_in_user(void __user*to, const void __user *from, unsigned long n)
|
||||
raw_copy_in_user(void __user *to, const void __user *from, unsigned long n)
|
||||
{
|
||||
if (eva_kernel_access())
|
||||
return ___invoke_copy_in_kernel(to, from, n);
|
||||
else
|
||||
return ___invoke_copy_in_user(to, from, n);
|
||||
register void __user *__cu_to_r __asm__("$4");
|
||||
register const void __user *__cu_from_r __asm__("$5");
|
||||
register long __cu_len_r __asm__("$6");
|
||||
|
||||
__cu_to_r = to;
|
||||
__cu_from_r = from;
|
||||
__cu_len_r = n;
|
||||
|
||||
__asm__ __volatile__(
|
||||
".set\tnoreorder\n\t"
|
||||
__MODULE_JAL(__raw_copy_in_user)
|
||||
".set\tnoat\n\t"
|
||||
__UA_ADDU "\t$1, %1, %2\n\t"
|
||||
".set\tat\n\t"
|
||||
".set\treorder"
|
||||
: "+r" (__cu_to_r), "+r" (__cu_from_r), "+r" (__cu_len_r)
|
||||
:
|
||||
: "$8", "$9", "$10", "$11", "$12", "$14", "$15", "$24", "$31",
|
||||
DADDI_SCRATCH, "memory");
|
||||
return __cu_len_r;
|
||||
}
|
||||
|
||||
extern __kernel_size_t __bzero_kernel(void __user *addr, __kernel_size_t size);
|
||||
extern __kernel_size_t __bzero(void __user *addr, __kernel_size_t size);
|
||||
|
||||
/*
|
||||
|
@ -657,28 +530,16 @@ __clear_user(void __user *addr, __kernel_size_t size)
|
|||
#define bzero_clobbers "$4", "$5", "$6", __UA_t0, __UA_t1, "$31"
|
||||
#endif /* CONFIG_CPU_MICROMIPS */
|
||||
|
||||
if (eva_kernel_access()) {
|
||||
__asm__ __volatile__(
|
||||
"move\t$4, %1\n\t"
|
||||
"move\t$5, $0\n\t"
|
||||
"move\t$6, %2\n\t"
|
||||
__MODULE_JAL(__bzero_kernel)
|
||||
"move\t%0, $6"
|
||||
: "=r" (res)
|
||||
: "r" (addr), "r" (size)
|
||||
: bzero_clobbers);
|
||||
} else {
|
||||
might_fault();
|
||||
__asm__ __volatile__(
|
||||
"move\t$4, %1\n\t"
|
||||
"move\t$5, $0\n\t"
|
||||
"move\t$6, %2\n\t"
|
||||
__MODULE_JAL(__bzero)
|
||||
"move\t%0, $6"
|
||||
: "=r" (res)
|
||||
: "r" (addr), "r" (size)
|
||||
: bzero_clobbers);
|
||||
}
|
||||
might_fault();
|
||||
__asm__ __volatile__(
|
||||
"move\t$4, %1\n\t"
|
||||
"move\t$5, $0\n\t"
|
||||
"move\t$6, %2\n\t"
|
||||
__MODULE_JAL(__bzero)
|
||||
"move\t%0, $6"
|
||||
: "=r" (res)
|
||||
: "r" (addr), "r" (size)
|
||||
: bzero_clobbers);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
@ -692,7 +553,6 @@ __clear_user(void __user *addr, __kernel_size_t size)
|
|||
__cl_size; \
|
||||
})
|
||||
|
||||
extern long __strncpy_from_kernel_asm(char *__to, const char __user *__from, long __len);
|
||||
extern long __strncpy_from_user_asm(char *__to, const char __user *__from, long __len);
|
||||
|
||||
/*
|
||||
|
@ -718,33 +578,23 @@ strncpy_from_user(char *__to, const char __user *__from, long __len)
|
|||
{
|
||||
long res;
|
||||
|
||||
if (eva_kernel_access()) {
|
||||
__asm__ __volatile__(
|
||||
"move\t$4, %1\n\t"
|
||||
"move\t$5, %2\n\t"
|
||||
"move\t$6, %3\n\t"
|
||||
__MODULE_JAL(__strncpy_from_kernel_asm)
|
||||
"move\t%0, $2"
|
||||
: "=r" (res)
|
||||
: "r" (__to), "r" (__from), "r" (__len)
|
||||
: "$2", "$3", "$4", "$5", "$6", __UA_t0, "$31", "memory");
|
||||
} else {
|
||||
might_fault();
|
||||
__asm__ __volatile__(
|
||||
"move\t$4, %1\n\t"
|
||||
"move\t$5, %2\n\t"
|
||||
"move\t$6, %3\n\t"
|
||||
__MODULE_JAL(__strncpy_from_user_asm)
|
||||
"move\t%0, $2"
|
||||
: "=r" (res)
|
||||
: "r" (__to), "r" (__from), "r" (__len)
|
||||
: "$2", "$3", "$4", "$5", "$6", __UA_t0, "$31", "memory");
|
||||
}
|
||||
if (!access_ok(__from, __len))
|
||||
return -EFAULT;
|
||||
|
||||
might_fault();
|
||||
__asm__ __volatile__(
|
||||
"move\t$4, %1\n\t"
|
||||
"move\t$5, %2\n\t"
|
||||
"move\t$6, %3\n\t"
|
||||
__MODULE_JAL(__strncpy_from_user_asm)
|
||||
"move\t%0, $2"
|
||||
: "=r" (res)
|
||||
: "r" (__to), "r" (__from), "r" (__len)
|
||||
: "$2", "$3", "$4", "$5", "$6", __UA_t0, "$31", "memory");
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
extern long __strnlen_kernel_asm(const char __user *s, long n);
|
||||
extern long __strnlen_user_asm(const char __user *s, long n);
|
||||
|
||||
/*
|
||||
|
@ -764,26 +614,18 @@ static inline long strnlen_user(const char __user *s, long n)
|
|||
{
|
||||
long res;
|
||||
|
||||
if (!access_ok(s, 1))
|
||||
return 0;
|
||||
|
||||
might_fault();
|
||||
if (eva_kernel_access()) {
|
||||
__asm__ __volatile__(
|
||||
"move\t$4, %1\n\t"
|
||||
"move\t$5, %2\n\t"
|
||||
__MODULE_JAL(__strnlen_kernel_asm)
|
||||
"move\t%0, $2"
|
||||
: "=r" (res)
|
||||
: "r" (s), "r" (n)
|
||||
: "$2", "$4", "$5", __UA_t0, "$31");
|
||||
} else {
|
||||
__asm__ __volatile__(
|
||||
"move\t$4, %1\n\t"
|
||||
"move\t$5, %2\n\t"
|
||||
__MODULE_JAL(__strnlen_user_asm)
|
||||
"move\t%0, $2"
|
||||
: "=r" (res)
|
||||
: "r" (s), "r" (n)
|
||||
: "$2", "$4", "$5", __UA_t0, "$31");
|
||||
}
|
||||
__asm__ __volatile__(
|
||||
"move\t$4, %1\n\t"
|
||||
"move\t$5, %2\n\t"
|
||||
__MODULE_JAL(__strnlen_user_asm)
|
||||
"move\t%0, $2"
|
||||
: "=r" (res)
|
||||
: "r" (s), "r" (n)
|
||||
: "$2", "$4", "$5", __UA_t0, "$31");
|
||||
|
||||
return res;
|
||||
}
|
||||
|
|
|
@ -20,6 +20,12 @@
|
|||
|
||||
#define VDSO_HAS_CLOCK_GETRES 1
|
||||
|
||||
#if MIPS_ISA_REV < 6
|
||||
#define VDSO_SYSCALL_CLOBBERS "hi", "lo",
|
||||
#else
|
||||
#define VDSO_SYSCALL_CLOBBERS
|
||||
#endif
|
||||
|
||||
static __always_inline long gettimeofday_fallback(
|
||||
struct __kernel_old_timeval *_tv,
|
||||
struct timezone *_tz)
|
||||
|
@ -35,7 +41,9 @@ static __always_inline long gettimeofday_fallback(
|
|||
: "=r" (ret), "=r" (error)
|
||||
: "r" (tv), "r" (tz), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
"$14", "$15", "$24", "$25",
|
||||
VDSO_SYSCALL_CLOBBERS
|
||||
"memory");
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
|
@ -59,7 +67,9 @@ static __always_inline long clock_gettime_fallback(
|
|||
: "=r" (ret), "=r" (error)
|
||||
: "r" (clkid), "r" (ts), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
"$14", "$15", "$24", "$25",
|
||||
VDSO_SYSCALL_CLOBBERS
|
||||
"memory");
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
|
@ -83,7 +93,9 @@ static __always_inline int clock_getres_fallback(
|
|||
: "=r" (ret), "=r" (error)
|
||||
: "r" (clkid), "r" (ts), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
"$14", "$15", "$24", "$25",
|
||||
VDSO_SYSCALL_CLOBBERS
|
||||
"memory");
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
|
@ -105,7 +117,9 @@ static __always_inline long clock_gettime32_fallback(
|
|||
: "=r" (ret), "=r" (error)
|
||||
: "r" (clkid), "r" (ts), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
"$14", "$15", "$24", "$25",
|
||||
VDSO_SYSCALL_CLOBBERS
|
||||
"memory");
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
|
@ -125,7 +139,9 @@ static __always_inline int clock_getres32_fallback(
|
|||
: "=r" (ret), "=r" (error)
|
||||
: "r" (clkid), "r" (ts), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
"$14", "$15", "$24", "$25",
|
||||
VDSO_SYSCALL_CLOBBERS
|
||||
"memory");
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
|
|
|
@ -17,10 +17,10 @@ obj-y += cpu-probe.o
|
|||
endif
|
||||
|
||||
ifdef CONFIG_FUNCTION_TRACER
|
||||
CFLAGS_REMOVE_ftrace.o = -pg
|
||||
CFLAGS_REMOVE_early_printk.o = -pg
|
||||
CFLAGS_REMOVE_perf_event.o = -pg
|
||||
CFLAGS_REMOVE_perf_event_mipsxx.o = -pg
|
||||
CFLAGS_REMOVE_ftrace.o = $(CC_FLAGS_FTRACE)
|
||||
CFLAGS_REMOVE_early_printk.o = $(CC_FLAGS_FTRACE)
|
||||
CFLAGS_REMOVE_perf_event.o = $(CC_FLAGS_FTRACE)
|
||||
CFLAGS_REMOVE_perf_event_mipsxx.o = $(CC_FLAGS_FTRACE)
|
||||
endif
|
||||
|
||||
obj-$(CONFIG_CEVT_BCM1480) += cevt-bcm1480.o
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
|
||||
#include <linux/uaccess.h>
|
||||
|
||||
static inline int __get_addr(unsigned long *a, unsigned long *p, bool user)
|
||||
{
|
||||
return user ? get_user(*a, (unsigned long __user *)p) :
|
||||
get_kernel_nofault(*a, p);
|
||||
}
|
||||
|
||||
static inline int __get_inst16(u16 *i, u16 *p, bool user)
|
||||
{
|
||||
return user ? get_user(*i, (u16 __user *)p) : get_kernel_nofault(*i, p);
|
||||
}
|
||||
|
||||
static inline int __get_inst32(u32 *i, u32 *p, bool user)
|
||||
{
|
||||
return user ? get_user(*i, (u32 __user *)p) : get_kernel_nofault(*i, p);
|
||||
}
|
|
@ -98,7 +98,6 @@ void output_thread_info_defines(void)
|
|||
OFFSET(TI_TP_VALUE, thread_info, tp_value);
|
||||
OFFSET(TI_CPU, thread_info, cpu);
|
||||
OFFSET(TI_PRE_COUNT, thread_info, preempt_count);
|
||||
OFFSET(TI_ADDR_LIMIT, thread_info, addr_limit);
|
||||
OFFSET(TI_REGS, thread_info, regs);
|
||||
DEFINE(_THREAD_SIZE, THREAD_SIZE);
|
||||
DEFINE(_THREAD_MASK, THREAD_MASK);
|
||||
|
|
|
@ -195,10 +195,6 @@ int c0_compare_int_usable(void)
|
|||
unsigned int delta;
|
||||
unsigned int cnt;
|
||||
|
||||
#ifdef CONFIG_KVM_GUEST
|
||||
return 1;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* IP7 already pending? Try to clear it by acking the timer.
|
||||
*/
|
||||
|
|
|
@ -1752,7 +1752,6 @@ static inline void cpu_probe_loongson(struct cpuinfo_mips *c, unsigned int cpu)
|
|||
set_isa(c, MIPS_CPU_ISA_M64R2);
|
||||
break;
|
||||
}
|
||||
c->writecombine = _CACHE_UNCACHED_ACCELERATED;
|
||||
c->ases |= (MIPS_ASE_LOONGSON_MMI | MIPS_ASE_LOONGSON_EXT |
|
||||
MIPS_ASE_LOONGSON_EXT2);
|
||||
break;
|
||||
|
@ -1782,7 +1781,6 @@ static inline void cpu_probe_loongson(struct cpuinfo_mips *c, unsigned int cpu)
|
|||
* register, we correct it here.
|
||||
*/
|
||||
c->options |= MIPS_CPU_FTLB | MIPS_CPU_TLBINV | MIPS_CPU_LDPTE;
|
||||
c->writecombine = _CACHE_UNCACHED_ACCELERATED;
|
||||
c->ases |= (MIPS_ASE_LOONGSON_MMI | MIPS_ASE_LOONGSON_CAM |
|
||||
MIPS_ASE_LOONGSON_EXT | MIPS_ASE_LOONGSON_EXT2);
|
||||
c->ases &= ~MIPS_ASE_VZ; /* VZ of Loongson-3A2000/3000 is incomplete */
|
||||
|
@ -1793,7 +1791,6 @@ static inline void cpu_probe_loongson(struct cpuinfo_mips *c, unsigned int cpu)
|
|||
set_elf_platform(cpu, "loongson3a");
|
||||
set_isa(c, MIPS_CPU_ISA_M64R2);
|
||||
decode_cpucfg(c);
|
||||
c->writecombine = _CACHE_UNCACHED_ACCELERATED;
|
||||
break;
|
||||
default:
|
||||
panic("Unknown Loongson Processor ID!");
|
||||
|
|
|
@ -90,7 +90,6 @@ static int ftrace_modify_code_2(unsigned long ip, unsigned int new_code1,
|
|||
unsigned int new_code2)
|
||||
{
|
||||
int faulted;
|
||||
mm_segment_t old_fs;
|
||||
|
||||
safe_store_code(new_code1, ip, faulted);
|
||||
if (unlikely(faulted))
|
||||
|
@ -102,10 +101,7 @@ static int ftrace_modify_code_2(unsigned long ip, unsigned int new_code1,
|
|||
return -EFAULT;
|
||||
|
||||
ip -= 4;
|
||||
old_fs = get_fs();
|
||||
set_fs(KERNEL_DS);
|
||||
flush_icache_range(ip, ip + 8);
|
||||
set_fs(old_fs);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -114,7 +110,6 @@ static int ftrace_modify_code_2r(unsigned long ip, unsigned int new_code1,
|
|||
unsigned int new_code2)
|
||||
{
|
||||
int faulted;
|
||||
mm_segment_t old_fs;
|
||||
|
||||
ip += 4;
|
||||
safe_store_code(new_code2, ip, faulted);
|
||||
|
@ -126,10 +121,7 @@ static int ftrace_modify_code_2r(unsigned long ip, unsigned int new_code1,
|
|||
if (unlikely(faulted))
|
||||
return -EFAULT;
|
||||
|
||||
old_fs = get_fs();
|
||||
set_fs(KERNEL_DS);
|
||||
flush_icache_range(ip, ip + 8);
|
||||
set_fs(old_fs);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -124,7 +124,6 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
|
|||
/* kernel thread */
|
||||
unsigned long status = p->thread.cp0_status;
|
||||
memset(childregs, 0, sizeof(struct pt_regs));
|
||||
ti->addr_limit = KERNEL_DS;
|
||||
p->thread.reg16 = usp; /* fn */
|
||||
p->thread.reg17 = kthread_arg;
|
||||
p->thread.reg29 = childksp;
|
||||
|
@ -145,7 +144,6 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
|
|||
childregs->regs[2] = 0; /* Child gets zero as return value */
|
||||
if (usp)
|
||||
childregs->regs[29] = usp;
|
||||
ti->addr_limit = USER_DS;
|
||||
|
||||
p->thread.reg29 = (unsigned long) childregs;
|
||||
p->thread.reg31 = (unsigned long) ret_from_fork;
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
#include <asm/stackframe.h>
|
||||
#include <asm/addrspace.h>
|
||||
|
||||
#include <kernel-entry-init.h>
|
||||
|
||||
LEAF(relocate_new_kernel)
|
||||
PTR_L a0, arg0
|
||||
PTR_L a1, arg1
|
||||
|
@ -125,11 +127,8 @@ LEAF(kexec_smp_wait)
|
|||
1: LONG_L s0, (t0)
|
||||
bne s0, zero,1b
|
||||
|
||||
#ifdef CONFIG_CPU_CAVIUM_OCTEON
|
||||
.set push
|
||||
.set noreorder
|
||||
synci 0($0)
|
||||
.set pop
|
||||
#ifdef USE_KEXEC_SMP_WAIT_FINAL
|
||||
kexec_smp_wait_final
|
||||
#else
|
||||
sync
|
||||
#endif
|
||||
|
|
|
@ -48,10 +48,8 @@ NESTED(handle_sys, PT_SIZE, sp)
|
|||
* We intentionally keep the kernel stack a little below the top of
|
||||
* userspace so we don't have to do a slower byte accurate check here.
|
||||
*/
|
||||
lw t5, TI_ADDR_LIMIT($28)
|
||||
addu t4, t0, 32
|
||||
and t5, t4
|
||||
bltz t5, bad_stack # -> sp is bad
|
||||
bltz t4, bad_stack # -> sp is bad
|
||||
|
||||
/*
|
||||
* Ok, copy the args from the luser stack to the kernel stack.
|
||||
|
@ -217,9 +215,9 @@ einval: li v0, -ENOSYS
|
|||
#define sys_sched_getaffinity mipsmt_sys_sched_getaffinity
|
||||
#endif /* CONFIG_MIPS_MT_FPAFF */
|
||||
|
||||
#define __SYSCALL_WITH_COMPAT(nr, native, compat) __SYSCALL(nr, native)
|
||||
#define __SYSCALL(nr, entry) PTR entry
|
||||
.align 2
|
||||
.type sys_call_table, @object
|
||||
EXPORT(sys_call_table)
|
||||
#include <asm/syscall_table_32_o32.h>
|
||||
#undef __SYSCALL
|
||||
#include <asm/syscall_table_o32.h>
|
||||
|
|
|
@ -104,5 +104,4 @@ not_n32_scall:
|
|||
#define __SYSCALL(nr, entry) PTR entry
|
||||
.type sysn32_call_table, @object
|
||||
EXPORT(sysn32_call_table)
|
||||
#include <asm/syscall_table_64_n32.h>
|
||||
#undef __SYSCALL
|
||||
#include <asm/syscall_table_n32.h>
|
||||
|
|
|
@ -113,5 +113,4 @@ illegal_syscall:
|
|||
.align 3
|
||||
.type sys_call_table, @object
|
||||
EXPORT(sys_call_table)
|
||||
#include <asm/syscall_table_64_n64.h>
|
||||
#undef __SYSCALL
|
||||
#include <asm/syscall_table_n64.h>
|
||||
|
|
|
@ -213,9 +213,9 @@ einval: li v0, -ENOSYS
|
|||
jr ra
|
||||
END(sys32_syscall)
|
||||
|
||||
#define __SYSCALL_WITH_COMPAT(nr, native, compat) __SYSCALL(nr, compat)
|
||||
#define __SYSCALL(nr, entry) PTR entry
|
||||
.align 3
|
||||
.type sys32_call_table,@object
|
||||
EXPORT(sys32_call_table)
|
||||
#include <asm/syscall_table_64_o32.h>
|
||||
#undef __SYSCALL
|
||||
#include <asm/syscall_table_o32.h>
|
||||
|
|
|
@ -134,17 +134,24 @@ static void __init bmips_smp_setup(void)
|
|||
if (!board_ebase_setup)
|
||||
board_ebase_setup = &bmips_ebase_setup;
|
||||
|
||||
__cpu_number_map[boot_cpu] = 0;
|
||||
__cpu_logical_map[0] = boot_cpu;
|
||||
if (max_cpus > 1) {
|
||||
__cpu_number_map[boot_cpu] = 0;
|
||||
__cpu_logical_map[0] = boot_cpu;
|
||||
|
||||
for (i = 0; i < max_cpus; i++) {
|
||||
if (i != boot_cpu) {
|
||||
__cpu_number_map[i] = cpu;
|
||||
__cpu_logical_map[cpu] = i;
|
||||
cpu++;
|
||||
for (i = 0; i < max_cpus; i++) {
|
||||
if (i != boot_cpu) {
|
||||
__cpu_number_map[i] = cpu;
|
||||
__cpu_logical_map[cpu] = i;
|
||||
cpu++;
|
||||
}
|
||||
set_cpu_possible(i, 1);
|
||||
set_cpu_present(i, 1);
|
||||
}
|
||||
set_cpu_possible(i, 1);
|
||||
set_cpu_present(i, 1);
|
||||
} else {
|
||||
__cpu_number_map[0] = boot_cpu;
|
||||
__cpu_logical_map[0] = 0;
|
||||
set_cpu_possible(0, 1);
|
||||
set_cpu_present(0, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ static int ss_get(void *data, u64 *val)
|
|||
return 0;
|
||||
}
|
||||
|
||||
DEFINE_SIMPLE_ATTRIBUTE(fops_ss, ss_get, NULL, "%llu\n");
|
||||
DEFINE_DEBUGFS_ATTRIBUTE(fops_ss, ss_get, NULL, "%llu\n");
|
||||
|
||||
|
||||
|
||||
|
@ -114,13 +114,13 @@ static int multi_get(void *data, u64 *val)
|
|||
return 0;
|
||||
}
|
||||
|
||||
DEFINE_SIMPLE_ATTRIBUTE(fops_multi, multi_get, NULL, "%llu\n");
|
||||
DEFINE_DEBUGFS_ATTRIBUTE(fops_multi, multi_get, NULL, "%llu\n");
|
||||
|
||||
static int __init spinlock_test(void)
|
||||
{
|
||||
debugfs_create_file("spin_single", S_IRUGO, mips_debugfs_dir, NULL,
|
||||
debugfs_create_file_unsafe("spin_single", S_IRUGO, mips_debugfs_dir, NULL,
|
||||
&fops_ss);
|
||||
debugfs_create_file("spin_multi", S_IRUGO, mips_debugfs_dir, NULL,
|
||||
debugfs_create_file_unsafe("spin_multi", S_IRUGO, mips_debugfs_dir, NULL,
|
||||
&fops_multi);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -8,15 +8,12 @@ _dummy := $(shell [ -d '$(uapi)' ] || mkdir -p '$(uapi)') \
|
|||
syscalln32 := $(src)/syscall_n32.tbl
|
||||
syscalln64 := $(src)/syscall_n64.tbl
|
||||
syscallo32 := $(src)/syscall_o32.tbl
|
||||
syshdr := $(srctree)/$(src)/syscallhdr.sh
|
||||
syshdr := $(srctree)/scripts/syscallhdr.sh
|
||||
sysnr := $(srctree)/$(src)/syscallnr.sh
|
||||
systbl := $(srctree)/$(src)/syscalltbl.sh
|
||||
systbl := $(srctree)/scripts/syscalltbl.sh
|
||||
|
||||
quiet_cmd_syshdr = SYSHDR $@
|
||||
cmd_syshdr = $(CONFIG_SHELL) '$(syshdr)' '$<' '$@' \
|
||||
'$(syshdr_abis_$(basetarget))' \
|
||||
'$(syshdr_pfx_$(basetarget))' \
|
||||
'$(syshdr_offset_$(basetarget))'
|
||||
cmd_syshdr = $(CONFIG_SHELL) $(syshdr) --offset __NR_Linux $< $@
|
||||
|
||||
quiet_cmd_sysnr = SYSNR $@
|
||||
cmd_sysnr = $(CONFIG_SHELL) '$(sysnr)' '$<' '$@' \
|
||||
|
@ -25,20 +22,14 @@ quiet_cmd_sysnr = SYSNR $@
|
|||
'$(sysnr_offset_$(basetarget))'
|
||||
|
||||
quiet_cmd_systbl = SYSTBL $@
|
||||
cmd_systbl = $(CONFIG_SHELL) '$(systbl)' '$<' '$@' \
|
||||
'$(systbl_abis_$(basetarget))' \
|
||||
'$(systbl_abi_$(basetarget))' \
|
||||
'$(systbl_offset_$(basetarget))'
|
||||
cmd_systbl = $(CONFIG_SHELL) $(systbl) $< $@
|
||||
|
||||
syshdr_offset_unistd_n32 := __NR_Linux
|
||||
$(uapi)/unistd_n32.h: $(syscalln32) $(syshdr) FORCE
|
||||
$(call if_changed,syshdr)
|
||||
|
||||
syshdr_offset_unistd_n64 := __NR_Linux
|
||||
$(uapi)/unistd_n64.h: $(syscalln64) $(syshdr) FORCE
|
||||
$(call if_changed,syshdr)
|
||||
|
||||
syshdr_offset_unistd_o32 := __NR_Linux
|
||||
$(uapi)/unistd_o32.h: $(syscallo32) $(syshdr) FORCE
|
||||
$(call if_changed,syshdr)
|
||||
|
||||
|
@ -57,33 +48,21 @@ sysnr_offset_unistd_nr_o32 := 4000
|
|||
$(kapi)/unistd_nr_o32.h: $(syscallo32) $(sysnr) FORCE
|
||||
$(call if_changed,sysnr)
|
||||
|
||||
systbl_abi_syscall_table_32_o32 := 32_o32
|
||||
systbl_offset_syscall_table_32_o32 := 4000
|
||||
$(kapi)/syscall_table_32_o32.h: $(syscallo32) $(systbl) FORCE
|
||||
$(kapi)/syscall_table_n32.h: $(syscalln32) $(systbl) FORCE
|
||||
$(call if_changed,systbl)
|
||||
|
||||
systbl_abi_syscall_table_64_n32 := 64_n32
|
||||
systbl_offset_syscall_table_64_n32 := 6000
|
||||
$(kapi)/syscall_table_64_n32.h: $(syscalln32) $(systbl) FORCE
|
||||
$(kapi)/syscall_table_n64.h: $(syscalln64) $(systbl) FORCE
|
||||
$(call if_changed,systbl)
|
||||
|
||||
systbl_abi_syscall_table_64_n64 := 64_n64
|
||||
systbl_offset_syscall_table_64_n64 := 5000
|
||||
$(kapi)/syscall_table_64_n64.h: $(syscalln64) $(systbl) FORCE
|
||||
$(call if_changed,systbl)
|
||||
|
||||
systbl_abi_syscall_table_64_o32 := 64_o32
|
||||
systbl_offset_syscall_table_64_o32 := 4000
|
||||
$(kapi)/syscall_table_64_o32.h: $(syscallo32) $(systbl) FORCE
|
||||
$(kapi)/syscall_table_o32.h: $(syscallo32) $(systbl) FORCE
|
||||
$(call if_changed,systbl)
|
||||
|
||||
uapisyshdr-y += unistd_n32.h \
|
||||
unistd_n64.h \
|
||||
unistd_o32.h
|
||||
kapisyshdr-y += syscall_table_32_o32.h \
|
||||
syscall_table_64_n32.h \
|
||||
syscall_table_64_n64.h \
|
||||
syscall_table_64_o32.h \
|
||||
kapisyshdr-y += syscall_table_n32.h \
|
||||
syscall_table_n64.h \
|
||||
syscall_table_o32.h \
|
||||
unistd_nr_n32.h \
|
||||
unistd_nr_n64.h \
|
||||
unistd_nr_o32.h
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
#!/bin/sh
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
in="$1"
|
||||
out="$2"
|
||||
my_abis=`echo "($3)" | tr ',' '|'`
|
||||
prefix="$4"
|
||||
offset="$5"
|
||||
|
||||
fileguard=_UAPI_ASM_MIPS_`basename "$out" | sed \
|
||||
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \
|
||||
-e 's/[^A-Z0-9_]/_/g' -e 's/__/_/g'`
|
||||
grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
|
||||
printf "#ifndef %s\n" "${fileguard}"
|
||||
printf "#define %s\n" "${fileguard}"
|
||||
printf "\n"
|
||||
|
||||
nxt=0
|
||||
while read nr abi name entry compat ; do
|
||||
if [ -z "$offset" ]; then
|
||||
printf "#define __NR_%s%s\t%s\n" \
|
||||
"${prefix}" "${name}" "${nr}"
|
||||
else
|
||||
printf "#define __NR_%s%s\t(%s + %s)\n" \
|
||||
"${prefix}" "${name}" "${offset}" "${nr}"
|
||||
fi
|
||||
nxt=$((nr+1))
|
||||
done
|
||||
|
||||
printf "\n"
|
||||
printf "#ifdef __KERNEL__\n"
|
||||
printf "#define __NR_syscalls\t%s\n" "${nxt}"
|
||||
printf "#endif\n"
|
||||
printf "\n"
|
||||
printf "#endif /* %s */\n" "${fileguard}"
|
||||
) > "$out"
|
|
@ -1,36 +0,0 @@
|
|||
#!/bin/sh
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
in="$1"
|
||||
out="$2"
|
||||
my_abis=`echo "($3)" | tr ',' '|'`
|
||||
my_abi="$4"
|
||||
offset="$5"
|
||||
|
||||
emit() {
|
||||
t_nxt="$1"
|
||||
t_nr="$2"
|
||||
t_entry="$3"
|
||||
|
||||
while [ $t_nxt -lt $t_nr ]; do
|
||||
printf "__SYSCALL(%s,sys_ni_syscall)\n" "${t_nxt}"
|
||||
t_nxt=$((t_nxt+1))
|
||||
done
|
||||
printf "__SYSCALL(%s,%s)\n" "${t_nxt}" "${t_entry}"
|
||||
}
|
||||
|
||||
grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
|
||||
nxt=0
|
||||
if [ -z "$offset" ]; then
|
||||
offset=0
|
||||
fi
|
||||
|
||||
while read nr abi name entry compat ; do
|
||||
if [ "$my_abi" = "64_o32" ] && [ ! -z "$compat" ]; then
|
||||
emit $((nxt+offset)) $((nr+offset)) $compat
|
||||
else
|
||||
emit $((nxt+offset)) $((nr+offset)) $entry
|
||||
fi
|
||||
nxt=$((nr+1))
|
||||
done
|
||||
) > "$out"
|
|
@ -72,6 +72,8 @@
|
|||
|
||||
#include <asm/mach-loongson64/cpucfg-emul.h>
|
||||
|
||||
#include "access-helper.h"
|
||||
|
||||
extern void check_wait(void);
|
||||
extern asmlinkage void rollback_handle_int(void);
|
||||
extern asmlinkage void handle_int(void);
|
||||
|
@ -108,7 +110,8 @@ void (*board_bind_eic_interrupt)(int irq, int regset);
|
|||
void (*board_ebase_setup)(void);
|
||||
void(*board_cache_error_setup)(void);
|
||||
|
||||
static void show_raw_backtrace(unsigned long reg29, const char *loglvl)
|
||||
static void show_raw_backtrace(unsigned long reg29, const char *loglvl,
|
||||
bool user)
|
||||
{
|
||||
unsigned long *sp = (unsigned long *)(reg29 & ~3);
|
||||
unsigned long addr;
|
||||
|
@ -118,9 +121,7 @@ static void show_raw_backtrace(unsigned long reg29, const char *loglvl)
|
|||
printk("%s\n", loglvl);
|
||||
#endif
|
||||
while (!kstack_end(sp)) {
|
||||
unsigned long __user *p =
|
||||
(unsigned long __user *)(unsigned long)sp++;
|
||||
if (__get_user(addr, p)) {
|
||||
if (__get_addr(&addr, sp++, user)) {
|
||||
printk("%s (Bad stack address)", loglvl);
|
||||
break;
|
||||
}
|
||||
|
@ -141,7 +142,7 @@ __setup("raw_show_trace", set_raw_show_trace);
|
|||
#endif
|
||||
|
||||
static void show_backtrace(struct task_struct *task, const struct pt_regs *regs,
|
||||
const char *loglvl)
|
||||
const char *loglvl, bool user)
|
||||
{
|
||||
unsigned long sp = regs->regs[29];
|
||||
unsigned long ra = regs->regs[31];
|
||||
|
@ -151,7 +152,7 @@ static void show_backtrace(struct task_struct *task, const struct pt_regs *regs,
|
|||
task = current;
|
||||
|
||||
if (raw_show_trace || user_mode(regs) || !__kernel_text_address(pc)) {
|
||||
show_raw_backtrace(sp, loglvl);
|
||||
show_raw_backtrace(sp, loglvl, user);
|
||||
return;
|
||||
}
|
||||
printk("%sCall Trace:\n", loglvl);
|
||||
|
@ -167,12 +168,12 @@ static void show_backtrace(struct task_struct *task, const struct pt_regs *regs,
|
|||
* with at least a bit of error checking ...
|
||||
*/
|
||||
static void show_stacktrace(struct task_struct *task,
|
||||
const struct pt_regs *regs, const char *loglvl)
|
||||
const struct pt_regs *regs, const char *loglvl, bool user)
|
||||
{
|
||||
const int field = 2 * sizeof(unsigned long);
|
||||
long stackdata;
|
||||
unsigned long stackdata;
|
||||
int i;
|
||||
unsigned long __user *sp = (unsigned long __user *)regs->regs[29];
|
||||
unsigned long *sp = (unsigned long *)regs->regs[29];
|
||||
|
||||
printk("%sStack :", loglvl);
|
||||
i = 0;
|
||||
|
@ -186,7 +187,7 @@ static void show_stacktrace(struct task_struct *task,
|
|||
break;
|
||||
}
|
||||
|
||||
if (__get_user(stackdata, sp++)) {
|
||||
if (__get_addr(&stackdata, sp++, user)) {
|
||||
pr_cont(" (Bad stack address)");
|
||||
break;
|
||||
}
|
||||
|
@ -195,13 +196,12 @@ static void show_stacktrace(struct task_struct *task,
|
|||
i++;
|
||||
}
|
||||
pr_cont("\n");
|
||||
show_backtrace(task, regs, loglvl);
|
||||
show_backtrace(task, regs, loglvl, user);
|
||||
}
|
||||
|
||||
void show_stack(struct task_struct *task, unsigned long *sp, const char *loglvl)
|
||||
{
|
||||
struct pt_regs regs;
|
||||
mm_segment_t old_fs = get_fs();
|
||||
|
||||
regs.cp0_status = KSU_KERNEL;
|
||||
if (sp) {
|
||||
|
@ -217,33 +217,41 @@ void show_stack(struct task_struct *task, unsigned long *sp, const char *loglvl)
|
|||
prepare_frametrace(®s);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* show_stack() deals exclusively with kernel mode, so be sure to access
|
||||
* the stack in the kernel (not user) address space.
|
||||
*/
|
||||
set_fs(KERNEL_DS);
|
||||
show_stacktrace(task, ®s, loglvl);
|
||||
set_fs(old_fs);
|
||||
show_stacktrace(task, ®s, loglvl, false);
|
||||
}
|
||||
|
||||
static void show_code(unsigned int __user *pc)
|
||||
static void show_code(void *pc, bool user)
|
||||
{
|
||||
long i;
|
||||
unsigned short __user *pc16 = NULL;
|
||||
unsigned short *pc16 = NULL;
|
||||
|
||||
printk("Code:");
|
||||
|
||||
if ((unsigned long)pc & 1)
|
||||
pc16 = (unsigned short __user *)((unsigned long)pc & ~1);
|
||||
pc16 = (u16 *)((unsigned long)pc & ~1);
|
||||
|
||||
for(i = -3 ; i < 6 ; i++) {
|
||||
unsigned int insn;
|
||||
if (pc16 ? __get_user(insn, pc16 + i) : __get_user(insn, pc + i)) {
|
||||
pr_cont(" (Bad address in epc)\n");
|
||||
break;
|
||||
if (pc16) {
|
||||
u16 insn16;
|
||||
|
||||
if (__get_inst16(&insn16, pc16 + i, user))
|
||||
goto bad_address;
|
||||
|
||||
pr_cont("%c%04x%c", (i?' ':'<'), insn16, (i?' ':'>'));
|
||||
} else {
|
||||
u32 insn32;
|
||||
|
||||
if (__get_inst32(&insn32, (u32 *)pc + i, user))
|
||||
goto bad_address;
|
||||
|
||||
pr_cont("%c%08x%c", (i?' ':'<'), insn32, (i?' ':'>'));
|
||||
}
|
||||
pr_cont("%c%0*x%c", (i?' ':'<'), pc16 ? 4 : 8, insn, (i?' ':'>'));
|
||||
}
|
||||
pr_cont("\n");
|
||||
return;
|
||||
|
||||
bad_address:
|
||||
pr_cont(" (Bad address in epc)\n\n");
|
||||
}
|
||||
|
||||
static void __show_regs(const struct pt_regs *regs)
|
||||
|
@ -356,7 +364,6 @@ void show_regs(struct pt_regs *regs)
|
|||
void show_registers(struct pt_regs *regs)
|
||||
{
|
||||
const int field = 2 * sizeof(unsigned long);
|
||||
mm_segment_t old_fs = get_fs();
|
||||
|
||||
__show_regs(regs);
|
||||
print_modules();
|
||||
|
@ -371,13 +378,9 @@ void show_registers(struct pt_regs *regs)
|
|||
printk("*HwTLS: %0*lx\n", field, tls);
|
||||
}
|
||||
|
||||
if (!user_mode(regs))
|
||||
/* Necessary for getting the correct stack content */
|
||||
set_fs(KERNEL_DS);
|
||||
show_stacktrace(current, regs, KERN_DEFAULT);
|
||||
show_code((unsigned int __user *) regs->cp0_epc);
|
||||
show_stacktrace(current, regs, KERN_DEFAULT, user_mode(regs));
|
||||
show_code((void *)regs->cp0_epc, user_mode(regs));
|
||||
printk("\n");
|
||||
set_fs(old_fs);
|
||||
}
|
||||
|
||||
static DEFINE_RAW_SPINLOCK(die_lock);
|
||||
|
@ -1022,18 +1025,14 @@ asmlinkage void do_bp(struct pt_regs *regs)
|
|||
unsigned long epc = msk_isa16_mode(exception_epc(regs));
|
||||
unsigned int opcode, bcode;
|
||||
enum ctx_state prev_state;
|
||||
mm_segment_t seg;
|
||||
|
||||
seg = get_fs();
|
||||
if (!user_mode(regs))
|
||||
set_fs(KERNEL_DS);
|
||||
bool user = user_mode(regs);
|
||||
|
||||
prev_state = exception_enter();
|
||||
current->thread.trap_nr = (regs->cp0_cause >> 2) & 0x1f;
|
||||
if (get_isa16_mode(regs->cp0_epc)) {
|
||||
u16 instr[2];
|
||||
|
||||
if (__get_user(instr[0], (u16 __user *)epc))
|
||||
if (__get_inst16(&instr[0], (u16 *)epc, user))
|
||||
goto out_sigsegv;
|
||||
|
||||
if (!cpu_has_mmips) {
|
||||
|
@ -1044,13 +1043,13 @@ asmlinkage void do_bp(struct pt_regs *regs)
|
|||
bcode = instr[0] & 0xf;
|
||||
} else {
|
||||
/* 32-bit microMIPS BREAK */
|
||||
if (__get_user(instr[1], (u16 __user *)(epc + 2)))
|
||||
if (__get_inst16(&instr[1], (u16 *)(epc + 2), user))
|
||||
goto out_sigsegv;
|
||||
opcode = (instr[0] << 16) | instr[1];
|
||||
bcode = (opcode >> 6) & ((1 << 20) - 1);
|
||||
}
|
||||
} else {
|
||||
if (__get_user(opcode, (unsigned int __user *)epc))
|
||||
if (__get_inst32(&opcode, (u32 *)epc, user))
|
||||
goto out_sigsegv;
|
||||
bcode = (opcode >> 6) & ((1 << 20) - 1);
|
||||
}
|
||||
|
@ -1100,7 +1099,6 @@ asmlinkage void do_bp(struct pt_regs *regs)
|
|||
do_trap_or_bp(regs, bcode, TRAP_BRKPT, "Break");
|
||||
|
||||
out:
|
||||
set_fs(seg);
|
||||
exception_exit(prev_state);
|
||||
return;
|
||||
|
||||
|
@ -1114,25 +1112,21 @@ asmlinkage void do_tr(struct pt_regs *regs)
|
|||
u32 opcode, tcode = 0;
|
||||
enum ctx_state prev_state;
|
||||
u16 instr[2];
|
||||
mm_segment_t seg;
|
||||
bool user = user_mode(regs);
|
||||
unsigned long epc = msk_isa16_mode(exception_epc(regs));
|
||||
|
||||
seg = get_fs();
|
||||
if (!user_mode(regs))
|
||||
set_fs(KERNEL_DS);
|
||||
|
||||
prev_state = exception_enter();
|
||||
current->thread.trap_nr = (regs->cp0_cause >> 2) & 0x1f;
|
||||
if (get_isa16_mode(regs->cp0_epc)) {
|
||||
if (__get_user(instr[0], (u16 __user *)(epc + 0)) ||
|
||||
__get_user(instr[1], (u16 __user *)(epc + 2)))
|
||||
if (__get_inst16(&instr[0], (u16 *)(epc + 0), user) ||
|
||||
__get_inst16(&instr[1], (u16 *)(epc + 2), user))
|
||||
goto out_sigsegv;
|
||||
opcode = (instr[0] << 16) | instr[1];
|
||||
/* Immediate versions don't provide a code. */
|
||||
if (!(opcode & OPCODE))
|
||||
tcode = (opcode >> 12) & ((1 << 4) - 1);
|
||||
} else {
|
||||
if (__get_user(opcode, (u32 __user *)epc))
|
||||
if (__get_inst32(&opcode, (u32 *)epc, user))
|
||||
goto out_sigsegv;
|
||||
/* Immediate versions don't provide a code. */
|
||||
if (!(opcode & OPCODE))
|
||||
|
@ -1142,7 +1136,6 @@ asmlinkage void do_tr(struct pt_regs *regs)
|
|||
do_trap_or_bp(regs, tcode, 0, "Trap");
|
||||
|
||||
out:
|
||||
set_fs(seg);
|
||||
exception_exit(prev_state);
|
||||
return;
|
||||
|
||||
|
@ -1591,7 +1584,6 @@ asmlinkage void do_mcheck(struct pt_regs *regs)
|
|||
{
|
||||
int multi_match = regs->cp0_status & ST0_TS;
|
||||
enum ctx_state prev_state;
|
||||
mm_segment_t old_fs = get_fs();
|
||||
|
||||
prev_state = exception_enter();
|
||||
show_regs(regs);
|
||||
|
@ -1602,12 +1594,7 @@ asmlinkage void do_mcheck(struct pt_regs *regs)
|
|||
dump_tlb_all();
|
||||
}
|
||||
|
||||
if (!user_mode(regs))
|
||||
set_fs(KERNEL_DS);
|
||||
|
||||
show_code((unsigned int __user *) regs->cp0_epc);
|
||||
|
||||
set_fs(old_fs);
|
||||
show_code((void *)regs->cp0_epc, user_mode(regs));
|
||||
|
||||
/*
|
||||
* Some chips may have other causes of machine check (e.g. SB1
|
||||
|
|
|
@ -93,6 +93,8 @@
|
|||
#include <asm/mmu_context.h>
|
||||
#include <linux/uaccess.h>
|
||||
|
||||
#include "access-helper.h"
|
||||
|
||||
enum {
|
||||
UNALIGNED_ACTION_QUIET,
|
||||
UNALIGNED_ACTION_SIGNAL,
|
||||
|
@ -107,14 +109,13 @@ static u32 unaligned_action;
|
|||
extern void show_registers(struct pt_regs *regs);
|
||||
|
||||
static void emulate_load_store_insn(struct pt_regs *regs,
|
||||
void __user *addr, unsigned int __user *pc)
|
||||
void __user *addr, unsigned int *pc)
|
||||
{
|
||||
unsigned long origpc, orig31, value;
|
||||
union mips_instruction insn;
|
||||
unsigned int res;
|
||||
#ifdef CONFIG_EVA
|
||||
mm_segment_t seg;
|
||||
#endif
|
||||
bool user = user_mode(regs);
|
||||
|
||||
origpc = (unsigned long)pc;
|
||||
orig31 = regs->regs[31];
|
||||
|
||||
|
@ -123,7 +124,7 @@ static void emulate_load_store_insn(struct pt_regs *regs,
|
|||
/*
|
||||
* This load never faults.
|
||||
*/
|
||||
__get_user(insn.word, pc);
|
||||
__get_inst32(&insn.word, pc, user);
|
||||
|
||||
switch (insn.i_format.opcode) {
|
||||
/*
|
||||
|
@ -163,7 +164,7 @@ static void emulate_load_store_insn(struct pt_regs *regs,
|
|||
if (insn.dsp_format.func == lx_op) {
|
||||
switch (insn.dsp_format.op) {
|
||||
case lwx_op:
|
||||
if (!access_ok(addr, 4))
|
||||
if (user && !access_ok(addr, 4))
|
||||
goto sigbus;
|
||||
LoadW(addr, value, res);
|
||||
if (res)
|
||||
|
@ -172,7 +173,7 @@ static void emulate_load_store_insn(struct pt_regs *regs,
|
|||
regs->regs[insn.dsp_format.rd] = value;
|
||||
break;
|
||||
case lhx_op:
|
||||
if (!access_ok(addr, 2))
|
||||
if (user && !access_ok(addr, 2))
|
||||
goto sigbus;
|
||||
LoadHW(addr, value, res);
|
||||
if (res)
|
||||
|
@ -191,93 +192,66 @@ static void emulate_load_store_insn(struct pt_regs *regs,
|
|||
* memory, so we need to "switch" the address limit to
|
||||
* user space, so that address check can work properly.
|
||||
*/
|
||||
seg = force_uaccess_begin();
|
||||
switch (insn.spec3_format.func) {
|
||||
case lhe_op:
|
||||
if (!access_ok(addr, 2)) {
|
||||
force_uaccess_end(seg);
|
||||
if (!access_ok(addr, 2))
|
||||
goto sigbus;
|
||||
}
|
||||
LoadHWE(addr, value, res);
|
||||
if (res) {
|
||||
force_uaccess_end(seg);
|
||||
if (res)
|
||||
goto fault;
|
||||
}
|
||||
compute_return_epc(regs);
|
||||
regs->regs[insn.spec3_format.rt] = value;
|
||||
break;
|
||||
case lwe_op:
|
||||
if (!access_ok(addr, 4)) {
|
||||
force_uaccess_end(seg);
|
||||
if (!access_ok(addr, 4))
|
||||
goto sigbus;
|
||||
}
|
||||
LoadWE(addr, value, res);
|
||||
if (res) {
|
||||
force_uaccess_end(seg);
|
||||
if (res)
|
||||
goto fault;
|
||||
}
|
||||
compute_return_epc(regs);
|
||||
regs->regs[insn.spec3_format.rt] = value;
|
||||
break;
|
||||
case lhue_op:
|
||||
if (!access_ok(addr, 2)) {
|
||||
force_uaccess_end(seg);
|
||||
if (!access_ok(addr, 2))
|
||||
goto sigbus;
|
||||
}
|
||||
LoadHWUE(addr, value, res);
|
||||
if (res) {
|
||||
force_uaccess_end(seg);
|
||||
if (res)
|
||||
goto fault;
|
||||
}
|
||||
compute_return_epc(regs);
|
||||
regs->regs[insn.spec3_format.rt] = value;
|
||||
break;
|
||||
case she_op:
|
||||
if (!access_ok(addr, 2)) {
|
||||
force_uaccess_end(seg);
|
||||
if (!access_ok(addr, 2))
|
||||
goto sigbus;
|
||||
}
|
||||
compute_return_epc(regs);
|
||||
value = regs->regs[insn.spec3_format.rt];
|
||||
StoreHWE(addr, value, res);
|
||||
if (res) {
|
||||
force_uaccess_end(seg);
|
||||
if (res)
|
||||
goto fault;
|
||||
}
|
||||
break;
|
||||
case swe_op:
|
||||
if (!access_ok(addr, 4)) {
|
||||
force_uaccess_end(seg);
|
||||
if (!access_ok(addr, 4))
|
||||
goto sigbus;
|
||||
}
|
||||
compute_return_epc(regs);
|
||||
value = regs->regs[insn.spec3_format.rt];
|
||||
StoreWE(addr, value, res);
|
||||
if (res) {
|
||||
force_uaccess_end(seg);
|
||||
if (res)
|
||||
goto fault;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
force_uaccess_end(seg);
|
||||
goto sigill;
|
||||
}
|
||||
force_uaccess_end(seg);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case lh_op:
|
||||
if (!access_ok(addr, 2))
|
||||
if (user && !access_ok(addr, 2))
|
||||
goto sigbus;
|
||||
|
||||
if (IS_ENABLED(CONFIG_EVA)) {
|
||||
if (uaccess_kernel())
|
||||
LoadHW(addr, value, res);
|
||||
else
|
||||
LoadHWE(addr, value, res);
|
||||
} else {
|
||||
if (IS_ENABLED(CONFIG_EVA) && user)
|
||||
LoadHWE(addr, value, res);
|
||||
else
|
||||
LoadHW(addr, value, res);
|
||||
}
|
||||
|
||||
if (res)
|
||||
goto fault;
|
||||
|
@ -286,17 +260,13 @@ static void emulate_load_store_insn(struct pt_regs *regs,
|
|||
break;
|
||||
|
||||
case lw_op:
|
||||
if (!access_ok(addr, 4))
|
||||
if (user && !access_ok(addr, 4))
|
||||
goto sigbus;
|
||||
|
||||
if (IS_ENABLED(CONFIG_EVA)) {
|
||||
if (uaccess_kernel())
|
||||
LoadW(addr, value, res);
|
||||
else
|
||||
LoadWE(addr, value, res);
|
||||
} else {
|
||||
if (IS_ENABLED(CONFIG_EVA) && user)
|
||||
LoadWE(addr, value, res);
|
||||
else
|
||||
LoadW(addr, value, res);
|
||||
}
|
||||
|
||||
if (res)
|
||||
goto fault;
|
||||
|
@ -305,17 +275,13 @@ static void emulate_load_store_insn(struct pt_regs *regs,
|
|||
break;
|
||||
|
||||
case lhu_op:
|
||||
if (!access_ok(addr, 2))
|
||||
if (user && !access_ok(addr, 2))
|
||||
goto sigbus;
|
||||
|
||||
if (IS_ENABLED(CONFIG_EVA)) {
|
||||
if (uaccess_kernel())
|
||||
LoadHWU(addr, value, res);
|
||||
else
|
||||
LoadHWUE(addr, value, res);
|
||||
} else {
|
||||
if (IS_ENABLED(CONFIG_EVA) && user)
|
||||
LoadHWUE(addr, value, res);
|
||||
else
|
||||
LoadHWU(addr, value, res);
|
||||
}
|
||||
|
||||
if (res)
|
||||
goto fault;
|
||||
|
@ -332,7 +298,7 @@ static void emulate_load_store_insn(struct pt_regs *regs,
|
|||
* would blow up, so for now we don't handle unaligned 64-bit
|
||||
* instructions on 32-bit kernels.
|
||||
*/
|
||||
if (!access_ok(addr, 4))
|
||||
if (user && !access_ok(addr, 4))
|
||||
goto sigbus;
|
||||
|
||||
LoadWU(addr, value, res);
|
||||
|
@ -355,7 +321,7 @@ static void emulate_load_store_insn(struct pt_regs *regs,
|
|||
* would blow up, so for now we don't handle unaligned 64-bit
|
||||
* instructions on 32-bit kernels.
|
||||
*/
|
||||
if (!access_ok(addr, 8))
|
||||
if (user && !access_ok(addr, 8))
|
||||
goto sigbus;
|
||||
|
||||
LoadDW(addr, value, res);
|
||||
|
@ -370,40 +336,32 @@ static void emulate_load_store_insn(struct pt_regs *regs,
|
|||
goto sigill;
|
||||
|
||||
case sh_op:
|
||||
if (!access_ok(addr, 2))
|
||||
if (user && !access_ok(addr, 2))
|
||||
goto sigbus;
|
||||
|
||||
compute_return_epc(regs);
|
||||
value = regs->regs[insn.i_format.rt];
|
||||
|
||||
if (IS_ENABLED(CONFIG_EVA)) {
|
||||
if (uaccess_kernel())
|
||||
StoreHW(addr, value, res);
|
||||
else
|
||||
StoreHWE(addr, value, res);
|
||||
} else {
|
||||
if (IS_ENABLED(CONFIG_EVA) && user)
|
||||
StoreHWE(addr, value, res);
|
||||
else
|
||||
StoreHW(addr, value, res);
|
||||
}
|
||||
|
||||
if (res)
|
||||
goto fault;
|
||||
break;
|
||||
|
||||
case sw_op:
|
||||
if (!access_ok(addr, 4))
|
||||
if (user && !access_ok(addr, 4))
|
||||
goto sigbus;
|
||||
|
||||
compute_return_epc(regs);
|
||||
value = regs->regs[insn.i_format.rt];
|
||||
|
||||
if (IS_ENABLED(CONFIG_EVA)) {
|
||||
if (uaccess_kernel())
|
||||
StoreW(addr, value, res);
|
||||
else
|
||||
StoreWE(addr, value, res);
|
||||
} else {
|
||||
if (IS_ENABLED(CONFIG_EVA) && user)
|
||||
StoreWE(addr, value, res);
|
||||
else
|
||||
StoreW(addr, value, res);
|
||||
}
|
||||
|
||||
if (res)
|
||||
goto fault;
|
||||
|
@ -418,7 +376,7 @@ static void emulate_load_store_insn(struct pt_regs *regs,
|
|||
* would blow up, so for now we don't handle unaligned 64-bit
|
||||
* instructions on 32-bit kernels.
|
||||
*/
|
||||
if (!access_ok(addr, 8))
|
||||
if (user && !access_ok(addr, 8))
|
||||
goto sigbus;
|
||||
|
||||
compute_return_epc(regs);
|
||||
|
@ -626,6 +584,7 @@ static void emulate_load_store_microMIPS(struct pt_regs *regs,
|
|||
unsigned long origpc, contpc;
|
||||
union mips_instruction insn;
|
||||
struct mm_decoded_insn mminsn;
|
||||
bool user = user_mode(regs);
|
||||
|
||||
origpc = regs->cp0_epc;
|
||||
orig31 = regs->regs[31];
|
||||
|
@ -689,7 +648,7 @@ static void emulate_load_store_microMIPS(struct pt_regs *regs,
|
|||
if (reg == 31)
|
||||
goto sigbus;
|
||||
|
||||
if (!access_ok(addr, 8))
|
||||
if (user && !access_ok(addr, 8))
|
||||
goto sigbus;
|
||||
|
||||
LoadW(addr, value, res);
|
||||
|
@ -708,7 +667,7 @@ static void emulate_load_store_microMIPS(struct pt_regs *regs,
|
|||
if (reg == 31)
|
||||
goto sigbus;
|
||||
|
||||
if (!access_ok(addr, 8))
|
||||
if (user && !access_ok(addr, 8))
|
||||
goto sigbus;
|
||||
|
||||
value = regs->regs[reg];
|
||||
|
@ -728,7 +687,7 @@ static void emulate_load_store_microMIPS(struct pt_regs *regs,
|
|||
if (reg == 31)
|
||||
goto sigbus;
|
||||
|
||||
if (!access_ok(addr, 16))
|
||||
if (user && !access_ok(addr, 16))
|
||||
goto sigbus;
|
||||
|
||||
LoadDW(addr, value, res);
|
||||
|
@ -751,7 +710,7 @@ static void emulate_load_store_microMIPS(struct pt_regs *regs,
|
|||
if (reg == 31)
|
||||
goto sigbus;
|
||||
|
||||
if (!access_ok(addr, 16))
|
||||
if (user && !access_ok(addr, 16))
|
||||
goto sigbus;
|
||||
|
||||
value = regs->regs[reg];
|
||||
|
@ -774,10 +733,10 @@ static void emulate_load_store_microMIPS(struct pt_regs *regs,
|
|||
if ((rvar > 9) || !reg)
|
||||
goto sigill;
|
||||
if (reg & 0x10) {
|
||||
if (!access_ok(addr, 4 * (rvar + 1)))
|
||||
if (user && !access_ok(addr, 4 * (rvar + 1)))
|
||||
goto sigbus;
|
||||
} else {
|
||||
if (!access_ok(addr, 4 * rvar))
|
||||
if (user && !access_ok(addr, 4 * rvar))
|
||||
goto sigbus;
|
||||
}
|
||||
if (rvar == 9)
|
||||
|
@ -810,10 +769,10 @@ static void emulate_load_store_microMIPS(struct pt_regs *regs,
|
|||
if ((rvar > 9) || !reg)
|
||||
goto sigill;
|
||||
if (reg & 0x10) {
|
||||
if (!access_ok(addr, 4 * (rvar + 1)))
|
||||
if (user && !access_ok(addr, 4 * (rvar + 1)))
|
||||
goto sigbus;
|
||||
} else {
|
||||
if (!access_ok(addr, 4 * rvar))
|
||||
if (user && !access_ok(addr, 4 * rvar))
|
||||
goto sigbus;
|
||||
}
|
||||
if (rvar == 9)
|
||||
|
@ -847,10 +806,10 @@ static void emulate_load_store_microMIPS(struct pt_regs *regs,
|
|||
if ((rvar > 9) || !reg)
|
||||
goto sigill;
|
||||
if (reg & 0x10) {
|
||||
if (!access_ok(addr, 8 * (rvar + 1)))
|
||||
if (user && !access_ok(addr, 8 * (rvar + 1)))
|
||||
goto sigbus;
|
||||
} else {
|
||||
if (!access_ok(addr, 8 * rvar))
|
||||
if (user && !access_ok(addr, 8 * rvar))
|
||||
goto sigbus;
|
||||
}
|
||||
if (rvar == 9)
|
||||
|
@ -888,10 +847,10 @@ static void emulate_load_store_microMIPS(struct pt_regs *regs,
|
|||
if ((rvar > 9) || !reg)
|
||||
goto sigill;
|
||||
if (reg & 0x10) {
|
||||
if (!access_ok(addr, 8 * (rvar + 1)))
|
||||
if (user && !access_ok(addr, 8 * (rvar + 1)))
|
||||
goto sigbus;
|
||||
} else {
|
||||
if (!access_ok(addr, 8 * rvar))
|
||||
if (user && !access_ok(addr, 8 * rvar))
|
||||
goto sigbus;
|
||||
}
|
||||
if (rvar == 9)
|
||||
|
@ -1010,7 +969,7 @@ fpu_emul:
|
|||
case mm_lwm16_op:
|
||||
reg = insn.mm16_m_format.rlist;
|
||||
rvar = reg + 1;
|
||||
if (!access_ok(addr, 4 * rvar))
|
||||
if (user && !access_ok(addr, 4 * rvar))
|
||||
goto sigbus;
|
||||
|
||||
for (i = 16; rvar; rvar--, i++) {
|
||||
|
@ -1030,7 +989,7 @@ fpu_emul:
|
|||
case mm_swm16_op:
|
||||
reg = insn.mm16_m_format.rlist;
|
||||
rvar = reg + 1;
|
||||
if (!access_ok(addr, 4 * rvar))
|
||||
if (user && !access_ok(addr, 4 * rvar))
|
||||
goto sigbus;
|
||||
|
||||
for (i = 16; rvar; rvar--, i++) {
|
||||
|
@ -1084,7 +1043,7 @@ fpu_emul:
|
|||
}
|
||||
|
||||
loadHW:
|
||||
if (!access_ok(addr, 2))
|
||||
if (user && !access_ok(addr, 2))
|
||||
goto sigbus;
|
||||
|
||||
LoadHW(addr, value, res);
|
||||
|
@ -1094,7 +1053,7 @@ loadHW:
|
|||
goto success;
|
||||
|
||||
loadHWU:
|
||||
if (!access_ok(addr, 2))
|
||||
if (user && !access_ok(addr, 2))
|
||||
goto sigbus;
|
||||
|
||||
LoadHWU(addr, value, res);
|
||||
|
@ -1104,7 +1063,7 @@ loadHWU:
|
|||
goto success;
|
||||
|
||||
loadW:
|
||||
if (!access_ok(addr, 4))
|
||||
if (user && !access_ok(addr, 4))
|
||||
goto sigbus;
|
||||
|
||||
LoadW(addr, value, res);
|
||||
|
@ -1122,7 +1081,7 @@ loadWU:
|
|||
* would blow up, so for now we don't handle unaligned 64-bit
|
||||
* instructions on 32-bit kernels.
|
||||
*/
|
||||
if (!access_ok(addr, 4))
|
||||
if (user && !access_ok(addr, 4))
|
||||
goto sigbus;
|
||||
|
||||
LoadWU(addr, value, res);
|
||||
|
@ -1144,7 +1103,7 @@ loadDW:
|
|||
* would blow up, so for now we don't handle unaligned 64-bit
|
||||
* instructions on 32-bit kernels.
|
||||
*/
|
||||
if (!access_ok(addr, 8))
|
||||
if (user && !access_ok(addr, 8))
|
||||
goto sigbus;
|
||||
|
||||
LoadDW(addr, value, res);
|
||||
|
@ -1158,7 +1117,7 @@ loadDW:
|
|||
goto sigill;
|
||||
|
||||
storeHW:
|
||||
if (!access_ok(addr, 2))
|
||||
if (user && !access_ok(addr, 2))
|
||||
goto sigbus;
|
||||
|
||||
value = regs->regs[reg];
|
||||
|
@ -1168,7 +1127,7 @@ storeHW:
|
|||
goto success;
|
||||
|
||||
storeW:
|
||||
if (!access_ok(addr, 4))
|
||||
if (user && !access_ok(addr, 4))
|
||||
goto sigbus;
|
||||
|
||||
value = regs->regs[reg];
|
||||
|
@ -1186,7 +1145,7 @@ storeDW:
|
|||
* would blow up, so for now we don't handle unaligned 64-bit
|
||||
* instructions on 32-bit kernels.
|
||||
*/
|
||||
if (!access_ok(addr, 8))
|
||||
if (user && !access_ok(addr, 8))
|
||||
goto sigbus;
|
||||
|
||||
value = regs->regs[reg];
|
||||
|
@ -1243,6 +1202,7 @@ static void emulate_load_store_MIPS16e(struct pt_regs *regs, void __user * addr)
|
|||
union mips16e_instruction mips16inst, oldinst;
|
||||
unsigned int opcode;
|
||||
int extended = 0;
|
||||
bool user = user_mode(regs);
|
||||
|
||||
origpc = regs->cp0_epc;
|
||||
orig31 = regs->regs[31];
|
||||
|
@ -1344,7 +1304,7 @@ static void emulate_load_store_MIPS16e(struct pt_regs *regs, void __user * addr)
|
|||
goto sigbus;
|
||||
|
||||
case MIPS16e_lh_op:
|
||||
if (!access_ok(addr, 2))
|
||||
if (user && !access_ok(addr, 2))
|
||||
goto sigbus;
|
||||
|
||||
LoadHW(addr, value, res);
|
||||
|
@ -1355,7 +1315,7 @@ static void emulate_load_store_MIPS16e(struct pt_regs *regs, void __user * addr)
|
|||
break;
|
||||
|
||||
case MIPS16e_lhu_op:
|
||||
if (!access_ok(addr, 2))
|
||||
if (user && !access_ok(addr, 2))
|
||||
goto sigbus;
|
||||
|
||||
LoadHWU(addr, value, res);
|
||||
|
@ -1368,7 +1328,7 @@ static void emulate_load_store_MIPS16e(struct pt_regs *regs, void __user * addr)
|
|||
case MIPS16e_lw_op:
|
||||
case MIPS16e_lwpc_op:
|
||||
case MIPS16e_lwsp_op:
|
||||
if (!access_ok(addr, 4))
|
||||
if (user && !access_ok(addr, 4))
|
||||
goto sigbus;
|
||||
|
||||
LoadW(addr, value, res);
|
||||
|
@ -1387,7 +1347,7 @@ static void emulate_load_store_MIPS16e(struct pt_regs *regs, void __user * addr)
|
|||
* would blow up, so for now we don't handle unaligned 64-bit
|
||||
* instructions on 32-bit kernels.
|
||||
*/
|
||||
if (!access_ok(addr, 4))
|
||||
if (user && !access_ok(addr, 4))
|
||||
goto sigbus;
|
||||
|
||||
LoadWU(addr, value, res);
|
||||
|
@ -1411,7 +1371,7 @@ loadDW:
|
|||
* would blow up, so for now we don't handle unaligned 64-bit
|
||||
* instructions on 32-bit kernels.
|
||||
*/
|
||||
if (!access_ok(addr, 8))
|
||||
if (user && !access_ok(addr, 8))
|
||||
goto sigbus;
|
||||
|
||||
LoadDW(addr, value, res);
|
||||
|
@ -1426,7 +1386,7 @@ loadDW:
|
|||
goto sigill;
|
||||
|
||||
case MIPS16e_sh_op:
|
||||
if (!access_ok(addr, 2))
|
||||
if (user && !access_ok(addr, 2))
|
||||
goto sigbus;
|
||||
|
||||
MIPS16e_compute_return_epc(regs, &oldinst);
|
||||
|
@ -1439,7 +1399,7 @@ loadDW:
|
|||
case MIPS16e_sw_op:
|
||||
case MIPS16e_swsp_op:
|
||||
case MIPS16e_i8_op: /* actually - MIPS16e_swrasp_func */
|
||||
if (!access_ok(addr, 4))
|
||||
if (user && !access_ok(addr, 4))
|
||||
goto sigbus;
|
||||
|
||||
MIPS16e_compute_return_epc(regs, &oldinst);
|
||||
|
@ -1459,7 +1419,7 @@ writeDW:
|
|||
* would blow up, so for now we don't handle unaligned 64-bit
|
||||
* instructions on 32-bit kernels.
|
||||
*/
|
||||
if (!access_ok(addr, 8))
|
||||
if (user && !access_ok(addr, 8))
|
||||
goto sigbus;
|
||||
|
||||
MIPS16e_compute_return_epc(regs, &oldinst);
|
||||
|
@ -1515,8 +1475,7 @@ sigill:
|
|||
asmlinkage void do_ade(struct pt_regs *regs)
|
||||
{
|
||||
enum ctx_state prev_state;
|
||||
unsigned int __user *pc;
|
||||
mm_segment_t seg;
|
||||
unsigned int *pc;
|
||||
|
||||
prev_state = exception_enter();
|
||||
perf_sw_event(PERF_COUNT_SW_ALIGNMENT_FAULTS,
|
||||
|
@ -1551,24 +1510,14 @@ asmlinkage void do_ade(struct pt_regs *regs)
|
|||
show_registers(regs);
|
||||
|
||||
if (cpu_has_mmips) {
|
||||
seg = get_fs();
|
||||
if (!user_mode(regs))
|
||||
set_fs(KERNEL_DS);
|
||||
emulate_load_store_microMIPS(regs,
|
||||
(void __user *)regs->cp0_badvaddr);
|
||||
set_fs(seg);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (cpu_has_mips16) {
|
||||
seg = get_fs();
|
||||
if (!user_mode(regs))
|
||||
set_fs(KERNEL_DS);
|
||||
emulate_load_store_MIPS16e(regs,
|
||||
(void __user *)regs->cp0_badvaddr);
|
||||
set_fs(seg);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1577,13 +1526,9 @@ asmlinkage void do_ade(struct pt_regs *regs)
|
|||
|
||||
if (unaligned_action == UNALIGNED_ACTION_SHOW)
|
||||
show_registers(regs);
|
||||
pc = (unsigned int __user *)exception_epc(regs);
|
||||
pc = (unsigned int *)exception_epc(regs);
|
||||
|
||||
seg = get_fs();
|
||||
if (!user_mode(regs))
|
||||
set_fs(KERNEL_DS);
|
||||
emulate_load_store_insn(regs, (void __user *)regs->cp0_badvaddr, pc);
|
||||
set_fs(seg);
|
||||
|
||||
return;
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
|
|||
{
|
||||
struct mips_vdso_image *image = current->thread.abi->vdso;
|
||||
struct mm_struct *mm = current->mm;
|
||||
unsigned long gic_size, vvar_size, size, base, data_addr, vdso_addr, gic_pfn;
|
||||
unsigned long gic_size, vvar_size, size, base, data_addr, vdso_addr, gic_pfn, gic_base;
|
||||
struct vm_area_struct *vma;
|
||||
int ret;
|
||||
|
||||
|
@ -158,7 +158,8 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
|
|||
|
||||
/* Map GIC user page. */
|
||||
if (gic_size) {
|
||||
gic_pfn = virt_to_phys(mips_gic_base + MIPS_GIC_USER_OFS) >> PAGE_SHIFT;
|
||||
gic_base = (unsigned long)mips_gic_base + MIPS_GIC_USER_OFS;
|
||||
gic_pfn = virt_to_phys((void *)gic_base) >> PAGE_SHIFT;
|
||||
|
||||
ret = io_remap_pfn_range(vma, base, gic_pfn, gic_size,
|
||||
pgprot_noncached(vma->vm_page_prot));
|
||||
|
|
|
@ -30,40 +30,6 @@ config KVM
|
|||
help
|
||||
Support for hosting Guest kernels.
|
||||
|
||||
choice
|
||||
prompt "Virtualization mode"
|
||||
depends on KVM
|
||||
default KVM_MIPS_TE
|
||||
|
||||
config KVM_MIPS_TE
|
||||
bool "Trap & Emulate"
|
||||
depends on CPU_MIPS32_R2
|
||||
help
|
||||
Use trap and emulate to virtualize 32-bit guests in user mode. This
|
||||
does not require any special hardware Virtualization support beyond
|
||||
standard MIPS32 r2 or later, but it does require the guest kernel
|
||||
to be configured with CONFIG_KVM_GUEST=y so that it resides in the
|
||||
user address segment.
|
||||
|
||||
config KVM_MIPS_VZ
|
||||
bool "MIPS Virtualization (VZ) ASE"
|
||||
help
|
||||
Use the MIPS Virtualization (VZ) ASE to virtualize guests. This
|
||||
supports running unmodified guest kernels (with CONFIG_KVM_GUEST=n),
|
||||
but requires hardware support.
|
||||
|
||||
endchoice
|
||||
|
||||
config KVM_MIPS_DYN_TRANS
|
||||
bool "KVM/MIPS: Dynamic binary translation to reduce traps"
|
||||
depends on KVM_MIPS_TE
|
||||
default y
|
||||
help
|
||||
When running in Trap & Emulate mode patch privileged
|
||||
instructions to reduce the number of traps.
|
||||
|
||||
If unsure, say Y.
|
||||
|
||||
config KVM_MIPS_DEBUG_COP0_COUNTERS
|
||||
bool "Maintain counters for COP0 accesses"
|
||||
depends on KVM
|
||||
|
|
|
@ -9,7 +9,7 @@ EXTRA_CFLAGS += -Ivirt/kvm -Iarch/mips/kvm
|
|||
common-objs-$(CONFIG_CPU_HAS_MSA) += msa.o
|
||||
|
||||
kvm-objs := $(common-objs-y) mips.o emulate.o entry.o \
|
||||
interrupt.o stats.o commpage.o \
|
||||
interrupt.o stats.o \
|
||||
fpu.o
|
||||
kvm-objs += hypcall.o
|
||||
kvm-objs += mmu.o
|
||||
|
@ -17,11 +17,6 @@ ifdef CONFIG_CPU_LOONGSON64
|
|||
kvm-objs += loongson_ipi.o
|
||||
endif
|
||||
|
||||
ifdef CONFIG_KVM_MIPS_VZ
|
||||
kvm-objs += vz.o
|
||||
else
|
||||
kvm-objs += dyntrans.o
|
||||
kvm-objs += trap_emul.o
|
||||
endif
|
||||
obj-$(CONFIG_KVM) += kvm.o
|
||||
obj-y += callback.o tlb.o
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
/*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* commpage, currently used for Virtual COP0 registers.
|
||||
* Mapped into the guest kernel @ KVM_GUEST_COMMPAGE_ADDR.
|
||||
*
|
||||
* Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
|
||||
* Authors: Sanjay Lal <sanjayl@kymasys.com>
|
||||
*/
|
||||
|
||||
#include <linux/errno.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/vmalloc.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/memblock.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/cacheflush.h>
|
||||
#include <asm/mmu_context.h>
|
||||
|
||||
#include <linux/kvm_host.h>
|
||||
|
||||
#include "commpage.h"
|
||||
|
||||
void kvm_mips_commpage_init(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
struct kvm_mips_commpage *page = vcpu->arch.kseg0_commpage;
|
||||
|
||||
/* Specific init values for fields */
|
||||
vcpu->arch.cop0 = &page->cop0;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue