Commit 09cea96c authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (151 commits)
  powerpc: Fix usage of 64-bit instruction in 32-bit altivec code
  MAINTAINERS: Add PowerPC patterns
  powerpc/pseries: Track previous CPPR values to correctly EOI interrupts
  powerpc/pseries: Correct pseries/dlpar.c build break without CONFIG_SMP
  powerpc: Make "intspec" pointers in irq_host->xlate() const
  powerpc/8xx: DTLB Miss cleanup
  powerpc/8xx: Remove DIRTY pte handling in DTLB Error.
  powerpc/8xx: Start using dcbX instructions in various copy routines
  powerpc/8xx: Restore _PAGE_WRITETHRU
  powerpc/8xx: Add missing Guarded setting in DTLB Error.
  powerpc/8xx: Fixup DAR from buggy dcbX instructions.
  powerpc/8xx: Tag DAR with 0x00f0 to catch buggy instructions.
  powerpc/8xx: Update TLB asm so it behaves as linux mm expects.
  powerpc/8xx: Invalidate non present TLBs
  powerpc/pseries: Serialize cpu hotplug operations during deactivate Vs deallocate
  pseries/pseries: Add code to online/offline CPUs of a DLPAR node
  powerpc: stop_this_cpu: remove the cpu from the online map.
  powerpc/pseries: Add kernel based CPU DLPAR handling
  sysfs/cpu: Add probe/release files
  powerpc/pseries: Kernel DLPAR Infrastructure
  ...
parents 6eb7365d e090aa80
...@@ -62,6 +62,21 @@ Description: CPU topology files that describe kernel limits related to ...@@ -62,6 +62,21 @@ Description: CPU topology files that describe kernel limits related to
See Documentation/cputopology.txt for more information. See Documentation/cputopology.txt for more information.
What: /sys/devices/system/cpu/probe
/sys/devices/system/cpu/release
Date: November 2009
Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
Description: Dynamic addition and removal of CPU's. This is not hotplug
removal, this is meant complete removal/addition of the CPU
from the system.
probe: writes to this file will dynamically add a CPU to the
system. Information written to the file to add CPU's is
architecture specific.
release: writes to this file dynamically remove a CPU from
the system. Information writtento the file to remove CPU's
is architecture specific.
What: /sys/devices/system/cpu/cpu#/node What: /sys/devices/system/cpu/cpu#/node
Date: October 2009 Date: October 2009
......
...@@ -49,6 +49,12 @@ maxcpus=n Restrict boot time cpus to n. Say if you have 4 cpus, using ...@@ -49,6 +49,12 @@ maxcpus=n Restrict boot time cpus to n. Say if you have 4 cpus, using
additional_cpus=n (*) Use this to limit hotpluggable cpus. This option sets additional_cpus=n (*) Use this to limit hotpluggable cpus. This option sets
cpu_possible_map = cpu_present_map + additional_cpus cpu_possible_map = cpu_present_map + additional_cpus
cede_offline={"off","on"} Use this option to disable/enable putting offlined
processors to an extended H_CEDE state on
supported pseries platforms.
If nothing is specified,
cede_offline is set to "on".
(*) Option valid only for following architectures (*) Option valid only for following architectures
- ia64 - ia64
......
...@@ -20,12 +20,16 @@ Required properities: ...@@ -20,12 +20,16 @@ Required properities:
- compatible : should be "fsl,fpga-pixis". - compatible : should be "fsl,fpga-pixis".
- reg : should contain the address and the length of the FPPGA register - reg : should contain the address and the length of the FPPGA register
set. set.
- interrupt-parent: should specify phandle for the interrupt controller.
- interrupts : should specify event (wakeup) IRQ.
Example (MPC8610HPCD): Example (MPC8610HPCD):
board-control@e8000000 { board-control@e8000000 {
compatible = "fsl,fpga-pixis"; compatible = "fsl,fpga-pixis";
reg = <0xe8000000 32>; reg = <0xe8000000 32>;
interrupt-parent = <&mpic>;
interrupts = <8 8>;
}; };
* Freescale BCSR GPIO banks * Freescale BCSR GPIO banks
......
...@@ -103,7 +103,22 @@ fsl,mpc5200-gpt nodes ...@@ -103,7 +103,22 @@ fsl,mpc5200-gpt nodes
--------------------- ---------------------
On the mpc5200 and 5200b, GPT0 has a watchdog timer function. If the board On the mpc5200 and 5200b, GPT0 has a watchdog timer function. If the board
design supports the internal wdt, then the device node for GPT0 should design supports the internal wdt, then the device node for GPT0 should
include the empty property 'fsl,has-wdt'. include the empty property 'fsl,has-wdt'. Note that this does not activate
the watchdog. The timer will function as a GPT if the timer api is used, and
it will function as watchdog if the watchdog device is used. The watchdog
mode has priority over the gpt mode, i.e. if the watchdog is activated, any
gpt api call to this timer will fail with -EBUSY.
If you add the property
fsl,wdt-on-boot = <n>;
GPT0 will be marked as in-use watchdog, i.e. blocking every gpt access to it.
If n>0, the watchdog is started with a timeout of n seconds. If n=0, the
configuration of the watchdog is not touched. This is useful in two cases:
- just mark GPT0 as watchdog, blocking gpt accesses, and configure it later;
- do not touch a configuration assigned by the boot loader which supervises
the boot process itself.
The watchdog will respect the CONFIG_WATCHDOG_NOWAYOUT option.
An mpc5200-gpt can be used as a single line GPIO controller. To do so, An mpc5200-gpt can be used as a single line GPIO controller. To do so,
add the following properties to the gpt node: add the following properties to the gpt node:
......
...@@ -3260,6 +3260,7 @@ LINUX FOR IBM pSERIES (RS/6000) ...@@ -3260,6 +3260,7 @@ LINUX FOR IBM pSERIES (RS/6000)
M: Paul Mackerras <paulus@au.ibm.com> M: Paul Mackerras <paulus@au.ibm.com>
W: http://www.ibm.com/linux/ltc/projects/ppc W: http://www.ibm.com/linux/ltc/projects/ppc
S: Supported S: Supported
F: arch/powerpc/boot/rs6000.h
LINUX FOR POWERPC (32-BIT AND 64-BIT) LINUX FOR POWERPC (32-BIT AND 64-BIT)
M: Benjamin Herrenschmidt <benh@kernel.crashing.org> M: Benjamin Herrenschmidt <benh@kernel.crashing.org>
...@@ -3268,18 +3269,24 @@ W: http://www.penguinppc.org/ ...@@ -3268,18 +3269,24 @@ W: http://www.penguinppc.org/
L: linuxppc-dev@ozlabs.org L: linuxppc-dev@ozlabs.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git
S: Supported S: Supported
F: Documentation/powerpc/
F: arch/powerpc/
LINUX FOR POWER MACINTOSH LINUX FOR POWER MACINTOSH
M: Benjamin Herrenschmidt <benh@kernel.crashing.org> M: Benjamin Herrenschmidt <benh@kernel.crashing.org>
W: http://www.penguinppc.org/ W: http://www.penguinppc.org/
L: linuxppc-dev@ozlabs.org L: linuxppc-dev@ozlabs.org
S: Maintained S: Maintained
F: arch/powerpc/platforms/powermac/
F: drivers/macintosh/
LINUX FOR POWERPC EMBEDDED MPC5XXX LINUX FOR POWERPC EMBEDDED MPC5XXX
M: Grant Likely <grant.likely@secretlab.ca> M: Grant Likely <grant.likely@secretlab.ca>
L: linuxppc-dev@ozlabs.org L: linuxppc-dev@ozlabs.org
T: git git://git.secretlab.ca/git/linux-2.6.git T: git git://git.secretlab.ca/git/linux-2.6.git
S: Maintained S: Maintained
F: arch/powerpc/platforms/512x/
F: arch/powerpc/platforms/52xx/
LINUX FOR POWERPC EMBEDDED PPC4XX LINUX FOR POWERPC EMBEDDED PPC4XX
M: Josh Boyer <jwboyer@linux.vnet.ibm.com> M: Josh Boyer <jwboyer@linux.vnet.ibm.com>
...@@ -3288,6 +3295,8 @@ W: http://www.penguinppc.org/ ...@@ -3288,6 +3295,8 @@ W: http://www.penguinppc.org/
L: linuxppc-dev@ozlabs.org L: linuxppc-dev@ozlabs.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx.git
S: Maintained S: Maintained
F: arch/powerpc/platforms/40x/
F: arch/powerpc/platforms/44x/
LINUX FOR POWERPC EMBEDDED XILINX VIRTEX LINUX FOR POWERPC EMBEDDED XILINX VIRTEX
M: Grant Likely <grant.likely@secretlab.ca> M: Grant Likely <grant.likely@secretlab.ca>
...@@ -3295,6 +3304,8 @@ W: http://wiki.secretlab.ca/index.php/Linux_on_Xilinx_Virtex ...@@ -3295,6 +3304,8 @@ W: http://wiki.secretlab.ca/index.php/Linux_on_Xilinx_Virtex
L: linuxppc-dev@ozlabs.org L: linuxppc-dev@ozlabs.org
T: git git://git.secretlab.ca/git/linux-2.6.git T: git git://git.secretlab.ca/git/linux-2.6.git
S: Maintained S: Maintained
F: arch/powerpc/*/*virtex*
F: arch/powerpc/*/*/*virtex*
LINUX FOR POWERPC EMBEDDED PPC8XX LINUX FOR POWERPC EMBEDDED PPC8XX
M: Vitaly Bordug <vitb@kernel.crashing.org> M: Vitaly Bordug <vitb@kernel.crashing.org>
...@@ -3308,12 +3319,16 @@ M: Kumar Gala <galak@kernel.crashing.org> ...@@ -3308,12 +3319,16 @@ M: Kumar Gala <galak@kernel.crashing.org>
W: http://www.penguinppc.org/ W: http://www.penguinppc.org/
L: linuxppc-dev@ozlabs.org L: linuxppc-dev@ozlabs.org
S: Maintained S: Maintained
F: arch/powerpc/platforms/83xx/
LINUX FOR POWERPC PA SEMI PWRFICIENT LINUX FOR POWERPC PA SEMI PWRFICIENT
M: Olof Johansson <olof@lixom.net> M: Olof Johansson <olof@lixom.net>
W: http://www.pasemi.com/ W: http://www.pasemi.com/
L: linuxppc-dev@ozlabs.org L: linuxppc-dev@ozlabs.org
S: Supported S: Supported
F: arch/powerpc/platforms/pasemi/
F: drivers/*/*pasemi*
F: drivers/*/*/*pasemi*
LINUX SECURITY MODULE (LSM) FRAMEWORK LINUX SECURITY MODULE (LSM) FRAMEWORK
M: Chris Wright <chrisw@sous-sol.org> M: Chris Wright <chrisw@sous-sol.org>
......
...@@ -56,6 +56,16 @@ config IRQ_PER_CPU ...@@ -56,6 +56,16 @@ config IRQ_PER_CPU
bool bool
default y default y
config NR_IRQS
int "Number of virtual interrupt numbers"
range 32 512
default "512"
help
This defines the number of virtual interrupt numbers the kernel
can manage. Virtual interrupt numbers are what you see in
/proc/interrupts. If you configure your system to have too few,
drivers will fail to load or worse - handle with care.
config STACKTRACE_SUPPORT config STACKTRACE_SUPPORT
bool bool
default y default y
...@@ -199,24 +209,14 @@ config DEFAULT_UIMAGE ...@@ -199,24 +209,14 @@ config DEFAULT_UIMAGE
config REDBOOT config REDBOOT
bool bool
config HIBERNATE_32
bool
depends on (PPC_PMAC && !SMP) || BROKEN
default y
config HIBERNATE_64
bool
depends on BROKEN || (PPC_PMAC64 && EXPERIMENTAL)
default y
config ARCH_HIBERNATION_POSSIBLE config ARCH_HIBERNATION_POSSIBLE
bool bool
depends on (PPC64 && HIBERNATE_64) || (PPC32 && HIBERNATE_32)
default y default y
config ARCH_SUSPEND_POSSIBLE config ARCH_SUSPEND_POSSIBLE
def_bool y def_bool y
depends on ADB_PMU || PPC_EFIKA || PPC_LITE5200 || PPC_83xx depends on ADB_PMU || PPC_EFIKA || PPC_LITE5200 || PPC_83xx || \
PPC_85xx || PPC_86xx
config PPC_DCR_NATIVE config PPC_DCR_NATIVE
bool bool
...@@ -320,6 +320,10 @@ config HOTPLUG_CPU ...@@ -320,6 +320,10 @@ config HOTPLUG_CPU
Say N if you are unsure. Say N if you are unsure.
config ARCH_CPU_PROBE_RELEASE
def_bool y
depends on HOTPLUG_CPU
config ARCH_ENABLE_MEMORY_HOTPLUG config ARCH_ENABLE_MEMORY_HOTPLUG
def_bool y def_bool y
...@@ -378,6 +382,19 @@ config IRQ_ALL_CPUS ...@@ -378,6 +382,19 @@ config IRQ_ALL_CPUS
CPU. Generally saying Y is safe, although some problems have been CPU. Generally saying Y is safe, although some problems have been
reported with SMP Power Macintoshes with this option enabled. reported with SMP Power Macintoshes with this option enabled.
config SPARSE_IRQ
bool "Support sparse irq numbering"
default y
help
This enables support for sparse irqs. This is useful for distro
kernels that want to define a high CONFIG_NR_CPUS value but still
want to have low kernel memory footprint on smaller machines.
( Sparse IRQs can also be beneficial on NUMA boxes, as they spread
out the irq_desc[] array in a more NUMA-friendly way. )
If you don't know what to do here, say Y.
config NUMA config NUMA
bool "NUMA support" bool "NUMA support"
depends on PPC64 depends on PPC64
...@@ -652,6 +669,14 @@ config FSL_PCI ...@@ -652,6 +669,14 @@ config FSL_PCI
select PPC_INDIRECT_PCI select PPC_INDIRECT_PCI
select PCI_QUIRKS select PCI_QUIRKS
config FSL_PMC
bool
default y
depends on SUSPEND && (PPC_85xx || PPC_86xx)
help
Freescale MPC85xx/MPC86xx power management controller support
(suspend/resume). For MPC83xx see platforms/83xx/suspend.c
config 4xx_SOC config 4xx_SOC
bool bool
......
...@@ -352,6 +352,7 @@ EMAC0: ethernet@ef600e00 { ...@@ -352,6 +352,7 @@ EMAC0: ethernet@ef600e00 {
max-frame-size = <9000>; max-frame-size = <9000>;
rx-fifo-size = <4096>; rx-fifo-size = <4096>;
tx-fifo-size = <2048>; tx-fifo-size = <2048>;
rx-fifo-size-gige = <16384>;
phy-mode = "rgmii"; phy-mode = "rgmii";
phy-map = <0x00000000>; phy-map = <0x00000000>;
rgmii-device = <&RGMII0>; rgmii-device = <&RGMII0>;
...@@ -381,6 +382,7 @@ EMAC1: ethernet@ef600f00 { ...@@ -381,6 +382,7 @@ EMAC1: ethernet@ef600f00 {
max-frame-size = <9000>; max-frame-size = <9000>;
rx-fifo-size = <4096>; rx-fifo-size = <4096>;
tx-fifo-size = <2048>; tx-fifo-size = <2048>;
rx-fifo-size-gige = <16384>;
phy-mode = "rgmii"; phy-mode = "rgmii";
phy-map = <0x00000000>; phy-map = <0x00000000>;
rgmii-device = <&RGMII0>; rgmii-device = <&RGMII0>;
......
...@@ -316,6 +316,7 @@ EMAC0: ethernet@ef600a00 { ...@@ -316,6 +316,7 @@ EMAC0: ethernet@ef600a00 {
max-frame-size = <9000>; max-frame-size = <9000>;
rx-fifo-size = <4096>; rx-fifo-size = <4096>;
tx-fifo-size = <2048>; tx-fifo-size = <2048>;
rx-fifo-size-gige = <16384>;
phy-mode = "rgmii"; phy-mode = "rgmii";
phy-map = <0x00000000>; phy-map = <0x00000000>;
rgmii-device = <&RGMII0>; rgmii-device = <&RGMII0>;
...@@ -345,6 +346,7 @@ EMAC1: ethernet@ef600b00 { ...@@ -345,6 +346,7 @@ EMAC1: ethernet@ef600b00 {
max-frame-size = <9000>; max-frame-size = <9000>;
rx-fifo-size = <4096>; rx-fifo-size = <4096>;
tx-fifo-size = <2048>; tx-fifo-size = <2048>;
rx-fifo-size-gige = <16384>;
phy-mode = "rgmii"; phy-mode = "rgmii";
phy-map = <0x00000000>; phy-map = <0x00000000>;
rgmii-device = <&RGMII0>; rgmii-device = <&RGMII0>;
...@@ -375,6 +377,8 @@ EMAC2: ethernet@ef600c00 { ...@@ -375,6 +377,8 @@ EMAC2: ethernet@ef600c00 {
max-frame-size = <9000>; max-frame-size = <9000>;
rx-fifo-size = <4096>; rx-fifo-size = <4096>;
tx-fifo-size = <2048>; tx-fifo-size = <2048>;
rx-fifo-size-gige = <16384>;
tx-fifo-size-gige = <16384>; /* emac2&3 only */
phy-mode = "rgmii"; phy-mode = "rgmii";
phy-map = <0x00000000>; phy-map = <0x00000000>;
rgmii-device = <&RGMII1>; rgmii-device = <&RGMII1>;
...@@ -403,6 +407,8 @@ EMAC3: ethernet@ef600d00 { ...@@ -403,6 +407,8 @@ EMAC3: ethernet@ef600d00 {
max-frame-size = <9000>; max-frame-size = <9000>;
rx-fifo-size = <4096>; rx-fifo-size = <4096>;
tx-fifo-size = <2048>; tx-fifo-size = <2048>;
rx-fifo-size-gige = <16384>;
tx-fifo-size-gige = <16384>; /* emac2&3 only */
phy-mode = "rgmii"; phy-mode = "rgmii";
phy-map = <0x00000000>; phy-map = <0x00000000>;
rgmii-device = <&RGMII1>; rgmii-device = <&RGMII1>;
......
...@@ -118,6 +118,12 @@ partition@7800000 { ...@@ -118,6 +118,12 @@ partition@7800000 {
}; };
}; };
nvram@3,0 {
device_type = "nvram";
compatible = "simtek,stk14ca8";
reg = <0x3 0x0 0x20000>;
};
fpga@4,0 { fpga@4,0 {
compatible = "gef,ppc9a-fpga-regs"; compatible = "gef,ppc9a-fpga-regs";
reg = <0x4 0x0 0x40>; reg = <0x4 0x0 0x40>;
......
...@@ -115,6 +115,12 @@ partition@7800000 { ...@@ -115,6 +115,12 @@ partition@7800000 {
}; };
}; };
nvram@3,0 {
device_type = "nvram";
compatible = "simtek,stk14ca8";
reg = <0x3 0x0 0x20000>;
};
fpga@4,0 { fpga@4,0 {
compatible = "gef,fpga-regs"; compatible = "gef,fpga-regs";
reg = <0x4 0x0 0x40>; reg = <0x4 0x0 0x40>;
......
...@@ -84,6 +84,12 @@ localbus@fef05000 { ...@@ -84,6 +84,12 @@ localbus@fef05000 {
6 0 0xfd000000 0x00800000 // IO FPGA (8-bit) 6 0 0xfd000000 0x00800000 // IO FPGA (8-bit)
7 0 0xfd800000 0x00800000>; // IO FPGA (32-bit) 7 0 0xfd800000 0x00800000>; // IO FPGA (32-bit)
nvram@3,0 {
device_type = "nvram";
compatible = "simtek,stk14ca8";
reg = <0x3 0x0 0x20000>;
};
fpga@4,0 { fpga@4,0 {
compatible = "gef,fpga-regs"; compatible = "gef,fpga-regs";
reg = <0x4 0x0 0x40>; reg = <0x4 0x0 0x40>;
......
...@@ -292,6 +292,7 @@ EMAC0: ethernet@ef600e00 { ...@@ -292,6 +292,7 @@ EMAC0: ethernet@ef600e00 {
max-frame-size = <9000>; max-frame-size = <9000>;
rx-fifo-size = <4096>; rx-fifo-size = <4096>;
tx-fifo-size = <2048>; tx-fifo-size = <2048>;
rx-fifo-size-gige = <16384>;
phy-mode = "rgmii"; phy-mode = "rgmii";
phy-map = <0x00000000>; phy-map = <0x00000000>;
rgmii-device = <&RGMII0>; rgmii-device = <&RGMII0>;
...@@ -321,6 +322,7 @@ EMAC1: ethernet@ef600f00 { ...@@ -321,6 +322,7 @@ EMAC1: ethernet@ef600f00 {
max-frame-size = <9000>; max-frame-size = <9000>;
rx-fifo-size = <4096>; rx-fifo-size = <4096>;
tx-fifo-size = <2048>; tx-fifo-size = <2048>;
rx-fifo-size-gige = <16384>;
phy-mode = "rgmii"; phy-mode = "rgmii";
phy-map = <0x00000000>; phy-map = <0x00000000>;
rgmii-device = <&RGMII0>; rgmii-device = <&RGMII0>;
...@@ -351,6 +353,8 @@ EMAC2: ethernet@ef601100 { ...@@ -351,6 +353,8 @@ EMAC2: ethernet@ef601100 {
max-frame-size = <9000>; max-frame-size = <9000>;
rx-fifo-size = <4096>; rx-fifo-size = <4096>;
tx-fifo-size = <2048>; tx-fifo-size = <2048>;
rx-fifo-size-gige = <16384>;
tx-fifo-size-gige = <16384>; /* emac2&3 only */
phy-mode = "rgmii"; phy-mode = "rgmii";
phy-map = <0x00000000>; phy-map = <0x00000000>;
rgmii-device = <&RGMII1>; rgmii-device = <&RGMII1>;
...@@ -379,6 +383,8 @@ EMAC3: ethernet@ef601200 { ...@@ -379,6 +383,8 @@ EMAC3: ethernet@ef601200 {
max-frame-size = <9000>; max-frame-size = <9000>;
rx-fifo-size = <4096>; rx-fifo-size = <4096>;
tx-fifo-size = <2048>; tx-fifo-size = <2048>;
rx-fifo-size-gige = <16384>;
tx-fifo-size-gige = <16384>; /* emac2&3 only */
phy-mode = "rgmii"; phy-mode = "rgmii";
phy-map = <0x00000000>; phy-map = <0x00000000>;
rgmii-device = <&RGMII1>; rgmii-device = <&RGMII1>;
......
...@@ -226,6 +226,8 @@ EMAC0: ethernet@ef600900 { ...@@ -226,6 +226,8 @@ EMAC0: ethernet@ef600900 {
max-frame-size = <9000>; max-frame-size = <9000>;
rx-fifo-size = <4096>; rx-fifo-size = <4096>;
tx-fifo-size = <2048>; tx-fifo-size = <2048>;
rx-fifo-size-gige = <16384>;
tx-fifo-size-gige = <16384>;
phy-mode = "rgmii"; phy-mode = "rgmii";
phy-map = <0x00000000>; phy-map = <0x00000000>;
rgmii-device = <&RGMII0>; rgmii-device = <&RGMII0>;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
/ { / {
#address-cells = <2>; #address-cells = <2>;
#size-cells = <1>; #size-cells = <2>;
model = "amcc,katmai"; model = "amcc,katmai";
compatible = "amcc,katmai"; compatible = "amcc,katmai";
dcr-parent = <&{/cpus/cpu@0}>; dcr-parent = <&{/cpus/cpu@0}>;
...@@ -49,7 +49,7 @@ cpu@0 { ...@@ -49,7 +49,7 @@ cpu@0 {
memory { memory {
device_type = "memory"; device_type = "memory";
reg = <0x00000000 0x00000000 0x00000000>; /* Filled in by zImage */ reg = <0x0 0x00000000 0x0 0x00000000>; /* Filled in by U-Boot */
}; };
UIC0: interrupt-controller0 { UIC0: interrupt-controller0 {
...@@ -112,7 +112,15 @@ plb { ...@@ -112,7 +112,15 @@ plb {
compatible = "ibm,plb-440spe", "ibm,plb-440gp", "ibm,plb4"; compatible = "ibm,plb-440spe", "ibm,plb-440gp", "ibm,plb4";
#address-cells = <2>; #address-cells = <2>;
#size-cells = <1>; #size-cells = <1>;
ranges; /* addr-child addr-parent size */
ranges = <0x4 0xe0000000 0x4 0xe0000000 0x20000000
0xc 0x00000000 0xc 0x00000000 0x20000000
0xd 0x00000000 0xd 0x00000000 0x80000000
0xd 0x80000000 0xd 0x80000000 0x80000000
0xe 0x00000000 0xe 0x00000000 0x80000000
0xe 0x80000000 0xe 0x80000000 0x80000000
0xf 0x00000000 0xf 0x00000000 0x80000000
0xf 0x80000000 0xf 0x80000000 0x80000000>;
clock-frequency = <0>; /* Filled in by zImage */ clock-frequency = <0>; /* Filled in by zImage */
SDRAM0: sdram { SDRAM0: sdram {
...@@ -245,8 +253,8 @@ PCIX0: pci@c0ec00000 { ...@@ -245,8 +253,8 @@ PCIX0: pci@c0ec00000 {
ranges = <0x02000000 0x00000000 0x80000000 0x0000000d 0x80000000 0x00000000 0x80000000 ranges = <0x02000000 0x00000000 0x80000000 0x0000000d 0x80000000 0x00000000 0x80000000
0x01000000 0x00000000 0x00000000 0x0000000c 0x08000000 0x00000000 0x00010000>; 0x01000000 0x00000000 0x00000000 0x0000000c 0x08000000 0x00000000 0x00010000>;
/* Inbound 2GB range starting at 0 */ /* Inbound 4GB range starting at 0 */
dma-ranges = <0x42000000 0x0 0x0 0x0 0x0 0x0 0x80000000>; dma-ranges = <0x42000000 0x0 0x0 0x0 0x0 0x1 0x00000000>;
/* This drives busses 0 to 0xf */ /* This drives busses 0 to 0xf */
bus-range = <0x0 0xf>; bus-range = <0x0 0xf>;
...@@ -289,10 +297,10 @@ PCIE0: pciex@d00000000 { ...@@ -289,10 +297,10 @@ PCIE0: pciex@d00000000 {
ranges = <0x02000000 0x00000000 0x80000000 0x0000000e 0x00000000 0x00000000 0x80000000 ranges = <0x02000000 0x00000000 0x80000000 0x0000000e 0x00000000 0x00000000 0x80000000
0x01000000 0x00000000 0x00000000 0x0000000f 0x80000000 0x00000000 0x00010000>; 0x01000000 0x00000000 0x00000000 0x0000000f 0x80000000 0x00000000 0x00010000>;
/* Inbound 2GB range starting at 0 */ /* Inbound 4GB range starting at 0 */
dma-ranges = <0x42000000 0x0 0x0 0x0 0x0 0x0 0x80000000>; dma-ranges = <0x42000000 0x0 0x0 0x0 0x0 0x1 0x00000000>;
/* This drives busses 10 to 0x1f */ /* This drives busses 0x10 to 0x1f */
bus-range = <0x10 0x1f>; bus-range = <0x10 0x1f>;
/* Legacy interrupts (note the weird polarity, the bridge seems /* Legacy interrupts (note the weird polarity, the bridge seems
...@@ -330,10 +338,10 @@ PCIE1: pciex@d20000000 { ...@@ -330,10 +338,10 @@ PCIE1: pciex@d20000000 {
ranges = <0x02000000 0x00000000 0x80000000 0x0000000e 0x80000000 0x00000000 0x80000000 ranges = <0x02000000 0x00000000 0x80000000 0x0000000e 0x80000000 0x00000000 0x80000000
0x01000000 0x00000000 0x00000000 0x0000000f 0x80010000 0x00000000 0x00010000>; 0x01000000 0x00000000 0x00000000 0x0000000f 0x80010000 0x00000000 0x00010000>;
/* Inbound 2GB range starting at 0 */ /* Inbound 4GB range starting at 0 */
dma-ranges = <0x42000000 0x0 0x0 0x0 0x0 0x0 0x80000000>; dma-ranges = <0x42000000 0x0 0x0 0x0 0x0 0x1 0x00000000>;
/* This drives busses 10 to 0x1f */ /* This drives busses 0x20 to 0x2f */
bus-range = <0x20 0x2f>; bus-range = <0x20 0x2f>;
/* Legacy interrupts (note the weird polarity, the bridge seems /* Legacy interrupts (note the weird polarity, the bridge seems
...@@ -371,10 +379,10 @@ PCIE2: pciex@d40000000 { ...@@ -371,10 +379,10 @@ PCIE2: pciex@d40000000 {
ranges = <0x02000000 0x00000000 0x80000000 0x0000000f 0x00000000 0x00000000 0x80000000 ranges = <0x02000000 0x00000000 0x80000000 0x0000000f 0x00000000 0x00000000 0x80000000
0x01000000 0x00000000 0x00000000 0x0000000f 0x80020000 0x00000000 0x00010000>; 0x01000000 0x00000000 0x00000000 0x0000000f 0x80020000 0x00000000 0x00010000>;
/* Inbound 2GB range starting at 0 */ /* Inbound 4GB range starting at 0 */
dma-ranges = <0x42000000 0x0 0x0 0x0 0x0 0x0 0x80000000>; dma-ranges = <0x42000000 0x0 0x0 0x0 0x0 0x1 0x00000000>;
/* This drives busses 10 to 0x1f */ /* This drives busses 0x30 to 0x3f */
bus-range = <0x30 0x3f>; bus-range = <0x30 0x3f>;
/* Legacy interrupts (note the weird polarity, the bridge seems /* Legacy interrupts (note the weird polarity, the bridge seems
......
...@@ -272,6 +272,8 @@ EMAC0: ethernet@ef600900 { ...@@ -272,6 +272,8 @@ EMAC0: ethernet@ef600900 {
max-frame-size = <9000>; max-frame-size = <9000>;
rx-fifo-size = <4096>; rx-fifo-size = <4096>;
tx-fifo-size = <2048>; tx-fifo-size = <2048>;
rx-fifo-size-gige = <16384>;
tx-fifo-size-gige = <16384>;
phy-mode = "rgmii"; phy-mode = "rgmii";
phy-map = <0x00000000>; phy-map = <0x00000000>;
rgmii-device = <&RGMII0>; rgmii-device = <&RGMII0>;
...@@ -300,6 +302,8 @@ EMAC1: ethernet@ef600a00 { ...@@ -300,6 +302,8 @@ EMAC1: ethernet@ef600a00 {
max-frame-size = <9000>; max-frame-size = <9000>;
rx-fifo-size = <4096>; rx-fifo-size = <4096>;
tx-fifo-size = <2048>; tx-fifo-size = <2048>;
rx-fifo-size-gige = <16384>;
tx-fifo-size-gige = <16384>;
phy-mode = "rgmii"; phy-mode = "rgmii";
phy-map = <0x00000000>; phy-map = <0x00000000>;
rgmii-device = <&RGMII0>; rgmii-device = <&RGMII0>;
......
...@@ -59,6 +59,13 @@ soc8360@e0000000 { ...@@ -59,6 +59,13 @@ soc8360@e0000000 {
reg = <0xe0000000 0x00000200>; reg = <0xe0000000 0x00000200>;
bus-frequency = <0>; /* Filled in by U-Boot */ bus-frequency = <0>; /* Filled in by U-Boot */
pmc: power@b00 {
compatible = "fsl,mpc8360-pmc", "fsl,mpc8349-pmc";
reg = <0xb00 0x100 0xa00 0x100>;
interrupts = <80 0x8>;
interrupt-parent = <&ipic>;
};
i2c@3000 { i2c@3000 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
......
...@@ -227,6 +227,8 @@ EMAC0: ethernet@ef600900 { ...@@ -227,6 +227,8 @@ EMAC0: ethernet@ef600900 {
max-frame-size = <9000>; max-frame-size = <9000>;
rx-fifo-size = <4096>; rx-fifo-size = <4096>;
tx-fifo-size = <2048>; tx-fifo-size = <2048>;
rx-fifo-size-gige = <16384>;
tx-fifo-size-gige = <16384>;
phy-mode = "rgmii"; phy-mode = "rgmii";
phy-map = <0x0000003f>; /* Start at 6 */ phy-map = <0x0000003f>; /* Start at 6 */
rgmii-device = <&RGMII0>; rgmii-device = <&RGMII0>;
...@@ -255,6 +257,8 @@ EMAC1: ethernet@ef600a00 { ...@@ -255,6 +257,8 @@ EMAC1: ethernet@ef600a00 {
max-frame-size = <9000>; max-frame-size = <9000>;
rx-fifo-size = <4096>; rx-fifo-size = <4096>;
tx-fifo-size = <2048>; tx-fifo-size = <2048>;
rx-fifo-size-gige = <16384>;
tx-fifo-size-gige = <16384>;
phy-mode = "rgmii"; phy-mode = "rgmii";
phy-map = <0x00000000>; phy-map = <0x00000000>;
rgmii-device = <&RGMII0>; rgmii-device = <&RGMII0>;
......
...@@ -79,6 +79,13 @@ wdt@200 { ...@@ -79,6 +79,13 @@ wdt@200 {
reg = <0x200 0x100>; reg = <0x200 0x100>;
}; };
pmc: power@b00 {
compatible = "fsl,mpc8323-pmc", "fsl,mpc8349-pmc";
reg = <0xb00 0x100 0xa00 0x100>;
interrupts = <80 0x8>;
interrupt-parent = <&ipic>;
};
i2c@3000 { i2c@3000 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
...@@ -163,6 +170,7 @@ crypto@30000 { ...@@ -163,6 +170,7 @@ crypto@30000 {
fsl,channel-fifo-len = <24>; fsl,channel-fifo-len = <24>;
fsl,exec-units-mask = <0x4c>; fsl,exec-units-mask = <0x4c>;
fsl,descriptor-types-mask = <0x0122003f>; fsl,descriptor-types-mask = <0x0122003f>;
sleep = <&pmc 0x03000000>;
}; };
ipic: pic@700 { ipic: pic@700 {
...@@ -428,5 +436,6 @@ pci0: pci@e0008500 { ...@@ -428,5 +436,6 @@ pci0: pci@e0008500 {
0xe0008300 0x8>; /* config space access registers */ 0xe0008300 0x8>; /* config space access registers */
compatible = "fsl,mpc8349-pci"; compatible = "fsl,mpc8349-pci";
device_type = "pci"; device_type = "pci";
sleep = <&pmc 0x00010000>;
}; };
}; };
...@@ -62,6 +62,13 @@ wdt@200 { ...@@ -62,6 +62,13 @@ wdt@200 {
reg = <0x200 0x100>; reg = <0x200 0x100>;
}; };
pmc: power@b00 {
compatible = "fsl,mpc8323-pmc", "fsl,mpc8349-pmc";
reg = <0xb00 0x100 0xa00 0x100>;
interrupts = <80 0x8>;
interrupt-parent = <&ipic>;
};
i2c@3000 { i2c@3000 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
...@@ -141,6 +148,7 @@ crypto@30000 { ...@@ -141,6 +148,7 @@ crypto@30000 {
fsl,channel-fifo-len = <24>; fsl,channel-fifo-len = <24>;
fsl,exec-units-mask = <0x4c>; fsl,exec-units-mask = <0x4c>;
fsl,descriptor-types-mask = <0x0122003f>; fsl,descriptor-types-mask = <0x0122003f>;
sleep = <&pmc 0x03000000>;
}; };
ipic:pic@700 { ipic:pic@700 {
...@@ -360,5 +368,6 @@ pci0: pci@e0008500 { ...@@ -360,5 +368,6 @@ pci0: pci@e0008500 {
0xe0008300 0x8>; /* config space access registers */ 0xe0008300 0x8>; /* config space access registers */
compatible = "fsl,mpc8349-pci"; compatible = "fsl,mpc8349-pci";
device_type = "pci"; device_type = "pci";
sleep = <&pmc 0x00010000>;
}; };
}; };
...@@ -99,6 +99,13 @@ wdt@200 { ...@@ -99,6 +99,13 @@ wdt@200 {
reg = <0x200 0x100>; reg = <0x200 0x100>;
}; };
pmc: power@b00 {
compatible = "fsl,mpc8360-pmc", "fsl,mpc8349-pmc";
reg = <0xb00 0x100 0xa00 0x100>;
interrupts = <80 0x8>;
interrupt-parent = <&ipic>;
};
i2c@3000 { i2c@3000 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
...@@ -194,6 +201,7 @@ crypto@30000 { ...@@ -194,6 +201,7 @@ crypto@30000 {
fsl,channel-fifo-len = <24>; fsl,channel-fifo-len = <24>;
fsl,exec-units-mask = <0x7e>; fsl,exec-units-mask = <0x7e>;
fsl,descriptor-types-mask = <0x01010ebf>; fsl,descriptor-types-mask = <0x01010ebf>;
sleep = <&pmc 0x03000000>;
}; };
ipic: pic@700 { ipic: pic@700 {
...@@ -470,5 +478,6 @@ pci0: pci@e0008500 { ...@@ -470,5 +478,6 @@ pci0: pci@e0008500 {
0xe0008300 0x8>; /* config space access registers */ 0xe0008300 0x8>; /* config space access registers */
compatible = "fsl,mpc8349-pci"; compatible = "fsl,mpc8349-pci";
device_type = "pci"; device_type = "pci";
sleep = <&pmc 0x00010000>;
}; };
}; };
...@@ -71,6 +71,13 @@ wdt@200 { ...@@ -71,6 +71,13 @@ wdt@200 {
reg = <0x200 0x100>; reg = <0x200 0x100>;
}; };
pmc: power@b00 {
compatible = "fsl,mpc8360-pmc", "fsl,mpc8349-pmc";
reg = <0xb00 0x100 0xa00 0x100>;
interrupts = <80 0x8>;
interrupt-parent = <&ipic>;
};
i2c@3000 { i2c@3000 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
...@@ -161,6 +168,7 @@ crypto@30000 { ...@@ -161,6 +168,7 @@ crypto@30000 {
fsl,channel-fifo-len = <24>; fsl,channel-fifo-len = <24>;
fsl,exec-units-mask = <0x7e>; fsl,exec-units-mask = <0x7e>;
fsl,descriptor-types-mask = <0x01010ebf>; fsl,descriptor-types-mask = <0x01010ebf>;
sleep = <&pmc 0x03000000>;
}; };
ipic: interrupt-controller@700 { ipic: interrupt-controller@700 {
...@@ -455,6 +463,7 @@ pci0: pci@e0008500 { ...@@ -455,6 +463,7 @@ pci0: pci@e0008500 {
0xa800 0 0 2 &ipic 20 8 0xa800 0 0 2 &ipic 20 8
0xa800 0 0 3 &ipic 21 8 0xa800 0 0 3 &ipic 21 8
0xa800 0 0 4 &ipic 18 8>; 0xa800 0 0 4 &ipic 18 8>;
sleep = <&pmc 0x00010000>;
/* filled by u-boot */ /* filled by u-boot */
bus-range = <0 0>; bus-range = <0 0>;
clock-frequency = <0>; clock-frequency = <0>;
......
...@@ -40,6 +40,8 @@ PowerPC,8568@0 { ...@@ -40,6 +40,8 @@ PowerPC,8568@0 {
i-cache-line-size = <32>; // 32 bytes i-cache-line-size = <32>; // 32 bytes
d-cache-size = <0x8000>; // L1, 32K d-cache-size = <0x8000>; // L1, 32K
i-cache-size = <0x8000>; // L1, 32K i-cache-size = <0x8000>; // L1, 32K
sleep = <&pmc 0x00008000 // core
&pmc 0x00004000>; // timebase
timebase-frequency = <0>; timebase-frequency = <0>;
bus-frequency = <0>; bus-frequency = <0>;
clock-frequency = <0>; clock-frequency = <0>;
...@@ -94,6 +96,13 @@ L2: l2-cache-controller@20000 { ...@@ -94,6 +96,13 @@ L2: l2-cache-controller@20000 {
interrupts = <16 2>; interrupts = <16 2>;
}; };
i2c-sleep-nexus {
#address-cells = <1>;
#size-cells = <1>;
compatible = "simple-bus";
sleep = <&pmc 0x00000004>;
ranges;
i2c@3000 { i2c@3000 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
...@@ -107,6 +116,8 @@ i2c@3000 { ...@@ -107,6 +116,8 @@ i2c@3000 {
rtc@68 { rtc@68 {
compatible = "dallas,ds1374"; compatible = "dallas,ds1374";
reg = <0x68>; reg = <0x68>;
interrupts = <3 1>;
interrupt-parent = <&mpic>;
}; };
}; };
...@@ -120,6 +131,7 @@ i2c@3100 { ...@@ -120,6 +131,7 @@ i2c@3100 {
interrupt-parent = <&mpic>; interrupt-parent = <&mpic>;
dfsrr; dfsrr;
}; };
};
dma@21300 { dma@21300 {
#address-cells = <1>; #address-cells = <1>;
...@@ -128,6 +140,8 @@ dma@21300 { ...@@ -128,6 +140,8 @@ dma@21300 {
reg = <0x21300 0x4>; reg = <0x21300 0x4>;
ranges = <0x0 0x21100 0x200>; ranges = <0x0 0x21100 0x200>;
cell-index = <0>; cell-index = <0>;
sleep = <&pmc 0x00000400>;
dma-channel@0 { dma-channel@0 {
compatible = "fsl,mpc8568-dma-channel", compatible = "fsl,mpc8568-dma-channel",
"fsl,eloplus-dma-channel"; "fsl,eloplus-dma-channel";
...@@ -176,6 +190,7 @@ enet0: ethernet@24000 { ...@@ -176,6 +190,7 @@ enet0: ethernet@24000 {
interrupt-parent = <&mpic>; interrupt-parent = <&mpic>;
tbi-handle = <&tbi0>; tbi-handle = <&tbi0>;
phy-handle = <&phy2>; phy-handle = <&phy2>;
sleep = <&pmc 0x00000080>;
mdio@520 { mdio@520 {
#address-cells = <1>; #address-cells = <1>;
...@@ -228,6 +243,7 @@ enet1: ethernet@25000 { ...@@ -228,6 +243,7 @@ enet1: ethernet@25000 {
interrupt-parent = <&mpic>; interrupt-parent = <&mpic>;
tbi-handle = <&tbi1>; tbi-handle = <&tbi1>;
phy-handle = <&phy3>; phy-handle = <&phy3>;
sleep = <&pmc 0x00000040>;
mdio@520 { mdio@520 {
#address-cells = <1>; #address-cells = <1>;
...@@ -242,6 +258,13 @@ tbi1: tbi-phy@11 { ...@@ -242,6 +258,13 @@ tbi1: tbi-phy@11 {
}; };
}; };
duart-sleep-nexus {
#address-cells = <1>;
#size-cells = <1>;
compatible = "simple-bus";
sleep = <&pmc 0x00000002>;
ranges;
serial0: serial@4500 { serial0: serial@4500 {
cell-index = <0>; cell-index = <0>;
device_type = "serial"; device_type = "serial";
...@@ -252,12 +275,6 @@ serial0: serial@4500 { ...@@ -252,12 +275,6 @@ serial0: serial@4500 {
interrupt-parent = <&mpic>; interrupt-parent = <&mpic>;
}; };
global-utilities@e0000 { //global utilities block
compatible = "fsl,mpc8548-guts";
reg = <0xe0000 0x1000>;
fsl,has-rstcr;
};
serial1: serial@4600 { serial1: serial@4600 {
cell-index = <1>; cell-index = <1>;
device_type = "serial"; device_type = "serial";
...@@ -267,6 +284,22 @@ serial1: serial@4600 { ...@@ -267,6 +284,22 @@ serial1: serial@4600 {
interrupts = <42 2>; interrupts = <42 2>;
interrupt-parent = <&mpic>; interrupt-parent = <&mpic>;
}; };
};
global-utilities@e0000 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "fsl,mpc8568-guts", "fsl,mpc8548-guts";
reg = <0xe0000 0x1000>;
ranges = <0 0xe0000 0x1000>;
fsl,has-rstcr;
pmc: power@70 {
compatible = "fsl,mpc8568-pmc",
"fsl,mpc8548-pmc";
reg = <0x70 0x20>;
};
};
crypto@30000 { crypto@30000 {
compatible = "fsl,sec2.1", "fsl,sec2.0"; compatible = "fsl,sec2.1", "fsl,sec2.0";
...@@ -277,6 +310,7 @@ crypto@30000 { ...@@ -277,6 +310,7 @@ crypto@30000 {
fsl,channel-fifo-len = <24>; fsl,channel-fifo-len = <24>;
fsl,exec-units-mask = <0xfe>; fsl,exec-units-mask = <0xfe>;
fsl,descriptor-types-mask = <0x12b0ebf>; fsl,descriptor-types-mask = <0x12b0ebf>;
sleep = <&pmc 0x01000000>;
}; };
mpic: pic@40000 { mpic: pic@40000 {
...@@ -376,6 +410,7 @@ qe@e0080000 { ...@@ -376,6 +410,7 @@ qe@e0080000 {
compatible = "fsl,qe"; compatible = "fsl,qe";
ranges = <0x0 0xe0080000 0x40000>; ranges = <0x0 0xe0080000 0x40000>;
reg = <0xe0080000 0x480>; reg = <0xe0080000 0x480>;
sleep = <&pmc 0x00000800>;
brg-frequency = <0>; brg-frequency = <0>;
bus-frequency = <396000000>; bus-frequency = <396000000>;
fsl,qe-num-riscs = <2>; fsl,qe-num-riscs = <2>;
...@@ -509,6 +544,7 @@ pci0: pci@e0008000 { ...@@ -509,6 +544,7 @@ pci0: pci@e0008000 {
bus-range = <0 255>; bus-range = <0 255>;
ranges = <0x2000000 0x0 0x80000000 0x80000000 0x0 0x20000000 ranges = <0x2000000 0x0 0x80000000 0x80000000 0x0 0x20000000
0x1000000 0x0 0x0 0xe2000000 0x0 0x800000>; 0x1000000 0x0 0x0 0xe2000000 0x0 0x800000>;
sleep = <&pmc 0x80000000>;
clock-frequency = <66666666>; clock-frequency = <66666666>;
#interrupt-cells = <1>; #interrupt-cells = <1>;
#size-cells = <2>; #size-cells = <2>;
...@@ -534,6 +570,7 @@ pci1: pcie@e000a000 { ...@@ -534,6 +570,7 @@ pci1: pcie@e000a000 {
bus-range = <0 255>; bus-range = <0 255>;
ranges = <0x2000000 0x0 0xa0000000 0xa0000000 0x0 0x10000000 ranges = <0x2000000 0x0 0xa0000000 0xa0000000 0x0 0x10000000
0x1000000 0x0 0x0 0xe2800000 0x0 0x800000>; 0x1000000 0x0 0x0 0xe2800000 0x0 0x800000>;
sleep = <&pmc 0x20000000>;
clock-frequency = <33333333>; clock-frequency = <33333333>;
#interrupt-cells = <1>; #interrupt-cells = <1>;
#size-cells = <2>; #size-cells = <2>;
...@@ -570,5 +607,7 @@ rio0: rapidio@e00c00000 { ...@@ -570,5 +607,7 @@ rio0: rapidio@e00c00000 {
55 2 /* msg2_tx */ 55 2 /* msg2_tx */
56 2 /* msg2_rx */>; 56 2 /* msg2_rx */>;
interrupt-parent = <&mpic>; interrupt-parent = <&mpic>;
sleep = <&pmc 0x00080000 /* controller */
&pmc 0x00040000>; /* message unit */
}; };
}; };
...@@ -41,6 +41,8 @@ PowerPC,8569@0 { ...@@ -41,6 +41,8 @@ PowerPC,8569@0 {
i-cache-line-size = <32>; // 32 bytes i-cache-line-size = <32>; // 32 bytes
d-cache-size = <0x8000>; // L1, 32K d-cache-size = <0x8000>; // L1, 32K
i-cache-size = <0x8000>; // L1, 32K i-cache-size = <0x8000>; // L1, 32K
sleep = <&pmc 0x00008000 // core
&pmc 0x00004000>; // timebase
timebase-frequency = <0>; timebase-frequency = <0>;
bus-frequency = <0>; bus-frequency = <0>;
clock-frequency = <0>; clock-frequency = <0>;
...@@ -59,6 +61,7 @@ localbus@e0005000 { ...@@ -59,6 +61,7 @@ localbus@e0005000 {
reg = <0xe0005000 0x1000>; reg = <0xe0005000 0x1000>;
interrupts = <19 2>; interrupts = <19 2>;
interrupt-parent = <&mpic>; interrupt-parent = <&mpic>;
sleep = <&pmc 0x08000000>;
ranges = <0x0 0x0 0xfe000000 0x02000000 ranges = <0x0 0x0 0xfe000000 0x02000000
0x1 0x0 0xf8000000 0x00008000 0x1 0x0 0xf8000000 0x00008000
...@@ -158,6 +161,13 @@ memory-controller@2000 { ...@@ -158,6 +161,13 @@ memory-controller@2000 {
interrupts = <18 2>; interrupts = <18 2>;
}; };
i2c-sleep-nexus {
#address-cells = <1>;
#size-cells = <1>;
compatible = "simple-bus";
sleep = <&pmc 0x00000004>;
ranges;
i2c@3000 { i2c@3000 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
...@@ -171,6 +181,8 @@ i2c@3000 { ...@@ -171,6 +181,8 @@ i2c@3000 {
rtc@68 { rtc@68 {
compatible = "dallas,ds1374"; compatible = "dallas,ds1374";
reg = <0x68>; reg = <0x68>;
interrupts = <3 1>;
interrupt-parent = <&mpic>;
}; };
}; };
...@@ -184,6 +196,14 @@ i2c@3100 { ...@@ -184,6 +196,14 @@ i2c@3100 {
interrupt-parent = <&mpic>; interrupt-parent = <&mpic>;
dfsrr; dfsrr;
}; };
};
duart-sleep-nexus {
#address-cells = <1>;
#size-cells = <1>;
compatible = "simple-bus";
sleep = <&pmc 0x00000002>;
ranges;
serial0: serial@4500 { serial0: serial@4500 {
cell-index = <0>; cell-index = <0>;
...@@ -204,6 +224,7 @@ serial1: serial@4600 { ...@@ -204,6 +224,7 @@ serial1: serial@4600 {
interrupts = <42 2>; interrupts = <42 2>;
interrupt-parent = <&mpic>; interrupt-parent = <&mpic>;
}; };
};
L2: l2-cache-controller@20000 { L2: l2-cache-controller@20000 {
compatible = "fsl,mpc8569-l2-cache-controller"; compatible = "fsl,mpc8569-l2-cache-controller";
...@@ -260,6 +281,7 @@ sdhci@2e000 { ...@@ -260,6 +281,7 @@ sdhci@2e000 {
reg = <0x2e000 0x1000>; reg = <0x2e000 0x1000>;
interrupts = <72 0x8>; interrupts = <72 0x8>;
interrupt-parent = <&mpic>; interrupt-parent = <&mpic>;
sleep = <&pmc 0x00200000>;
/* Filled in by U-Boot */ /* Filled in by U-Boot */
clock-frequency = <0>; clock-frequency = <0>;
status = "disabled"; status = "disabled";
...@@ -276,6 +298,7 @@ crypto@30000 { ...@@ -276,6 +298,7 @@ crypto@30000 {
fsl,channel-fifo-len = <24>; fsl,channel-fifo-len = <24>;
fsl,exec-units-mask = <0xbfe>; fsl,exec-units-mask = <0xbfe>;
fsl,descriptor-types-mask = <0x3ab0ebf>; fsl,descriptor-types-mask = <0x3ab0ebf>;
sleep = <&pmc 0x01000000>;
}; };
mpic: pic@40000 { mpic: pic@40000 {
...@@ -304,9 +327,18 @@ msi@41600 { ...@@ -304,9 +327,18 @@ msi@41600 {
}; };
global-utilities@e0000 { global-utilities@e0000 {
compatible = "fsl,mpc8569-guts"; #address-cells = <1>;
#size-cells = <1>;
compatible = "fsl,mpc8569-guts", "fsl,mpc8548-guts";
reg = <0xe0000 0x1000>; reg = <0xe0000 0x1000>;
ranges = <0 0xe0000 0x1000>;
fsl,has-rstcr; fsl,has-rstcr;
pmc: power@70 {
compatible = "fsl,mpc8569-pmc",
"fsl,mpc8548-pmc";
reg = <0x70 0x20>;
};
}; };
par_io@e0100 { par_io@e0100 {
...@@ -422,6 +454,7 @@ qe@e0080000 { ...@@ -422,6 +454,7 @@ qe@e0080000 {
compatible = "fsl,qe"; compatible = "fsl,qe";
ranges = <0x0 0xe0080000 0x40000>; ranges = <0x0 0xe0080000 0x40000>;
reg = <0xe0080000 0x480>; reg = <0xe0080000 0x480>;
sleep = <&pmc 0x00000800>;
brg-frequency = <0>; brg-frequency = <0>;
bus-frequency = <0>; bus-frequency = <0>;
fsl,qe-num-riscs = <4>; fsl,qe-num-riscs = <4>;
...@@ -684,6 +717,7 @@ pci1: pcie@e000a000 { ...@@ -684,6 +717,7 @@ pci1: pcie@e000a000 {
bus-range = <0 255>; bus-range = <0 255>;
ranges = <0x2000000 0x0 0xa0000000 0xa0000000 0x0 0x10000000 ranges = <0x2000000 0x0 0xa0000000 0xa0000000 0x0 0x10000000
0x1000000 0x0 0x00000000 0xe2800000 0x0 0x00800000>; 0x1000000 0x0 0x00000000 0xe2800000 0x0 0x00800000>;
sleep = <&pmc 0x20000000>;
clock-frequency = <33333333>; clock-frequency = <33333333>;
pcie@0 { pcie@0 {
reg = <0x0 0x0 0x0 0x0 0x0>; reg = <0x0 0x0 0x0 0x0 0x0>;
...@@ -714,5 +748,6 @@ rio0: rapidio@e00c00000 { ...@@ -714,5 +748,6 @@ rio0: rapidio@e00c00000 {
55 2 /* msg2_tx */ 55 2 /* msg2_tx */
56 2 /* msg2_rx */>; 56 2 /* msg2_rx */>;
interrupt-parent = <&mpic>; interrupt-parent = <&mpic>;
sleep = <&pmc 0x00080000>;
}; };
}; };
...@@ -35,6 +35,8 @@ PowerPC,8610@0 { ...@@ -35,6 +35,8 @@ PowerPC,8610@0 {
i-cache-line-size = <32>; i-cache-line-size = <32>;
d-cache-size = <32768>; // L1 d-cache-size = <32768>; // L1
i-cache-size = <32768>; // L1 i-cache-size = <32768>; // L1
sleep = <&pmc 0x00008000 0 // core
&pmc 0x00004000 0>; // timebase
timebase-frequency = <0>; // From uboot timebase-frequency = <0>; // From uboot
bus-frequency = <0>; // From uboot bus-frequency = <0>; // From uboot
clock-frequency = <0>; // From uboot clock-frequency = <0>; // From uboot
...@@ -60,6 +62,7 @@ localbus@e0005000 { ...@@ -60,6 +62,7 @@ localbus@e0005000 {
5 0 0xe8480000 0x00008000 5 0 0xe8480000 0x00008000
6 0 0xe84c0000 0x00008000 6 0 0xe84c0000 0x00008000
3 0 0xe8000000 0x00000020>; 3 0 0xe8000000 0x00000020>;
sleep = <&pmc 0x08000000 0>;
flash@0,0 { flash@0,0 {
compatible = "cfi-flash"; compatible = "cfi-flash";
...@@ -105,6 +108,8 @@ board-control@3,0 { ...@@ -105,6 +108,8 @@ board-control@3,0 {
compatible = "fsl,fpga-pixis"; compatible = "fsl,fpga-pixis";
reg = <3 0 0x20>; reg = <3 0 0x20>;
ranges = <0 3 0 0x20>; ranges = <0 3 0 0x20>;
interrupt-parent = <&mpic>;
interrupts = <8 8>;
sdcsr_pio: gpio-controller@a { sdcsr_pio: gpio-controller@a {
#gpio-cells = <2>; #gpio-cells = <2>;
...@@ -163,6 +168,7 @@ i2c@3100 { ...@@ -163,6 +168,7 @@ i2c@3100 {
reg = <0x3100 0x100>; reg = <0x3100 0x100>;
interrupts = <43 2>; interrupts = <43 2>;
interrupt-parent = <&mpic>; interrupt-parent = <&mpic>;
sleep = <&pmc 0x00000004 0>;
dfsrr; dfsrr;
}; };
...@@ -174,6 +180,7 @@ serial0: serial@4500 { ...@@ -174,6 +180,7 @@ serial0: serial@4500 {
clock-frequency = <0>; clock-frequency = <0>;
interrupts = <42 2>; interrupts = <42 2>;
interrupt-parent = <&mpic>; interrupt-parent = <&mpic>;
sleep = <&pmc 0x00000002 0>;
}; };
serial1: serial@4600 { serial1: serial@4600 {
...@@ -184,6 +191,7 @@ serial1: serial@4600 { ...@@ -184,6 +191,7 @@ serial1: serial@4600 {
clock-frequency = <0>; clock-frequency = <0>;
interrupts = <42 2>; interrupts = <42 2>;
interrupt-parent = <&mpic>; interrupt-parent = <&mpic>;
sleep = <&pmc 0x00000008 0>;
}; };
spi@7000 { spi@7000 {
...@@ -196,6 +204,7 @@ spi@7000 { ...@@ -196,6 +204,7 @@ spi@7000 {
interrupt-parent = <&mpic>; interrupt-parent = <&mpic>;
mode = "cpu"; mode = "cpu";
gpios = <&sdcsr_pio 7 0>; gpios = <&sdcsr_pio 7 0>;
sleep = <&pmc 0x00000800 0>;
mmc-slot@0 { mmc-slot@0 {
compatible = "fsl,mpc8610hpcd-mmc-slot", compatible = "fsl,mpc8610hpcd-mmc-slot",
...@@ -213,6 +222,7 @@ display@2c000 { ...@@ -213,6 +222,7 @@ display@2c000 {
reg = <0x2c000 100>; reg = <0x2c000 100>;
interrupts = <72 2>; interrupts = <72 2>;
interrupt-parent = <&mpic>; interrupt-parent = <&mpic>;
sleep = <&pmc 0x04000000 0>;
}; };
mpic: interrupt-controller@40000 { mpic: interrupt-controller@40000 {
...@@ -241,9 +251,18 @@ msi@41600 { ...@@ -241,9 +251,18 @@ msi@41600 {
}; };
global-utilities@e0000 { global-utilities@e0000 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "fsl,mpc8610-guts"; compatible = "fsl,mpc8610-guts";
reg = <0xe0000 0x1000>; reg = <0xe0000 0x1000>;
ranges = <0 0xe0000 0x1000>;
fsl,has-rstcr; fsl,has-rstcr;
pmc: power@70 {
compatible = "fsl,mpc8610-pmc",
"fsl,mpc8641d-pmc";
reg = <0x70 0x20>;
};
}; };
wdt@e4000 { wdt@e4000 {
...@@ -262,6 +281,7 @@ ssi@16000 { ...@@ -262,6 +281,7 @@ ssi@16000 {
fsl,playback-dma = <&dma00>; fsl,playback-dma = <&dma00>;
fsl,capture-dma = <&dma01>; fsl,capture-dma = <&dma01>;
fsl,fifo-depth = <8>; fsl,fifo-depth = <8>;
sleep = <&pmc 0 0x08000000>;
}; };
ssi@16100 { ssi@16100 {
...@@ -271,6 +291,7 @@ ssi@16100 { ...@@ -271,6 +291,7 @@ ssi@16100 {
interrupt-parent = <&mpic>; interrupt-parent = <&mpic>;
interrupts = <63 2>; interrupts = <63 2>;
fsl,fifo-depth = <8>; fsl,fifo-depth = <8>;
sleep = <&pmc 0 0x04000000>;
}; };
dma@21300 { dma@21300 {
...@@ -280,6 +301,7 @@ dma@21300 { ...@@ -280,6 +301,7 @@ dma@21300 {
cell-index = <0>; cell-index = <0>;
reg = <0x21300 0x4>; /* DMA general status register */ reg = <0x21300 0x4>; /* DMA general status register */
ranges = <0x0 0x21100 0x200>; ranges = <0x0 0x21100 0x200>;
sleep = <&pmc 0x00000400 0>;
dma00: dma-channel@0 { dma00: dma-channel@0 {
compatible = "fsl,mpc8610-dma-channel", compatible = "fsl,mpc8610-dma-channel",
...@@ -322,6 +344,7 @@ dma@c300 { ...@@ -322,6 +344,7 @@ dma@c300 {
cell-index = <1>; cell-index = <1>;
reg = <0xc300 0x4>; /* DMA general status register */ reg = <0xc300 0x4>; /* DMA general status register */
ranges = <0x0 0xc100 0x200>; ranges = <0x0 0xc100 0x200>;
sleep = <&pmc 0x00000200 0>;
dma-channel@0 { dma-channel@0 {
compatible = "fsl,mpc8610-dma-channel", compatible = "fsl,mpc8610-dma-channel",
...@@ -369,6 +392,7 @@ pci0: pci@e0008000 { ...@@ -369,6 +392,7 @@ pci0: pci@e0008000 {
bus-range = <0 0>; bus-range = <0 0>;
ranges = <0x02000000 0x0 0x80000000 0x80000000 0x0 0x10000000 ranges = <0x02000000 0x0 0x80000000 0x80000000 0x0 0x10000000
0x01000000 0x0 0x00000000 0xe1000000 0x0 0x00100000>; 0x01000000 0x0 0x00000000 0xe1000000 0x0 0x00100000>;
sleep = <&pmc 0x80000000 0>;
clock-frequency = <33333333>; clock-frequency = <33333333>;
interrupt-parent = <&mpic>; interrupt-parent = <&mpic>;
interrupts = <24 2>; interrupts = <24 2>;
...@@ -398,6 +422,7 @@ pci1: pcie@e000a000 { ...@@ -398,6 +422,7 @@ pci1: pcie@e000a000 {
bus-range = <1 3>; bus-range = <1 3>;
ranges = <0x02000000 0x0 0xa0000000 0xa0000000 0x0 0x10000000 ranges = <0x02000000 0x0 0xa0000000 0xa0000000 0x0 0x10000000
0x01000000 0x0 0x00000000 0xe3000000 0x0 0x00100000>; 0x01000000 0x0 0x00000000 0xe3000000 0x0 0x00100000>;
sleep = <&pmc 0x40000000 0>;
clock-frequency = <33333333>; clock-frequency = <33333333>;
interrupt-parent = <&mpic>; interrupt-parent = <&mpic>;
interrupts = <26 2>; interrupts = <26 2>;
...@@ -474,6 +499,7 @@ pci2: pcie@e0009000 { ...@@ -474,6 +499,7 @@ pci2: pcie@e0009000 {
0x0000 0 0 4 &mpic 7 1>; 0x0000 0 0 4 &mpic 7 1>;
interrupt-parent = <&mpic>; interrupt-parent = <&mpic>;
interrupts = <25 2>; interrupts = <25 2>;
sleep = <&pmc 0x20000000 0>;
clock-frequency = <33333333>; clock-frequency = <33333333>;
}; };
}; };
This diff is collapsed.
/*
* P2020 RDB Core0 Device Tree Source in CAMP mode.
*
* In CAMP mode, each core needs to have its own dts. Only mpic and L2 cache
* can be shared, all the other devices must be assigned to one core only.
* This dts file allows core0 to have memory, l2, i2c, spi, gpio, dma1, usb,
* eth1, eth2, sdhc, crypto, global-util, pci0.
*
* Copyright 2009 Freescale Semiconductor Inc.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*/
/dts-v1/;
/ {
model = "fsl,P2020";
compatible = "fsl,P2020RDB", "fsl,MPC85XXRDB-CAMP";
#address-cells = <2>;
#size-cells = <2>;
aliases {
ethernet1 = &enet1;
ethernet2 = &enet2;
serial0 = &serial0;
pci0 = &pci0;
};
cpus {
#address-cells = <1>;
#size-cells = <0>;
PowerPC,P2020@0 {
device_type = "cpu";
reg = <0x0>;
next-level-cache = <&L2>;
};
};
memory {
device_type = "memory";
};
soc@ffe00000 {
#address-cells = <1>;
#size-cells = <1>;
device_type = "soc";
compatible = "fsl,p2020-immr", "simple-bus";
ranges = <0x0 0x0 0xffe00000 0x100000>;
bus-frequency = <0>; // Filled out by uboot.
ecm-law@0 {
compatible = "fsl,ecm-law";
reg = <0x0 0x1000>;
fsl,num-laws = <12>;
};
ecm@1000 {
compatible = "fsl,p2020-ecm", "fsl,ecm";
reg = <0x1000 0x1000>;
interrupts = <17 2>;
interrupt-parent = <&mpic>;
};
memory-controller@2000 {
compatible = "fsl,p2020-memory-controller";
reg = <0x2000 0x1000>;
interrupt-parent = <&mpic>;
interrupts = <18 2>;
};
i2c@3000 {
#address-cells = <1>;
#size-cells = <0>;
cell-index = <0>;
compatible = "fsl-i2c";
reg = <0x3000 0x100>;
interrupts = <43 2>;
interrupt-parent = <&mpic>;
dfsrr;
rtc@68 {
compatible = "dallas,ds1339";
reg = <0x68>;
};
};
i2c@3100 {
#address-cells = <1>;
#size-cells = <0>;
cell-index = <1>;
compatible = "fsl-i2c";
reg = <0x3100 0x100>;
interrupts = <43 2>;
interrupt-parent = <&mpic>;
dfsrr;
};
serial0: serial@4500 {
cell-index = <0>;
device_type = "serial";
compatible = "ns16550";
reg = <0x4500 0x100>;
clock-frequency = <0>;
};
spi@7000 {
cell-index = <0>;
#address-cells = <1>;
#size-cells = <0>;
compatible = "fsl,espi";
reg = <0x7000 0x1000>;
interrupts = <59 0x2>;
interrupt-parent = <&mpic>;
mode = "cpu";
fsl_m25p80@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "fsl,espi-flash";
reg = <0>;
linux,modalias = "fsl_m25p80";
modal = "s25sl128b";
spi-max-frequency = <50000000>;
mode = <0>;
partition@0 {
/* 512KB for u-boot Bootloader Image */
reg = <0x0 0x00080000>;
label = "SPI (RO) U-Boot Image";
read-only;
};
partition@80000 {
/* 512KB for DTB Image */
reg = <0x00080000 0x00080000>;
label = "SPI (RO) DTB Image";
read-only;
};
partition@100000 {
/* 4MB for Linux Kernel Image */
reg = <0x00100000 0x00400000>;
label = "SPI (RO) Linux Kernel Image";
read-only;
};
partition@500000 {
/* 4MB for Compressed RFS Image */
reg = <0x00500000 0x00400000>;
label = "SPI (RO) Compressed RFS Image";
read-only;
};
partition@900000 {
/* 7MB for JFFS2 based RFS */
reg = <0x00900000 0x00700000>;
label = "SPI (RW) JFFS2 RFS";
};
};
};
gpio: gpio-controller@f000 {
#gpio-cells = <2>;
compatible = "fsl,mpc8572-gpio";
reg = <0xf000 0x100>;
interrupts = <47 0x2>;
interrupt-parent = <&mpic>;
gpio-controller;
};
L2: l2-cache-controller@20000 {
compatible = "fsl,p2020-l2-cache-controller";
reg = <0x20000 0x1000>;
cache-line-size = <32>; // 32 bytes
cache-size = <0x80000>; // L2,512K
interrupt-parent = <&mpic>;
interrupts = <16 2>;
};
dma@21300 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "fsl,eloplus-dma";
reg = <0x21300 0x4>;
ranges = <0x0 0x21100 0x200>;
cell-index = <0>;
dma-channel@0 {
compatible = "fsl,eloplus-dma-channel";
reg = <0x0 0x80>;
cell-index = <0>;
interrupt-parent = <&mpic>;
interrupts = <20 2>;
};
dma-channel@80 {
compatible = "fsl,eloplus-dma-channel";
reg = <0x80 0x80>;
cell-index = <1>;
interrupt-parent = <&mpic>;
interrupts = <21 2>;
};
dma-channel@100 {
compatible = "fsl,eloplus-dma-channel";
reg = <0x100 0x80>;
cell-index = <2>;
interrupt-parent = <&mpic>;
interrupts = <22 2>;
};
dma-channel@180 {
compatible = "fsl,eloplus-dma-channel";
reg = <0x180 0x80>;
cell-index = <3>;
interrupt-parent = <&mpic>;
interrupts = <23 2>;
};
};
usb@22000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "fsl-usb2-dr";
reg = <0x22000 0x1000>;
interrupt-parent = <&mpic>;
interrupts = <28 0x2>;
phy_type = "ulpi";
};
mdio@24520 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "fsl,gianfar-mdio";
reg = <0x24520 0x20>;
phy0: ethernet-phy@0 {
interrupt-parent = <&mpic>;
interrupts = <3 1>;
reg = <0x0>;
};
phy1: ethernet-phy@1 {
interrupt-parent = <&mpic>;
interrupts = <3 1>;
reg = <0x1>;
};
};
mdio@25520 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "fsl,gianfar-tbi";
reg = <0x26520 0x20>;
tbi0: tbi-phy@11 {
reg = <0x11>;
device_type = "tbi-phy";
};
};
enet1: ethernet@25000 {
#address-cells = <1>;
#size-cells = <1>;
cell-index = <1>;
device_type = "network";
model = "eTSEC";
compatible = "gianfar";
reg = <0x25000 0x1000>;
ranges = <0x0 0x25000 0x1000>;
local-mac-address = [ 00 00 00 00 00 00 ];
interrupts = <35 2 36 2 40 2>;
interrupt-parent = <&mpic>;
tbi-handle = <&tbi0>;
phy-handle = <&phy0>;
phy-connection-type = "sgmii";
};
enet2: ethernet@26000 {
#address-cells = <1>;
#size-cells = <1>;
cell-index = <2>;
device_type = "network";
model = "eTSEC";
compatible = "gianfar";
reg = <0x26000 0x1000>;
ranges = <0x0 0x26000 0x1000>;
local-mac-address = [ 00 00 00 00 00 00 ];
interrupts = <31 2 32 2 33 2>;
interrupt-parent = <&mpic>;
phy-handle = <&phy1>;
phy-connection-type = "rgmii-id";
};
sdhci@2e000 {
compatible = "fsl,p2020-esdhc", "fsl,esdhc";
reg = <0x2e000 0x1000>;
interrupts = <72 0x2>;
interrupt-parent = <&mpic>;
/* Filled in by U-Boot */
clock-frequency = <0>;
};
crypto@30000 {
compatible = "fsl,sec3.1", "fsl,sec3.0", "fsl,sec2.4",
"fsl,sec2.2", "fsl,sec2.1", "fsl,sec2.0";
reg = <0x30000 0x10000>;
interrupts = <45 2 58 2>;
interrupt-parent = <&mpic>;
fsl,num-channels = <4>;
fsl,channel-fifo-len = <24>;
fsl,exec-units-mask = <0xbfe>;
fsl,descriptor-types-mask = <0x3ab0ebf>;
};
mpic: pic@40000 {
interrupt-controller;
#address-cells = <0>;
#interrupt-cells = <2>;
reg = <0x40000 0x40000>;
compatible = "chrp,open-pic";
device_type = "open-pic";
protected-sources = <
42 76 77 78 79 /* serial1 , dma2 */
29 30 34 26 /* enet0, pci1 */
0xe0 0xe1 0xe2 0xe3 /* msi */
0xe4 0xe5 0xe6 0xe7
>;
};
global-utilities@e0000 {
compatible = "fsl,p2020-guts";
reg = <0xe0000 0x1000>;
fsl,has-rstcr;
};
};
pci0: pcie@ffe09000 {
compatible = "fsl,mpc8548-pcie";
device_type = "pci";
#interrupt-cells = <1>;
#size-cells = <2>;
#address-cells = <3>;
reg = <0 0xffe09000 0 0x1000>;
bus-range = <0 255>;
ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000
0x1000000 0x0 0x00000000 0 0xffc30000 0x0 0x10000>;
clock-frequency = <33333333>;
interrupt-parent = <&mpic>;
interrupts = <25 2>;
pcie@0 {
reg = <0x0 0x0 0x0 0x0 0x0>;
#size-cells = <2>;
#address-cells = <3>;
device_type = "pci";
ranges = <0x2000000 0x0 0xa0000000
0x2000000 0x0 0xa0000000
0x0 0x20000000
0x1000000 0x0 0x0
0x1000000 0x0 0x0
0x0 0x100000>;
};
};
};
/*
* P2020 RDB Core1 Device Tree Source in CAMP mode.
*
* In CAMP mode, each core needs to have its own dts. Only mpic and L2 cache
* can be shared, all the other devices must be assigned to one core only.
* This dts allows core1 to have l2, dma2, eth0, pci1, msi.
*
* Please note to add "-b 1" for core1's dts compiling.
*
* Copyright 2009 Freescale Semiconductor Inc.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*/
/dts-v1/;
/ {
model = "fsl,P2020";
compatible = "fsl,P2020RDB", "fsl,MPC85XXRDB-CAMP";
#address-cells = <2>;
#size-cells = <2>;
aliases {
ethernet0 = &enet0;
serial0 = &serial0;
pci1 = &pci1;
};
cpus {
#address-cells = <1>;
#size-cells = <0>;
PowerPC,P2020@1 {
device_type = "cpu";
reg = <0x1>;
next-level-cache = <&L2>;
};
};
memory {
device_type = "memory";
};
soc@ffe00000 {
#address-cells = <1>;
#size-cells = <1>;
device_type = "soc";
compatible = "fsl,p2020-immr", "simple-bus";
ranges = <0x0 0x0 0xffe00000 0x100000>;
bus-frequency = <0>; // Filled out by uboot.
serial0: serial@4600 {
cell-index = <1>;
device_type = "serial";
compatible = "ns16550";
reg = <0x4600 0x100>;
clock-frequency = <0>;
};
dma@c300 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "fsl,eloplus-dma";
reg = <0xc300 0x4>;
ranges = <0x0 0xc100 0x200>;
cell-index = <1>;
dma-channel@0 {
compatible = "fsl,eloplus-dma-channel";
reg = <0x0 0x80>;
cell-index = <0>;
interrupt-parent = <&mpic>;
interrupts = <76 2>;
};
dma-channel@80 {
compatible = "fsl,eloplus-dma-channel";
reg = <0x80 0x80>;
cell-index = <1>;
interrupt-parent = <&mpic>;
interrupts = <77 2>;
};
dma-channel@100 {
compatible = "fsl,eloplus-dma-channel";
reg = <0x100 0x80>;
cell-index = <2>;
interrupt-parent = <&mpic>;
interrupts = <78 2>;
};
dma-channel@180 {
compatible = "fsl,eloplus-dma-channel";
reg = <0x180 0x80>;
cell-index = <3>;
interrupt-parent = <&mpic>;
interrupts = <79 2>;
};
};
L2: l2-cache-controller@20000 {
compatible = "fsl,p2020-l2-cache-controller";
reg = <0x20000 0x1000>;
cache-line-size = <32>; // 32 bytes
cache-size = <0x80000>; // L2,512K
interrupt-parent = <&mpic>;
};
enet0: ethernet@24000 {
#address-cells = <1>;
#size-cells = <1>;
cell-index = <0>;
device_type = "network";
model = "eTSEC";
compatible = "gianfar";
reg = <0x24000 0x1000>;
ranges = <0x0 0x24000 0x1000>;
local-mac-address = [ 00 00 00 00 00 00 ];
interrupts = <29 2 30 2 34 2>;
interrupt-parent = <&mpic>;
fixed-link = <1 1 1000 0 0>;
phy-connection-type = "rgmii-id";
};
mpic: pic@40000 {
interrupt-controller;
#address-cells = <0>;
#interrupt-cells = <2>;
reg = <0x40000 0x40000>;
compatible = "chrp,open-pic";
device_type = "open-pic";
protected-sources = <
17 18 43 42 59 47 /*ecm, mem, i2c, serial0, spi,gpio */
16 20 21 22 23 28 /* L2, dma1, USB */
03 35 36 40 31 32 33 /* mdio, enet1, enet2 */
72 45 58 25 /* sdhci, crypto , pci */
>;
};
msi@41600 {
compatible = "fsl,p2020-msi", "fsl,mpic-msi";
reg = <0x41600 0x80>;
msi-available-ranges = <0 0x100>;
interrupts = <
0xe0 0
0xe1 0
0xe2 0
0xe3 0
0xe4 0
0xe5 0
0xe6 0
0xe7 0>;
interrupt-parent = <&mpic>;
};
};
pci1: pcie@ffe0a000 {
compatible = "fsl,mpc8548-pcie";
device_type = "pci";
#interrupt-cells = <1>;
#size-cells = <2>;
#address-cells = <3>;
reg = <0 0xffe0a000 0 0x1000>;
bus-range = <0 255>;
ranges = <0x2000000 0x0 0xc0000000 0 0xc0000000 0x0 0x20000000
0x1000000 0x0 0x00000000 0 0xffc20000 0x0 0x10000>;
clock-frequency = <33333333>;
interrupt-parent = <&mpic>;
interrupts = <26 2>;
pcie@0 {
reg = <0x0 0x0 0x0 0x0 0x0>;
#size-cells = <2>;
#address-cells = <3>;
device_type = "pci";
ranges = <0x2000000 0x0 0xc0000000
0x2000000 0x0 0xc0000000
0x0 0x20000000
0x1000000 0x0 0x0
0x1000000 0x0 0x0
0x0 0x100000>;
};
};
};
This diff is collapsed.
...@@ -226,6 +226,7 @@ EMAC0: ethernet@ef600a00 { ...@@ -226,6 +226,7 @@ EMAC0: ethernet@ef600a00 {
max-frame-size = <9000>; max-frame-size = <9000>;
rx-fifo-size = <4096>; rx-fifo-size = <4096>;
tx-fifo-size = <2048>; tx-fifo-size = <2048>;
rx-fifo-size-gige = <16384>;
phy-mode = "rgmii"; phy-mode = "rgmii";
phy-map = <0x00000000>; phy-map = <0x00000000>;
rgmii-device = <&RGMII0>; rgmii-device = <&RGMII0>;
......
...@@ -282,20 +282,10 @@ PCI0: pci@ec000000 { ...@@ -282,20 +282,10 @@ PCI0: pci@ec000000 {
/* Inbound 2GB range starting at 0 */ /* Inbound 2GB range starting at 0 */
dma-ranges = <0x42000000 0x0 0x0 0x0 0x0 0x0 0x80000000>; dma-ranges = <0x42000000 0x0 0x0 0x0 0x0 0x0 0x80000000>;
/* Bamboo has all 4 IRQ pins tied together per slot */
interrupt-map-mask = <0xf800 0x0 0x0 0x0>; interrupt-map-mask = <0xf800 0x0 0x0 0x0>;
interrupt-map = < interrupt-map = <
/* IDSEL 1 */ /* IDSEL 12 */
0x800 0x0 0x0 0x0 &UIC0 0x1c 0x8 0x6000 0x0 0x0 0x0 &UIC0 0x19 0x8
/* IDSEL 2 */
0x1000 0x0 0x0 0x0 &UIC0 0x1b 0x8
/* IDSEL 3 */
0x1800 0x0 0x0 0x0 &UIC0 0x1a 0x8
/* IDSEL 4 */
0x2000 0x0 0x0 0x0 &UIC0 0x19 0x8
>; >;
}; };
}; };
......
...@@ -218,7 +218,7 @@ CONFIG_MPIC=y ...@@ -218,7 +218,7 @@ CONFIG_MPIC=y
# CONFIG_MPIC_WEIRD is not set # CONFIG_MPIC_WEIRD is not set
# CONFIG_PPC_I8259 is not set # CONFIG_PPC_I8259 is not set
# CONFIG_PPC_RTAS is not set # CONFIG_PPC_RTAS is not set
# CONFIG_MMIO_NVRAM is not set CONFIG_MMIO_NVRAM=y
# CONFIG_PPC_MPC106 is not set # CONFIG_PPC_MPC106 is not set
# CONFIG_PPC_970_NAP is not set # CONFIG_PPC_970_NAP is not set
# CONFIG_PPC_INDIRECT_IO is not set # CONFIG_PPC_INDIRECT_IO is not set
......
...@@ -218,7 +218,7 @@ CONFIG_MPIC=y ...@@ -218,7 +218,7 @@ CONFIG_MPIC=y
# CONFIG_MPIC_WEIRD is not set # CONFIG_MPIC_WEIRD is not set
# CONFIG_PPC_I8259 is not set # CONFIG_PPC_I8259 is not set
# CONFIG_PPC_RTAS is not set # CONFIG_PPC_RTAS is not set
# CONFIG_MMIO_NVRAM is not set CONFIG_MMIO_NVRAM=y
# CONFIG_PPC_MPC106 is not set # CONFIG_PPC_MPC106 is not set
# CONFIG_PPC_970_NAP is not set # CONFIG_PPC_970_NAP is not set
# CONFIG_PPC_INDIRECT_IO is not set # CONFIG_PPC_INDIRECT_IO is not set
......
...@@ -219,7 +219,7 @@ CONFIG_MPIC=y ...@@ -219,7 +219,7 @@ CONFIG_MPIC=y
# CONFIG_MPIC_WEIRD is not set # CONFIG_MPIC_WEIRD is not set
# CONFIG_PPC_I8259 is not set # CONFIG_PPC_I8259 is not set
# CONFIG_PPC_RTAS is not set # CONFIG_PPC_RTAS is not set
# CONFIG_MMIO_NVRAM is not set CONFIG_MMIO_NVRAM=y
# CONFIG_PPC_MPC106 is not set # CONFIG_PPC_MPC106 is not set
# CONFIG_PPC_970_NAP is not set # CONFIG_PPC_970_NAP is not set
# CONFIG_PPC_INDIRECT_IO is not set # CONFIG_PPC_INDIRECT_IO is not set
...@@ -1124,7 +1124,7 @@ CONFIG_UNIX98_PTYS=y ...@@ -1124,7 +1124,7 @@ CONFIG_UNIX98_PTYS=y
# CONFIG_IPMI_HANDLER is not set # CONFIG_IPMI_HANDLER is not set
CONFIG_HW_RANDOM=y CONFIG_HW_RANDOM=y
# CONFIG_HW_RANDOM_TIMERIOMEM is not set # CONFIG_HW_RANDOM_TIMERIOMEM is not set
# CONFIG_NVRAM is not set CONFIG_NVRAM=y
# CONFIG_R3964 is not set # CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set # CONFIG_APPLICOM is not set
# CONFIG_RAW_DRIVER is not set # CONFIG_RAW_DRIVER is not set
......
...@@ -3,8 +3,47 @@ ...@@ -3,8 +3,47 @@
#include <linux/compiler.h> #include <linux/compiler.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/errno.h>
#include <linux/of.h> #include <linux/of.h>
/*
* USB Controller pram common to QE and CPM.
*/
struct usb_ctlr {
u8 usb_usmod;
u8 usb_usadr;
u8 usb_uscom;
u8 res1[1];
__be16 usb_usep[4];
u8 res2[4];
__be16 usb_usber;
u8 res3[2];
__be16 usb_usbmr;
u8 res4[1];
u8 usb_usbs;
/* Fields down below are QE-only */
__be16 usb_ussft;
u8 res5[2];
__be16 usb_usfrn;
u8 res6[0x22];
} __attribute__ ((packed));
/*
* Function code bits, usually generic to devices.
*/
#ifdef CONFIG_CPM1
#define CPMFCR_GBL ((u_char)0x00) /* Flag doesn't exist in CPM1 */
#define CPMFCR_TC2 ((u_char)0x00) /* Flag doesn't exist in CPM1 */
#define CPMFCR_DTB ((u_char)0x00) /* Flag doesn't exist in CPM1 */
#define CPMFCR_BDB ((u_char)0x00) /* Flag doesn't exist in CPM1 */
#else
#define CPMFCR_GBL ((u_char)0x20) /* Set memory snooping */
#define CPMFCR_TC2 ((u_char)0x04) /* Transfer code 2 value */
#define CPMFCR_DTB ((u_char)0x02) /* Use local bus for data when set */
#define CPMFCR_BDB ((u_char)0x01) /* Use local bus for BD when set */
#endif
#define CPMFCR_EB ((u_char)0x10) /* Set big endian byte order */
/* Opcodes common to CPM1 and CPM2 /* Opcodes common to CPM1 and CPM2
*/ */
#define CPM_CR_INIT_TRX ((ushort)0x0000) #define CPM_CR_INIT_TRX ((ushort)0x0000)
...@@ -93,13 +132,56 @@ typedef struct cpm_buf_desc { ...@@ -93,13 +132,56 @@ typedef struct cpm_buf_desc {
#define BD_I2C_START (0x0400) #define BD_I2C_START (0x0400)
int cpm_muram_init(void); int cpm_muram_init(void);
#if defined(CONFIG_CPM) || defined(CONFIG_QUICC_ENGINE)
unsigned long cpm_muram_alloc(unsigned long size, unsigned long align); unsigned long cpm_muram_alloc(unsigned long size, unsigned long align);
int cpm_muram_free(unsigned long offset); int cpm_muram_free(unsigned long offset);
unsigned long cpm_muram_alloc_fixed(unsigned long offset, unsigned long size); unsigned long cpm_muram_alloc_fixed(unsigned long offset, unsigned long size);
void __iomem *cpm_muram_addr(unsigned long offset); void __iomem *cpm_muram_addr(unsigned long offset);
unsigned long cpm_muram_offset(void __iomem *addr); unsigned long cpm_muram_offset(void __iomem *addr);
dma_addr_t cpm_muram_dma(void __iomem *addr); dma_addr_t cpm_muram_dma(void __iomem *addr);
#else
static inline unsigned long cpm_muram_alloc(unsigned long size,
unsigned long align)
{
return -ENOSYS;
}
static inline int cpm_muram_free(unsigned long offset)
{
return -ENOSYS;
}
static inline unsigned long cpm_muram_alloc_fixed(unsigned long offset,
unsigned long size)
{
return -ENOSYS;
}
static inline void __iomem *cpm_muram_addr(unsigned long offset)
{
return NULL;
}
static inline unsigned long cpm_muram_offset(void __iomem *addr)
{
return -ENOSYS;
}
static inline dma_addr_t cpm_muram_dma(void __iomem *addr)
{
return 0;
}
#endif /* defined(CONFIG_CPM) || defined(CONFIG_QUICC_ENGINE) */
#ifdef CONFIG_CPM
int cpm_command(u32 command, u8 opcode); int cpm_command(u32 command, u8 opcode);
#else
static inline int cpm_command(u32 command, u8 opcode)
{
return -ENOSYS;
}
#endif /* CONFIG_CPM */
int cpm2_gpiochip_add32(struct device_node *np); int cpm2_gpiochip_add32(struct device_node *np);
......
...@@ -478,51 +478,6 @@ typedef struct iic { ...@@ -478,51 +478,6 @@ typedef struct iic {
char res2[2]; /* Reserved */ char res2[2]; /* Reserved */
} iic_t; } iic_t;
/* SPI parameter RAM.
*/
typedef struct spi {
ushort spi_rbase; /* Rx Buffer descriptor base address */
ushort spi_tbase; /* Tx Buffer descriptor base address */
u_char spi_rfcr; /* Rx function code */
u_char spi_tfcr; /* Tx function code */
ushort spi_mrblr; /* Max receive buffer length */
uint spi_rstate; /* Internal */
uint spi_rdp; /* Internal */
ushort spi_rbptr; /* Internal */
ushort spi_rbc; /* Internal */
uint spi_rxtmp; /* Internal */
uint spi_tstate; /* Internal */
uint spi_tdp; /* Internal */
ushort spi_tbptr; /* Internal */
ushort spi_tbc; /* Internal */
uint spi_txtmp; /* Internal */
uint spi_res;
ushort spi_rpbase; /* Relocation pointer */
ushort spi_res2;
} spi_t;
/* SPI Mode register.
*/
#define SPMODE_LOOP ((ushort)0x4000) /* Loopback */
#define SPMODE_CI ((ushort)0x2000) /* Clock Invert */
#define SPMODE_CP ((ushort)0x1000) /* Clock Phase */
#define SPMODE_DIV16 ((ushort)0x0800) /* BRG/16 mode */
#define SPMODE_REV ((ushort)0x0400) /* Reversed Data */
#define SPMODE_MSTR ((ushort)0x0200) /* SPI Master */
#define SPMODE_EN ((ushort)0x0100) /* Enable */
#define SPMODE_LENMSK ((ushort)0x00f0) /* character length */
#define SPMODE_LEN4 ((ushort)0x0030) /* 4 bits per char */
#define SPMODE_LEN8 ((ushort)0x0070) /* 8 bits per char */
#define SPMODE_LEN16 ((ushort)0x00f0) /* 16 bits per char */
#define SPMODE_PMMSK ((ushort)0x000f) /* prescale modulus */
/* SPIE fields */
#define SPIE_MME 0x20
#define SPIE_TXE 0x10
#define SPIE_BSY 0x04
#define SPIE_TXB 0x02
#define SPIE_RXB 0x01
/* /*
* RISC Controller Configuration Register definitons * RISC Controller Configuration Register definitons
*/ */
......
...@@ -124,14 +124,6 @@ static inline void cpm2_fastbrg(uint brg, uint rate, int div16) ...@@ -124,14 +124,6 @@ static inline void cpm2_fastbrg(uint brg, uint rate, int div16)
__cpm2_setbrg(brg, rate, CPM2_BRG_INT_CLK, div16, CPM_BRG_EXTC_INT); __cpm2_setbrg(brg, rate, CPM2_BRG_INT_CLK, div16, CPM_BRG_EXTC_INT);
} }
/* Function code bits, usually generic to devices.
*/
#define CPMFCR_GBL ((u_char)0x20) /* Set memory snooping */
#define CPMFCR_EB ((u_char)0x10) /* Set big endian byte order */
#define CPMFCR_TC2 ((u_char)0x04) /* Transfer code 2 value */
#define CPMFCR_DTB ((u_char)0x02) /* Use local bus for data when set */
#define CPMFCR_BDB ((u_char)0x01) /* Use local bus for BD when set */
/* Parameter RAM offsets from the base. /* Parameter RAM offsets from the base.
*/ */
#define PROFF_SCC1 ((uint)0x8000) #define PROFF_SCC1 ((uint)0x8000)
...@@ -654,45 +646,6 @@ typedef struct iic { ...@@ -654,45 +646,6 @@ typedef struct iic {
uint iic_txtmp; /* Internal */ uint iic_txtmp; /* Internal */
} iic_t; } iic_t;
/* SPI parameter RAM.
*/
typedef struct spi {
ushort spi_rbase; /* Rx Buffer descriptor base address */
ushort spi_tbase; /* Tx Buffer descriptor base address */
u_char spi_rfcr; /* Rx function code */
u_char spi_tfcr; /* Tx function code */
ushort spi_mrblr; /* Max receive buffer length */
uint spi_rstate; /* Internal */
uint spi_rdp; /* Internal */
ushort spi_rbptr; /* Internal */
ushort spi_rbc; /* Internal */
uint spi_rxtmp; /* Internal */
uint spi_tstate; /* Internal */
uint spi_tdp; /* Internal */
ushort spi_tbptr; /* Internal */
ushort spi_tbc; /* Internal */
uint spi_txtmp; /* Internal */
uint spi_res; /* Tx temp. */
uint spi_res1[4]; /* SDMA temp. */
} spi_t;
/* SPI Mode register.
*/
#define SPMODE_LOOP ((ushort)0x4000) /* Loopback */
#define SPMODE_CI ((ushort)0x2000) /* Clock Invert */
#define SPMODE_CP ((ushort)0x1000) /* Clock Phase */
#define SPMODE_DIV16 ((ushort)0x0800) /* BRG/16 mode */
#define SPMODE_REV ((ushort)0x0400) /* Reversed Data */
#define SPMODE_MSTR ((ushort)0x0200) /* SPI Master */
#define SPMODE_EN ((ushort)0x0100) /* Enable */
#define SPMODE_LENMSK ((ushort)0x00f0) /* character length */
#define SPMODE_PMMSK ((ushort)0x000f) /* prescale modulus */
#define SPMODE_LEN(x) ((((x)-1)&0xF)<<4)
#define SPMODE_PM(x) ((x) &0xF)
#define SPI_EB ((u_char)0x10) /* big endian byte order */
/* IDMA parameter RAM /* IDMA parameter RAM
*/ */
typedef struct idma { typedef struct idma {
......
...@@ -147,6 +147,7 @@ ...@@ -147,6 +147,7 @@
.globl label##_pSeries; \ .globl label##_pSeries; \
label##_pSeries: \ label##_pSeries: \
HMT_MEDIUM; \ HMT_MEDIUM; \
DO_KVM n; \
mtspr SPRN_SPRG_SCRATCH0,r13; /* save r13 */ \ mtspr SPRN_SPRG_SCRATCH0,r13; /* save r13 */ \
EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, label##_common) EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, label##_common)
...@@ -170,6 +171,7 @@ label##_pSeries: \ ...@@ -170,6 +171,7 @@ label##_pSeries: \
.globl label##_pSeries; \ .globl label##_pSeries; \
label##_pSeries: \ label##_pSeries: \
HMT_MEDIUM; \ HMT_MEDIUM; \
DO_KVM n; \
mtspr SPRN_SPRG_SCRATCH0,r13; /* save r13 */ \ mtspr SPRN_SPRG_SCRATCH0,r13; /* save r13 */ \
mfspr r13,SPRN_SPRG_PACA; /* get paca address into r13 */ \ mfspr r13,SPRN_SPRG_PACA; /* get paca address into r13 */ \
std r9,PACA_EXGEN+EX_R9(r13); /* save r9, r10 */ \ std r9,PACA_EXGEN+EX_R9(r13); /* save r9, r10 */ \
......
...@@ -3,6 +3,10 @@ ...@@ -3,6 +3,10 @@
#include <asm/page.h> #include <asm/page.h>
pte_t *huge_pte_offset_and_shift(struct mm_struct *mm,
unsigned long addr, unsigned *shift);
void flush_dcache_icache_hugepage(struct page *page);
int is_hugepage_only_range(struct mm_struct *mm, unsigned long addr, int is_hugepage_only_range(struct mm_struct *mm, unsigned long addr,
unsigned long len); unsigned long len);
...@@ -11,12 +15,6 @@ void hugetlb_free_pgd_range(struct mmu_gather *tlb, unsigned long addr, ...@@ -11,12 +15,6 @@ void hugetlb_free_pgd_range(struct mmu_gather *tlb, unsigned long addr,
unsigned long end, unsigned long floor, unsigned long end, unsigned long floor,
unsigned long ceiling); unsigned long ceiling);
void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
pte_t *ptep, pte_t pte);
pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr,
pte_t *ptep);
/* /*
* The version of vma_mmu_pagesize() in arch/powerpc/mm/hugetlbpage.c needs * The version of vma_mmu_pagesize() in arch/powerpc/mm/hugetlbpage.c needs
* to override the version in mm/hugetlb.c * to override the version in mm/hugetlb.c
...@@ -42,9 +40,26 @@ static inline void hugetlb_prefault_arch_hook(struct mm_struct *mm) ...@@ -42,9 +40,26 @@ static inline void hugetlb_prefault_arch_hook(struct mm_struct *mm)
{ {
} }
static inline void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
pte_t *ptep, pte_t pte)
{
set_pte_at(mm, addr, ptep, pte);
}
static inline pte_t huge_ptep_get_and_clear(struct mm_struct *mm,
unsigned long addr, pte_t *ptep)
{
unsigned long old = pte_update(mm, addr, ptep, ~0UL, 1);
return __pte(old);
}
static inline void huge_ptep_clear_flush(struct vm_area_struct *vma, static inline void huge_ptep_clear_flush(struct vm_area_struct *vma,
unsigned long addr, pte_t *ptep) unsigned long addr, pte_t *ptep)
{ {
pte_t pte;
pte = huge_ptep_get_and_clear(vma->vm_mm, addr, ptep);
flush_tlb_page(vma, addr);
} }
static inline int huge_pte_none(pte_t pte) static inline int huge_pte_none(pte_t pte)
......
...@@ -212,6 +212,19 @@ ...@@ -212,6 +212,19 @@
#define H_QUERY_INT_STATE 0x1E4 #define H_QUERY_INT_STATE 0x1E4
#define H_POLL_PENDING 0x1D8 #define H_POLL_PENDING 0x1D8
#define H_ILLAN_ATTRIBUTES 0x244 #define H_ILLAN_ATTRIBUTES 0x244
#define H_MODIFY_HEA_QP 0x250
#define H_QUERY_HEA_QP 0x254
#define H_QUERY_HEA 0x258
#define H_QUERY_HEA_PORT 0x25C
#define H_MODIFY_HEA_PORT 0x260
#define H_REG_BCMC 0x264
#define H_DEREG_BCMC 0x268
#define H_REGISTER_HEA_RPAGES 0x26C
#define H_DISABLE_AND_GET_HEA 0x270
#define H_GET_HEA_INFO 0x274
#define H_ALLOC_HEA_RESOURCE 0x278
#define H_ADD_CONN 0x284
#define H_DEL_CONN 0x288
#define H_JOIN 0x298 #define H_JOIN 0x298
#define H_VASI_STATE 0x2A4 #define H_VASI_STATE 0x2A4
#define H_ENABLE_CRQ 0x2B0 #define H_ENABLE_CRQ 0x2B0
......
...@@ -64,11 +64,6 @@ extern void iseries_handle_interrupts(void); ...@@ -64,11 +64,6 @@ extern void iseries_handle_interrupts(void);
get_paca()->hard_enabled = 0; \ get_paca()->hard_enabled = 0; \
} while(0) } while(0)
static inline int irqs_disabled_flags(unsigned long flags)
{
return flags == 0;
}
#else #else
#if defined(CONFIG_BOOKE) #if defined(CONFIG_BOOKE)
......
...@@ -549,7 +549,7 @@ typedef struct comm_proc { ...@@ -549,7 +549,7 @@ typedef struct comm_proc {
/* USB Controller. /* USB Controller.
*/ */
typedef struct usb_ctlr { typedef struct cpm_usb_ctlr {
u8 usb_usmod; u8 usb_usmod;
u8 usb_usadr; u8 usb_usadr;
u8 usb_uscom; u8 usb_uscom;
......
...@@ -210,7 +210,7 @@ struct sir { ...@@ -210,7 +210,7 @@ struct sir {
} __attribute__ ((packed)); } __attribute__ ((packed));
/* USB Controller */ /* USB Controller */
struct usb_ctlr { struct qe_usb_ctlr {
u8 usb_usmod; u8 usb_usmod;
u8 usb_usadr; u8 usb_usadr;
u8 usb_uscom; u8 usb_uscom;
...@@ -229,7 +229,7 @@ struct usb_ctlr { ...@@ -229,7 +229,7 @@ struct usb_ctlr {
} __attribute__ ((packed)); } __attribute__ ((packed));
/* MCC */ /* MCC */
struct mcc { struct qe_mcc {
__be32 mcce; /* MCC event register */ __be32 mcce; /* MCC event register */
__be32 mccm; /* MCC mask register */ __be32 mccm; /* MCC mask register */
__be32 mccf; /* MCC configuration register */ __be32 mccf; /* MCC configuration register */
...@@ -431,9 +431,9 @@ struct qe_immap { ...@@ -431,9 +431,9 @@ struct qe_immap {
struct qe_mux qmx; /* QE Multiplexer */ struct qe_mux qmx; /* QE Multiplexer */
struct qe_timers qet; /* QE Timers */ struct qe_timers qet; /* QE Timers */
struct spi spi[0x2]; /* spi */ struct spi spi[0x2]; /* spi */
struct mcc mcc; /* mcc */ struct qe_mcc mcc; /* mcc */
struct qe_brg brg; /* brg */ struct qe_brg brg; /* brg */
struct usb_ctlr usb; /* USB */ struct qe_usb_ctlr usb; /* USB */
struct si1 si1; /* SI */ struct si1 si1; /* SI */
u8 res11[0x800]; u8 res11[0x800];
struct sir sir; /* SI Routing Tables */ struct sir sir; /* SI Routing Tables */
......
...@@ -17,8 +17,6 @@ ...@@ -17,8 +17,6 @@
#include <asm/atomic.h> #include <asm/atomic.h>
#define get_irq_desc(irq) (&irq_desc[(irq)])
/* Define a way to iterate across irqs. */ /* Define a way to iterate across irqs. */
#define for_each_irq(i) \ #define for_each_irq(i) \
for ((i) = 0; (i) < NR_IRQS; ++(i)) for ((i) = 0; (i) < NR_IRQS; ++(i))
...@@ -34,12 +32,15 @@ extern atomic_t ppc_n_lost_interrupts; ...@@ -34,12 +32,15 @@ extern atomic_t ppc_n_lost_interrupts;
*/ */
#define NO_IRQ_IGNORE ((unsigned int)-1) #define NO_IRQ_IGNORE ((unsigned int)-1)
/* Total number of virq in the platform (make it a CONFIG_* option ? */ /* Total number of virq in the platform */
#define NR_IRQS 512 #define NR_IRQS CONFIG_NR_IRQS
/* Number of irqs reserved for the legacy controller */ /* Number of irqs reserved for the legacy controller */
#define NUM_ISA_INTERRUPTS 16 #define NUM_ISA_INTERRUPTS 16
/* Same thing, used by the generic IRQ code */
#define NR_IRQS_LEGACY NUM_ISA_INTERRUPTS
/* This type is the placeholder for a hardware interrupt number. It has to /* This type is the placeholder for a hardware interrupt number. It has to
* be big enough to enclose whatever representation is used by a given * be big enough to enclose whatever representation is used by a given
* platform. * platform.
...@@ -99,7 +100,7 @@ struct irq_host_ops { ...@@ -99,7 +100,7 @@ struct irq_host_ops {
* interrupt controller has for that line) * interrupt controller has for that line)
*/ */
int (*xlate)(struct irq_host *h, struct device_node *ctrler, int (*xlate)(struct irq_host *h, struct device_node *ctrler,
u32 *intspec, unsigned int intsize, const u32 *intspec, unsigned int intsize,
irq_hw_number_t *out_hwirq, unsigned int *out_type); irq_hw_number_t *out_hwirq, unsigned int *out_type);
}; };
...@@ -313,7 +314,7 @@ extern void irq_free_virt(unsigned int virq, unsigned int count); ...@@ -313,7 +314,7 @@ extern void irq_free_virt(unsigned int virq, unsigned int count);
* of the of_irq_map_*() functions. * of the of_irq_map_*() functions.
*/ */
extern unsigned int irq_create_of_mapping(struct device_node *controller, extern unsigned int irq_create_of_mapping(struct device_node *controller,
u32 *intspec, unsigned int intsize); const u32 *intspec, unsigned int intsize);
/** /**
* irq_of_parse_and_map - Parse and Map an interrupt into linux virq space * irq_of_parse_and_map - Parse and Map an interrupt into linux virq space
......
...@@ -46,6 +46,24 @@ struct kvm_regs { ...@@ -46,6 +46,24 @@ struct kvm_regs {
}; };
struct kvm_sregs { struct kvm_sregs {
__u32 pvr;
union {
struct {
__u64 sdr1;
struct {
struct {
__u64 slbe;
__u64 slbv;
} slb[64];
} ppc64;
struct {
__u32 sr[16];
__u64 ibat[8];
__u64 dbat[8];
} ppc32;
} s;
__u8 pad[1020];
} u;
}; };
struct kvm_fpu { struct kvm_fpu {
......
...@@ -49,6 +49,46 @@ ...@@ -49,6 +49,46 @@
#define BOOKE_INTERRUPT_SPE_FP_ROUND 34 #define BOOKE_INTERRUPT_SPE_FP_ROUND 34
#define BOOKE_INTERRUPT_PERFORMANCE_MONITOR 35 #define BOOKE_INTERRUPT_PERFORMANCE_MONITOR 35
/* book3s */
#define BOOK3S_INTERRUPT_SYSTEM_RESET 0x100
#define BOOK3S_INTERRUPT_MACHINE_CHECK 0x200
#define BOOK3S_INTERRUPT_DATA_STORAGE 0x300
#define BOOK3S_INTERRUPT_DATA_SEGMENT 0x380
#define BOOK3S_INTERRUPT_INST_STORAGE 0x400
#define BOOK3S_INTERRUPT_INST_SEGMENT 0x480
#define BOOK3S_INTERRUPT_EXTERNAL 0x500
#define BOOK3S_INTERRUPT_ALIGNMENT 0x600
#define BOOK3S_INTERRUPT_PROGRAM 0x700
#define BOOK3S_INTERRUPT_FP_UNAVAIL 0x800
#define BOOK3S_INTERRUPT_DECREMENTER 0x900
#define BOOK3S_INTERRUPT_SYSCALL 0xc00
#define BOOK3S_INTERRUPT_TRACE 0xd00
#define BOOK3S_INTERRUPT_PERFMON 0xf00
#define BOOK3S_INTERRUPT_ALTIVEC 0xf20
#define BOOK3S_INTERRUPT_VSX 0xf40
#define BOOK3S_IRQPRIO_SYSTEM_RESET 0
#define BOOK3S_IRQPRIO_DATA_SEGMENT 1
#define BOOK3S_IRQPRIO_INST_SEGMENT 2
#define BOOK3S_IRQPRIO_DATA_STORAGE 3
#define BOOK3S_IRQPRIO_INST_STORAGE 4
#define BOOK3S_IRQPRIO_ALIGNMENT 5
#define BOOK3S_IRQPRIO_PROGRAM 6
#define BOOK3S_IRQPRIO_FP_UNAVAIL 7
#define BOOK3S_IRQPRIO_ALTIVEC 8
#define BOOK3S_IRQPRIO_VSX 9
#define BOOK3S_IRQPRIO_SYSCALL 10
#define BOOK3S_IRQPRIO_MACHINE_CHECK 11
#define BOOK3S_IRQPRIO_DEBUG 12
#define BOOK3S_IRQPRIO_EXTERNAL 13
#define BOOK3S_IRQPRIO_DECREMENTER 14
#define BOOK3S_IRQPRIO_PERFORMANCE_MONITOR 15
#define BOOK3S_IRQPRIO_MAX 16
#define BOOK3S_HFLAG_DCBZ32 0x1
#define BOOK3S_HFLAG_SLB 0x2
#define RESUME_FLAG_NV (1<<0) /* Reload guest nonvolatile state? */ #define RESUME_FLAG_NV (1<<0) /* Reload guest nonvolatile state? */
#define RESUME_FLAG_HOST (1<<1) /* Resume host? */ #define RESUME_FLAG_HOST (1<<1) /* Resume host? */
......
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2, as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Copyright SUSE Linux Products GmbH 2009
*
* Authors: Alexander Graf <agraf@suse.de>
*/
#ifndef __ASM_KVM_BOOK3S_H__
#define __ASM_KVM_BOOK3S_H__
#include <linux/types.h>
#include <linux/kvm_host.h>
#include <asm/kvm_ppc.h>
struct kvmppc_slb {
u64 esid;
u64 vsid;
u64 orige;
u64 origv;
bool valid;
bool Ks;
bool Kp;
bool nx;
bool large;
bool class;
};
struct kvmppc_sr {
u32 raw;
u32 vsid;
bool Ks;
bool Kp;
bool nx;
};
struct kvmppc_bat {
u64 raw;
u32 bepi;
u32 bepi_mask;
bool vs;
bool vp;
u32 brpn;
u8 wimg;
u8 pp;
};
struct kvmppc_sid_map {
u64 guest_vsid;
u64 guest_esid;
u64 host_vsid;
bool valid;
};
#define SID_MAP_BITS 9
#define SID_MAP_NUM (1 << SID_MAP_BITS)
#define SID_MAP_MASK (SID_MAP_NUM - 1)
struct kvmppc_vcpu_book3s {
struct kvm_vcpu vcpu;
struct kvmppc_sid_map sid_map[SID_MAP_NUM];
struct kvmppc_slb slb[64];
struct {
u64 esid;
u64 vsid;
} slb_shadow[64];
u8 slb_shadow_max;
struct kvmppc_sr sr[16];
struct kvmppc_bat ibat[8];
struct kvmppc_bat dbat[8];
u64 hid[6];
int slb_nr;
u64 sdr1;
u64 dsisr;
u64 hior;
u64 msr_mask;
u64 vsid_first;
u64 vsid_next;
u64 vsid_max;
int context_id;
};
#define CONTEXT_HOST 0
#define CONTEXT_GUEST 1
#define CONTEXT_GUEST_END 2
#define VSID_REAL 0xfffffffffff00000
#define VSID_REAL_DR 0xffffffffffe00000
#define VSID_REAL_IR 0xffffffffffd00000
#define VSID_BAT 0xffffffffffc00000
#define VSID_PR 0x8000000000000000
extern void kvmppc_mmu_pte_flush(struct kvm_vcpu *vcpu, u64 ea, u64 ea_mask);
extern void kvmppc_mmu_pte_vflush(struct kvm_vcpu *vcpu, u64 vp, u64 vp_mask);
extern void kvmppc_mmu_pte_pflush(struct kvm_vcpu *vcpu, u64 pa_start, u64 pa_end);
extern void kvmppc_set_msr(struct kvm_vcpu *vcpu, u64 new_msr);
extern void kvmppc_mmu_book3s_64_init(struct kvm_vcpu *vcpu);
extern void kvmppc_mmu_book3s_32_init(struct kvm_vcpu *vcpu);
extern int kvmppc_mmu_map_page(struct kvm_vcpu *vcpu, struct kvmppc_pte *pte);
extern int kvmppc_mmu_map_segment(struct kvm_vcpu *vcpu, ulong eaddr);
extern void kvmppc_mmu_flush_segments(struct kvm_vcpu *vcpu);
extern struct kvmppc_pte *kvmppc_mmu_find_pte(struct kvm_vcpu *vcpu, u64 ea, bool data);
extern int kvmppc_ld(struct kvm_vcpu *vcpu, ulong eaddr, int size, void *ptr, bool data);
extern int kvmppc_st(struct kvm_vcpu *vcpu, ulong eaddr, int size, void *ptr);
extern void kvmppc_book3s_queue_irqprio(struct kvm_vcpu *vcpu, unsigned int vec);
extern void kvmppc_set_bat(struct kvm_vcpu *vcpu, struct kvmppc_bat *bat,
bool upper, u32 val);
extern u32 kvmppc_trampoline_lowmem;
extern u32 kvmppc_trampoline_enter;
static inline struct kvmppc_vcpu_book3s *to_book3s(struct kvm_vcpu *vcpu)
{
return container_of(vcpu, struct kvmppc_vcpu_book3s, vcpu);
}
static inline ulong dsisr(void)
{
ulong r;
asm ( "mfdsisr %0 " : "=r" (r) );
return r;
}
extern void kvm_return_point(void);
#define INS_DCBZ 0x7c0007ec
#endif /* __ASM_KVM_BOOK3S_H__ */
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2, as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Copyright SUSE Linux Products GmbH 2009
*
* Authors: Alexander Graf <agraf@suse.de>
*/
#ifndef __ASM_KVM_BOOK3S_ASM_H__
#define __ASM_KVM_BOOK3S_ASM_H__
#ifdef CONFIG_KVM_BOOK3S_64_HANDLER
#include <asm/kvm_asm.h>
.macro DO_KVM intno
.if (\intno == BOOK3S_INTERRUPT_SYSTEM_RESET) || \
(\intno == BOOK3S_INTERRUPT_MACHINE_CHECK) || \
(\intno == BOOK3S_INTERRUPT_DATA_STORAGE) || \
(\intno == BOOK3S_INTERRUPT_INST_STORAGE) || \
(\intno == BOOK3S_INTERRUPT_DATA_SEGMENT) || \
(\intno == BOOK3S_INTERRUPT_INST_SEGMENT) || \
(\intno == BOOK3S_INTERRUPT_EXTERNAL) || \
(\intno == BOOK3S_INTERRUPT_ALIGNMENT) || \
(\intno == BOOK3S_INTERRUPT_PROGRAM) || \
(\intno == BOOK3S_INTERRUPT_FP_UNAVAIL) || \
(\intno == BOOK3S_INTERRUPT_DECREMENTER) || \
(\intno == BOOK3S_INTERRUPT_SYSCALL) || \
(\intno == BOOK3S_INTERRUPT_TRACE) || \
(\intno == BOOK3S_INTERRUPT_PERFMON) || \
(\intno == BOOK3S_INTERRUPT_ALTIVEC) || \
(\intno == BOOK3S_INTERRUPT_VSX)
b kvmppc_trampoline_\intno
kvmppc_resume_\intno:
.endif
.endm
#else
.macro DO_KVM intno
.endm
#endif /* CONFIG_KVM_BOOK3S_64_HANDLER */
#endif /* __ASM_KVM_BOOK3S_ASM_H__ */
...@@ -21,7 +21,8 @@ ...@@ -21,7 +21,8 @@
#define __POWERPC_KVM_HOST_H__ #define __POWERPC_KVM_HOST_H__
#include <linux/mutex.h> #include <linux/mutex.h>
#include <linux/timer.h> #include <linux/hrtimer.h>
#include <linux/interrupt.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/kvm_types.h> #include <linux/kvm_types.h>
#include <asm/kvm_asm.h> #include <asm/kvm_asm.h>
...@@ -37,6 +38,8 @@ ...@@ -37,6 +38,8 @@
#define KVM_NR_PAGE_SIZES 1 #define KVM_NR_PAGE_SIZES 1
#define KVM_PAGES_PER_HPAGE(x) (1UL<<31) #define KVM_PAGES_PER_HPAGE(x) (1UL<<31)
#define HPTEG_CACHE_NUM 1024
struct kvm; struct kvm;
struct kvm_run; struct kvm_run;
struct kvm_vcpu; struct kvm_vcpu;
...@@ -63,6 +66,17 @@ struct kvm_vcpu_stat { ...@@ -63,6 +66,17 @@ struct kvm_vcpu_stat {
u32 dec_exits; u32 dec_exits;
u32 ext_intr_exits; u32 ext_intr_exits;
u32 halt_wakeup; u32 halt_wakeup;
#ifdef CONFIG_PPC64
u32 pf_storage;
u32 pf_instruc;
u32 sp_storage;
u32 sp_instruc;
u32 queue_intr;
u32 ld;
u32 ld_slow;
u32 st;
u32 st_slow;
#endif
}; };
enum kvm_exit_types { enum kvm_exit_types {
...@@ -109,9 +123,53 @@ struct kvmppc_exit_timing { ...@@ -109,9 +123,53 @@ struct kvmppc_exit_timing {
struct kvm_arch { struct kvm_arch {
}; };
struct kvmppc_pte {
u64 eaddr;
u64 vpage;
u64 raddr;
bool may_read;
bool may_write;
bool may_execute;
};
struct kvmppc_mmu {
/* book3s_64 only */
void (*slbmte)(struct kvm_vcpu *vcpu, u64 rb, u64 rs);
u64 (*slbmfee)(struct kvm_vcpu *vcpu, u64 slb_nr);
u64 (*slbmfev)(struct kvm_vcpu *vcpu, u64 slb_nr);
void (*slbie)(struct kvm_vcpu *vcpu, u64 slb_nr);
void (*slbia)(struct kvm_vcpu *vcpu);
/* book3s */
void (*mtsrin)(struct kvm_vcpu *vcpu, u32 srnum, ulong value);
u32 (*mfsrin)(struct kvm_vcpu *vcpu, u32 srnum);
int (*xlate)(struct kvm_vcpu *vcpu, gva_t eaddr, struct kvmppc_pte *pte, bool data);
void (*reset_msr)(struct kvm_vcpu *vcpu);
void (*tlbie)(struct kvm_vcpu *vcpu, ulong addr, bool large);
int (*esid_to_vsid)(struct kvm_vcpu *vcpu, u64 esid, u64 *vsid);
u64 (*ea_to_vp)(struct kvm_vcpu *vcpu, gva_t eaddr, bool data);
bool (*is_dcbz32)(struct kvm_vcpu *vcpu);
};
struct hpte_cache {
u64 host_va;
u64 pfn;
ulong slot;
struct kvmppc_pte pte;
};
struct kvm_vcpu_arch { struct kvm_vcpu_arch {
u32 host_stack; ulong host_stack;
u32 host_pid; u32 host_pid;
#ifdef CONFIG_PPC64
ulong host_msr;
ulong host_r2;
void *host_retip;
ulong trampoline_lowmem;
ulong trampoline_enter;
ulong highmem_handler;
ulong host_paca_phys;
struct kvmppc_mmu mmu;
#endif
u64 fpr[32]; u64 fpr[32];
ulong gpr[32]; ulong gpr[32];
...@@ -123,6 +181,10 @@ struct kvm_vcpu_arch { ...@@ -123,6 +181,10 @@ struct kvm_vcpu_arch {
ulong xer; ulong xer;
ulong msr; ulong msr;
#ifdef CONFIG_PPC64
ulong shadow_msr;
ulong hflags;
#endif
u32 mmucr; u32 mmucr;
ulong sprg0; ulong sprg0;
ulong sprg1; ulong sprg1;
...@@ -149,6 +211,7 @@ struct kvm_vcpu_arch { ...@@ -149,6 +211,7 @@ struct kvm_vcpu_arch {
u32 ivor[64]; u32 ivor[64];
ulong ivpr; ulong ivpr;
u32 pir; u32 pir;
u32 pvr;
u32 shadow_pid; u32 shadow_pid;
u32 pid; u32 pid;
...@@ -174,6 +237,9 @@ struct kvm_vcpu_arch { ...@@ -174,6 +237,9 @@ struct kvm_vcpu_arch {
#endif #endif
u32 last_inst; u32 last_inst;
#ifdef CONFIG_PPC64
ulong fault_dsisr;
#endif
ulong fault_dear; ulong fault_dear;
ulong fault_esr; ulong fault_esr;
gpa_t paddr_accessed; gpa_t paddr_accessed;
...@@ -185,8 +251,15 @@ struct kvm_vcpu_arch { ...@@ -185,8 +251,15 @@ struct kvm_vcpu_arch {
u32 cpr0_cfgaddr; /* holds the last set cpr0_cfgaddr */ u32 cpr0_cfgaddr; /* holds the last set cpr0_cfgaddr */
struct timer_list dec_timer; struct hrtimer dec_timer;
struct tasklet_struct tasklet;
u64 dec_jiffies;
unsigned long pending_exceptions; unsigned long pending_exceptions;
#ifdef CONFIG_PPC64
struct hpte_cache hpte_cache[HPTEG_CACHE_NUM];
int hpte_cache_offset;
#endif
}; };
#endif /* __POWERPC_KVM_HOST_H__ */ #endif /* __POWERPC_KVM_HOST_H__ */
...@@ -39,6 +39,7 @@ enum emulation_result { ...@@ -39,6 +39,7 @@ enum emulation_result {
extern int __kvmppc_vcpu_run(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu); extern int __kvmppc_vcpu_run(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu);
extern char kvmppc_handlers_start[]; extern char kvmppc_handlers_start[];
extern unsigned long kvmppc_handler_len; extern unsigned long kvmppc_handler_len;
extern void kvmppc_handler_highmem(void);
extern void kvmppc_dump_vcpu(struct kvm_vcpu *vcpu); extern void kvmppc_dump_vcpu(struct kvm_vcpu *vcpu);
extern int kvmppc_handle_load(struct kvm_run *run, struct kvm_vcpu *vcpu, extern int kvmppc_handle_load(struct kvm_run *run, struct kvm_vcpu *vcpu,
......
...@@ -100,7 +100,14 @@ struct lppaca { ...@@ -100,7 +100,14 @@ struct lppaca {
// Used to pass parms from the OS to PLIC for SetAsrAndRfid // Used to pass parms from the OS to PLIC for SetAsrAndRfid
u64 saved_gpr3; // Saved GPR3 x20-x27 u64 saved_gpr3; // Saved GPR3 x20-x27
u64 saved_gpr4; // Saved GPR4 x28-x2F u64 saved_gpr4; // Saved GPR4 x28-x2F
u64 saved_gpr5; // Saved GPR5 x30-x37 union {
u64 saved_gpr5; /* Saved GPR5 x30-x37 */
struct {
u8 cede_latency_hint; /* x30 */
u8 reserved[7]; /* x31-x36 */
} fields;
} gpr5_dword;
u8 dtl_enable_mask; // Dispatch Trace Log mask x38-x38 u8 dtl_enable_mask; // Dispatch Trace Log mask x38-x38
u8 donate_dedicated_cpu; // Donate dedicated CPU cycles x39-x39 u8 donate_dedicated_cpu; // Donate dedicated CPU cycles x39-x39
......
...@@ -266,6 +266,11 @@ struct machdep_calls { ...@@ -266,6 +266,11 @@ struct machdep_calls {
void (*suspend_disable_irqs)(void); void (*suspend_disable_irqs)(void);
void (*suspend_enable_irqs)(void); void (*suspend_enable_irqs)(void);
#endif #endif
#ifdef CONFIG_ARCH_CPU_PROBE_RELEASE
ssize_t (*cpu_probe)(const char *, size_t);
ssize_t (*cpu_release)(const char *, size_t);
#endif
}; };
extern void e500_idle(void); extern void e500_idle(void);
......
...@@ -39,6 +39,7 @@ struct macio_dev ...@@ -39,6 +39,7 @@ struct macio_dev
struct macio_bus *bus; /* macio bus this device is on */ struct macio_bus *bus; /* macio bus this device is on */
struct macio_dev *media_bay; /* Device is part of a media bay */ struct macio_dev *media_bay; /* Device is part of a media bay */
struct of_device ofdev; struct of_device ofdev;
struct device_dma_parameters dma_parms; /* ide needs that */
int n_resources; int n_resources;
struct resource resource[MACIO_DEV_COUNT_RESOURCES]; struct resource resource[MACIO_DEV_COUNT_RESOURCES];
int n_interrupts; int n_interrupts;
...@@ -78,6 +79,8 @@ static inline unsigned long macio_resource_len(struct macio_dev *dev, int resour ...@@ -78,6 +79,8 @@ static inline unsigned long macio_resource_len(struct macio_dev *dev, int resour
return res->end - res->start + 1; return res->end - res->start + 1;
} }
extern int macio_enable_devres(struct macio_dev *dev);
extern int macio_request_resource(struct macio_dev *dev, int resource_no, const char *name); extern int macio_request_resource(struct macio_dev *dev, int resource_no, const char *name);
extern void macio_release_resource(struct macio_dev *dev, int resource_no); extern void macio_release_resource(struct macio_dev *dev, int resource_no);
extern int macio_request_resources(struct macio_dev *dev, const char *name); extern int macio_request_resources(struct macio_dev *dev, const char *name);
...@@ -131,6 +134,9 @@ struct macio_driver ...@@ -131,6 +134,9 @@ struct macio_driver
int (*resume)(struct macio_dev* dev); int (*resume)(struct macio_dev* dev);
int (*shutdown)(struct macio_dev* dev); int (*shutdown)(struct macio_dev* dev);
#ifdef CONFIG_PMAC_MEDIABAY
void (*mediabay_event)(struct macio_dev* dev, int mb_state);
#endif
struct device_driver driver; struct device_driver driver;
}; };
#define to_macio_driver(drv) container_of(drv,struct macio_driver, driver) #define to_macio_driver(drv) container_of(drv,struct macio_driver, driver)
......
...@@ -17,26 +17,31 @@ ...@@ -17,26 +17,31 @@
#define MB_POWER 6 /* media bay contains a Power device (???) */ #define MB_POWER 6 /* media bay contains a Power device (???) */
#define MB_NO 7 /* media bay contains nothing */ #define MB_NO 7 /* media bay contains nothing */
/* Number of bays in the machine or 0 */ struct macio_dev;
extern int media_bay_count;
#ifdef CONFIG_BLK_DEV_IDE_PMAC #ifdef CONFIG_PMAC_MEDIABAY
#include <linux/ide.h>
int check_media_bay_by_base(unsigned long base, int what); /* Check the content type of the bay, returns MB_NO if the bay is still
/* called by IDE PMAC host driver to register IDE controller for media bay */ * transitionning
int media_bay_set_ide_infos(struct device_node *which_bay, unsigned long base, */
int irq, ide_hwif_t *hwif); extern int check_media_bay(struct macio_dev *bay);
int check_media_bay(struct device_node *which_bay, int what); /* The ATA driver uses the calls below to temporarily hold on the
* media bay callbacks while initializing the interface
*/
extern void lock_media_bay(struct macio_dev *bay);
extern void unlock_media_bay(struct macio_dev *bay);
#else #else
static inline int check_media_bay(struct device_node *which_bay, int what) static inline int check_media_bay(struct macio_dev *bay)
{ {
return -ENODEV; return MB_NO;
} }
static inline void lock_media_bay(struct macio_dev *bay) { }
static inline void unlock_media_bay(struct macio_dev *bay) { }
#endif #endif
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
...@@ -173,14 +173,6 @@ extern unsigned long tce_alloc_start, tce_alloc_end; ...@@ -173,14 +173,6 @@ extern unsigned long tce_alloc_start, tce_alloc_end;
*/ */
extern int mmu_ci_restrictions; extern int mmu_ci_restrictions;
#ifdef CONFIG_HUGETLB_PAGE
/*
* The page size indexes of the huge pages for use by hugetlbfs
*/
extern unsigned int mmu_huge_psizes[MMU_PAGE_COUNT];
#endif /* CONFIG_HUGETLB_PAGE */
/* /*
* This function sets the AVPN and L fields of the HPTE appropriately * This function sets the AVPN and L fields of the HPTE appropriately
* for the page size * for the page size
...@@ -253,10 +245,11 @@ extern int __hash_page_64K(unsigned long ea, unsigned long access, ...@@ -253,10 +245,11 @@ extern int __hash_page_64K(unsigned long ea, unsigned long access,
unsigned long vsid, pte_t *ptep, unsigned long trap, unsigned long vsid, pte_t *ptep, unsigned long trap,
unsigned int local, int ssize); unsigned int local, int ssize);
struct mm_struct; struct mm_struct;
unsigned int hash_page_do_lazy_icache(unsigned int pp, pte_t pte, int trap);
extern int hash_page(unsigned long ea, unsigned long access, unsigned long trap); extern int hash_page(unsigned long ea, unsigned long access, unsigned long trap);
extern int hash_huge_page(struct mm_struct *mm, unsigned long access, int __hash_page_huge(unsigned long ea, unsigned long access, unsigned long vsid,
unsigned long ea, unsigned long vsid, int local, pte_t *ptep, unsigned long trap, int local, int ssize,
unsigned long trap); unsigned int shift, unsigned int mmu_psize);
extern int htab_bolt_mapping(unsigned long vstart, unsigned long vend, extern int htab_bolt_mapping(unsigned long vstart, unsigned long vend,
unsigned long pstart, unsigned long prot, unsigned long pstart, unsigned long prot,
...@@ -380,6 +373,38 @@ extern void slb_set_size(u16 size); ...@@ -380,6 +373,38 @@ extern void slb_set_size(u16 size);
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#ifdef CONFIG_PPC_SUBPAGE_PROT
/*
* For the sub-page protection option, we extend the PGD with one of
* these. Basically we have a 3-level tree, with the top level being
* the protptrs array. To optimize speed and memory consumption when
* only addresses < 4GB are being protected, pointers to the first
* four pages of sub-page protection words are stored in the low_prot
* array.
* Each page of sub-page protection words protects 1GB (4 bytes
* protects 64k). For the 3-level tree, each page of pointers then
* protects 8TB.
*/
struct subpage_prot_table {
unsigned long maxaddr; /* only addresses < this are protected */
unsigned int **protptrs[2];
unsigned int *low_prot[4];
};
#define SBP_L1_BITS (PAGE_SHIFT - 2)
#define SBP_L2_BITS (PAGE_SHIFT - 3)
#define SBP_L1_COUNT (1 << SBP_L1_BITS)
#define SBP_L2_COUNT (1 << SBP_L2_BITS)
#define SBP_L2_SHIFT (PAGE_SHIFT + SBP_L1_BITS)
#define SBP_L3_SHIFT (SBP_L2_SHIFT + SBP_L2_BITS)
extern void subpage_prot_free(struct mm_struct *mm);
extern void subpage_prot_init_new_context(struct mm_struct *mm);
#else
static inline void subpage_prot_free(struct mm_struct *mm) {}
static inline void subpage_prot_init_new_context(struct mm_struct *mm) { }
#endif /* CONFIG_PPC_SUBPAGE_PROT */
typedef unsigned long mm_context_id_t; typedef unsigned long mm_context_id_t;
typedef struct { typedef struct {
...@@ -393,6 +418,9 @@ typedef struct { ...@@ -393,6 +418,9 @@ typedef struct {
u16 sllp; /* SLB page size encoding */ u16 sllp; /* SLB page size encoding */
#endif #endif
unsigned long vdso_base; unsigned long vdso_base;
#ifdef CONFIG_PPC_SUBPAGE_PROT
struct subpage_prot_table spt;
#endif /* CONFIG_PPC_SUBPAGE_PROT */
} mm_context_t; } mm_context_t;
......
...@@ -23,6 +23,8 @@ extern void switch_slb(struct task_struct *tsk, struct mm_struct *mm); ...@@ -23,6 +23,8 @@ extern void switch_slb(struct task_struct *tsk, struct mm_struct *mm);
extern void set_context(unsigned long id, pgd_t *pgd); extern void set_context(unsigned long id, pgd_t *pgd);
#ifdef CONFIG_PPC_BOOK3S_64 #ifdef CONFIG_PPC_BOOK3S_64
extern int __init_new_context(void);
extern void __destroy_context(int context_id);
static inline void mmu_context_init(void) { } static inline void mmu_context_init(void) { }
#else #else
extern void mmu_context_init(void); extern void mmu_context_init(void);
......
...@@ -276,6 +276,53 @@ extern int mpc52xx_set_psc_clkdiv(int psc_id, int clkdiv); ...@@ -276,6 +276,53 @@ extern int mpc52xx_set_psc_clkdiv(int psc_id, int clkdiv);
extern unsigned int mpc52xx_get_xtal_freq(struct device_node *node); extern unsigned int mpc52xx_get_xtal_freq(struct device_node *node);
extern void mpc52xx_restart(char *cmd); extern void mpc52xx_restart(char *cmd);
/* mpc52xx_gpt.c */
struct mpc52xx_gpt_priv;
extern struct mpc52xx_gpt_priv *mpc52xx_gpt_from_irq(int irq);
extern int mpc52xx_gpt_start_timer(struct mpc52xx_gpt_priv *gpt, u64 period,
int continuous);
extern u64 mpc52xx_gpt_timer_period(struct mpc52xx_gpt_priv *gpt);
extern int mpc52xx_gpt_stop_timer(struct mpc52xx_gpt_priv *gpt);
/* mpc52xx_lpbfifo.c */
#define MPC52XX_LPBFIFO_FLAG_READ (0)
#define MPC52XX_LPBFIFO_FLAG_WRITE (1<<0)
#define MPC52XX_LPBFIFO_FLAG_NO_INCREMENT (1<<1)
#define MPC52XX_LPBFIFO_FLAG_NO_DMA (1<<2)
#define MPC52XX_LPBFIFO_FLAG_POLL_DMA (1<<3)
struct mpc52xx_lpbfifo_request {
struct list_head list;
/* localplus bus address */
unsigned int cs;
size_t offset;
/* Memory address */
void *data;
phys_addr_t data_phys;
/* Details of transfer */
size_t size;
size_t pos; /* current position of transfer */
int flags;
/* What to do when finished */
void (*callback)(struct mpc52xx_lpbfifo_request *);
void *priv; /* Driver private data */
/* statistics */
int irq_count;
int irq_ticks;
u8 last_byte;
int buffer_not_done_cnt;
};
extern int mpc52xx_lpbfifo_submit(struct mpc52xx_lpbfifo_request *req);
extern void mpc52xx_lpbfifo_abort(struct mpc52xx_lpbfifo_request *req);
extern void mpc52xx_lpbfifo_poll(void);
/* mpc52xx_pic.c */ /* mpc52xx_pic.c */
extern void mpc52xx_init_irq(void); extern void mpc52xx_init_irq(void);
extern unsigned int mpc52xx_get_irq(void); extern unsigned int mpc52xx_get_irq(void);
......
...@@ -73,7 +73,6 @@ extern int nvram_write_error_log(char * buff, int length, ...@@ -73,7 +73,6 @@ extern int nvram_write_error_log(char * buff, int length,
extern int nvram_read_error_log(char * buff, int length, extern int nvram_read_error_log(char * buff, int length,
unsigned int * err_type, unsigned int *err_seq); unsigned int * err_type, unsigned int *err_seq);
extern int nvram_clear_error_log(void); extern int nvram_clear_error_log(void);
extern struct nvram_partition *nvram_find_partition(int sig, const char *name);
extern int pSeries_nvram_init(void); extern int pSeries_nvram_init(void);
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#ifdef CONFIG_PPC_PSERIES #ifdef CONFIG_PPC_PSERIES
extern int pSeries_reconfig_notifier_register(struct notifier_block *); extern int pSeries_reconfig_notifier_register(struct notifier_block *);
extern void pSeries_reconfig_notifier_unregister(struct notifier_block *); extern void pSeries_reconfig_notifier_unregister(struct notifier_block *);
extern struct blocking_notifier_head pSeries_reconfig_chain;
#else /* !CONFIG_PPC_PSERIES */ #else /* !CONFIG_PPC_PSERIES */
static inline int pSeries_reconfig_notifier_register(struct notifier_block *nb) static inline int pSeries_reconfig_notifier_register(struct notifier_block *nb)
{ {
......
...@@ -129,6 +129,15 @@ struct paca_struct { ...@@ -129,6 +129,15 @@ struct paca_struct {
u64 system_time; /* accumulated system TB ticks */ u64 system_time; /* accumulated system TB ticks */
u64 startpurr; /* PURR/TB value snapshot */ u64 startpurr; /* PURR/TB value snapshot */
u64 startspurr; /* SPURR value snapshot */ u64 startspurr; /* SPURR value snapshot */
#ifdef CONFIG_KVM_BOOK3S_64_HANDLER
struct {
u64 esid;
u64 vsid;
} kvm_slb[64]; /* guest SLB */
u8 kvm_slb_max; /* highest used guest slb entry */
u8 kvm_in_guest; /* are we inside the guest? */
#endif
}; };
extern struct paca_struct paca[]; extern struct paca_struct paca[];
......
...@@ -229,6 +229,20 @@ typedef unsigned long pgprot_t; ...@@ -229,6 +229,20 @@ typedef unsigned long pgprot_t;
#endif #endif
typedef struct { signed long pd; } hugepd_t;
#define HUGEPD_SHIFT_MASK 0x3f
#ifdef CONFIG_HUGETLB_PAGE
static inline int hugepd_ok(hugepd_t hpd)
{
return (hpd.pd > 0);
}
#define is_hugepd(pdep) (hugepd_ok(*((hugepd_t *)(pdep))))
#else /* CONFIG_HUGETLB_PAGE */
#define is_hugepd(pdep) 0
#endif /* CONFIG_HUGETLB_PAGE */
struct page; struct page;
extern void clear_user_page(void *page, unsigned long vaddr, struct page *pg); extern void clear_user_page(void *page, unsigned long vaddr, struct page *pg);
extern void copy_user_page(void *to, void *from, unsigned long vaddr, extern void copy_user_page(void *to, void *from, unsigned long vaddr,
......
...@@ -90,7 +90,7 @@ extern unsigned int HPAGE_SHIFT; ...@@ -90,7 +90,7 @@ extern unsigned int HPAGE_SHIFT;
#define HPAGE_SIZE ((1UL) << HPAGE_SHIFT) #define HPAGE_SIZE ((1UL) << HPAGE_SHIFT)
#define HPAGE_MASK (~(HPAGE_SIZE - 1)) #define HPAGE_MASK (~(HPAGE_SIZE - 1))
#define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT)
#define HUGE_MAX_HSTATE 3 #define HUGE_MAX_HSTATE (MMU_PAGE_COUNT-1)
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
#include <linux/threads.h> #include <linux/threads.h>
#define PTE_NONCACHE_NUM 0 /* dummy for now to share code w/ppc64 */ /* For 32-bit, all levels of page tables are just drawn from get_free_page() */
#define MAX_PGTABLE_INDEX_SIZE 0
extern void __bad_pte(pmd_t *pmd); extern void __bad_pte(pmd_t *pmd);
...@@ -36,11 +37,10 @@ extern void pgd_free(struct mm_struct *mm, pgd_t *pgd); ...@@ -36,11 +37,10 @@ extern void pgd_free(struct mm_struct *mm, pgd_t *pgd);
extern pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long addr); extern pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long addr);
extern pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long addr); extern pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long addr);
static inline void pgtable_free(pgtable_free_t pgf) static inline void pgtable_free(void *table, unsigned index_size)
{ {
void *p = (void *)(pgf.val & ~PGF_CACHENUM_MASK); BUG_ON(index_size); /* 32-bit doesn't use this */
free_page((unsigned long)table);
free_page((unsigned long)p);
} }
#define check_pgt_cache() do { } while (0) #define check_pgt_cache() do { } while (0)
......
...@@ -11,27 +11,34 @@ ...@@ -11,27 +11,34 @@
#include <linux/cpumask.h> #include <linux/cpumask.h>
#include <linux/percpu.h> #include <linux/percpu.h>
#ifndef CONFIG_PPC_SUBPAGE_PROT /*
static inline void subpage_prot_free(pgd_t *pgd) {} * Functions that deal with pagetables that could be at any level of
#endif * the table need to be passed an "index_size" so they know how to
* handle allocation. For PTE pages (which are linked to a struct
* page for now, and drawn from the main get_free_pages() pool), the
* allocation size will be (2^index_size * sizeof(pointer)) and
* allocations are drawn from the kmem_cache in PGT_CACHE(index_size).
*
* The maximum index size needs to be big enough to allow any
* pagetable sizes we need, but small enough to fit in the low bits of
* any page table pointer. In other words all pagetables, even tiny
* ones, must be aligned to allow at least enough low 0 bits to
* contain this value. This value is also used as a mask, so it must
* be one less than a power of two.
*/
#define MAX_PGTABLE_INDEX_SIZE 0xf
extern struct kmem_cache *pgtable_cache[]; extern struct kmem_cache *pgtable_cache[];
#define PGT_CACHE(shift) (pgtable_cache[(shift)-1])
#define PGD_CACHE_NUM 0
#define PUD_CACHE_NUM 1
#define PMD_CACHE_NUM 1
#define HUGEPTE_CACHE_NUM 2
#define PTE_NONCACHE_NUM 7 /* from GFP rather than kmem_cache */
static inline pgd_t *pgd_alloc(struct mm_struct *mm) static inline pgd_t *pgd_alloc(struct mm_struct *mm)
{ {
return kmem_cache_alloc(pgtable_cache[PGD_CACHE_NUM], GFP_KERNEL); return kmem_cache_alloc(PGT_CACHE(PGD_INDEX_SIZE), GFP_KERNEL);
} }
static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd) static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
{ {
subpage_prot_free(pgd); kmem_cache_free(PGT_CACHE(PGD_INDEX_SIZE), pgd);
kmem_cache_free(pgtable_cache[PGD_CACHE_NUM], pgd);
} }
#ifndef CONFIG_PPC_64K_PAGES #ifndef CONFIG_PPC_64K_PAGES
...@@ -40,13 +47,13 @@ static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd) ...@@ -40,13 +47,13 @@ static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr) static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr)
{ {
return kmem_cache_alloc(pgtable_cache[PUD_CACHE_NUM], return kmem_cache_alloc(PGT_CACHE(PUD_INDEX_SIZE),
GFP_KERNEL|__GFP_REPEAT); GFP_KERNEL|__GFP_REPEAT);
} }
static inline void pud_free(struct mm_struct *mm, pud_t *pud) static inline void pud_free(struct mm_struct *mm, pud_t *pud)
{ {
kmem_cache_free(pgtable_cache[PUD_CACHE_NUM], pud); kmem_cache_free(PGT_CACHE(PUD_INDEX_SIZE), pud);
} }
static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd) static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd)
...@@ -78,13 +85,13 @@ static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, ...@@ -78,13 +85,13 @@ static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd,
static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr) static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr)
{ {
return kmem_cache_alloc(pgtable_cache[PMD_CACHE_NUM], return kmem_cache_alloc(PGT_CACHE(PMD_INDEX_SIZE),
GFP_KERNEL|__GFP_REPEAT); GFP_KERNEL|__GFP_REPEAT);
} }
static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
{ {
kmem_cache_free(pgtable_cache[PMD_CACHE_NUM], pmd); kmem_cache_free(PGT_CACHE(PMD_INDEX_SIZE), pmd);
} }
static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm,
...@@ -107,24 +114,22 @@ static inline pgtable_t pte_alloc_one(struct mm_struct *mm, ...@@ -107,24 +114,22 @@ static inline pgtable_t pte_alloc_one(struct mm_struct *mm,
return page; return page;
} }
static inline void pgtable_free(pgtable_free_t pgf) static inline void pgtable_free(void *table, unsigned index_size)
{ {
void *p = (void *)(pgf.val & ~PGF_CACHENUM_MASK); if (!index_size)
int cachenum = pgf.val & PGF_CACHENUM_MASK; free_page((unsigned long)table);
else {
if (cachenum == PTE_NONCACHE_NUM) BUG_ON(index_size > MAX_PGTABLE_INDEX_SIZE);
free_page((unsigned long)p); kmem_cache_free(PGT_CACHE(index_size), table);
else }
kmem_cache_free(pgtable_cache[cachenum], p);
} }
#define __pmd_free_tlb(tlb, pmd,addr) \ #define __pmd_free_tlb(tlb, pmd, addr) \
pgtable_free_tlb(tlb, pgtable_free_cache(pmd, \ pgtable_free_tlb(tlb, pmd, PMD_INDEX_SIZE)
PMD_CACHE_NUM, PMD_TABLE_SIZE-1))
#ifndef CONFIG_PPC_64K_PAGES #ifndef CONFIG_PPC_64K_PAGES
#define __pud_free_tlb(tlb, pud, addr) \ #define __pud_free_tlb(tlb, pud, addr) \
pgtable_free_tlb(tlb, pgtable_free_cache(pud, \ pgtable_free_tlb(tlb, pud, PUD_INDEX_SIZE)
PUD_CACHE_NUM, PUD_TABLE_SIZE-1))
#endif /* CONFIG_PPC_64K_PAGES */ #endif /* CONFIG_PPC_64K_PAGES */
#define check_pgt_cache() do { } while (0) #define check_pgt_cache() do { } while (0)
......
...@@ -24,25 +24,6 @@ static inline void pte_free(struct mm_struct *mm, pgtable_t ptepage) ...@@ -24,25 +24,6 @@ static inline void pte_free(struct mm_struct *mm, pgtable_t ptepage)
__free_page(ptepage); __free_page(ptepage);
} }
typedef struct pgtable_free {
unsigned long val;
} pgtable_free_t;
/* This needs to be big enough to allow for MMU_PAGE_COUNT + 2 to be stored
* and small enough to fit in the low bits of any naturally aligned page
* table cache entry. Arbitrarily set to 0x1f, that should give us some
* room to grow
*/
#define PGF_CACHENUM_MASK 0x1f
static inline pgtable_free_t pgtable_free_cache(void *p, int cachenum,
unsigned long mask)
{
BUG_ON(cachenum > PGF_CACHENUM_MASK);
return (pgtable_free_t){.val = ((unsigned long) p & ~mask) | cachenum};
}
#ifdef CONFIG_PPC64 #ifdef CONFIG_PPC64
#include <asm/pgalloc-64.h> #include <asm/pgalloc-64.h>
#else #else
...@@ -50,12 +31,12 @@ static inline pgtable_free_t pgtable_free_cache(void *p, int cachenum, ...@@ -50,12 +31,12 @@ static inline pgtable_free_t pgtable_free_cache(void *p, int cachenum,
#endif #endif
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
extern void pgtable_free_tlb(struct mmu_gather *tlb, pgtable_free_t pgf); extern void pgtable_free_tlb(struct mmu_gather *tlb, void *table, unsigned shift);
extern void pte_free_finish(void); extern void pte_free_finish(void);
#else /* CONFIG_SMP */ #else /* CONFIG_SMP */
static inline void pgtable_free_tlb(struct mmu_gather *tlb, pgtable_free_t pgf) static inline void pgtable_free_tlb(struct mmu_gather *tlb, void *table, unsigned shift)
{ {
pgtable_free(pgf); pgtable_free(table, shift);
} }
static inline void pte_free_finish(void) { } static inline void pte_free_finish(void) { }
#endif /* !CONFIG_SMP */ #endif /* !CONFIG_SMP */
...@@ -63,12 +44,9 @@ static inline void pte_free_finish(void) { } ...@@ -63,12 +44,9 @@ static inline void pte_free_finish(void) { }
static inline void __pte_free_tlb(struct mmu_gather *tlb, struct page *ptepage, static inline void __pte_free_tlb(struct mmu_gather *tlb, struct page *ptepage,
unsigned long address) unsigned long address)
{ {
pgtable_free_t pgf = pgtable_free_cache(page_address(ptepage),
PTE_NONCACHE_NUM,
PTE_TABLE_SIZE-1);
tlb_flush_pgtable(tlb, address); tlb_flush_pgtable(tlb, address);
pgtable_page_dtor(ptepage); pgtable_page_dtor(ptepage);
pgtable_free_tlb(tlb, pgf); pgtable_free_tlb(tlb, page_address(ptepage), 0);
} }
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
...@@ -354,6 +354,7 @@ static inline void __ptep_set_access_flags(pte_t *ptep, pte_t entry) ...@@ -354,6 +354,7 @@ static inline void __ptep_set_access_flags(pte_t *ptep, pte_t entry)
#define pgoff_to_pte(off) ((pte_t) {((off) << PTE_RPN_SHIFT)|_PAGE_FILE}) #define pgoff_to_pte(off) ((pte_t) {((off) << PTE_RPN_SHIFT)|_PAGE_FILE})
#define PTE_FILE_MAX_BITS (BITS_PER_LONG - PTE_RPN_SHIFT) #define PTE_FILE_MAX_BITS (BITS_PER_LONG - PTE_RPN_SHIFT)
void pgtable_cache_add(unsigned shift, void (*ctor)(void *));
void pgtable_cache_init(void); void pgtable_cache_init(void);
/* /*
...@@ -378,7 +379,18 @@ void pgtable_cache_init(void); ...@@ -378,7 +379,18 @@ void pgtable_cache_init(void);
return pt; return pt;
} }
pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long address); #ifdef CONFIG_HUGETLB_PAGE
pte_t *find_linux_pte_or_hugepte(pgd_t *pgdir, unsigned long ea,
unsigned *shift);
#else
static inline pte_t *find_linux_pte_or_hugepte(pgd_t *pgdir, unsigned long ea,
unsigned *shift)
{
if (shift)
*shift = 0;
return find_linux_pte(pgdir, ea);
}
#endif /* !CONFIG_HUGETLB_PAGE */
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
......
...@@ -211,6 +211,9 @@ extern void paging_init(void); ...@@ -211,6 +211,9 @@ extern void paging_init(void);
*/ */
extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t); extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t);
extern int gup_hugepd(hugepd_t *hugepd, unsigned pdshift, unsigned long addr,
unsigned long end, int write, struct page **pages, int *nr);
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
...@@ -33,21 +33,21 @@ ...@@ -33,21 +33,21 @@
#define _PAGE_NO_CACHE 0x0002 /* I: cache inhibit */ #define _PAGE_NO_CACHE 0x0002 /* I: cache inhibit */
#define _PAGE_SHARED 0x0004 /* No ASID (context) compare */ #define _PAGE_SHARED 0x0004 /* No ASID (context) compare */
#define _PAGE_SPECIAL 0x0008 /* SW entry, forced to 0 by the TLB miss */ #define _PAGE_SPECIAL 0x0008 /* SW entry, forced to 0 by the TLB miss */
#define _PAGE_DIRTY 0x0100 /* C: page changed */
/* These five software bits must be masked out when the entry is loaded /* These 4 software bits must be masked out when the entry is loaded
* into the TLB. * into the TLB, 1 SW bit left(0x0080).
*/ */
#define _PAGE_GUARDED 0x0010 /* software: guarded access */ #define _PAGE_GUARDED 0x0010 /* software: guarded access */
#define _PAGE_DIRTY 0x0020 /* software: page changed */ #define _PAGE_ACCESSED 0x0020 /* software: page referenced */
#define _PAGE_RW 0x0040 /* software: user write access allowed */ #define _PAGE_WRITETHRU 0x0040 /* software: caching is write through */
#define _PAGE_ACCESSED 0x0080 /* software: page referenced */
/* Setting any bits in the nibble with the follow two controls will /* Setting any bits in the nibble with the follow two controls will
* require a TLB exception handler change. It is assumed unused bits * require a TLB exception handler change. It is assumed unused bits
* are always zero. * are always zero.
*/ */
#define _PAGE_HWWRITE 0x0100 /* h/w write enable: never set in Linux PTE */ #define _PAGE_RW 0x0400 /* lsb PP bits, inverted in HW */
#define _PAGE_USER 0x0800 /* One of the PP bits, the other is USER&~RW */ #define _PAGE_USER 0x0800 /* msb PP bits */
#define _PMD_PRESENT 0x0001 #define _PMD_PRESENT 0x0001
#define _PMD_BAD 0x0ff0 #define _PMD_BAD 0x0ff0
......
...@@ -76,41 +76,4 @@ ...@@ -76,41 +76,4 @@
remap_pfn_range((vma), (addr), (pfn), PAGE_SIZE, \ remap_pfn_range((vma), (addr), (pfn), PAGE_SIZE, \
__pgprot(pgprot_val((prot)) | _PAGE_4K_PFN)) __pgprot(pgprot_val((prot)) | _PAGE_4K_PFN))
#ifdef CONFIG_PPC_SUBPAGE_PROT
/*
* For the sub-page protection option, we extend the PGD with one of
* these. Basically we have a 3-level tree, with the top level being
* the protptrs array. To optimize speed and memory consumption when
* only addresses < 4GB are being protected, pointers to the first
* four pages of sub-page protection words are stored in the low_prot
* array.
* Each page of sub-page protection words protects 1GB (4 bytes
* protects 64k). For the 3-level tree, each page of pointers then
* protects 8TB.
*/
struct subpage_prot_table {
unsigned long maxaddr; /* only addresses < this are protected */
unsigned int **protptrs[2];
unsigned int *low_prot[4];
};
#undef PGD_TABLE_SIZE
#define PGD_TABLE_SIZE ((sizeof(pgd_t) << PGD_INDEX_SIZE) + \
sizeof(struct subpage_prot_table))
#define SBP_L1_BITS (PAGE_SHIFT - 2)
#define SBP_L2_BITS (PAGE_SHIFT - 3)
#define SBP_L1_COUNT (1 << SBP_L1_BITS)
#define SBP_L2_COUNT (1 << SBP_L2_BITS)
#define SBP_L2_SHIFT (PAGE_SHIFT + SBP_L1_BITS)
#define SBP_L3_SHIFT (SBP_L2_SHIFT + SBP_L2_BITS)
extern void subpage_prot_free(pgd_t *pgd);
static inline struct subpage_prot_table *pgd_subpage_prot(pgd_t *pgd)
{
return (struct subpage_prot_table *)(pgd + PTRS_PER_PGD);
}
#endif /* CONFIG_PPC_SUBPAGE_PROT */
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
...@@ -87,7 +87,7 @@ extern spinlock_t cmxgcr_lock; ...@@ -87,7 +87,7 @@ extern spinlock_t cmxgcr_lock;
/* Export QE common operations */ /* Export QE common operations */
#ifdef CONFIG_QUICC_ENGINE #ifdef CONFIG_QUICC_ENGINE
extern void __init qe_reset(void); extern void qe_reset(void);
#else #else
static inline void qe_reset(void) {} static inline void qe_reset(void) {}
#endif #endif
...@@ -145,8 +145,17 @@ static inline void qe_pin_set_gpio(struct qe_pin *qe_pin) {} ...@@ -145,8 +145,17 @@ static inline void qe_pin_set_gpio(struct qe_pin *qe_pin) {}
static inline void qe_pin_set_dedicated(struct qe_pin *pin) {} static inline void qe_pin_set_dedicated(struct qe_pin *pin) {}
#endif /* CONFIG_QE_GPIO */ #endif /* CONFIG_QE_GPIO */
/* QE internal API */ #ifdef CONFIG_QUICC_ENGINE
int qe_issue_cmd(u32 cmd, u32 device, u8 mcn_protocol, u32 cmd_input); int qe_issue_cmd(u32 cmd, u32 device, u8 mcn_protocol, u32 cmd_input);
#else
static inline int qe_issue_cmd(u32 cmd, u32 device, u8 mcn_protocol,
u32 cmd_input)
{
return -ENOSYS;
}
#endif /* CONFIG_QUICC_ENGINE */
/* QE internal API */
enum qe_clock qe_clock_source(const char *source); enum qe_clock qe_clock_source(const char *source);
unsigned int qe_get_brg_clk(void); unsigned int qe_get_brg_clk(void);
int qe_setbrg(enum qe_clock brg, unsigned int rate, unsigned int multiplier); int qe_setbrg(enum qe_clock brg, unsigned int rate, unsigned int multiplier);
...@@ -154,7 +163,28 @@ int qe_get_snum(void); ...@@ -154,7 +163,28 @@ int qe_get_snum(void);
void qe_put_snum(u8 snum); void qe_put_snum(u8 snum);
unsigned int qe_get_num_of_risc(void); unsigned int qe_get_num_of_risc(void);
unsigned int qe_get_num_of_snums(void); unsigned int qe_get_num_of_snums(void);
int qe_alive_during_sleep(void);
static inline int qe_alive_during_sleep(void)
{
/*
* MPC8568E reference manual says:
*
* "...power down sequence waits for all I/O interfaces to become idle.
* In some applications this may happen eventually without actively
* shutting down interfaces, but most likely, software will have to
* take steps to shut down the eTSEC, QUICC Engine Block, and PCI
* interfaces before issuing the command (either the write to the core
* MSR[WE] as described above or writing to POWMGTCSR) to put the
* device into sleep state."
*
* MPC8569E reference manual has a similar paragraph.
*/
#ifdef CONFIG_PPC_85xx
return 0;
#else
return 1;
#endif
}
/* we actually use cpm_muram implementation, define this for convenience */ /* we actually use cpm_muram implementation, define this for convenience */
#define qe_muram_init cpm_muram_init #define qe_muram_init cpm_muram_init
...@@ -210,8 +240,15 @@ struct qe_firmware_info { ...@@ -210,8 +240,15 @@ struct qe_firmware_info {
u64 extended_modes; /* Extended modes */ u64 extended_modes; /* Extended modes */
}; };
#ifdef CONFIG_QUICC_ENGINE
/* Upload a firmware to the QE */ /* Upload a firmware to the QE */
int qe_upload_firmware(const struct qe_firmware *firmware); int qe_upload_firmware(const struct qe_firmware *firmware);
#else
static inline int qe_upload_firmware(const struct qe_firmware *firmware)
{
return -ENOSYS;
}
#endif /* CONFIG_QUICC_ENGINE */
/* Obtain information on the uploaded firmware */ /* Obtain information on the uploaded firmware */
struct qe_firmware_info *qe_get_firmware_info(void); struct qe_firmware_info *qe_get_firmware_info(void);
......
...@@ -145,7 +145,7 @@ SYSCALL_SPU(setfsuid) ...@@ -145,7 +145,7 @@ SYSCALL_SPU(setfsuid)
SYSCALL_SPU(setfsgid) SYSCALL_SPU(setfsgid)
SYSCALL_SPU(llseek) SYSCALL_SPU(llseek)
COMPAT_SYS_SPU(getdents) COMPAT_SYS_SPU(getdents)
SYSX_SPU(sys_select,ppc32_select,ppc_select) SYSX_SPU(sys_select,ppc32_select,sys_select)
SYSCALL_SPU(flock) SYSCALL_SPU(flock)
SYSCALL_SPU(msync) SYSCALL_SPU(msync)
COMPAT_SYS_SPU(readv) COMPAT_SYS_SPU(readv)
......
...@@ -42,10 +42,11 @@ obj-$(CONFIG_ALTIVEC) += vecemu.o ...@@ -42,10 +42,11 @@ obj-$(CONFIG_ALTIVEC) += vecemu.o
obj-$(CONFIG_PPC_970_NAP) += idle_power4.o obj-$(CONFIG_PPC_970_NAP) += idle_power4.o
obj-$(CONFIG_PPC_OF) += of_device.o of_platform.o prom_parse.o obj-$(CONFIG_PPC_OF) += of_device.o of_platform.o prom_parse.o
obj-$(CONFIG_PPC_CLOCK) += clock.o obj-$(CONFIG_PPC_CLOCK) += clock.o
procfs-$(CONFIG_PPC64) := proc_ppc64.o procfs-y := proc_powerpc.o
obj-$(CONFIG_PROC_FS) += $(procfs-y) obj-$(CONFIG_PROC_FS) += $(procfs-y)
rtaspci-$(CONFIG_PPC64)-$(CONFIG_PCI) := rtas_pci.o rtaspci-$(CONFIG_PPC64)-$(CONFIG_PCI) := rtas_pci.o
obj-$(CONFIG_PPC_RTAS) += rtas.o rtas-rtc.o $(rtaspci-y-y) obj-$(CONFIG_PPC_RTAS) += rtas.o rtas-rtc.o $(rtaspci-y-y)
obj-$(CONFIG_PPC_RTAS_DAEMON) += rtasd.o
obj-$(CONFIG_RTAS_FLASH) += rtas_flash.o obj-$(CONFIG_RTAS_FLASH) += rtas_flash.o
obj-$(CONFIG_RTAS_PROC) += rtas-proc.o obj-$(CONFIG_RTAS_PROC) += rtas-proc.o
obj-$(CONFIG_LPARCFG) += lparcfg.o obj-$(CONFIG_LPARCFG) += lparcfg.o
......
...@@ -190,6 +190,11 @@ int main(void) ...@@ -190,6 +190,11 @@ int main(void)
DEFINE(PACA_SYSTEM_TIME, offsetof(struct paca_struct, system_time)); DEFINE(PACA_SYSTEM_TIME, offsetof(struct paca_struct, system_time));
DEFINE(PACA_DATA_OFFSET, offsetof(struct paca_struct, data_offset)); DEFINE(PACA_DATA_OFFSET, offsetof(struct paca_struct, data_offset));
DEFINE(PACA_TRAP_SAVE, offsetof(struct paca_struct, trap_save)); DEFINE(PACA_TRAP_SAVE, offsetof(struct paca_struct, trap_save));
#ifdef CONFIG_KVM_BOOK3S_64_HANDLER
DEFINE(PACA_KVM_IN_GUEST, offsetof(struct paca_struct, kvm_in_guest));
DEFINE(PACA_KVM_SLB, offsetof(struct paca_struct, kvm_slb));
DEFINE(PACA_KVM_SLB_MAX, offsetof(struct paca_struct, kvm_slb_max));
#endif
#endif /* CONFIG_PPC64 */ #endif /* CONFIG_PPC64 */
/* RTAS */ /* RTAS */
...@@ -398,14 +403,24 @@ int main(void) ...@@ -398,14 +403,24 @@ int main(void)
DEFINE(VCPU_LAST_INST, offsetof(struct kvm_vcpu, arch.last_inst)); DEFINE(VCPU_LAST_INST, offsetof(struct kvm_vcpu, arch.last_inst));
DEFINE(VCPU_FAULT_DEAR, offsetof(struct kvm_vcpu, arch.fault_dear)); DEFINE(VCPU_FAULT_DEAR, offsetof(struct kvm_vcpu, arch.fault_dear));
DEFINE(VCPU_FAULT_ESR, offsetof(struct kvm_vcpu, arch.fault_esr)); DEFINE(VCPU_FAULT_ESR, offsetof(struct kvm_vcpu, arch.fault_esr));
/* book3s_64 */
#ifdef CONFIG_PPC64
DEFINE(VCPU_FAULT_DSISR, offsetof(struct kvm_vcpu, arch.fault_dsisr));
DEFINE(VCPU_HOST_RETIP, offsetof(struct kvm_vcpu, arch.host_retip));
DEFINE(VCPU_HOST_R2, offsetof(struct kvm_vcpu, arch.host_r2));
DEFINE(VCPU_HOST_MSR, offsetof(struct kvm_vcpu, arch.host_msr));
DEFINE(VCPU_SHADOW_MSR, offsetof(struct kvm_vcpu, arch.shadow_msr));
DEFINE(VCPU_TRAMPOLINE_LOWMEM, offsetof(struct kvm_vcpu, arch.trampoline_lowmem));
DEFINE(VCPU_TRAMPOLINE_ENTER, offsetof(struct kvm_vcpu, arch.trampoline_enter));
DEFINE(VCPU_HIGHMEM_HANDLER, offsetof(struct kvm_vcpu, arch.highmem_handler));
DEFINE(VCPU_HFLAGS, offsetof(struct kvm_vcpu, arch.hflags));
#endif
#endif #endif
#ifdef CONFIG_44x #ifdef CONFIG_44x
DEFINE(PGD_T_LOG2, PGD_T_LOG2); DEFINE(PGD_T_LOG2, PGD_T_LOG2);
DEFINE(PTE_T_LOG2, PTE_T_LOG2); DEFINE(PTE_T_LOG2, PTE_T_LOG2);
#endif #endif
#ifdef CONFIG_FSL_BOOKE
DEFINE(TLBCAM_SIZE, sizeof(struct tlbcam));
#endif
#ifdef CONFIG_KVM_EXIT_TIMING #ifdef CONFIG_KVM_EXIT_TIMING
DEFINE(VCPU_TIMING_EXIT_TBU, offsetof(struct kvm_vcpu, DEFINE(VCPU_TIMING_EXIT_TBU, offsetof(struct kvm_vcpu,
......
...@@ -373,7 +373,7 @@ void default_machine_crash_shutdown(struct pt_regs *regs) ...@@ -373,7 +373,7 @@ void default_machine_crash_shutdown(struct pt_regs *regs)
hard_irq_disable(); hard_irq_disable();
for_each_irq(i) { for_each_irq(i) {
struct irq_desc *desc = irq_desc + i; struct irq_desc *desc = irq_to_desc(i);
if (desc->status & IRQ_INPROGRESS) if (desc->status & IRQ_INPROGRESS)
desc->chip->eoi(i); desc->chip->eoi(i);
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include <asm/dma.h> #include <asm/dma.h>
#include <asm/abs_addr.h> #include <asm/abs_addr.h>
int swiotlb __read_mostly;
unsigned int ppc_swiotlb_enable; unsigned int ppc_swiotlb_enable;
/* /*
......
...@@ -41,6 +41,7 @@ __start_interrupts: ...@@ -41,6 +41,7 @@ __start_interrupts:
. = 0x200 . = 0x200
_machine_check_pSeries: _machine_check_pSeries:
HMT_MEDIUM HMT_MEDIUM
DO_KVM 0x200
mtspr SPRN_SPRG_SCRATCH0,r13 /* save r13 */ mtspr SPRN_SPRG_SCRATCH0,r13 /* save r13 */
EXCEPTION_PROLOG_PSERIES(PACA_EXMC, machine_check_common) EXCEPTION_PROLOG_PSERIES(PACA_EXMC, machine_check_common)
...@@ -48,6 +49,7 @@ _machine_check_pSeries: ...@@ -48,6 +49,7 @@ _machine_check_pSeries:
.globl data_access_pSeries .globl data_access_pSeries
data_access_pSeries: data_access_pSeries:
HMT_MEDIUM HMT_MEDIUM
DO_KVM 0x300
mtspr SPRN_SPRG_SCRATCH0,r13 mtspr SPRN_SPRG_SCRATCH0,r13
BEGIN_FTR_SECTION BEGIN_FTR_SECTION
mfspr r13,SPRN_SPRG_PACA mfspr r13,SPRN_SPRG_PACA
...@@ -77,6 +79,7 @@ ALT_FTR_SECTION_END_IFCLR(CPU_FTR_SLB) ...@@ -77,6 +79,7 @@ ALT_FTR_SECTION_END_IFCLR(CPU_FTR_SLB)
.globl data_access_slb_pSeries .globl data_access_slb_pSeries
data_access_slb_pSeries: data_access_slb_pSeries:
HMT_MEDIUM HMT_MEDIUM
DO_KVM 0x380
mtspr SPRN_SPRG_SCRATCH0,r13 mtspr SPRN_SPRG_SCRATCH0,r13
mfspr r13,SPRN_SPRG_PACA /* get paca address into r13 */ mfspr r13,SPRN_SPRG_PACA /* get paca address into r13 */
std r3,PACA_EXSLB+EX_R3(r13) std r3,PACA_EXSLB+EX_R3(r13)
...@@ -115,6 +118,7 @@ data_access_slb_pSeries: ...@@ -115,6 +118,7 @@ data_access_slb_pSeries:
.globl instruction_access_slb_pSeries .globl instruction_access_slb_pSeries
instruction_access_slb_pSeries: instruction_access_slb_pSeries:
HMT_MEDIUM HMT_MEDIUM
DO_KVM 0x480
mtspr SPRN_SPRG_SCRATCH0,r13 mtspr SPRN_SPRG_SCRATCH0,r13
mfspr r13,SPRN_SPRG_PACA /* get paca address into r13 */ mfspr r13,SPRN_SPRG_PACA /* get paca address into r13 */
std r3,PACA_EXSLB+EX_R3(r13) std r3,PACA_EXSLB+EX_R3(r13)
...@@ -154,6 +158,7 @@ instruction_access_slb_pSeries: ...@@ -154,6 +158,7 @@ instruction_access_slb_pSeries:
.globl system_call_pSeries .globl system_call_pSeries
system_call_pSeries: system_call_pSeries:
HMT_MEDIUM HMT_MEDIUM
DO_KVM 0xc00
BEGIN_FTR_SECTION BEGIN_FTR_SECTION
cmpdi r0,0x1ebe cmpdi r0,0x1ebe
beq- 1f beq- 1f
...@@ -187,14 +192,17 @@ END_FTR_SECTION_IFSET(CPU_FTR_REAL_LE) ...@@ -187,14 +192,17 @@ END_FTR_SECTION_IFSET(CPU_FTR_REAL_LE)
*/ */
performance_monitor_pSeries_1: performance_monitor_pSeries_1:
. = 0xf00 . = 0xf00
DO_KVM 0xf00
b performance_monitor_pSeries b performance_monitor_pSeries
altivec_unavailable_pSeries_1: altivec_unavailable_pSeries_1:
. = 0xf20 . = 0xf20
DO_KVM 0xf20
b altivec_unavailable_pSeries b altivec_unavailable_pSeries
vsx_unavailable_pSeries_1: vsx_unavailable_pSeries_1:
. = 0xf40 . = 0xf40
DO_KVM 0xf40
b vsx_unavailable_pSeries b vsx_unavailable_pSeries
#ifdef CONFIG_CBE_RAS #ifdef CONFIG_CBE_RAS
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include <asm/firmware.h> #include <asm/firmware.h>
#include <asm/page_64.h> #include <asm/page_64.h>
#include <asm/irqflags.h> #include <asm/irqflags.h>
#include <asm/kvm_book3s_64_asm.h>
/* The physical memory is layed out such that the secondary processor /* The physical memory is layed out such that the secondary processor
* spin code sits at 0x0000...0x00ff. On server, the vectors follow * spin code sits at 0x0000...0x00ff. On server, the vectors follow
...@@ -165,6 +166,12 @@ exception_marker: ...@@ -165,6 +166,12 @@ exception_marker:
#include "exceptions-64s.S" #include "exceptions-64s.S"
#endif #endif
/* KVM trampoline code needs to be close to the interrupt handlers */
#ifdef CONFIG_KVM_BOOK3S_64_HANDLER
#include "../kvm/book3s_64_rmhandlers.S"
#endif
_GLOBAL(generic_secondary_thread_init) _GLOBAL(generic_secondary_thread_init)
mr r24,r3 mr r24,r3
......
This diff is collapsed.
...@@ -943,28 +943,6 @@ _GLOBAL(__setup_e500mc_ivors) ...@@ -943,28 +943,6 @@ _GLOBAL(__setup_e500mc_ivors)
sync sync
blr blr
/*
* extern void loadcam_entry(unsigned int index)
*
* Load TLBCAM[index] entry in to the L2 CAM MMU
*/
_GLOBAL(loadcam_entry)
lis r4,TLBCAM@ha
addi r4,r4,TLBCAM@l
mulli r5,r3,TLBCAM_SIZE
add r3,r5,r4
lwz r4,0(r3)
mtspr SPRN_MAS0,r4
lwz r4,4(r3)
mtspr SPRN_MAS1,r4
lwz r4,8(r3)
mtspr SPRN_MAS2,r4
lwz r4,12(r3)
mtspr SPRN_MAS3,r4
tlbwe
isync
blr
/* /*
* extern void giveup_altivec(struct task_struct *prev) * extern void giveup_altivec(struct task_struct *prev)
* *
......
...@@ -161,7 +161,7 @@ void _memcpy_fromio(void *dest, const volatile void __iomem *src, ...@@ -161,7 +161,7 @@ void _memcpy_fromio(void *dest, const volatile void __iomem *src,
dest++; dest++;
n--; n--;
} }
while(n > 4) { while(n >= 4) {
*((u32 *)dest) = *((volatile u32 *)vsrc); *((u32 *)dest) = *((volatile u32 *)vsrc);
eieio(); eieio();
vsrc += 4; vsrc += 4;
...@@ -190,7 +190,7 @@ void _memcpy_toio(volatile void __iomem *dest, const void *src, unsigned long n) ...@@ -190,7 +190,7 @@ void _memcpy_toio(volatile void __iomem *dest, const void *src, unsigned long n)
vdest++; vdest++;
n--; n--;
} }
while(n > 4) { while(n >= 4) {
*((volatile u32 *)vdest) = *((volatile u32 *)src); *((volatile u32 *)vdest) = *((volatile u32 *)src);
src += 4; src += 4;
vdest += 4; vdest += 4;
......
...@@ -87,7 +87,10 @@ extern int tau_interrupts(int); ...@@ -87,7 +87,10 @@ extern int tau_interrupts(int);
#endif /* CONFIG_PPC32 */ #endif /* CONFIG_PPC32 */
#ifdef CONFIG_PPC64 #ifdef CONFIG_PPC64
#ifndef CONFIG_SPARSE_IRQ
EXPORT_SYMBOL(irq_desc); EXPORT_SYMBOL(irq_desc);
#endif
int distribute_irqs = 1; int distribute_irqs = 1;
...@@ -189,14 +192,30 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -189,14 +192,30 @@ int show_interrupts(struct seq_file *p, void *v)
for_each_online_cpu(j) for_each_online_cpu(j)
seq_printf(p, "CPU%d ", j); seq_printf(p, "CPU%d ", j);
seq_putc(p, '\n'); seq_putc(p, '\n');
} else if (i == nr_irqs) {
#if defined(CONFIG_PPC32) && defined(CONFIG_TAU_INT)
if (tau_initialized){
seq_puts(p, "TAU: ");
for_each_online_cpu(j)
seq_printf(p, "%10u ", tau_interrupts(j));
seq_puts(p, " PowerPC Thermal Assist (cpu temp)\n");
} }
#endif /* CONFIG_PPC32 && CONFIG_TAU_INT*/
seq_printf(p, "BAD: %10u\n", ppc_spurious_interrupts);
return 0;
}
desc = irq_to_desc(i);
if (!desc)
return 0;
if (i < NR_IRQS) {
desc = get_irq_desc(i);
spin_lock_irqsave(&desc->lock, flags); spin_lock_irqsave(&desc->lock, flags);
action = desc->action; action = desc->action;
if (!action || !action->handler) if (!action || !action->handler)
goto skip; goto skip;
seq_printf(p, "%3d: ", i); seq_printf(p, "%3d: ", i);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
for_each_online_cpu(j) for_each_online_cpu(j)
...@@ -204,51 +223,47 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -204,51 +223,47 @@ int show_interrupts(struct seq_file *p, void *v)
#else #else
seq_printf(p, "%10u ", kstat_irqs(i)); seq_printf(p, "%10u ", kstat_irqs(i));
#endif /* CONFIG_SMP */ #endif /* CONFIG_SMP */
if (desc->chip) if (desc->chip)
seq_printf(p, " %s ", desc->chip->typename); seq_printf(p, " %s ", desc->chip->name);
else else
seq_puts(p, " None "); seq_puts(p, " None ");
seq_printf(p, "%s", (desc->status & IRQ_LEVEL) ? "Level " : "Edge "); seq_printf(p, "%s", (desc->status & IRQ_LEVEL) ? "Level " : "Edge ");
seq_printf(p, " %s", action->name); seq_printf(p, " %s", action->name);
for (action = action->next; action; action = action->next) for (action = action->next; action; action = action->next)
seq_printf(p, ", %s", action->name); seq_printf(p, ", %s", action->name);
seq_putc(p, '\n'); seq_putc(p, '\n');
skip: skip:
spin_unlock_irqrestore(&desc->lock, flags); spin_unlock_irqrestore(&desc->lock, flags);
} else if (i == NR_IRQS) {
#if defined(CONFIG_PPC32) && defined(CONFIG_TAU_INT)
if (tau_initialized){
seq_puts(p, "TAU: ");
for_each_online_cpu(j)
seq_printf(p, "%10u ", tau_interrupts(j));
seq_puts(p, " PowerPC Thermal Assist (cpu temp)\n");
}
#endif /* CONFIG_PPC32 && CONFIG_TAU_INT*/
seq_printf(p, "BAD: %10u\n", ppc_spurious_interrupts);
}
return 0; return 0;
} }
#ifdef CONFIG_HOTPLUG_CPU #ifdef CONFIG_HOTPLUG_CPU
void fixup_irqs(cpumask_t map) void fixup_irqs(cpumask_t map)
{ {
struct irq_desc *desc;
unsigned int irq; unsigned int irq;
static int warned; static int warned;
for_each_irq(irq) { for_each_irq(irq) {
cpumask_t mask; cpumask_t mask;
if (irq_desc[irq].status & IRQ_PER_CPU) desc = irq_to_desc(irq);
if (desc && desc->status & IRQ_PER_CPU)
continue; continue;
cpumask_and(&mask, irq_desc[irq].affinity, &map); cpumask_and(&mask, desc->affinity, &map);
if (any_online_cpu(mask) == NR_CPUS) { if (any_online_cpu(mask) == NR_CPUS) {
printk("Breaking affinity for irq %i\n", irq); printk("Breaking affinity for irq %i\n", irq);
mask = map; mask = map;
} }
if (irq_desc[irq].chip->set_affinity) if (desc->chip->set_affinity)
irq_desc[irq].chip->set_affinity(irq, &mask); desc->chip->set_affinity(irq, &mask);
else if (irq_desc[irq].action && !(warned++)) else if (desc->action && !(warned++))
printk("Cannot set affinity for irq %i\n", irq); printk("Cannot set affinity for irq %i\n", irq);
} }
...@@ -275,7 +290,7 @@ static inline void handle_one_irq(unsigned int irq) ...@@ -275,7 +290,7 @@ static inline void handle_one_irq(unsigned int irq)
return; return;
} }
desc = irq_desc + irq; desc = irq_to_desc(irq);
saved_sp_limit = current->thread.ksp_limit; saved_sp_limit = current->thread.ksp_limit;
irqtp->task = curtp->task; irqtp->task = curtp->task;
...@@ -541,7 +556,7 @@ struct irq_host *irq_alloc_host(struct device_node *of_node, ...@@ -541,7 +556,7 @@ struct irq_host *irq_alloc_host(struct device_node *of_node,
smp_wmb(); smp_wmb();
/* Clear norequest flags */ /* Clear norequest flags */
get_irq_desc(i)->status &= ~IRQ_NOREQUEST; irq_to_desc(i)->status &= ~IRQ_NOREQUEST;
/* Legacy flags are left to default at this point, /* Legacy flags are left to default at this point,
* one can then use irq_create_mapping() to * one can then use irq_create_mapping() to
...@@ -607,8 +622,16 @@ void irq_set_virq_count(unsigned int count) ...@@ -607,8 +622,16 @@ void irq_set_virq_count(unsigned int count)
static int irq_setup_virq(struct irq_host *host, unsigned int virq, static int irq_setup_virq(struct irq_host *host, unsigned int virq,
irq_hw_number_t hwirq) irq_hw_number_t hwirq)
{ {
struct irq_desc *desc;
desc = irq_to_desc_alloc_node(virq, 0);
if (!desc) {
pr_debug("irq: -> allocating desc failed\n");
goto error;
}
/* Clear IRQ_NOREQUEST flag */ /* Clear IRQ_NOREQUEST flag */
get_irq_desc(virq)->status &= ~IRQ_NOREQUEST; desc->status &= ~IRQ_NOREQUEST;
/* map it */ /* map it */
smp_wmb(); smp_wmb();
...@@ -617,11 +640,14 @@ static int irq_setup_virq(struct irq_host *host, unsigned int virq, ...@@ -617,11 +640,14 @@ static int irq_setup_virq(struct irq_host *host, unsigned int virq,
if (host->ops->map(host, virq, hwirq)) { if (host->ops->map(host, virq, hwirq)) {
pr_debug("irq: -> mapping failed, freeing\n"); pr_debug("irq: -> mapping failed, freeing\n");
irq_free_virt(virq, 1); goto error;
return -1;
} }
return 0; return 0;
error:
irq_free_virt(virq, 1);
return -1;
} }
unsigned int irq_create_direct_mapping(struct irq_host *host) unsigned int irq_create_direct_mapping(struct irq_host *host)
...@@ -705,7 +731,7 @@ unsigned int irq_create_mapping(struct irq_host *host, ...@@ -705,7 +731,7 @@ unsigned int irq_create_mapping(struct irq_host *host,
EXPORT_SYMBOL_GPL(irq_create_mapping); EXPORT_SYMBOL_GPL(irq_create_mapping);
unsigned int irq_create_of_mapping(struct device_node *controller, unsigned int irq_create_of_mapping(struct device_node *controller,
u32 *intspec, unsigned int intsize) const u32 *intspec, unsigned int intsize)
{ {
struct irq_host *host; struct irq_host *host;
irq_hw_number_t hwirq; irq_hw_number_t hwirq;
...@@ -738,7 +764,7 @@ unsigned int irq_create_of_mapping(struct device_node *controller, ...@@ -738,7 +764,7 @@ unsigned int irq_create_of_mapping(struct device_node *controller,
/* Set type if specified and different than the current one */ /* Set type if specified and different than the current one */
if (type != IRQ_TYPE_NONE && if (type != IRQ_TYPE_NONE &&
type != (get_irq_desc(virq)->status & IRQF_TRIGGER_MASK)) type != (irq_to_desc(virq)->status & IRQF_TRIGGER_MASK))
set_irq_type(virq, type); set_irq_type(virq, type);
return virq; return virq;
} }
...@@ -810,7 +836,7 @@ void irq_dispose_mapping(unsigned int virq) ...@@ -810,7 +836,7 @@ void irq_dispose_mapping(unsigned int virq)
irq_map[virq].hwirq = host->inval_irq; irq_map[virq].hwirq = host->inval_irq;
/* Set some flags */ /* Set some flags */
get_irq_desc(virq)->status |= IRQ_NOREQUEST; irq_to_desc(virq)->status |= IRQ_NOREQUEST;
/* Free it */ /* Free it */
irq_free_virt(virq, 1); irq_free_virt(virq, 1);
...@@ -1002,12 +1028,24 @@ void irq_free_virt(unsigned int virq, unsigned int count) ...@@ -1002,12 +1028,24 @@ void irq_free_virt(unsigned int virq, unsigned int count)
spin_unlock_irqrestore(&irq_big_lock, flags); spin_unlock_irqrestore(&irq_big_lock, flags);
} }
void irq_early_init(void) int arch_early_irq_init(void)
{ {
unsigned int i; struct irq_desc *desc;
int i;
for (i = 0; i < NR_IRQS; i++) for (i = 0; i < NR_IRQS; i++) {
get_irq_desc(i)->status |= IRQ_NOREQUEST; desc = irq_to_desc(i);
if (desc)
desc->status |= IRQ_NOREQUEST;
}
return 0;
}
int arch_init_chip_data(struct irq_desc *desc, int node)
{
desc->status |= IRQ_NOREQUEST;
return 0;
} }
/* We need to create the radix trees late */ /* We need to create the radix trees late */
...@@ -1069,16 +1107,19 @@ static int virq_debug_show(struct seq_file *m, void *private) ...@@ -1069,16 +1107,19 @@ static int virq_debug_show(struct seq_file *m, void *private)
seq_printf(m, "%-5s %-7s %-15s %s\n", "virq", "hwirq", seq_printf(m, "%-5s %-7s %-15s %s\n", "virq", "hwirq",
"chip name", "host name"); "chip name", "host name");
for (i = 1; i < NR_IRQS; i++) { for (i = 1; i < nr_irqs; i++) {
desc = get_irq_desc(i); desc = irq_to_desc(i);
if (!desc)
continue;
spin_lock_irqsave(&desc->lock, flags); spin_lock_irqsave(&desc->lock, flags);
if (desc->action && desc->action->handler) { if (desc->action && desc->action->handler) {
seq_printf(m, "%5d ", i); seq_printf(m, "%5d ", i);
seq_printf(m, "0x%05lx ", virq_to_hw(i)); seq_printf(m, "0x%05lx ", virq_to_hw(i));
if (desc->chip && desc->chip->typename) if (desc->chip && desc->chip->name)
p = desc->chip->typename; p = desc->chip->name;
else else
p = none; p = none;
seq_printf(m, "%-15s ", p); seq_printf(m, "%-15s ", p);
......
...@@ -781,9 +781,9 @@ static int __init lparcfg_init(void) ...@@ -781,9 +781,9 @@ static int __init lparcfg_init(void)
!firmware_has_feature(FW_FEATURE_ISERIES)) !firmware_has_feature(FW_FEATURE_ISERIES))
mode |= S_IWUSR; mode |= S_IWUSR;
ent = proc_create("ppc64/lparcfg", mode, NULL, &lparcfg_fops); ent = proc_create("powerpc/lparcfg", mode, NULL, &lparcfg_fops);
if (!ent) { if (!ent) {
printk(KERN_ERR "Failed to create ppc64/lparcfg\n"); printk(KERN_ERR "Failed to create powerpc/lparcfg\n");
return -EIO; return -EIO;
} }
......
...@@ -502,15 +502,7 @@ _GLOBAL(clear_pages) ...@@ -502,15 +502,7 @@ _GLOBAL(clear_pages)
li r0,PAGE_SIZE/L1_CACHE_BYTES li r0,PAGE_SIZE/L1_CACHE_BYTES
slw r0,r0,r4 slw r0,r0,r4
mtctr r0 mtctr r0
#ifdef CONFIG_8xx
li r4, 0
1: stw r4, 0(r3)
stw r4, 4(r3)
stw r4, 8(r3)
stw r4, 12(r3)
#else
1: dcbz 0,r3 1: dcbz 0,r3
#endif
addi r3,r3,L1_CACHE_BYTES addi r3,r3,L1_CACHE_BYTES
bdnz 1b bdnz 1b
blr blr
...@@ -535,15 +527,6 @@ _GLOBAL(copy_page) ...@@ -535,15 +527,6 @@ _GLOBAL(copy_page)
addi r3,r3,-4 addi r3,r3,-4
addi r4,r4,-4 addi r4,r4,-4
#ifdef CONFIG_8xx
/* don't use prefetch on 8xx */
li r0,4096/L1_CACHE_BYTES
mtctr r0
1: COPY_16_BYTES
bdnz 1b
blr
#else /* not 8xx, we can prefetch */
li r5,4 li r5,4
#if MAX_COPY_PREFETCH > 1 #if MAX_COPY_PREFETCH > 1
...@@ -584,7 +567,6 @@ _GLOBAL(copy_page) ...@@ -584,7 +567,6 @@ _GLOBAL(copy_page)
li r0,MAX_COPY_PREFETCH li r0,MAX_COPY_PREFETCH
li r11,4 li r11,4
b 2b b 2b
#endif /* CONFIG_8xx */
/* /*
* void atomic_clear_mask(atomic_t mask, atomic_t *addr) * void atomic_clear_mask(atomic_t mask, atomic_t *addr)
......
...@@ -139,8 +139,8 @@ static ssize_t dev_nvram_write(struct file *file, const char __user *buf, ...@@ -139,8 +139,8 @@ static ssize_t dev_nvram_write(struct file *file, const char __user *buf,
} }
static int dev_nvram_ioctl(struct inode *inode, struct file *file, static long dev_nvram_ioctl(struct file *file, unsigned int cmd,
unsigned int cmd, unsigned long arg) unsigned long arg)
{ {
switch(cmd) { switch(cmd) {
#ifdef CONFIG_PPC_PMAC #ifdef CONFIG_PPC_PMAC
...@@ -173,7 +173,7 @@ const struct file_operations nvram_fops = { ...@@ -173,7 +173,7 @@ const struct file_operations nvram_fops = {
.llseek = dev_nvram_llseek, .llseek = dev_nvram_llseek,
.read = dev_nvram_read, .read = dev_nvram_read,
.write = dev_nvram_write, .write = dev_nvram_write,
.ioctl = dev_nvram_ioctl, .unlocked_ioctl = dev_nvram_ioctl,
}; };
static struct miscdevice nvram_dev = { static struct miscdevice nvram_dev = {
...@@ -184,7 +184,7 @@ static struct miscdevice nvram_dev = { ...@@ -184,7 +184,7 @@ static struct miscdevice nvram_dev = {
#ifdef DEBUG_NVRAM #ifdef DEBUG_NVRAM
static void nvram_print_partitions(char * label) static void __init nvram_print_partitions(char * label)
{ {
struct list_head * p; struct list_head * p;
struct nvram_partition * tmp_part; struct nvram_partition * tmp_part;
...@@ -202,7 +202,7 @@ static void nvram_print_partitions(char * label) ...@@ -202,7 +202,7 @@ static void nvram_print_partitions(char * label)
#endif #endif
static int nvram_write_header(struct nvram_partition * part) static int __init nvram_write_header(struct nvram_partition * part)
{ {
loff_t tmp_index; loff_t tmp_index;
int rc; int rc;
...@@ -214,7 +214,7 @@ static int nvram_write_header(struct nvram_partition * part) ...@@ -214,7 +214,7 @@ static int nvram_write_header(struct nvram_partition * part)
} }
static unsigned char nvram_checksum(struct nvram_header *p) static unsigned char __init nvram_checksum(struct nvram_header *p)
{ {
unsigned int c_sum, c_sum2; unsigned int c_sum, c_sum2;
unsigned short *sp = (unsigned short *)p->name; /* assume 6 shorts */ unsigned short *sp = (unsigned short *)p->name; /* assume 6 shorts */
...@@ -228,32 +228,7 @@ static unsigned char nvram_checksum(struct nvram_header *p) ...@@ -228,32 +228,7 @@ static unsigned char nvram_checksum(struct nvram_header *p)
return c_sum; return c_sum;
} }
static int __init nvram_remove_os_partition(void)
/*
* Find an nvram partition, sig can be 0 for any
* partition or name can be NULL for any name, else
* tries to match both
*/
struct nvram_partition *nvram_find_partition(int sig, const char *name)
{
struct nvram_partition * part;
struct list_head * p;
list_for_each(p, &nvram_part->partition) {
part = list_entry(p, struct nvram_partition, partition);
if (sig && part->header.signature != sig)
continue;
if (name && 0 != strncmp(name, part->header.name, 12))
continue;
return part;
}
return NULL;
}
EXPORT_SYMBOL(nvram_find_partition);
static int nvram_remove_os_partition(void)
{ {
struct list_head *i; struct list_head *i;
struct list_head *j; struct list_head *j;
...@@ -319,7 +294,7 @@ static int nvram_remove_os_partition(void) ...@@ -319,7 +294,7 @@ static int nvram_remove_os_partition(void)
* Will create a partition starting at the first free * Will create a partition starting at the first free
* space found if space has enough room. * space found if space has enough room.
*/ */
static int nvram_create_os_partition(void) static int __init nvram_create_os_partition(void)
{ {
struct nvram_partition *part; struct nvram_partition *part;
struct nvram_partition *new_part; struct nvram_partition *new_part;
...@@ -422,7 +397,7 @@ static int nvram_create_os_partition(void) ...@@ -422,7 +397,7 @@ static int nvram_create_os_partition(void)
* 5.) If the max chunk cannot be allocated then try finding a chunk * 5.) If the max chunk cannot be allocated then try finding a chunk
* that will satisfy the minum needed (NVRAM_MIN_REQ). * that will satisfy the minum needed (NVRAM_MIN_REQ).
*/ */
static int nvram_setup_partition(void) static int __init nvram_setup_partition(void)
{ {
struct list_head * p; struct list_head * p;
struct nvram_partition * part; struct nvram_partition * part;
...@@ -480,7 +455,7 @@ static int nvram_setup_partition(void) ...@@ -480,7 +455,7 @@ static int nvram_setup_partition(void)
} }
static int nvram_scan_partitions(void) static int __init nvram_scan_partitions(void)
{ {
loff_t cur_index = 0; loff_t cur_index = 0;
struct nvram_header phead; struct nvram_header phead;
...@@ -706,6 +681,9 @@ int nvram_clear_error_log(void) ...@@ -706,6 +681,9 @@ int nvram_clear_error_log(void)
int clear_word = ERR_FLAG_ALREADY_LOGGED; int clear_word = ERR_FLAG_ALREADY_LOGGED;
int rc; int rc;
if (nvram_error_log_index == -1)
return -1;
tmp_index = nvram_error_log_index; tmp_index = nvram_error_log_index;
rc = ppc_md.nvram_write((char *)&clear_word, sizeof(int), &tmp_index); rc = ppc_md.nvram_write((char *)&clear_word, sizeof(int), &tmp_index);
......
This diff is collapsed.
...@@ -96,8 +96,6 @@ EXPORT_SYMBOL(copy_4K_page); ...@@ -96,8 +96,6 @@ EXPORT_SYMBOL(copy_4K_page);
EXPORT_SYMBOL(isa_io_base); EXPORT_SYMBOL(isa_io_base);
EXPORT_SYMBOL(isa_mem_base); EXPORT_SYMBOL(isa_mem_base);
EXPORT_SYMBOL(pci_dram_offset); EXPORT_SYMBOL(pci_dram_offset);
EXPORT_SYMBOL(pci_alloc_consistent);
EXPORT_SYMBOL(pci_free_consistent);
#endif /* CONFIG_PCI */ #endif /* CONFIG_PCI */
EXPORT_SYMBOL(start_thread); EXPORT_SYMBOL(start_thread);
...@@ -162,7 +160,6 @@ EXPORT_SYMBOL(screen_info); ...@@ -162,7 +160,6 @@ EXPORT_SYMBOL(screen_info);
#ifdef CONFIG_PPC32 #ifdef CONFIG_PPC32
EXPORT_SYMBOL(timer_interrupt); EXPORT_SYMBOL(timer_interrupt);
EXPORT_SYMBOL(irq_desc);
EXPORT_SYMBOL(tb_ticks_per_jiffy); EXPORT_SYMBOL(tb_ticks_per_jiffy);
EXPORT_SYMBOL(cacheable_memcpy); EXPORT_SYMBOL(cacheable_memcpy);
EXPORT_SYMBOL(cacheable_memzero); EXPORT_SYMBOL(cacheable_memzero);
......
This diff is collapsed.
...@@ -356,11 +356,6 @@ void __init setup_system(void) ...@@ -356,11 +356,6 @@ void __init setup_system(void)
*/ */
initialize_cache_info(); initialize_cache_info();
/*
* Initialize irq remapping subsystem
*/
irq_early_init();
#ifdef CONFIG_PPC_RTAS #ifdef CONFIG_PPC_RTAS
/* /*
* Initialize RTAS if available * Initialize RTAS if available
......
This diff is collapsed.
This diff is collapsed.
...@@ -269,6 +269,7 @@ void account_system_vtime(struct task_struct *tsk) ...@@ -269,6 +269,7 @@ void account_system_vtime(struct task_struct *tsk)
per_cpu(cputime_scaled_last_delta, smp_processor_id()) = deltascaled; per_cpu(cputime_scaled_last_delta, smp_processor_id()) = deltascaled;
local_irq_restore(flags); local_irq_restore(flags);
} }
EXPORT_SYMBOL_GPL(account_system_vtime);
/* /*
* Transfer the user and system times accumulated in the paca * Transfer the user and system times accumulated in the paca
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment