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: (88 commits) powerpc: Fix lwsync feature fixup vs. modules on 64-bit powerpc: Convert pmc_owner_lock to raw_spinlock powerpc: Convert die.lock to raw_spinlock powerpc: Convert tlbivax_lock to raw_spinlock powerpc: Convert mpic locks to raw_spinlock powerpc: Convert pmac_pic_lock to raw_spinlock powerpc: Convert big_irq_lock to raw_spinlock powerpc: Convert feature_lock to raw_spinlock powerpc: Convert i8259_lock to raw_spinlock powerpc: Convert beat_htab_lock to raw_spinlock powerpc: Convert confirm_error_lock to raw_spinlock powerpc: Convert ipic_lock to raw_spinlock powerpc: Convert native_tlbie_lock to raw_spinlock powerpc: Convert beatic_irq_mask_lock to raw_spinlock powerpc: Convert nv_lock to raw_spinlock powerpc: Convert context_lock to raw_spinlock powerpc/85xx: Add NOR, LEDs and PIB support for MPC8568E-MDS boards powerpc/86xx: Enable VME driver on the GE SBC610 powerpc/86xx: Enable VME driver on the GE PPC9A powerpc/86xx: Add MSI section to GE PPC9A DTS ...
This commit is contained in:
Коммит
ef1a8de8ea
|
@ -0,0 +1,70 @@
|
||||||
|
MPC5121 PSC Device Tree Bindings
|
||||||
|
|
||||||
|
PSC in UART mode
|
||||||
|
----------------
|
||||||
|
|
||||||
|
For PSC in UART mode the needed PSC serial devices
|
||||||
|
are specified by fsl,mpc5121-psc-uart nodes in the
|
||||||
|
fsl,mpc5121-immr SoC node. Additionally the PSC FIFO
|
||||||
|
Controller node fsl,mpc5121-psc-fifo is requered there:
|
||||||
|
|
||||||
|
fsl,mpc5121-psc-uart nodes
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
Required properties :
|
||||||
|
- compatible : Should contain "fsl,mpc5121-psc-uart" and "fsl,mpc5121-psc"
|
||||||
|
- cell-index : Index of the PSC in hardware
|
||||||
|
- reg : Offset and length of the register set for the PSC device
|
||||||
|
- interrupts : <a b> where a is the interrupt number of the
|
||||||
|
PSC FIFO Controller and b is a field that represents an
|
||||||
|
encoding of the sense and level information for the interrupt.
|
||||||
|
- interrupt-parent : the phandle for the interrupt controller that
|
||||||
|
services interrupts for this device.
|
||||||
|
|
||||||
|
Recommended properties :
|
||||||
|
- fsl,rx-fifo-size : the size of the RX fifo slice (a multiple of 4)
|
||||||
|
- fsl,tx-fifo-size : the size of the TX fifo slice (a multiple of 4)
|
||||||
|
|
||||||
|
|
||||||
|
fsl,mpc5121-psc-fifo node
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
Required properties :
|
||||||
|
- compatible : Should be "fsl,mpc5121-psc-fifo"
|
||||||
|
- reg : Offset and length of the register set for the PSC
|
||||||
|
FIFO Controller
|
||||||
|
- interrupts : <a b> where a is the interrupt number of the
|
||||||
|
PSC FIFO Controller and b is a field that represents an
|
||||||
|
encoding of the sense and level information for the interrupt.
|
||||||
|
- interrupt-parent : the phandle for the interrupt controller that
|
||||||
|
services interrupts for this device.
|
||||||
|
|
||||||
|
|
||||||
|
Example for a board using PSC0 and PSC1 devices in serial mode:
|
||||||
|
|
||||||
|
serial@11000 {
|
||||||
|
compatible = "fsl,mpc5121-psc-uart", "fsl,mpc5121-psc";
|
||||||
|
cell-index = <0>;
|
||||||
|
reg = <0x11000 0x100>;
|
||||||
|
interrupts = <40 0x8>;
|
||||||
|
interrupt-parent = < &ipic >;
|
||||||
|
fsl,rx-fifo-size = <16>;
|
||||||
|
fsl,tx-fifo-size = <16>;
|
||||||
|
};
|
||||||
|
|
||||||
|
serial@11100 {
|
||||||
|
compatible = "fsl,mpc5121-psc-uart", "fsl,mpc5121-psc";
|
||||||
|
cell-index = <1>;
|
||||||
|
reg = <0x11100 0x100>;
|
||||||
|
interrupts = <40 0x8>;
|
||||||
|
interrupt-parent = < &ipic >;
|
||||||
|
fsl,rx-fifo-size = <16>;
|
||||||
|
fsl,tx-fifo-size = <16>;
|
||||||
|
};
|
||||||
|
|
||||||
|
pscfifo@11f00 {
|
||||||
|
compatible = "fsl,mpc5121-psc-fifo";
|
||||||
|
reg = <0x11f00 0x100>;
|
||||||
|
interrupts = <40 0x8>;
|
||||||
|
interrupt-parent = < &ipic >;
|
||||||
|
};
|
|
@ -13,6 +13,11 @@ Required properties:
|
||||||
- interrupt-parent : the phandle for the interrupt controller that
|
- interrupt-parent : the phandle for the interrupt controller that
|
||||||
services interrupts for this device.
|
services interrupts for this device.
|
||||||
|
|
||||||
|
Optional properties:
|
||||||
|
- gpios : specifies the gpio pins to be used for chipselects.
|
||||||
|
The gpios will be referred to as reg = <index> in the SPI child nodes.
|
||||||
|
If unspecified, a single SPI device without a chip select can be used.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
spi@4c0 {
|
spi@4c0 {
|
||||||
cell-index = <0>;
|
cell-index = <0>;
|
||||||
|
@ -21,4 +26,6 @@ Example:
|
||||||
interrupts = <82 0>;
|
interrupts = <82 0>;
|
||||||
interrupt-parent = <700>;
|
interrupt-parent = <700>;
|
||||||
mode = "cpu";
|
mode = "cpu";
|
||||||
|
gpios = <&gpio 18 1 // device reg=<0>
|
||||||
|
&gpio 19 1>; // device reg=<1>
|
||||||
};
|
};
|
||||||
|
|
|
@ -0,0 +1,134 @@
|
||||||
|
GDB intends to support the following hardware debug features of BookE
|
||||||
|
processors:
|
||||||
|
|
||||||
|
4 hardware breakpoints (IAC)
|
||||||
|
2 hardware watchpoints (read, write and read-write) (DAC)
|
||||||
|
2 value conditions for the hardware watchpoints (DVC)
|
||||||
|
|
||||||
|
For that, we need to extend ptrace so that GDB can query and set these
|
||||||
|
resources. Since we're extending, we're trying to create an interface
|
||||||
|
that's extendable and that covers both BookE and server processors, so
|
||||||
|
that GDB doesn't need to special-case each of them. We added the
|
||||||
|
following 3 new ptrace requests.
|
||||||
|
|
||||||
|
1. PTRACE_PPC_GETHWDEBUGINFO
|
||||||
|
|
||||||
|
Query for GDB to discover the hardware debug features. The main info to
|
||||||
|
be returned here is the minimum alignment for the hardware watchpoints.
|
||||||
|
BookE processors don't have restrictions here, but server processors have
|
||||||
|
an 8-byte alignment restriction for hardware watchpoints. We'd like to avoid
|
||||||
|
adding special cases to GDB based on what it sees in AUXV.
|
||||||
|
|
||||||
|
Since we're at it, we added other useful info that the kernel can return to
|
||||||
|
GDB: this query will return the number of hardware breakpoints, hardware
|
||||||
|
watchpoints and whether it supports a range of addresses and a condition.
|
||||||
|
The query will fill the following structure provided by the requesting process:
|
||||||
|
|
||||||
|
struct ppc_debug_info {
|
||||||
|
unit32_t version;
|
||||||
|
unit32_t num_instruction_bps;
|
||||||
|
unit32_t num_data_bps;
|
||||||
|
unit32_t num_condition_regs;
|
||||||
|
unit32_t data_bp_alignment;
|
||||||
|
unit32_t sizeof_condition; /* size of the DVC register */
|
||||||
|
uint64_t features; /* bitmask of the individual flags */
|
||||||
|
};
|
||||||
|
|
||||||
|
features will have bits indicating whether there is support for:
|
||||||
|
|
||||||
|
#define PPC_DEBUG_FEATURE_INSN_BP_RANGE 0x1
|
||||||
|
#define PPC_DEBUG_FEATURE_INSN_BP_MASK 0x2
|
||||||
|
#define PPC_DEBUG_FEATURE_DATA_BP_RANGE 0x4
|
||||||
|
#define PPC_DEBUG_FEATURE_DATA_BP_MASK 0x8
|
||||||
|
|
||||||
|
2. PTRACE_SETHWDEBUG
|
||||||
|
|
||||||
|
Sets a hardware breakpoint or watchpoint, according to the provided structure:
|
||||||
|
|
||||||
|
struct ppc_hw_breakpoint {
|
||||||
|
uint32_t version;
|
||||||
|
#define PPC_BREAKPOINT_TRIGGER_EXECUTE 0x1
|
||||||
|
#define PPC_BREAKPOINT_TRIGGER_READ 0x2
|
||||||
|
#define PPC_BREAKPOINT_TRIGGER_WRITE 0x4
|
||||||
|
uint32_t trigger_type; /* only some combinations allowed */
|
||||||
|
#define PPC_BREAKPOINT_MODE_EXACT 0x0
|
||||||
|
#define PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE 0x1
|
||||||
|
#define PPC_BREAKPOINT_MODE_RANGE_EXCLUSIVE 0x2
|
||||||
|
#define PPC_BREAKPOINT_MODE_MASK 0x3
|
||||||
|
uint32_t addr_mode; /* address match mode */
|
||||||
|
|
||||||
|
#define PPC_BREAKPOINT_CONDITION_MODE 0x3
|
||||||
|
#define PPC_BREAKPOINT_CONDITION_NONE 0x0
|
||||||
|
#define PPC_BREAKPOINT_CONDITION_AND 0x1
|
||||||
|
#define PPC_BREAKPOINT_CONDITION_EXACT 0x1 /* different name for the same thing as above */
|
||||||
|
#define PPC_BREAKPOINT_CONDITION_OR 0x2
|
||||||
|
#define PPC_BREAKPOINT_CONDITION_AND_OR 0x3
|
||||||
|
#define PPC_BREAKPOINT_CONDITION_BE_ALL 0x00ff0000 /* byte enable bits */
|
||||||
|
#define PPC_BREAKPOINT_CONDITION_BE(n) (1<<((n)+16))
|
||||||
|
uint32_t condition_mode; /* break/watchpoint condition flags */
|
||||||
|
|
||||||
|
uint64_t addr;
|
||||||
|
uint64_t addr2;
|
||||||
|
uint64_t condition_value;
|
||||||
|
};
|
||||||
|
|
||||||
|
A request specifies one event, not necessarily just one register to be set.
|
||||||
|
For instance, if the request is for a watchpoint with a condition, both the
|
||||||
|
DAC and DVC registers will be set in the same request.
|
||||||
|
|
||||||
|
With this GDB can ask for all kinds of hardware breakpoints and watchpoints
|
||||||
|
that the BookE supports. COMEFROM breakpoints available in server processors
|
||||||
|
are not contemplated, but that is out of the scope of this work.
|
||||||
|
|
||||||
|
ptrace will return an integer (handle) uniquely identifying the breakpoint or
|
||||||
|
watchpoint just created. This integer will be used in the PTRACE_DELHWDEBUG
|
||||||
|
request to ask for its removal. Return -ENOSPC if the requested breakpoint
|
||||||
|
can't be allocated on the registers.
|
||||||
|
|
||||||
|
Some examples of using the structure to:
|
||||||
|
|
||||||
|
- set a breakpoint in the first breakpoint register
|
||||||
|
|
||||||
|
p.version = PPC_DEBUG_CURRENT_VERSION;
|
||||||
|
p.trigger_type = PPC_BREAKPOINT_TRIGGER_EXECUTE;
|
||||||
|
p.addr_mode = PPC_BREAKPOINT_MODE_EXACT;
|
||||||
|
p.condition_mode = PPC_BREAKPOINT_CONDITION_NONE;
|
||||||
|
p.addr = (uint64_t) address;
|
||||||
|
p.addr2 = 0;
|
||||||
|
p.condition_value = 0;
|
||||||
|
|
||||||
|
- set a watchpoint which triggers on reads in the second watchpoint register
|
||||||
|
|
||||||
|
p.version = PPC_DEBUG_CURRENT_VERSION;
|
||||||
|
p.trigger_type = PPC_BREAKPOINT_TRIGGER_READ;
|
||||||
|
p.addr_mode = PPC_BREAKPOINT_MODE_EXACT;
|
||||||
|
p.condition_mode = PPC_BREAKPOINT_CONDITION_NONE;
|
||||||
|
p.addr = (uint64_t) address;
|
||||||
|
p.addr2 = 0;
|
||||||
|
p.condition_value = 0;
|
||||||
|
|
||||||
|
- set a watchpoint which triggers only with a specific value
|
||||||
|
|
||||||
|
p.version = PPC_DEBUG_CURRENT_VERSION;
|
||||||
|
p.trigger_type = PPC_BREAKPOINT_TRIGGER_READ;
|
||||||
|
p.addr_mode = PPC_BREAKPOINT_MODE_EXACT;
|
||||||
|
p.condition_mode = PPC_BREAKPOINT_CONDITION_AND | PPC_BREAKPOINT_CONDITION_BE_ALL;
|
||||||
|
p.addr = (uint64_t) address;
|
||||||
|
p.addr2 = 0;
|
||||||
|
p.condition_value = (uint64_t) condition;
|
||||||
|
|
||||||
|
- set a ranged hardware breakpoint
|
||||||
|
|
||||||
|
p.version = PPC_DEBUG_CURRENT_VERSION;
|
||||||
|
p.trigger_type = PPC_BREAKPOINT_TRIGGER_EXECUTE;
|
||||||
|
p.addr_mode = PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE;
|
||||||
|
p.condition_mode = PPC_BREAKPOINT_CONDITION_NONE;
|
||||||
|
p.addr = (uint64_t) begin_range;
|
||||||
|
p.addr2 = (uint64_t) end_range;
|
||||||
|
p.condition_value = 0;
|
||||||
|
|
||||||
|
3. PTRACE_DELHWDEBUG
|
||||||
|
|
||||||
|
Takes an integer which identifies an existing breakpoint or watchpoint
|
||||||
|
(i.e., the value returned from PTRACE_SETHWDEBUG), and deletes the
|
||||||
|
corresponding breakpoint or watchpoint..
|
|
@ -58,7 +58,7 @@ config IRQ_PER_CPU
|
||||||
|
|
||||||
config NR_IRQS
|
config NR_IRQS
|
||||||
int "Number of virtual interrupt numbers"
|
int "Number of virtual interrupt numbers"
|
||||||
range 32 512
|
range 32 32768
|
||||||
default "512"
|
default "512"
|
||||||
help
|
help
|
||||||
This defines the number of virtual interrupt numbers the kernel
|
This defines the number of virtual interrupt numbers the kernel
|
||||||
|
@ -241,6 +241,33 @@ config PPC_OF_PLATFORM_PCI
|
||||||
config ARCH_SUPPORTS_DEBUG_PAGEALLOC
|
config ARCH_SUPPORTS_DEBUG_PAGEALLOC
|
||||||
def_bool y
|
def_bool y
|
||||||
|
|
||||||
|
config PPC_ADV_DEBUG_REGS
|
||||||
|
bool
|
||||||
|
depends on 40x || BOOKE
|
||||||
|
default y
|
||||||
|
|
||||||
|
config PPC_ADV_DEBUG_IACS
|
||||||
|
int
|
||||||
|
depends on PPC_ADV_DEBUG_REGS
|
||||||
|
default 4 if 44x
|
||||||
|
default 2
|
||||||
|
|
||||||
|
config PPC_ADV_DEBUG_DACS
|
||||||
|
int
|
||||||
|
depends on PPC_ADV_DEBUG_REGS
|
||||||
|
default 2
|
||||||
|
|
||||||
|
config PPC_ADV_DEBUG_DVCS
|
||||||
|
int
|
||||||
|
depends on PPC_ADV_DEBUG_REGS
|
||||||
|
default 2 if 44x
|
||||||
|
default 0
|
||||||
|
|
||||||
|
config PPC_ADV_DEBUG_DAC_RANGE
|
||||||
|
bool
|
||||||
|
depends on PPC_ADV_DEBUG_REGS && 44x
|
||||||
|
default y
|
||||||
|
|
||||||
source "init/Kconfig"
|
source "init/Kconfig"
|
||||||
|
|
||||||
source "kernel/Kconfig.freezer"
|
source "kernel/Kconfig.freezer"
|
||||||
|
|
|
@ -60,6 +60,7 @@
|
||||||
d-cache-size = <32768>;
|
d-cache-size = <32768>;
|
||||||
dcr-controller;
|
dcr-controller;
|
||||||
dcr-access-method = "native";
|
dcr-access-method = "native";
|
||||||
|
next-level-cache = <&L2C0>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -146,6 +147,13 @@
|
||||||
dcr-reg = <0x010 0x002>;
|
dcr-reg = <0x010 0x002>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
CRYPTO: crypto@180000 {
|
||||||
|
compatible = "amcc,ppc460gt-crypto", "amcc,ppc4xx-crypto";
|
||||||
|
reg = <4 0x00180000 0x80400>;
|
||||||
|
interrupt-parent = <&UIC0>;
|
||||||
|
interrupts = <0x1d 0x4>;
|
||||||
|
};
|
||||||
|
|
||||||
MAL0: mcmal {
|
MAL0: mcmal {
|
||||||
compatible = "ibm,mcmal-460gt", "ibm,mcmal2";
|
compatible = "ibm,mcmal-460gt", "ibm,mcmal2";
|
||||||
dcr-reg = <0x180 0x062>;
|
dcr-reg = <0x180 0x062>;
|
||||||
|
@ -274,6 +282,7 @@
|
||||||
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 = "sgmii";
|
phy-mode = "sgmii";
|
||||||
phy-map = <0xffffffff>;
|
phy-map = <0xffffffff>;
|
||||||
gpcs-address = <0x0000000a>;
|
gpcs-address = <0x0000000a>;
|
||||||
|
@ -302,6 +311,7 @@
|
||||||
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 = "sgmii";
|
phy-mode = "sgmii";
|
||||||
phy-map = <0x00000000>;
|
phy-map = <0x00000000>;
|
||||||
gpcs-address = <0x0000000b>;
|
gpcs-address = <0x0000000b>;
|
||||||
|
@ -331,6 +341,8 @@
|
||||||
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 = "sgmii";
|
phy-mode = "sgmii";
|
||||||
phy-map = <0x00000001>;
|
phy-map = <0x00000001>;
|
||||||
gpcs-address = <0x0000000C>;
|
gpcs-address = <0x0000000C>;
|
||||||
|
|
|
@ -341,6 +341,22 @@
|
||||||
device_type = "open-pic";
|
device_type = "open-pic";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
msi@41600 {
|
||||||
|
compatible = "fsl,mpc8641-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>;
|
||||||
|
};
|
||||||
|
|
||||||
global-utilities@e0000 {
|
global-utilities@e0000 {
|
||||||
compatible = "fsl,mpc8641-guts";
|
compatible = "fsl,mpc8641-guts";
|
||||||
reg = <0xe0000 0x1000>;
|
reg = <0xe0000 0x1000>;
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
serial0 = &serial0;
|
serial0 = &serial0;
|
||||||
serial1 = &serial1;
|
serial1 = &serial1;
|
||||||
pci0 = &pci0;
|
pci0 = &pci0;
|
||||||
|
pci1 = &pci1;
|
||||||
};
|
};
|
||||||
|
|
||||||
cpus {
|
cpus {
|
||||||
|
@ -338,6 +339,22 @@
|
||||||
device_type = "open-pic";
|
device_type = "open-pic";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
msi@41600 {
|
||||||
|
compatible = "fsl,mpc8641-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>;
|
||||||
|
};
|
||||||
|
|
||||||
global-utilities@e0000 {
|
global-utilities@e0000 {
|
||||||
compatible = "fsl,mpc8641-guts";
|
compatible = "fsl,mpc8641-guts";
|
||||||
reg = <0xe0000 0x1000>;
|
reg = <0xe0000 0x1000>;
|
||||||
|
@ -358,7 +375,7 @@
|
||||||
clock-frequency = <33333333>;
|
clock-frequency = <33333333>;
|
||||||
interrupt-parent = <&mpic>;
|
interrupt-parent = <&mpic>;
|
||||||
interrupts = <0x18 0x2>;
|
interrupts = <0x18 0x2>;
|
||||||
interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
|
interrupt-map-mask = <0xff00 0x0 0x0 0x7>;
|
||||||
interrupt-map = <
|
interrupt-map = <
|
||||||
0x0000 0x0 0x0 0x1 &mpic 0x0 0x2
|
0x0000 0x0 0x0 0x1 &mpic 0x0 0x2
|
||||||
0x0000 0x0 0x0 0x2 &mpic 0x1 0x2
|
0x0000 0x0 0x0 0x2 &mpic 0x1 0x2
|
||||||
|
|
|
@ -84,6 +84,40 @@
|
||||||
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)
|
||||||
|
|
||||||
|
/* flash@0,0 is a mirror of part of the memory in flash@1,0
|
||||||
|
flash@0,0 {
|
||||||
|
compatible = "gef,sbc610-firmware-mirror", "cfi-flash";
|
||||||
|
reg = <0x0 0x0 0x1000000>;
|
||||||
|
bank-width = <4>;
|
||||||
|
device-width = <2>;
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
partition@0 {
|
||||||
|
label = "firmware";
|
||||||
|
reg = <0x0 0x1000000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
|
flash@1,0 {
|
||||||
|
compatible = "gef,sbc610-paged-flash", "cfi-flash";
|
||||||
|
reg = <0x1 0x0 0x8000000>;
|
||||||
|
bank-width = <4>;
|
||||||
|
device-width = <2>;
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
partition@0 {
|
||||||
|
label = "user";
|
||||||
|
reg = <0x0 0x7800000>;
|
||||||
|
};
|
||||||
|
partition@7800000 {
|
||||||
|
label = "firmware";
|
||||||
|
reg = <0x7800000 0x800000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
nvram@3,0 {
|
nvram@3,0 {
|
||||||
device_type = "nvram";
|
device_type = "nvram";
|
||||||
compatible = "simtek,stk14ca8";
|
compatible = "simtek,stk14ca8";
|
||||||
|
@ -305,6 +339,22 @@
|
||||||
device_type = "open-pic";
|
device_type = "open-pic";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
msi@41600 {
|
||||||
|
compatible = "fsl,mpc8641-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>;
|
||||||
|
};
|
||||||
|
|
||||||
global-utilities@e0000 {
|
global-utilities@e0000 {
|
||||||
compatible = "fsl,mpc8641-guts";
|
compatible = "fsl,mpc8641-guts";
|
||||||
reg = <0xe0000 0x1000>;
|
reg = <0xe0000 0x1000>;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Device Tree Source for AMCC Glacier (460GT)
|
* Device Tree Source for AMCC Glacier (460GT)
|
||||||
*
|
*
|
||||||
* Copyright 2008 DENX Software Engineering, Stefan Roese <sr@denx.de>
|
* Copyright 2008-2010 DENX Software Engineering, Stefan Roese <sr@denx.de>
|
||||||
*
|
*
|
||||||
* This file is licensed under the terms of the GNU General Public
|
* This file is licensed under the terms of the GNU General Public
|
||||||
* License version 2. This program is licensed "as is" without
|
* License version 2. This program is licensed "as is" without
|
||||||
|
@ -42,6 +42,7 @@
|
||||||
d-cache-size = <32768>;
|
d-cache-size = <32768>;
|
||||||
dcr-controller;
|
dcr-controller;
|
||||||
dcr-access-method = "native";
|
dcr-access-method = "native";
|
||||||
|
next-level-cache = <&L2C0>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -106,6 +107,16 @@
|
||||||
dcr-reg = <0x00c 0x002>;
|
dcr-reg = <0x00c 0x002>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
L2C0: l2c {
|
||||||
|
compatible = "ibm,l2-cache-460gt", "ibm,l2-cache";
|
||||||
|
dcr-reg = <0x020 0x008 /* Internal SRAM DCR's */
|
||||||
|
0x030 0x008>; /* L2 cache DCR's */
|
||||||
|
cache-line-size = <32>; /* 32 bytes */
|
||||||
|
cache-size = <262144>; /* L2, 256K */
|
||||||
|
interrupt-parent = <&UIC1>;
|
||||||
|
interrupts = <11 1>;
|
||||||
|
};
|
||||||
|
|
||||||
plb {
|
plb {
|
||||||
compatible = "ibm,plb-460gt", "ibm,plb4";
|
compatible = "ibm,plb-460gt", "ibm,plb4";
|
||||||
#address-cells = <2>;
|
#address-cells = <2>;
|
||||||
|
@ -118,6 +129,13 @@
|
||||||
dcr-reg = <0x010 0x002>;
|
dcr-reg = <0x010 0x002>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
CRYPTO: crypto@180000 {
|
||||||
|
compatible = "amcc,ppc460gt-crypto", "amcc,ppc4xx-crypto";
|
||||||
|
reg = <4 0x00180000 0x80400>;
|
||||||
|
interrupt-parent = <&UIC0>;
|
||||||
|
interrupts = <0x1d 0x4>;
|
||||||
|
};
|
||||||
|
|
||||||
MAL0: mcmal {
|
MAL0: mcmal {
|
||||||
compatible = "ibm,mcmal-460gt", "ibm,mcmal2";
|
compatible = "ibm,mcmal-460gt", "ibm,mcmal2";
|
||||||
dcr-reg = <0x180 0x062>;
|
dcr-reg = <0x180 0x062>;
|
||||||
|
@ -186,6 +204,29 @@
|
||||||
reg = <0x03fa0000 0x00060000>;
|
reg = <0x03fa0000 0x00060000>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ndfc@3,0 {
|
||||||
|
compatible = "ibm,ndfc";
|
||||||
|
reg = <0x00000003 0x00000000 0x00002000>;
|
||||||
|
ccr = <0x00001000>;
|
||||||
|
bank-settings = <0x80002222>;
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
nand {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
partition@0 {
|
||||||
|
label = "u-boot";
|
||||||
|
reg = <0x00000000 0x00100000>;
|
||||||
|
};
|
||||||
|
partition@100000 {
|
||||||
|
label = "user";
|
||||||
|
reg = <0x00000000 0x03f00000>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
UART0: serial@ef600300 {
|
UART0: serial@ef600300 {
|
||||||
|
@ -237,6 +278,20 @@
|
||||||
reg = <0xef600700 0x00000014>;
|
reg = <0xef600700 0x00000014>;
|
||||||
interrupt-parent = <&UIC0>;
|
interrupt-parent = <&UIC0>;
|
||||||
interrupts = <0x2 0x4>;
|
interrupts = <0x2 0x4>;
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
rtc@68 {
|
||||||
|
compatible = "stm,m41t80";
|
||||||
|
reg = <0x68>;
|
||||||
|
interrupt-parent = <&UIC2>;
|
||||||
|
interrupts = <0x19 0x8>;
|
||||||
|
};
|
||||||
|
sttm@48 {
|
||||||
|
compatible = "ad,ad7414";
|
||||||
|
reg = <0x48>;
|
||||||
|
interrupt-parent = <&UIC1>;
|
||||||
|
interrupts = <0x14 0x8>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
IIC1: i2c@ef600800 {
|
IIC1: i2c@ef600800 {
|
||||||
|
@ -275,7 +330,7 @@
|
||||||
|
|
||||||
EMAC0: ethernet@ef600e00 {
|
EMAC0: ethernet@ef600e00 {
|
||||||
device_type = "network";
|
device_type = "network";
|
||||||
compatible = "ibm,emac-460gt", "ibm,emac4";
|
compatible = "ibm,emac-460gt", "ibm,emac4sync";
|
||||||
interrupt-parent = <&EMAC0>;
|
interrupt-parent = <&EMAC0>;
|
||||||
interrupts = <0x0 0x1>;
|
interrupts = <0x0 0x1>;
|
||||||
#interrupt-cells = <1>;
|
#interrupt-cells = <1>;
|
||||||
|
@ -283,7 +338,7 @@
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
interrupt-map = </*Status*/ 0x0 &UIC2 0x10 0x4
|
interrupt-map = </*Status*/ 0x0 &UIC2 0x10 0x4
|
||||||
/*Wake*/ 0x1 &UIC2 0x14 0x4>;
|
/*Wake*/ 0x1 &UIC2 0x14 0x4>;
|
||||||
reg = <0xef600e00 0x00000074>;
|
reg = <0xef600e00 0x000000c4>;
|
||||||
local-mac-address = [000000000000]; /* Filled in by U-Boot */
|
local-mac-address = [000000000000]; /* Filled in by U-Boot */
|
||||||
mal-device = <&MAL0>;
|
mal-device = <&MAL0>;
|
||||||
mal-tx-channel = <0>;
|
mal-tx-channel = <0>;
|
||||||
|
@ -305,7 +360,7 @@
|
||||||
|
|
||||||
EMAC1: ethernet@ef600f00 {
|
EMAC1: ethernet@ef600f00 {
|
||||||
device_type = "network";
|
device_type = "network";
|
||||||
compatible = "ibm,emac-460gt", "ibm,emac4";
|
compatible = "ibm,emac-460gt", "ibm,emac4sync";
|
||||||
interrupt-parent = <&EMAC1>;
|
interrupt-parent = <&EMAC1>;
|
||||||
interrupts = <0x0 0x1>;
|
interrupts = <0x0 0x1>;
|
||||||
#interrupt-cells = <1>;
|
#interrupt-cells = <1>;
|
||||||
|
@ -313,7 +368,7 @@
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
interrupt-map = </*Status*/ 0x0 &UIC2 0x11 0x4
|
interrupt-map = </*Status*/ 0x0 &UIC2 0x11 0x4
|
||||||
/*Wake*/ 0x1 &UIC2 0x15 0x4>;
|
/*Wake*/ 0x1 &UIC2 0x15 0x4>;
|
||||||
reg = <0xef600f00 0x00000074>;
|
reg = <0xef600f00 0x000000c4>;
|
||||||
local-mac-address = [000000000000]; /* Filled in by U-Boot */
|
local-mac-address = [000000000000]; /* Filled in by U-Boot */
|
||||||
mal-device = <&MAL0>;
|
mal-device = <&MAL0>;
|
||||||
mal-tx-channel = <1>;
|
mal-tx-channel = <1>;
|
||||||
|
@ -336,7 +391,7 @@
|
||||||
|
|
||||||
EMAC2: ethernet@ef601100 {
|
EMAC2: ethernet@ef601100 {
|
||||||
device_type = "network";
|
device_type = "network";
|
||||||
compatible = "ibm,emac-460gt", "ibm,emac4";
|
compatible = "ibm,emac-460gt", "ibm,emac4sync";
|
||||||
interrupt-parent = <&EMAC2>;
|
interrupt-parent = <&EMAC2>;
|
||||||
interrupts = <0x0 0x1>;
|
interrupts = <0x0 0x1>;
|
||||||
#interrupt-cells = <1>;
|
#interrupt-cells = <1>;
|
||||||
|
@ -344,7 +399,7 @@
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
interrupt-map = </*Status*/ 0x0 &UIC2 0x12 0x4
|
interrupt-map = </*Status*/ 0x0 &UIC2 0x12 0x4
|
||||||
/*Wake*/ 0x1 &UIC2 0x16 0x4>;
|
/*Wake*/ 0x1 &UIC2 0x16 0x4>;
|
||||||
reg = <0xef601100 0x00000074>;
|
reg = <0xef601100 0x000000c4>;
|
||||||
local-mac-address = [000000000000]; /* Filled in by U-Boot */
|
local-mac-address = [000000000000]; /* Filled in by U-Boot */
|
||||||
mal-device = <&MAL0>;
|
mal-device = <&MAL0>;
|
||||||
mal-tx-channel = <2>;
|
mal-tx-channel = <2>;
|
||||||
|
@ -366,7 +421,7 @@
|
||||||
|
|
||||||
EMAC3: ethernet@ef601200 {
|
EMAC3: ethernet@ef601200 {
|
||||||
device_type = "network";
|
device_type = "network";
|
||||||
compatible = "ibm,emac-460gt", "ibm,emac4";
|
compatible = "ibm,emac-460gt", "ibm,emac4sync";
|
||||||
interrupt-parent = <&EMAC3>;
|
interrupt-parent = <&EMAC3>;
|
||||||
interrupts = <0x0 0x1>;
|
interrupts = <0x0 0x1>;
|
||||||
#interrupt-cells = <1>;
|
#interrupt-cells = <1>;
|
||||||
|
@ -374,7 +429,7 @@
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
interrupt-map = </*Status*/ 0x0 &UIC2 0x13 0x4
|
interrupt-map = </*Status*/ 0x0 &UIC2 0x13 0x4
|
||||||
/*Wake*/ 0x1 &UIC2 0x17 0x4>;
|
/*Wake*/ 0x1 &UIC2 0x17 0x4>;
|
||||||
reg = <0xef601200 0x00000074>;
|
reg = <0xef601200 0x000000c4>;
|
||||||
local-mac-address = [000000000000]; /* Filled in by U-Boot */
|
local-mac-address = [000000000000]; /* Filled in by U-Boot */
|
||||||
mal-device = <&MAL0>;
|
mal-device = <&MAL0>;
|
||||||
mal-tx-channel = <3>;
|
mal-tx-channel = <3>;
|
||||||
|
@ -414,6 +469,7 @@
|
||||||
* later cannot be changed
|
* later cannot be changed
|
||||||
*/
|
*/
|
||||||
ranges = <0x02000000 0x00000000 0x80000000 0x0000000d 0x80000000 0x00000000 0x80000000
|
ranges = <0x02000000 0x00000000 0x80000000 0x0000000d 0x80000000 0x00000000 0x80000000
|
||||||
|
0x02000000 0x00000000 0x00000000 0x0000000c 0x0ee00000 0x00000000 0x00100000
|
||||||
0x01000000 0x00000000 0x00000000 0x0000000c 0x08000000 0x00000000 0x00010000>;
|
0x01000000 0x00000000 0x00000000 0x0000000c 0x08000000 0x00000000 0x00010000>;
|
||||||
|
|
||||||
/* Inbound 2GB range starting at 0 */
|
/* Inbound 2GB range starting at 0 */
|
||||||
|
@ -444,6 +500,7 @@
|
||||||
* later cannot be changed
|
* later cannot be changed
|
||||||
*/
|
*/
|
||||||
ranges = <0x02000000 0x00000000 0x80000000 0x0000000e 0x00000000 0x00000000 0x80000000
|
ranges = <0x02000000 0x00000000 0x80000000 0x0000000e 0x00000000 0x00000000 0x80000000
|
||||||
|
0x02000000 0x00000000 0x00000000 0x0000000f 0x00000000 0x00000000 0x00100000
|
||||||
0x01000000 0x00000000 0x00000000 0x0000000f 0x80000000 0x00000000 0x00010000>;
|
0x01000000 0x00000000 0x00000000 0x0000000f 0x80000000 0x00000000 0x00010000>;
|
||||||
|
|
||||||
/* Inbound 2GB range starting at 0 */
|
/* Inbound 2GB range starting at 0 */
|
||||||
|
@ -485,6 +542,7 @@
|
||||||
* later cannot be changed
|
* later cannot be changed
|
||||||
*/
|
*/
|
||||||
ranges = <0x02000000 0x00000000 0x80000000 0x0000000e 0x80000000 0x00000000 0x80000000
|
ranges = <0x02000000 0x00000000 0x80000000 0x0000000e 0x80000000 0x00000000 0x80000000
|
||||||
|
0x02000000 0x00000000 0x00000000 0x0000000f 0x00100000 0x00000000 0x00100000
|
||||||
0x01000000 0x00000000 0x00000000 0x0000000f 0x80010000 0x00000000 0x00010000>;
|
0x01000000 0x00000000 0x00000000 0x0000000f 0x80010000 0x00000000 0x00010000>;
|
||||||
|
|
||||||
/* Inbound 2GB range starting at 0 */
|
/* Inbound 2GB range starting at 0 */
|
||||||
|
|
|
@ -156,7 +156,7 @@
|
||||||
compatible = "ibm,opb-440spe", "ibm,opb-440gp", "ibm,opb";
|
compatible = "ibm,opb-440spe", "ibm,opb-440gp", "ibm,opb";
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <1>;
|
#size-cells = <1>;
|
||||||
ranges = <0x00000000 0x00000004 0xe0000000 0x20000000>;
|
ranges = <0xe0000000 0x00000004 0xe0000000 0x20000000>;
|
||||||
clock-frequency = <0>; /* Filled in by zImage */
|
clock-frequency = <0>; /* Filled in by zImage */
|
||||||
|
|
||||||
EBC0: ebc {
|
EBC0: ebc {
|
||||||
|
@ -165,14 +165,47 @@
|
||||||
#address-cells = <2>;
|
#address-cells = <2>;
|
||||||
#size-cells = <1>;
|
#size-cells = <1>;
|
||||||
clock-frequency = <0>; /* Filled in by zImage */
|
clock-frequency = <0>; /* Filled in by zImage */
|
||||||
|
/* ranges property is supplied by U-Boot */
|
||||||
interrupts = <0x5 0x1>;
|
interrupts = <0x5 0x1>;
|
||||||
interrupt-parent = <&UIC1>;
|
interrupt-parent = <&UIC1>;
|
||||||
|
|
||||||
|
nor_flash@0,0 {
|
||||||
|
compatible = "cfi-flash";
|
||||||
|
bank-width = <2>;
|
||||||
|
reg = <0x00000000 0x00000000 0x01000000>;
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
partition@0 {
|
||||||
|
label = "kernel";
|
||||||
|
reg = <0x00000000 0x001e0000>;
|
||||||
|
};
|
||||||
|
partition@1e0000 {
|
||||||
|
label = "dtb";
|
||||||
|
reg = <0x001e0000 0x00020000>;
|
||||||
|
};
|
||||||
|
partition@200000 {
|
||||||
|
label = "root";
|
||||||
|
reg = <0x00200000 0x00200000>;
|
||||||
|
};
|
||||||
|
partition@400000 {
|
||||||
|
label = "user";
|
||||||
|
reg = <0x00400000 0x00b60000>;
|
||||||
|
};
|
||||||
|
partition@f60000 {
|
||||||
|
label = "env";
|
||||||
|
reg = <0x00f60000 0x00040000>;
|
||||||
|
};
|
||||||
|
partition@fa0000 {
|
||||||
|
label = "u-boot";
|
||||||
|
reg = <0x00fa0000 0x00060000>;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
UART0: serial@10000200 {
|
UART0: serial@f0000200 {
|
||||||
device_type = "serial";
|
device_type = "serial";
|
||||||
compatible = "ns16550";
|
compatible = "ns16550";
|
||||||
reg = <0x10000200 0x00000008>;
|
reg = <0xf0000200 0x00000008>;
|
||||||
virtual-reg = <0xa0000200>;
|
virtual-reg = <0xa0000200>;
|
||||||
clock-frequency = <0>; /* Filled in by zImage */
|
clock-frequency = <0>; /* Filled in by zImage */
|
||||||
current-speed = <115200>;
|
current-speed = <115200>;
|
||||||
|
@ -180,10 +213,10 @@
|
||||||
interrupts = <0x0 0x4>;
|
interrupts = <0x0 0x4>;
|
||||||
};
|
};
|
||||||
|
|
||||||
UART1: serial@10000300 {
|
UART1: serial@f0000300 {
|
||||||
device_type = "serial";
|
device_type = "serial";
|
||||||
compatible = "ns16550";
|
compatible = "ns16550";
|
||||||
reg = <0x10000300 0x00000008>;
|
reg = <0xf0000300 0x00000008>;
|
||||||
virtual-reg = <0xa0000300>;
|
virtual-reg = <0xa0000300>;
|
||||||
clock-frequency = <0>;
|
clock-frequency = <0>;
|
||||||
current-speed = <0>;
|
current-speed = <0>;
|
||||||
|
@ -192,10 +225,10 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
UART2: serial@10000600 {
|
UART2: serial@f0000600 {
|
||||||
device_type = "serial";
|
device_type = "serial";
|
||||||
compatible = "ns16550";
|
compatible = "ns16550";
|
||||||
reg = <0x10000600 0x00000008>;
|
reg = <0xf0000600 0x00000008>;
|
||||||
virtual-reg = <0xa0000600>;
|
virtual-reg = <0xa0000600>;
|
||||||
clock-frequency = <0>;
|
clock-frequency = <0>;
|
||||||
current-speed = <0>;
|
current-speed = <0>;
|
||||||
|
@ -203,27 +236,27 @@
|
||||||
interrupts = <0x5 0x4>;
|
interrupts = <0x5 0x4>;
|
||||||
};
|
};
|
||||||
|
|
||||||
IIC0: i2c@10000400 {
|
IIC0: i2c@f0000400 {
|
||||||
compatible = "ibm,iic-440spe", "ibm,iic-440gp", "ibm,iic";
|
compatible = "ibm,iic-440spe", "ibm,iic-440gp", "ibm,iic";
|
||||||
reg = <0x10000400 0x00000014>;
|
reg = <0xf0000400 0x00000014>;
|
||||||
interrupt-parent = <&UIC0>;
|
interrupt-parent = <&UIC0>;
|
||||||
interrupts = <0x2 0x4>;
|
interrupts = <0x2 0x4>;
|
||||||
};
|
};
|
||||||
|
|
||||||
IIC1: i2c@10000500 {
|
IIC1: i2c@f0000500 {
|
||||||
compatible = "ibm,iic-440spe", "ibm,iic-440gp", "ibm,iic";
|
compatible = "ibm,iic-440spe", "ibm,iic-440gp", "ibm,iic";
|
||||||
reg = <0x10000500 0x00000014>;
|
reg = <0xf0000500 0x00000014>;
|
||||||
interrupt-parent = <&UIC0>;
|
interrupt-parent = <&UIC0>;
|
||||||
interrupts = <0x3 0x4>;
|
interrupts = <0x3 0x4>;
|
||||||
};
|
};
|
||||||
|
|
||||||
EMAC0: ethernet@10000800 {
|
EMAC0: ethernet@f0000800 {
|
||||||
linux,network-index = <0x0>;
|
linux,network-index = <0x0>;
|
||||||
device_type = "network";
|
device_type = "network";
|
||||||
compatible = "ibm,emac-440spe", "ibm,emac4";
|
compatible = "ibm,emac-440spe", "ibm,emac4";
|
||||||
interrupt-parent = <&UIC1>;
|
interrupt-parent = <&UIC1>;
|
||||||
interrupts = <0x1c 0x4 0x1d 0x4>;
|
interrupts = <0x1c 0x4 0x1d 0x4>;
|
||||||
reg = <0x10000800 0x00000074>;
|
reg = <0xf0000800 0x00000074>;
|
||||||
local-mac-address = [000000000000];
|
local-mac-address = [000000000000];
|
||||||
mal-device = <&MAL0>;
|
mal-device = <&MAL0>;
|
||||||
mal-tx-channel = <0>;
|
mal-tx-channel = <0>;
|
||||||
|
@ -453,6 +486,6 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
chosen {
|
chosen {
|
||||||
linux,stdout-path = "/plb/opb/serial@10000200";
|
linux,stdout-path = "/plb/opb/serial@f0000200";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -62,17 +62,12 @@
|
||||||
interrupt-parent = < &ipic >;
|
interrupt-parent = < &ipic >;
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <1>;
|
#size-cells = <1>;
|
||||||
bank-width = <1>;
|
|
||||||
// ADS has two Hynix 512MB Nand flash chips in a single
|
// ADS has two Hynix 512MB Nand flash chips in a single
|
||||||
// stacked package .
|
// stacked package.
|
||||||
chips = <2>;
|
chips = <2>;
|
||||||
nand0@0 {
|
nand@0 {
|
||||||
label = "nand0";
|
label = "nand";
|
||||||
reg = <0x00000000 0x02000000>; // first 32 MB of chip 0
|
reg = <0x00000000 0x40000000>; // 512MB + 512MB
|
||||||
};
|
|
||||||
nand1@20000000 {
|
|
||||||
label = "nand1";
|
|
||||||
reg = <0x20000000 0x02000000>; // first 32 MB of chip 1
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -166,6 +161,11 @@
|
||||||
interrupt-parent = < &ipic >;
|
interrupt-parent = < &ipic >;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
reset@e00 { // Reset module
|
||||||
|
compatible = "fsl,mpc5121-reset";
|
||||||
|
reg = <0xe00 0x100>;
|
||||||
|
};
|
||||||
|
|
||||||
clock@f00 { // Clock control
|
clock@f00 { // Clock control
|
||||||
compatible = "fsl,mpc5121-clock";
|
compatible = "fsl,mpc5121-clock";
|
||||||
reg = <0xf00 0x100>;
|
reg = <0xf00 0x100>;
|
||||||
|
@ -185,17 +185,15 @@
|
||||||
interrupt-parent = < &ipic >;
|
interrupt-parent = < &ipic >;
|
||||||
};
|
};
|
||||||
|
|
||||||
mscan@1300 {
|
can@1300 {
|
||||||
compatible = "fsl,mpc5121-mscan";
|
compatible = "fsl,mpc5121-mscan";
|
||||||
cell-index = <0>;
|
|
||||||
interrupts = <12 0x8>;
|
interrupts = <12 0x8>;
|
||||||
interrupt-parent = < &ipic >;
|
interrupt-parent = < &ipic >;
|
||||||
reg = <0x1300 0x80>;
|
reg = <0x1300 0x80>;
|
||||||
};
|
};
|
||||||
|
|
||||||
mscan@1380 {
|
can@1380 {
|
||||||
compatible = "fsl,mpc5121-mscan";
|
compatible = "fsl,mpc5121-mscan";
|
||||||
cell-index = <1>;
|
|
||||||
interrupts = <13 0x8>;
|
interrupts = <13 0x8>;
|
||||||
interrupt-parent = < &ipic >;
|
interrupt-parent = < &ipic >;
|
||||||
reg = <0x1380 0x80>;
|
reg = <0x1380 0x80>;
|
||||||
|
@ -205,17 +203,31 @@
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
compatible = "fsl,mpc5121-i2c", "fsl-i2c";
|
compatible = "fsl,mpc5121-i2c", "fsl-i2c";
|
||||||
cell-index = <0>;
|
|
||||||
reg = <0x1700 0x20>;
|
reg = <0x1700 0x20>;
|
||||||
interrupts = <9 0x8>;
|
interrupts = <9 0x8>;
|
||||||
interrupt-parent = < &ipic >;
|
interrupt-parent = < &ipic >;
|
||||||
|
fsl,preserve-clocking;
|
||||||
|
|
||||||
|
hwmon@4a {
|
||||||
|
compatible = "adi,ad7414";
|
||||||
|
reg = <0x4a>;
|
||||||
|
};
|
||||||
|
|
||||||
|
eeprom@50 {
|
||||||
|
compatible = "at,24c32";
|
||||||
|
reg = <0x50>;
|
||||||
|
};
|
||||||
|
|
||||||
|
rtc@68 {
|
||||||
|
compatible = "stm,m41t62";
|
||||||
|
reg = <0x68>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
i2c@1720 {
|
i2c@1720 {
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
compatible = "fsl,mpc5121-i2c", "fsl-i2c";
|
compatible = "fsl,mpc5121-i2c", "fsl-i2c";
|
||||||
cell-index = <1>;
|
|
||||||
reg = <0x1720 0x20>;
|
reg = <0x1720 0x20>;
|
||||||
interrupts = <10 0x8>;
|
interrupts = <10 0x8>;
|
||||||
interrupt-parent = < &ipic >;
|
interrupt-parent = < &ipic >;
|
||||||
|
@ -225,7 +237,6 @@
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
compatible = "fsl,mpc5121-i2c", "fsl-i2c";
|
compatible = "fsl,mpc5121-i2c", "fsl-i2c";
|
||||||
cell-index = <2>;
|
|
||||||
reg = <0x1740 0x20>;
|
reg = <0x1740 0x20>;
|
||||||
interrupts = <11 0x8>;
|
interrupts = <11 0x8>;
|
||||||
interrupt-parent = < &ipic >;
|
interrupt-parent = < &ipic >;
|
||||||
|
@ -244,7 +255,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
display@2100 {
|
display@2100 {
|
||||||
compatible = "fsl,mpc5121-diu", "fsl-diu";
|
compatible = "fsl,mpc5121-diu";
|
||||||
reg = <0x2100 0x100>;
|
reg = <0x2100 0x100>;
|
||||||
interrupts = <64 0x8>;
|
interrupts = <64 0x8>;
|
||||||
interrupt-parent = < &ipic >;
|
interrupt-parent = < &ipic >;
|
||||||
|
@ -277,7 +288,7 @@
|
||||||
|
|
||||||
// USB1 using external ULPI PHY
|
// USB1 using external ULPI PHY
|
||||||
//usb@3000 {
|
//usb@3000 {
|
||||||
// compatible = "fsl,mpc5121-usb2-dr", "fsl-usb2-dr";
|
// compatible = "fsl,mpc5121-usb2-dr";
|
||||||
// reg = <0x3000 0x1000>;
|
// reg = <0x3000 0x1000>;
|
||||||
// #address-cells = <1>;
|
// #address-cells = <1>;
|
||||||
// #size-cells = <0>;
|
// #size-cells = <0>;
|
||||||
|
@ -285,12 +296,11 @@
|
||||||
// interrupts = <43 0x8>;
|
// interrupts = <43 0x8>;
|
||||||
// dr_mode = "otg";
|
// dr_mode = "otg";
|
||||||
// phy_type = "ulpi";
|
// phy_type = "ulpi";
|
||||||
// port1;
|
|
||||||
//};
|
//};
|
||||||
|
|
||||||
// USB0 using internal UTMI PHY
|
// USB0 using internal UTMI PHY
|
||||||
usb@4000 {
|
usb@4000 {
|
||||||
compatible = "fsl,mpc5121-usb2-dr", "fsl-usb2-dr";
|
compatible = "fsl,mpc5121-usb2-dr";
|
||||||
reg = <0x4000 0x1000>;
|
reg = <0x4000 0x1000>;
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
|
@ -298,7 +308,8 @@
|
||||||
interrupts = <44 0x8>;
|
interrupts = <44 0x8>;
|
||||||
dr_mode = "otg";
|
dr_mode = "otg";
|
||||||
phy_type = "utmi_wide";
|
phy_type = "utmi_wide";
|
||||||
port0;
|
fsl,invert-drvvbus;
|
||||||
|
fsl,invert-pwr-fault;
|
||||||
};
|
};
|
||||||
|
|
||||||
// IO control
|
// IO control
|
||||||
|
@ -365,7 +376,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
dma@14000 {
|
dma@14000 {
|
||||||
compatible = "fsl,mpc5121-dma2";
|
compatible = "fsl,mpc5121-dma";
|
||||||
reg = <0x14000 0x1800>;
|
reg = <0x14000 0x1800>;
|
||||||
interrupts = <65 0x8>;
|
interrupts = <65 0x8>;
|
||||||
interrupt-parent = < &ipic >;
|
interrupt-parent = < &ipic >;
|
||||||
|
|
|
@ -54,9 +54,52 @@
|
||||||
reg = <0x0 0x10000000>;
|
reg = <0x0 0x10000000>;
|
||||||
};
|
};
|
||||||
|
|
||||||
bcsr@f8000000 {
|
localbus@e0005000 {
|
||||||
|
#address-cells = <2>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
compatible = "fsl,mpc8568-localbus", "fsl,pq3-localbus",
|
||||||
|
"simple-bus";
|
||||||
|
reg = <0xe0005000 0x1000>;
|
||||||
|
|
||||||
|
ranges = <0x0 0x0 0xfe000000 0x02000000
|
||||||
|
0x1 0x0 0xf8000000 0x00008000
|
||||||
|
0x2 0x0 0xf0000000 0x04000000
|
||||||
|
0x4 0x0 0xf8008000 0x00008000
|
||||||
|
0x5 0x0 0xf8010000 0x00008000>;
|
||||||
|
|
||||||
|
nor@0,0 {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
compatible = "cfi-flash";
|
||||||
|
reg = <0x0 0x0 0x02000000>;
|
||||||
|
bank-width = <2>;
|
||||||
|
device-width = <2>;
|
||||||
|
};
|
||||||
|
|
||||||
|
bcsr@1,0 {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
compatible = "fsl,mpc8568mds-bcsr";
|
compatible = "fsl,mpc8568mds-bcsr";
|
||||||
reg = <0xf8000000 0x8000>;
|
reg = <1 0 0x8000>;
|
||||||
|
ranges = <0 1 0 0x8000>;
|
||||||
|
|
||||||
|
bcsr5: gpio-controller@11 {
|
||||||
|
#gpio-cells = <2>;
|
||||||
|
compatible = "fsl,mpc8568mds-bcsr-gpio";
|
||||||
|
reg = <0x5 0x1>;
|
||||||
|
gpio-controller;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
pib@4,0 {
|
||||||
|
compatible = "fsl,mpc8568mds-pib";
|
||||||
|
reg = <4 0 0x8000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
pib@5,0 {
|
||||||
|
compatible = "fsl,mpc8568mds-pib";
|
||||||
|
reg = <5 0 0x8000>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
soc8568@e0000000 {
|
soc8568@e0000000 {
|
||||||
|
@ -610,4 +653,20 @@
|
||||||
sleep = <&pmc 0x00080000 /* controller */
|
sleep = <&pmc 0x00080000 /* controller */
|
||||||
&pmc 0x00040000>; /* message unit */
|
&pmc 0x00040000>; /* message unit */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
leds {
|
||||||
|
compatible = "gpio-leds";
|
||||||
|
|
||||||
|
green {
|
||||||
|
gpios = <&bcsr5 1 0>;
|
||||||
|
};
|
||||||
|
|
||||||
|
amber {
|
||||||
|
gpios = <&bcsr5 2 0>;
|
||||||
|
};
|
||||||
|
|
||||||
|
red {
|
||||||
|
gpios = <&bcsr5 3 0>;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#
|
#
|
||||||
# Automatically generated make config: don't edit
|
# Automatically generated make config: don't edit
|
||||||
# Linux kernel version: 2.6.33-rc1
|
# Linux kernel version: 2.6.33-rc5
|
||||||
# Mon Jan 4 14:55:34 2010
|
# Tue Jan 26 14:40:58 2010
|
||||||
#
|
#
|
||||||
# CONFIG_PPC64 is not set
|
# CONFIG_PPC64 is not set
|
||||||
|
|
||||||
|
@ -106,6 +106,7 @@ CONFIG_INITRAMFS_SOURCE=""
|
||||||
CONFIG_RD_GZIP=y
|
CONFIG_RD_GZIP=y
|
||||||
# CONFIG_RD_BZIP2 is not set
|
# CONFIG_RD_BZIP2 is not set
|
||||||
# CONFIG_RD_LZMA is not set
|
# CONFIG_RD_LZMA is not set
|
||||||
|
# CONFIG_RD_LZO is not set
|
||||||
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
|
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
|
||||||
CONFIG_SYSCTL=y
|
CONFIG_SYSCTL=y
|
||||||
CONFIG_ANON_INODES=y
|
CONFIG_ANON_INODES=y
|
||||||
|
@ -442,7 +443,90 @@ CONFIG_EXTRA_FIRMWARE=""
|
||||||
# CONFIG_SYS_HYPERVISOR is not set
|
# CONFIG_SYS_HYPERVISOR is not set
|
||||||
CONFIG_CONNECTOR=y
|
CONFIG_CONNECTOR=y
|
||||||
CONFIG_PROC_EVENTS=y
|
CONFIG_PROC_EVENTS=y
|
||||||
# CONFIG_MTD is not set
|
CONFIG_MTD=y
|
||||||
|
# CONFIG_MTD_DEBUG is not set
|
||||||
|
# CONFIG_MTD_TESTS is not set
|
||||||
|
# CONFIG_MTD_CONCAT is not set
|
||||||
|
CONFIG_MTD_PARTITIONS=y
|
||||||
|
# CONFIG_MTD_REDBOOT_PARTS is not set
|
||||||
|
CONFIG_MTD_CMDLINE_PARTS=y
|
||||||
|
CONFIG_MTD_OF_PARTS=y
|
||||||
|
# CONFIG_MTD_AR7_PARTS is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# User Modules And Translation Layers
|
||||||
|
#
|
||||||
|
CONFIG_MTD_CHAR=y
|
||||||
|
CONFIG_MTD_BLKDEVS=y
|
||||||
|
CONFIG_MTD_BLOCK=y
|
||||||
|
# CONFIG_FTL is not set
|
||||||
|
# CONFIG_NFTL is not set
|
||||||
|
# CONFIG_INFTL is not set
|
||||||
|
# CONFIG_RFD_FTL is not set
|
||||||
|
# CONFIG_SSFDC is not set
|
||||||
|
# CONFIG_MTD_OOPS is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# RAM/ROM/Flash chip drivers
|
||||||
|
#
|
||||||
|
CONFIG_MTD_CFI=y
|
||||||
|
# CONFIG_MTD_JEDECPROBE is not set
|
||||||
|
CONFIG_MTD_GEN_PROBE=y
|
||||||
|
# CONFIG_MTD_CFI_ADV_OPTIONS is not set
|
||||||
|
CONFIG_MTD_MAP_BANK_WIDTH_1=y
|
||||||
|
CONFIG_MTD_MAP_BANK_WIDTH_2=y
|
||||||
|
CONFIG_MTD_MAP_BANK_WIDTH_4=y
|
||||||
|
# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
|
||||||
|
# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
|
||||||
|
# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
|
||||||
|
CONFIG_MTD_CFI_I1=y
|
||||||
|
CONFIG_MTD_CFI_I2=y
|
||||||
|
# CONFIG_MTD_CFI_I4 is not set
|
||||||
|
# CONFIG_MTD_CFI_I8 is not set
|
||||||
|
# CONFIG_MTD_CFI_INTELEXT is not set
|
||||||
|
CONFIG_MTD_CFI_AMDSTD=y
|
||||||
|
# CONFIG_MTD_CFI_STAA is not set
|
||||||
|
CONFIG_MTD_CFI_UTIL=y
|
||||||
|
# CONFIG_MTD_RAM is not set
|
||||||
|
# CONFIG_MTD_ROM is not set
|
||||||
|
# CONFIG_MTD_ABSENT is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# Mapping drivers for chip access
|
||||||
|
#
|
||||||
|
# CONFIG_MTD_COMPLEX_MAPPINGS is not set
|
||||||
|
# CONFIG_MTD_PHYSMAP is not set
|
||||||
|
CONFIG_MTD_PHYSMAP_OF=y
|
||||||
|
# CONFIG_MTD_INTEL_VR_NOR is not set
|
||||||
|
# CONFIG_MTD_PLATRAM is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# Self-contained MTD device drivers
|
||||||
|
#
|
||||||
|
# CONFIG_MTD_PMC551 is not set
|
||||||
|
# CONFIG_MTD_SLRAM is not set
|
||||||
|
# CONFIG_MTD_PHRAM is not set
|
||||||
|
# CONFIG_MTD_MTDRAM is not set
|
||||||
|
# CONFIG_MTD_BLOCK2MTD is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# Disk-On-Chip Device Drivers
|
||||||
|
#
|
||||||
|
# CONFIG_MTD_DOC2000 is not set
|
||||||
|
# CONFIG_MTD_DOC2001 is not set
|
||||||
|
# CONFIG_MTD_DOC2001PLUS is not set
|
||||||
|
# CONFIG_MTD_NAND is not set
|
||||||
|
# CONFIG_MTD_ONENAND is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# LPDDR flash memory drivers
|
||||||
|
#
|
||||||
|
# CONFIG_MTD_LPDDR is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# UBI - Unsorted block images
|
||||||
|
#
|
||||||
|
# CONFIG_MTD_UBI is not set
|
||||||
CONFIG_OF_DEVICE=y
|
CONFIG_OF_DEVICE=y
|
||||||
# CONFIG_PARPORT is not set
|
# CONFIG_PARPORT is not set
|
||||||
CONFIG_BLK_DEV=y
|
CONFIG_BLK_DEV=y
|
||||||
|
@ -500,7 +584,7 @@ CONFIG_HAVE_IDE=y
|
||||||
#
|
#
|
||||||
|
|
||||||
#
|
#
|
||||||
# See the help texts for more information.
|
# The newer stack is recommended.
|
||||||
#
|
#
|
||||||
# CONFIG_FIREWIRE is not set
|
# CONFIG_FIREWIRE is not set
|
||||||
# CONFIG_IEEE1394 is not set
|
# CONFIG_IEEE1394 is not set
|
||||||
|
@ -763,7 +847,6 @@ CONFIG_EXT2_FS=y
|
||||||
# CONFIG_EXT2_FS_XIP is not set
|
# CONFIG_EXT2_FS_XIP is not set
|
||||||
# CONFIG_EXT3_FS is not set
|
# CONFIG_EXT3_FS is not set
|
||||||
# CONFIG_EXT4_FS is not set
|
# CONFIG_EXT4_FS is not set
|
||||||
CONFIG_EXT4_USE_FOR_EXT23=y
|
|
||||||
# CONFIG_REISERFS_FS is not set
|
# CONFIG_REISERFS_FS is not set
|
||||||
# CONFIG_JFS_FS is not set
|
# CONFIG_JFS_FS is not set
|
||||||
# CONFIG_FS_POSIX_ACL is not set
|
# CONFIG_FS_POSIX_ACL is not set
|
||||||
|
@ -820,6 +903,7 @@ CONFIG_MISC_FILESYSTEMS=y
|
||||||
# CONFIG_BEFS_FS is not set
|
# CONFIG_BEFS_FS is not set
|
||||||
# CONFIG_BFS_FS is not set
|
# CONFIG_BFS_FS is not set
|
||||||
# CONFIG_EFS_FS is not set
|
# CONFIG_EFS_FS is not set
|
||||||
|
# CONFIG_JFFS2_FS is not set
|
||||||
CONFIG_CRAMFS=y
|
CONFIG_CRAMFS=y
|
||||||
# CONFIG_SQUASHFS is not set
|
# CONFIG_SQUASHFS is not set
|
||||||
# CONFIG_VXFS_FS is not set
|
# CONFIG_VXFS_FS is not set
|
||||||
|
|
|
@ -1557,7 +1557,52 @@ CONFIG_RTC_DRV_RX8581=y
|
||||||
#
|
#
|
||||||
# TI VLYNQ
|
# TI VLYNQ
|
||||||
#
|
#
|
||||||
# CONFIG_STAGING is not set
|
CONFIG_STAGING=y
|
||||||
|
# CONFIG_STAGING_EXCLUDE_BUILD is not set
|
||||||
|
# CONFIG_ET131X is not set
|
||||||
|
# CONFIG_ME4000 is not set
|
||||||
|
# CONFIG_MEILHAUS is not set
|
||||||
|
# CONFIG_USB_IP_COMMON is not set
|
||||||
|
# CONFIG_ECHO is not set
|
||||||
|
# CONFIG_COMEDI is not set
|
||||||
|
# CONFIG_ASUS_OLED is not set
|
||||||
|
# CONFIG_ALTERA_PCIE_CHDMA is not set
|
||||||
|
# CONFIG_INPUT_MIMIO is not set
|
||||||
|
# CONFIG_TRANZPORT is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# Android
|
||||||
|
#
|
||||||
|
# CONFIG_ANDROID is not set
|
||||||
|
# CONFIG_DST is not set
|
||||||
|
# CONFIG_POHMELFS is not set
|
||||||
|
# CONFIG_B3DFG is not set
|
||||||
|
# CONFIG_IDE_PHISON is not set
|
||||||
|
# CONFIG_PLAN9AUTH is not set
|
||||||
|
# CONFIG_HECI is not set
|
||||||
|
# CONFIG_USB_CPC is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# Qualcomm MSM Camera And Video
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# Camera Sensor Selection
|
||||||
|
#
|
||||||
|
# CONFIG_HYPERV_STORAGE is not set
|
||||||
|
# CONFIG_HYPERV_BLOCK is not set
|
||||||
|
# CONFIG_HYPERV_NET is not set
|
||||||
|
CONFIG_VME_BUS=y
|
||||||
|
|
||||||
|
#
|
||||||
|
# VME Bridge Drivers
|
||||||
|
#
|
||||||
|
CONFIG_VME_TSI148=y
|
||||||
|
|
||||||
|
#
|
||||||
|
# VME Device Drivers
|
||||||
|
#
|
||||||
|
# CONFIG_VME_USER is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# File systems
|
# File systems
|
||||||
|
|
|
@ -265,7 +265,7 @@ CONFIG_MMIO_NVRAM=y
|
||||||
#
|
#
|
||||||
# Kernel options
|
# Kernel options
|
||||||
#
|
#
|
||||||
# CONFIG_HIGHMEM is not set
|
CONFIG_HIGHMEM=y
|
||||||
CONFIG_TICK_ONESHOT=y
|
CONFIG_TICK_ONESHOT=y
|
||||||
# CONFIG_NO_HZ is not set
|
# CONFIG_NO_HZ is not set
|
||||||
CONFIG_HIGH_RES_TIMERS=y
|
CONFIG_HIGH_RES_TIMERS=y
|
||||||
|
@ -651,7 +651,7 @@ CONFIG_MTD_CONCAT=y
|
||||||
CONFIG_MTD_PARTITIONS=y
|
CONFIG_MTD_PARTITIONS=y
|
||||||
# CONFIG_MTD_REDBOOT_PARTS is not set
|
# CONFIG_MTD_REDBOOT_PARTS is not set
|
||||||
# CONFIG_MTD_CMDLINE_PARTS is not set
|
# CONFIG_MTD_CMDLINE_PARTS is not set
|
||||||
# CONFIG_MTD_OF_PARTS is not set
|
CONFIG_MTD_OF_PARTS=y
|
||||||
# CONFIG_MTD_AR7_PARTS is not set
|
# CONFIG_MTD_AR7_PARTS is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -671,13 +671,9 @@ CONFIG_MTD_BLOCK=y
|
||||||
# RAM/ROM/Flash chip drivers
|
# RAM/ROM/Flash chip drivers
|
||||||
#
|
#
|
||||||
CONFIG_MTD_CFI=y
|
CONFIG_MTD_CFI=y
|
||||||
# CONFIG_MTD_JEDECPROBE is not set
|
CONFIG_MTD_JEDECPROBE=y
|
||||||
CONFIG_MTD_GEN_PROBE=y
|
CONFIG_MTD_GEN_PROBE=y
|
||||||
CONFIG_MTD_CFI_ADV_OPTIONS=y
|
# CONFIG_MTD_CFI_ADV_OPTIONS is not set
|
||||||
# CONFIG_MTD_CFI_NOSWAP is not set
|
|
||||||
# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
|
|
||||||
CONFIG_MTD_CFI_LE_BYTE_SWAP=y
|
|
||||||
# CONFIG_MTD_CFI_GEOMETRY is not set
|
|
||||||
CONFIG_MTD_MAP_BANK_WIDTH_1=y
|
CONFIG_MTD_MAP_BANK_WIDTH_1=y
|
||||||
CONFIG_MTD_MAP_BANK_WIDTH_2=y
|
CONFIG_MTD_MAP_BANK_WIDTH_2=y
|
||||||
CONFIG_MTD_MAP_BANK_WIDTH_4=y
|
CONFIG_MTD_MAP_BANK_WIDTH_4=y
|
||||||
|
@ -688,7 +684,6 @@ CONFIG_MTD_CFI_I1=y
|
||||||
CONFIG_MTD_CFI_I2=y
|
CONFIG_MTD_CFI_I2=y
|
||||||
# CONFIG_MTD_CFI_I4 is not set
|
# CONFIG_MTD_CFI_I4 is not set
|
||||||
# CONFIG_MTD_CFI_I8 is not set
|
# CONFIG_MTD_CFI_I8 is not set
|
||||||
# CONFIG_MTD_OTP is not set
|
|
||||||
CONFIG_MTD_CFI_INTELEXT=y
|
CONFIG_MTD_CFI_INTELEXT=y
|
||||||
CONFIG_MTD_CFI_AMDSTD=y
|
CONFIG_MTD_CFI_AMDSTD=y
|
||||||
# CONFIG_MTD_CFI_STAA is not set
|
# CONFIG_MTD_CFI_STAA is not set
|
||||||
|
@ -1652,7 +1647,44 @@ CONFIG_RTC_DRV_RX8581=y
|
||||||
#
|
#
|
||||||
# TI VLYNQ
|
# TI VLYNQ
|
||||||
#
|
#
|
||||||
# CONFIG_STAGING is not set
|
CONFIG_STAGING=y
|
||||||
|
# CONFIG_STAGING_EXCLUDE_BUILD is not set
|
||||||
|
# CONFIG_ET131X is not set
|
||||||
|
# CONFIG_ME4000 is not set
|
||||||
|
# CONFIG_MEILHAUS is not set
|
||||||
|
# CONFIG_USB_IP_COMMON is not set
|
||||||
|
# CONFIG_ECHO is not set
|
||||||
|
# CONFIG_COMEDI is not set
|
||||||
|
# CONFIG_ASUS_OLED is not set
|
||||||
|
# CONFIG_ALTERA_PCIE_CHDMA is not set
|
||||||
|
# CONFIG_INPUT_MIMIO is not set
|
||||||
|
# CONFIG_TRANZPORT is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# Android
|
||||||
|
#
|
||||||
|
# CONFIG_ANDROID is not set
|
||||||
|
# CONFIG_DST is not set
|
||||||
|
# CONFIG_POHMELFS is not set
|
||||||
|
# CONFIG_B3DFG is not set
|
||||||
|
# CONFIG_IDE_PHISON is not set
|
||||||
|
# CONFIG_PLAN9AUTH is not set
|
||||||
|
# CONFIG_HECI is not set
|
||||||
|
# CONFIG_VT6655 is not set
|
||||||
|
# CONFIG_USB_CPC is not set
|
||||||
|
# CONFIG_RDC_17F3101X is not set
|
||||||
|
CONFIG_VME_BUS=y
|
||||||
|
|
||||||
|
#
|
||||||
|
# VME Bridge Drivers
|
||||||
|
#
|
||||||
|
# CONFIG_VME_CA91CX42 is not set
|
||||||
|
CONFIG_VME_TSI148=y
|
||||||
|
|
||||||
|
#
|
||||||
|
# VME Device Drivers
|
||||||
|
#
|
||||||
|
# CONFIG_VME_USER is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# File systems
|
# File systems
|
||||||
|
@ -1729,7 +1761,17 @@ CONFIG_MISC_FILESYSTEMS=y
|
||||||
# CONFIG_BEFS_FS is not set
|
# CONFIG_BEFS_FS is not set
|
||||||
# CONFIG_BFS_FS is not set
|
# CONFIG_BFS_FS is not set
|
||||||
# CONFIG_EFS_FS is not set
|
# CONFIG_EFS_FS is not set
|
||||||
# CONFIG_JFFS2_FS is not set
|
CONFIG_JFFS2_FS=y
|
||||||
|
CONFIG_JFFS2_FS_DEBUG=0
|
||||||
|
CONFIG_JFFS2_FS_WRITEBUFFER=y
|
||||||
|
# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
|
||||||
|
# CONFIG_JFFS2_SUMMARY is not set
|
||||||
|
# CONFIG_JFFS2_FS_XATTR is not set
|
||||||
|
# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
|
||||||
|
CONFIG_JFFS2_ZLIB=y
|
||||||
|
# CONFIG_JFFS2_LZO is not set
|
||||||
|
CONFIG_JFFS2_RTIME=y
|
||||||
|
# CONFIG_JFFS2_RUBIN is not set
|
||||||
# CONFIG_CRAMFS is not set
|
# CONFIG_CRAMFS is not set
|
||||||
# CONFIG_SQUASHFS is not set
|
# CONFIG_SQUASHFS is not set
|
||||||
# CONFIG_VXFS_FS is not set
|
# CONFIG_VXFS_FS is not set
|
||||||
|
@ -1874,6 +1916,7 @@ CONFIG_DEBUG_PREEMPT=y
|
||||||
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
|
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
|
||||||
# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
|
# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
|
||||||
# CONFIG_DEBUG_KOBJECT is not set
|
# CONFIG_DEBUG_KOBJECT is not set
|
||||||
|
# CONFIG_DEBUG_HIGHMEM is not set
|
||||||
# CONFIG_DEBUG_BUGVERBOSE is not set
|
# CONFIG_DEBUG_BUGVERBOSE is not set
|
||||||
CONFIG_DEBUG_INFO=y
|
CONFIG_DEBUG_INFO=y
|
||||||
# CONFIG_DEBUG_VM is not set
|
# CONFIG_DEBUG_VM is not set
|
||||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -137,8 +137,9 @@ CONFIG_TRACEPOINTS=y
|
||||||
CONFIG_MARKERS=y
|
CONFIG_MARKERS=y
|
||||||
CONFIG_OPROFILE=y
|
CONFIG_OPROFILE=y
|
||||||
CONFIG_HAVE_OPROFILE=y
|
CONFIG_HAVE_OPROFILE=y
|
||||||
# CONFIG_KPROBES is not set
|
CONFIG_KPROBES=y
|
||||||
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
|
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
|
||||||
|
CONFIG_KRETPROBES=y
|
||||||
CONFIG_HAVE_IOREMAP_PROT=y
|
CONFIG_HAVE_IOREMAP_PROT=y
|
||||||
CONFIG_HAVE_KPROBES=y
|
CONFIG_HAVE_KPROBES=y
|
||||||
CONFIG_HAVE_KRETPROBES=y
|
CONFIG_HAVE_KRETPROBES=y
|
||||||
|
@ -191,6 +192,7 @@ CONFIG_SCANLOG=m
|
||||||
CONFIG_LPARCFG=y
|
CONFIG_LPARCFG=y
|
||||||
CONFIG_PPC_SMLPAR=y
|
CONFIG_PPC_SMLPAR=y
|
||||||
CONFIG_CMM=y
|
CONFIG_CMM=y
|
||||||
|
CONFIG_DTL=y
|
||||||
CONFIG_PPC_ISERIES=y
|
CONFIG_PPC_ISERIES=y
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -328,9 +330,10 @@ CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
|
||||||
CONFIG_KEXEC=y
|
CONFIG_KEXEC=y
|
||||||
# CONFIG_PHYP_DUMP is not set
|
# CONFIG_PHYP_DUMP is not set
|
||||||
CONFIG_IRQ_ALL_CPUS=y
|
CONFIG_IRQ_ALL_CPUS=y
|
||||||
# CONFIG_NUMA is not set
|
CONFIG_NUMA=y
|
||||||
|
CONFIG_NODES_SHIFT=8
|
||||||
|
CONFIG_MAX_ACTIVE_REGIONS=256
|
||||||
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
|
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
|
||||||
CONFIG_ARCH_FLATMEM_ENABLE=y
|
|
||||||
CONFIG_ARCH_SPARSEMEM_ENABLE=y
|
CONFIG_ARCH_SPARSEMEM_ENABLE=y
|
||||||
CONFIG_ARCH_SPARSEMEM_DEFAULT=y
|
CONFIG_ARCH_SPARSEMEM_DEFAULT=y
|
||||||
CONFIG_ARCH_POPULATES_NODE_MAP=y
|
CONFIG_ARCH_POPULATES_NODE_MAP=y
|
||||||
|
@ -339,6 +342,7 @@ CONFIG_SELECT_MEMORY_MODEL=y
|
||||||
# CONFIG_DISCONTIGMEM_MANUAL is not set
|
# CONFIG_DISCONTIGMEM_MANUAL is not set
|
||||||
CONFIG_SPARSEMEM_MANUAL=y
|
CONFIG_SPARSEMEM_MANUAL=y
|
||||||
CONFIG_SPARSEMEM=y
|
CONFIG_SPARSEMEM=y
|
||||||
|
CONFIG_NEED_MULTIPLE_NODES=y
|
||||||
CONFIG_HAVE_MEMORY_PRESENT=y
|
CONFIG_HAVE_MEMORY_PRESENT=y
|
||||||
CONFIG_SPARSEMEM_EXTREME=y
|
CONFIG_SPARSEMEM_EXTREME=y
|
||||||
CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
|
CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
|
||||||
|
@ -354,11 +358,12 @@ CONFIG_PHYS_ADDR_T_64BIT=y
|
||||||
CONFIG_ZONE_DMA_FLAG=1
|
CONFIG_ZONE_DMA_FLAG=1
|
||||||
CONFIG_BOUNCE=y
|
CONFIG_BOUNCE=y
|
||||||
CONFIG_UNEVICTABLE_LRU=y
|
CONFIG_UNEVICTABLE_LRU=y
|
||||||
|
CONFIG_NODES_SPAN_OTHER_NODES=y
|
||||||
CONFIG_ARCH_MEMORY_PROBE=y
|
CONFIG_ARCH_MEMORY_PROBE=y
|
||||||
CONFIG_PPC_HAS_HASH_64K=y
|
CONFIG_PPC_HAS_HASH_64K=y
|
||||||
# CONFIG_PPC_64K_PAGES is not set
|
# CONFIG_PPC_64K_PAGES is not set
|
||||||
CONFIG_FORCE_MAX_ZONEORDER=13
|
CONFIG_FORCE_MAX_ZONEORDER=13
|
||||||
# CONFIG_SCHED_SMT is not set
|
CONFIG_SCHED_SMT=y
|
||||||
CONFIG_PROC_DEVICETREE=y
|
CONFIG_PROC_DEVICETREE=y
|
||||||
# CONFIG_CMDLINE_BOOL is not set
|
# CONFIG_CMDLINE_BOOL is not set
|
||||||
CONFIG_EXTRA_TARGETS=""
|
CONFIG_EXTRA_TARGETS=""
|
||||||
|
@ -790,12 +795,12 @@ CONFIG_SCSI_IPR=y
|
||||||
CONFIG_SCSI_IPR_TRACE=y
|
CONFIG_SCSI_IPR_TRACE=y
|
||||||
CONFIG_SCSI_IPR_DUMP=y
|
CONFIG_SCSI_IPR_DUMP=y
|
||||||
# CONFIG_SCSI_QLOGIC_1280 is not set
|
# CONFIG_SCSI_QLOGIC_1280 is not set
|
||||||
# CONFIG_SCSI_QLA_FC is not set
|
CONFIG_SCSI_QLA_FC=m
|
||||||
# CONFIG_SCSI_QLA_ISCSI is not set
|
# CONFIG_SCSI_QLA_ISCSI is not set
|
||||||
CONFIG_SCSI_LPFC=m
|
CONFIG_SCSI_LPFC=m
|
||||||
# CONFIG_SCSI_DC395x is not set
|
# CONFIG_SCSI_DC395x is not set
|
||||||
# CONFIG_SCSI_DC390T is not set
|
# CONFIG_SCSI_DC390T is not set
|
||||||
CONFIG_SCSI_DEBUG=m
|
# CONFIG_SCSI_DEBUG is not set
|
||||||
# CONFIG_SCSI_SRP is not set
|
# CONFIG_SCSI_SRP is not set
|
||||||
# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
|
# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
|
||||||
# CONFIG_SCSI_DH is not set
|
# CONFIG_SCSI_DH is not set
|
||||||
|
@ -867,9 +872,8 @@ CONFIG_MD_AUTODETECT=y
|
||||||
CONFIG_MD_LINEAR=y
|
CONFIG_MD_LINEAR=y
|
||||||
CONFIG_MD_RAID0=y
|
CONFIG_MD_RAID0=y
|
||||||
CONFIG_MD_RAID1=y
|
CONFIG_MD_RAID1=y
|
||||||
CONFIG_MD_RAID10=y
|
CONFIG_MD_RAID10=m
|
||||||
CONFIG_MD_RAID456=y
|
CONFIG_MD_RAID456=m
|
||||||
CONFIG_MD_RAID5_RESHAPE=y
|
|
||||||
CONFIG_MD_MULTIPATH=m
|
CONFIG_MD_MULTIPATH=m
|
||||||
CONFIG_MD_FAULTY=m
|
CONFIG_MD_FAULTY=m
|
||||||
CONFIG_BLK_DEV_DM=y
|
CONFIG_BLK_DEV_DM=y
|
||||||
|
@ -984,7 +988,7 @@ CONFIG_ACENIC=m
|
||||||
CONFIG_ACENIC_OMIT_TIGON_I=y
|
CONFIG_ACENIC_OMIT_TIGON_I=y
|
||||||
# CONFIG_DL2K is not set
|
# CONFIG_DL2K is not set
|
||||||
CONFIG_E1000=y
|
CONFIG_E1000=y
|
||||||
# CONFIG_E1000E is not set
|
CONFIG_E1000E=m
|
||||||
# CONFIG_IP1000 is not set
|
# CONFIG_IP1000 is not set
|
||||||
# CONFIG_IGB is not set
|
# CONFIG_IGB is not set
|
||||||
# CONFIG_NS83820 is not set
|
# CONFIG_NS83820 is not set
|
||||||
|
@ -1006,19 +1010,19 @@ CONFIG_GELIC_WIRELESS=y
|
||||||
# CONFIG_ATL1E is not set
|
# CONFIG_ATL1E is not set
|
||||||
# CONFIG_JME is not set
|
# CONFIG_JME is not set
|
||||||
CONFIG_NETDEV_10000=y
|
CONFIG_NETDEV_10000=y
|
||||||
# CONFIG_CHELSIO_T1 is not set
|
CONFIG_CHELSIO_T1=m
|
||||||
# CONFIG_CHELSIO_T3 is not set
|
CONFIG_CHELSIO_T3=m
|
||||||
CONFIG_EHEA=m
|
CONFIG_EHEA=m
|
||||||
# CONFIG_ENIC is not set
|
# CONFIG_ENIC is not set
|
||||||
# CONFIG_IXGBE is not set
|
CONFIG_IXGBE=m
|
||||||
CONFIG_IXGB=m
|
CONFIG_IXGB=m
|
||||||
# CONFIG_S2IO is not set
|
CONFIG_S2IO=m
|
||||||
# CONFIG_MYRI10GE is not set
|
CONFIG_MYRI10GE=m
|
||||||
# CONFIG_NETXEN_NIC is not set
|
CONFIG_NETXEN_NIC=m
|
||||||
# CONFIG_NIU is not set
|
# CONFIG_NIU is not set
|
||||||
CONFIG_PASEMI_MAC=y
|
CONFIG_PASEMI_MAC=y
|
||||||
# CONFIG_MLX4_EN is not set
|
CONFIG_MLX4_EN=m
|
||||||
# CONFIG_MLX4_CORE is not set
|
CONFIG_MLX4_CORE=m
|
||||||
# CONFIG_TEHUTI is not set
|
# CONFIG_TEHUTI is not set
|
||||||
# CONFIG_BNX2X is not set
|
# CONFIG_BNX2X is not set
|
||||||
# CONFIG_QLGE is not set
|
# CONFIG_QLGE is not set
|
||||||
|
@ -1169,7 +1173,7 @@ CONFIG_SERIAL_TXX9=y
|
||||||
CONFIG_HAS_TXX9_SERIAL=y
|
CONFIG_HAS_TXX9_SERIAL=y
|
||||||
CONFIG_SERIAL_TXX9_NR_UARTS=6
|
CONFIG_SERIAL_TXX9_NR_UARTS=6
|
||||||
CONFIG_SERIAL_TXX9_CONSOLE=y
|
CONFIG_SERIAL_TXX9_CONSOLE=y
|
||||||
# CONFIG_SERIAL_JSM is not set
|
CONFIG_SERIAL_JSM=m
|
||||||
# CONFIG_SERIAL_OF_PLATFORM is not set
|
# CONFIG_SERIAL_OF_PLATFORM is not set
|
||||||
CONFIG_UNIX98_PTYS=y
|
CONFIG_UNIX98_PTYS=y
|
||||||
CONFIG_LEGACY_PTYS=y
|
CONFIG_LEGACY_PTYS=y
|
||||||
|
@ -1586,7 +1590,7 @@ CONFIG_USB_DEVICEFS=y
|
||||||
CONFIG_USB_DEVICE_CLASS=y
|
CONFIG_USB_DEVICE_CLASS=y
|
||||||
# CONFIG_USB_DYNAMIC_MINORS is not set
|
# CONFIG_USB_DYNAMIC_MINORS is not set
|
||||||
# CONFIG_USB_OTG is not set
|
# CONFIG_USB_OTG is not set
|
||||||
# CONFIG_USB_MON is not set
|
CONFIG_USB_MON=m
|
||||||
# CONFIG_USB_WUSB is not set
|
# CONFIG_USB_WUSB is not set
|
||||||
# CONFIG_USB_WUSB_CBAF is not set
|
# CONFIG_USB_WUSB_CBAF is not set
|
||||||
|
|
||||||
|
@ -1686,21 +1690,22 @@ CONFIG_USB_APPLEDISPLAY=m
|
||||||
# CONFIG_NEW_LEDS is not set
|
# CONFIG_NEW_LEDS is not set
|
||||||
# CONFIG_ACCESSIBILITY is not set
|
# CONFIG_ACCESSIBILITY is not set
|
||||||
CONFIG_INFINIBAND=m
|
CONFIG_INFINIBAND=m
|
||||||
# CONFIG_INFINIBAND_USER_MAD is not set
|
CONFIG_INFINIBAND_USER_MAD=m
|
||||||
# CONFIG_INFINIBAND_USER_ACCESS is not set
|
CONFIG_INFINIBAND_USER_ACCESS=m
|
||||||
|
CONFIG_INFINIBAND_USER_MEM=y
|
||||||
CONFIG_INFINIBAND_ADDR_TRANS=y
|
CONFIG_INFINIBAND_ADDR_TRANS=y
|
||||||
CONFIG_INFINIBAND_MTHCA=m
|
CONFIG_INFINIBAND_MTHCA=m
|
||||||
CONFIG_INFINIBAND_MTHCA_DEBUG=y
|
CONFIG_INFINIBAND_MTHCA_DEBUG=y
|
||||||
# CONFIG_INFINIBAND_IPATH is not set
|
CONFIG_INFINIBAND_IPATH=m
|
||||||
CONFIG_INFINIBAND_EHCA=m
|
CONFIG_INFINIBAND_EHCA=m
|
||||||
# CONFIG_INFINIBAND_AMSO1100 is not set
|
# CONFIG_INFINIBAND_AMSO1100 is not set
|
||||||
# CONFIG_MLX4_INFINIBAND is not set
|
CONFIG_MLX4_INFINIBAND=m
|
||||||
# CONFIG_INFINIBAND_NES is not set
|
# CONFIG_INFINIBAND_NES is not set
|
||||||
CONFIG_INFINIBAND_IPOIB=m
|
CONFIG_INFINIBAND_IPOIB=m
|
||||||
# CONFIG_INFINIBAND_IPOIB_CM is not set
|
CONFIG_INFINIBAND_IPOIB_CM=y
|
||||||
CONFIG_INFINIBAND_IPOIB_DEBUG=y
|
CONFIG_INFINIBAND_IPOIB_DEBUG=y
|
||||||
# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
|
# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
|
||||||
# CONFIG_INFINIBAND_SRP is not set
|
CONFIG_INFINIBAND_SRP=m
|
||||||
CONFIG_INFINIBAND_ISER=m
|
CONFIG_INFINIBAND_ISER=m
|
||||||
CONFIG_EDAC=y
|
CONFIG_EDAC=y
|
||||||
|
|
||||||
|
@ -1798,7 +1803,7 @@ CONFIG_REISERFS_FS=y
|
||||||
CONFIG_REISERFS_FS_XATTR=y
|
CONFIG_REISERFS_FS_XATTR=y
|
||||||
CONFIG_REISERFS_FS_POSIX_ACL=y
|
CONFIG_REISERFS_FS_POSIX_ACL=y
|
||||||
CONFIG_REISERFS_FS_SECURITY=y
|
CONFIG_REISERFS_FS_SECURITY=y
|
||||||
CONFIG_JFS_FS=y
|
CONFIG_JFS_FS=m
|
||||||
CONFIG_JFS_POSIX_ACL=y
|
CONFIG_JFS_POSIX_ACL=y
|
||||||
CONFIG_JFS_SECURITY=y
|
CONFIG_JFS_SECURITY=y
|
||||||
# CONFIG_JFS_DEBUG is not set
|
# CONFIG_JFS_DEBUG is not set
|
||||||
|
@ -1811,14 +1816,22 @@ CONFIG_XFS_POSIX_ACL=y
|
||||||
# CONFIG_XFS_RT is not set
|
# CONFIG_XFS_RT is not set
|
||||||
# CONFIG_XFS_DEBUG is not set
|
# CONFIG_XFS_DEBUG is not set
|
||||||
# CONFIG_GFS2_FS is not set
|
# CONFIG_GFS2_FS is not set
|
||||||
# CONFIG_OCFS2_FS is not set
|
CONFIG_OCFS2_FS=m
|
||||||
|
CONFIG_OCFS2_FS_O2CB=m
|
||||||
|
CONFIG_OCFS2_FS_STATS=y
|
||||||
|
CONFIG_OCFS2_DEBUG_MASKLOG=y
|
||||||
|
# CONFIG_OCFS2_DEBUG_FS is not set
|
||||||
|
# CONFIG_OCFS2_COMPAT_JBD is not set
|
||||||
|
CONFIG_BTRFS_FS=m
|
||||||
|
CONFIG_BTRFS_FS_POSIX_ACL=y
|
||||||
|
CONFIG_NILFS2_FS=m
|
||||||
CONFIG_DNOTIFY=y
|
CONFIG_DNOTIFY=y
|
||||||
CONFIG_INOTIFY=y
|
CONFIG_INOTIFY=y
|
||||||
CONFIG_INOTIFY_USER=y
|
CONFIG_INOTIFY_USER=y
|
||||||
# CONFIG_QUOTA is not set
|
# CONFIG_QUOTA is not set
|
||||||
# CONFIG_AUTOFS_FS is not set
|
# CONFIG_AUTOFS_FS is not set
|
||||||
CONFIG_AUTOFS4_FS=m
|
CONFIG_AUTOFS4_FS=m
|
||||||
# CONFIG_FUSE_FS is not set
|
CONFIG_FUSE_FS=m
|
||||||
|
|
||||||
#
|
#
|
||||||
# CD-ROM/DVD Filesystems
|
# CD-ROM/DVD Filesystems
|
||||||
|
@ -1851,7 +1864,7 @@ CONFIG_TMPFS=y
|
||||||
# CONFIG_TMPFS_POSIX_ACL is not set
|
# CONFIG_TMPFS_POSIX_ACL is not set
|
||||||
CONFIG_HUGETLBFS=y
|
CONFIG_HUGETLBFS=y
|
||||||
CONFIG_HUGETLB_PAGE=y
|
CONFIG_HUGETLB_PAGE=y
|
||||||
# CONFIG_CONFIGFS_FS is not set
|
CONFIG_CONFIGFS_FS=m
|
||||||
|
|
||||||
#
|
#
|
||||||
# Miscellaneous filesystems
|
# Miscellaneous filesystems
|
||||||
|
@ -2075,7 +2088,7 @@ CONFIG_XMON=y
|
||||||
CONFIG_XMON_DISASSEMBLY=y
|
CONFIG_XMON_DISASSEMBLY=y
|
||||||
CONFIG_DEBUGGER=y
|
CONFIG_DEBUGGER=y
|
||||||
CONFIG_IRQSTACKS=y
|
CONFIG_IRQSTACKS=y
|
||||||
# CONFIG_VIRQ_DEBUG is not set
|
CONFIG_VIRQ_DEBUG=y
|
||||||
CONFIG_BOOTX_TEXT=y
|
CONFIG_BOOTX_TEXT=y
|
||||||
# CONFIG_PPC_EARLY_DEBUG is not set
|
# CONFIG_PPC_EARLY_DEBUG is not set
|
||||||
|
|
||||||
|
|
|
@ -159,7 +159,7 @@ CONFIG_MODULE_SRCVERSION_ALL=y
|
||||||
CONFIG_KMOD=y
|
CONFIG_KMOD=y
|
||||||
CONFIG_STOP_MACHINE=y
|
CONFIG_STOP_MACHINE=y
|
||||||
CONFIG_BLOCK=y
|
CONFIG_BLOCK=y
|
||||||
# CONFIG_BLK_DEV_IO_TRACE is not set
|
CONFIG_BLK_DEV_IO_TRACE=y
|
||||||
CONFIG_BLK_DEV_BSG=y
|
CONFIG_BLK_DEV_BSG=y
|
||||||
# CONFIG_BLK_DEV_INTEGRITY is not set
|
# CONFIG_BLK_DEV_INTEGRITY is not set
|
||||||
CONFIG_BLOCK_COMPAT=y
|
CONFIG_BLOCK_COMPAT=y
|
||||||
|
@ -191,6 +191,7 @@ CONFIG_SCANLOG=m
|
||||||
CONFIG_LPARCFG=y
|
CONFIG_LPARCFG=y
|
||||||
CONFIG_PPC_SMLPAR=y
|
CONFIG_PPC_SMLPAR=y
|
||||||
CONFIG_CMM=y
|
CONFIG_CMM=y
|
||||||
|
CONFIG_DTL=y
|
||||||
# CONFIG_PPC_ISERIES is not set
|
# CONFIG_PPC_ISERIES is not set
|
||||||
# CONFIG_PPC_PMAC is not set
|
# CONFIG_PPC_PMAC is not set
|
||||||
# CONFIG_PPC_MAPLE is not set
|
# CONFIG_PPC_MAPLE is not set
|
||||||
|
@ -255,7 +256,8 @@ CONFIG_KEXEC=y
|
||||||
# CONFIG_PHYP_DUMP is not set
|
# CONFIG_PHYP_DUMP is not set
|
||||||
CONFIG_IRQ_ALL_CPUS=y
|
CONFIG_IRQ_ALL_CPUS=y
|
||||||
CONFIG_NUMA=y
|
CONFIG_NUMA=y
|
||||||
CONFIG_NODES_SHIFT=4
|
CONFIG_NODES_SHIFT=8
|
||||||
|
CONFIG_MAX_ACTIVE_REGIONS=256
|
||||||
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
|
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
|
||||||
CONFIG_ARCH_SPARSEMEM_ENABLE=y
|
CONFIG_ARCH_SPARSEMEM_ENABLE=y
|
||||||
CONFIG_ARCH_SPARSEMEM_DEFAULT=y
|
CONFIG_ARCH_SPARSEMEM_DEFAULT=y
|
||||||
|
@ -270,7 +272,9 @@ CONFIG_HAVE_MEMORY_PRESENT=y
|
||||||
CONFIG_SPARSEMEM_EXTREME=y
|
CONFIG_SPARSEMEM_EXTREME=y
|
||||||
CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
|
CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
|
||||||
CONFIG_SPARSEMEM_VMEMMAP=y
|
CONFIG_SPARSEMEM_VMEMMAP=y
|
||||||
# CONFIG_MEMORY_HOTPLUG is not set
|
CONFIG_MEMORY_HOTPLUG=y
|
||||||
|
CONFIG_MEMORY_HOTPLUG_SPARSE=y
|
||||||
|
CONFIG_MEMORY_HOTREMOVE=y
|
||||||
CONFIG_PAGEFLAGS_EXTENDED=y
|
CONFIG_PAGEFLAGS_EXTENDED=y
|
||||||
CONFIG_SPLIT_PTLOCK_CPUS=4
|
CONFIG_SPLIT_PTLOCK_CPUS=4
|
||||||
CONFIG_MIGRATION=y
|
CONFIG_MIGRATION=y
|
||||||
|
@ -705,7 +709,7 @@ CONFIG_MD_LINEAR=y
|
||||||
CONFIG_MD_RAID0=y
|
CONFIG_MD_RAID0=y
|
||||||
CONFIG_MD_RAID1=y
|
CONFIG_MD_RAID1=y
|
||||||
CONFIG_MD_RAID10=m
|
CONFIG_MD_RAID10=m
|
||||||
# CONFIG_MD_RAID456 is not set
|
CONFIG_MD_RAID456=m
|
||||||
CONFIG_MD_MULTIPATH=m
|
CONFIG_MD_MULTIPATH=m
|
||||||
CONFIG_MD_FAULTY=m
|
CONFIG_MD_FAULTY=m
|
||||||
CONFIG_BLK_DEV_DM=y
|
CONFIG_BLK_DEV_DM=y
|
||||||
|
@ -800,7 +804,7 @@ CONFIG_ACENIC=m
|
||||||
CONFIG_ACENIC_OMIT_TIGON_I=y
|
CONFIG_ACENIC_OMIT_TIGON_I=y
|
||||||
# CONFIG_DL2K is not set
|
# CONFIG_DL2K is not set
|
||||||
CONFIG_E1000=y
|
CONFIG_E1000=y
|
||||||
# CONFIG_E1000E is not set
|
CONFIG_E1000E=m
|
||||||
# CONFIG_IP1000 is not set
|
# CONFIG_IP1000 is not set
|
||||||
# CONFIG_IGB is not set
|
# CONFIG_IGB is not set
|
||||||
# CONFIG_NS83820 is not set
|
# CONFIG_NS83820 is not set
|
||||||
|
@ -818,18 +822,18 @@ CONFIG_TIGON3=y
|
||||||
# CONFIG_ATL1E is not set
|
# CONFIG_ATL1E is not set
|
||||||
# CONFIG_JME is not set
|
# CONFIG_JME is not set
|
||||||
CONFIG_NETDEV_10000=y
|
CONFIG_NETDEV_10000=y
|
||||||
# CONFIG_CHELSIO_T1 is not set
|
CONFIG_CHELSIO_T1=m
|
||||||
# CONFIG_CHELSIO_T3 is not set
|
CONFIG_CHELSIO_T3=m
|
||||||
CONFIG_EHEA=y
|
CONFIG_EHEA=y
|
||||||
# CONFIG_ENIC is not set
|
# CONFIG_ENIC is not set
|
||||||
# CONFIG_IXGBE is not set
|
CONFIG_IXGBE=m
|
||||||
CONFIG_IXGB=m
|
CONFIG_IXGB=m
|
||||||
CONFIG_S2IO=m
|
CONFIG_S2IO=m
|
||||||
# CONFIG_MYRI10GE is not set
|
CONFIG_MYRI10GE=m
|
||||||
# CONFIG_NETXEN_NIC is not set
|
CONFIG_NETXEN_NIC=m
|
||||||
# CONFIG_NIU is not set
|
# CONFIG_NIU is not set
|
||||||
# CONFIG_MLX4_EN is not set
|
CONFIG_MLX4_EN=m
|
||||||
# CONFIG_MLX4_CORE is not set
|
CONFIG_MLX4_CORE=m
|
||||||
# CONFIG_TEHUTI is not set
|
# CONFIG_TEHUTI is not set
|
||||||
# CONFIG_BNX2X is not set
|
# CONFIG_BNX2X is not set
|
||||||
# CONFIG_QLGE is not set
|
# CONFIG_QLGE is not set
|
||||||
|
@ -894,7 +898,7 @@ CONFIG_INPUT_MOUSEDEV=y
|
||||||
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
|
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
|
||||||
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
|
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
|
||||||
# CONFIG_INPUT_JOYDEV is not set
|
# CONFIG_INPUT_JOYDEV is not set
|
||||||
# CONFIG_INPUT_EVDEV is not set
|
CONFIG_INPUT_EVDEV=m
|
||||||
# CONFIG_INPUT_EVBUG is not set
|
# CONFIG_INPUT_EVBUG is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -1271,7 +1275,7 @@ CONFIG_USB_DEVICEFS=y
|
||||||
CONFIG_USB_DEVICE_CLASS=y
|
CONFIG_USB_DEVICE_CLASS=y
|
||||||
# CONFIG_USB_DYNAMIC_MINORS is not set
|
# CONFIG_USB_DYNAMIC_MINORS is not set
|
||||||
# CONFIG_USB_OTG is not set
|
# CONFIG_USB_OTG is not set
|
||||||
CONFIG_USB_MON=y
|
CONFIG_USB_MON=m
|
||||||
# CONFIG_USB_WUSB is not set
|
# CONFIG_USB_WUSB is not set
|
||||||
# CONFIG_USB_WUSB_CBAF is not set
|
# CONFIG_USB_WUSB_CBAF is not set
|
||||||
|
|
||||||
|
@ -1311,7 +1315,7 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
|
||||||
#
|
#
|
||||||
# may also be needed; see USB_STORAGE Help for more information
|
# may also be needed; see USB_STORAGE Help for more information
|
||||||
#
|
#
|
||||||
CONFIG_USB_STORAGE=y
|
CONFIG_USB_STORAGE=m
|
||||||
# CONFIG_USB_STORAGE_DEBUG is not set
|
# CONFIG_USB_STORAGE_DEBUG is not set
|
||||||
# CONFIG_USB_STORAGE_DATAFAB is not set
|
# CONFIG_USB_STORAGE_DATAFAB is not set
|
||||||
# CONFIG_USB_STORAGE_FREECOM is not set
|
# CONFIG_USB_STORAGE_FREECOM is not set
|
||||||
|
@ -1322,7 +1326,7 @@ CONFIG_USB_STORAGE=y
|
||||||
# CONFIG_USB_STORAGE_SDDR55 is not set
|
# CONFIG_USB_STORAGE_SDDR55 is not set
|
||||||
# CONFIG_USB_STORAGE_JUMPSHOT is not set
|
# CONFIG_USB_STORAGE_JUMPSHOT is not set
|
||||||
# CONFIG_USB_STORAGE_ALAUDA is not set
|
# CONFIG_USB_STORAGE_ALAUDA is not set
|
||||||
CONFIG_USB_STORAGE_ONETOUCH=y
|
# CONFIG_USB_STORAGE_ONETOUCH is not set
|
||||||
# CONFIG_USB_STORAGE_KARMA is not set
|
# CONFIG_USB_STORAGE_KARMA is not set
|
||||||
# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
|
# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
|
||||||
# CONFIG_USB_LIBUSUAL is not set
|
# CONFIG_USB_LIBUSUAL is not set
|
||||||
|
@ -1377,17 +1381,17 @@ CONFIG_INFINIBAND_USER_MEM=y
|
||||||
CONFIG_INFINIBAND_ADDR_TRANS=y
|
CONFIG_INFINIBAND_ADDR_TRANS=y
|
||||||
CONFIG_INFINIBAND_MTHCA=m
|
CONFIG_INFINIBAND_MTHCA=m
|
||||||
CONFIG_INFINIBAND_MTHCA_DEBUG=y
|
CONFIG_INFINIBAND_MTHCA_DEBUG=y
|
||||||
# CONFIG_INFINIBAND_IPATH is not set
|
CONFIG_INFINIBAND_IPATH=m
|
||||||
CONFIG_INFINIBAND_EHCA=m
|
CONFIG_INFINIBAND_EHCA=m
|
||||||
# CONFIG_INFINIBAND_AMSO1100 is not set
|
# CONFIG_INFINIBAND_AMSO1100 is not set
|
||||||
# CONFIG_MLX4_INFINIBAND is not set
|
CONFIG_MLX4_INFINIBAND=m
|
||||||
# CONFIG_INFINIBAND_NES is not set
|
# CONFIG_INFINIBAND_NES is not set
|
||||||
CONFIG_INFINIBAND_IPOIB=m
|
CONFIG_INFINIBAND_IPOIB=m
|
||||||
# CONFIG_INFINIBAND_IPOIB_CM is not set
|
CONFIG_INFINIBAND_IPOIB_CM=y
|
||||||
CONFIG_INFINIBAND_IPOIB_DEBUG=y
|
CONFIG_INFINIBAND_IPOIB_DEBUG=y
|
||||||
# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
|
# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
|
||||||
CONFIG_INFINIBAND_SRP=m
|
CONFIG_INFINIBAND_SRP=m
|
||||||
# CONFIG_INFINIBAND_ISER is not set
|
CONFIG_INFINIBAND_ISER=m
|
||||||
# CONFIG_EDAC is not set
|
# CONFIG_EDAC is not set
|
||||||
# CONFIG_RTC_CLASS is not set
|
# CONFIG_RTC_CLASS is not set
|
||||||
# CONFIG_DMADEVICES is not set
|
# CONFIG_DMADEVICES is not set
|
||||||
|
@ -1443,6 +1447,9 @@ CONFIG_OCFS2_FS_STATS=y
|
||||||
CONFIG_OCFS2_DEBUG_MASKLOG=y
|
CONFIG_OCFS2_DEBUG_MASKLOG=y
|
||||||
# CONFIG_OCFS2_DEBUG_FS is not set
|
# CONFIG_OCFS2_DEBUG_FS is not set
|
||||||
# CONFIG_OCFS2_COMPAT_JBD is not set
|
# CONFIG_OCFS2_COMPAT_JBD is not set
|
||||||
|
CONFIG_BTRFS_FS=m
|
||||||
|
CONFIG_BTRFS_FS_POSIX_ACL=y
|
||||||
|
CONFIG_NILFS2_FS=m
|
||||||
CONFIG_DNOTIFY=y
|
CONFIG_DNOTIFY=y
|
||||||
CONFIG_INOTIFY=y
|
CONFIG_INOTIFY=y
|
||||||
CONFIG_INOTIFY_USER=y
|
CONFIG_INOTIFY_USER=y
|
||||||
|
@ -1455,8 +1462,8 @@ CONFIG_FUSE_FS=m
|
||||||
# CD-ROM/DVD Filesystems
|
# CD-ROM/DVD Filesystems
|
||||||
#
|
#
|
||||||
CONFIG_ISO9660_FS=y
|
CONFIG_ISO9660_FS=y
|
||||||
CONFIG_JOLIET=y
|
# CONFIG_JOLIET is not set
|
||||||
CONFIG_ZISOFS=y
|
# CONFIG_ZISOFS is not set
|
||||||
CONFIG_UDF_FS=m
|
CONFIG_UDF_FS=m
|
||||||
CONFIG_UDF_NLS=y
|
CONFIG_UDF_NLS=y
|
||||||
|
|
||||||
|
@ -1508,14 +1515,14 @@ CONFIG_NFS_FS=y
|
||||||
CONFIG_NFS_V3=y
|
CONFIG_NFS_V3=y
|
||||||
CONFIG_NFS_V3_ACL=y
|
CONFIG_NFS_V3_ACL=y
|
||||||
CONFIG_NFS_V4=y
|
CONFIG_NFS_V4=y
|
||||||
CONFIG_NFSD=y
|
CONFIG_NFSD=m
|
||||||
CONFIG_NFSD_V2_ACL=y
|
CONFIG_NFSD_V2_ACL=y
|
||||||
CONFIG_NFSD_V3=y
|
CONFIG_NFSD_V3=y
|
||||||
CONFIG_NFSD_V3_ACL=y
|
CONFIG_NFSD_V3_ACL=y
|
||||||
CONFIG_NFSD_V4=y
|
CONFIG_NFSD_V4=y
|
||||||
CONFIG_LOCKD=y
|
CONFIG_LOCKD=y
|
||||||
CONFIG_LOCKD_V4=y
|
CONFIG_LOCKD_V4=y
|
||||||
CONFIG_EXPORTFS=y
|
CONFIG_EXPORTFS=m
|
||||||
CONFIG_NFS_ACL_SUPPORT=y
|
CONFIG_NFS_ACL_SUPPORT=y
|
||||||
CONFIG_NFS_COMMON=y
|
CONFIG_NFS_COMMON=y
|
||||||
CONFIG_SUNRPC=y
|
CONFIG_SUNRPC=y
|
||||||
|
@ -1681,12 +1688,12 @@ CONFIG_DYNAMIC_PRINTK_DEBUG=y
|
||||||
CONFIG_HAVE_ARCH_KGDB=y
|
CONFIG_HAVE_ARCH_KGDB=y
|
||||||
# CONFIG_KGDB is not set
|
# CONFIG_KGDB is not set
|
||||||
CONFIG_DEBUG_STACKOVERFLOW=y
|
CONFIG_DEBUG_STACKOVERFLOW=y
|
||||||
# CONFIG_DEBUG_STACK_USAGE is not set
|
CONFIG_DEBUG_STACK_USAGE=y
|
||||||
# CONFIG_DEBUG_PAGEALLOC is not set
|
# CONFIG_DEBUG_PAGEALLOC is not set
|
||||||
# CONFIG_HCALL_STATS is not set
|
# CONFIG_HCALL_STATS is not set
|
||||||
# CONFIG_CODE_PATCHING_SELFTEST is not set
|
CONFIG_CODE_PATCHING_SELFTEST=y
|
||||||
# CONFIG_FTR_FIXUP_SELFTEST is not set
|
CONFIG_FTR_FIXUP_SELFTEST=y
|
||||||
# CONFIG_MSI_BITMAP_SELFTEST is not set
|
CONFIG_MSI_BITMAP_SELFTEST=y
|
||||||
CONFIG_XMON=y
|
CONFIG_XMON=y
|
||||||
CONFIG_XMON_DEFAULT=y
|
CONFIG_XMON_DEFAULT=y
|
||||||
CONFIG_XMON_DISASSEMBLY=y
|
CONFIG_XMON_DISASSEMBLY=y
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#define _ASM_POWERPC_ASM_COMPAT_H
|
#define _ASM_POWERPC_ASM_COMPAT_H
|
||||||
|
|
||||||
#include <asm/types.h>
|
#include <asm/types.h>
|
||||||
|
#include <asm/ppc-opcode.h>
|
||||||
|
|
||||||
#ifdef __ASSEMBLY__
|
#ifdef __ASSEMBLY__
|
||||||
# define stringify_in_c(...) __VA_ARGS__
|
# define stringify_in_c(...) __VA_ARGS__
|
||||||
|
@ -24,7 +25,7 @@
|
||||||
#define PPC_LONG stringify_in_c(.llong)
|
#define PPC_LONG stringify_in_c(.llong)
|
||||||
#define PPC_LONG_ALIGN stringify_in_c(.balign 8)
|
#define PPC_LONG_ALIGN stringify_in_c(.balign 8)
|
||||||
#define PPC_TLNEI stringify_in_c(tdnei)
|
#define PPC_TLNEI stringify_in_c(tdnei)
|
||||||
#define PPC_LLARX stringify_in_c(ldarx)
|
#define PPC_LLARX(t, a, b, eh) PPC_LDARX(t, a, b, eh)
|
||||||
#define PPC_STLCX stringify_in_c(stdcx.)
|
#define PPC_STLCX stringify_in_c(stdcx.)
|
||||||
#define PPC_CNTLZL stringify_in_c(cntlzd)
|
#define PPC_CNTLZL stringify_in_c(cntlzd)
|
||||||
|
|
||||||
|
@ -46,7 +47,7 @@
|
||||||
#define PPC_LONG stringify_in_c(.long)
|
#define PPC_LONG stringify_in_c(.long)
|
||||||
#define PPC_LONG_ALIGN stringify_in_c(.balign 4)
|
#define PPC_LONG_ALIGN stringify_in_c(.balign 4)
|
||||||
#define PPC_TLNEI stringify_in_c(twnei)
|
#define PPC_TLNEI stringify_in_c(twnei)
|
||||||
#define PPC_LLARX stringify_in_c(lwarx)
|
#define PPC_LLARX(t, a, b, eh) PPC_LWARX(t, a, b, eh)
|
||||||
#define PPC_STLCX stringify_in_c(stwcx.)
|
#define PPC_STLCX stringify_in_c(stwcx.)
|
||||||
#define PPC_CNTLZL stringify_in_c(cntlzw)
|
#define PPC_CNTLZL stringify_in_c(cntlzw)
|
||||||
#define PPC_MTOCRF stringify_in_c(mtcrf)
|
#define PPC_MTOCRF stringify_in_c(mtcrf)
|
||||||
|
|
|
@ -49,13 +49,13 @@ static __inline__ int atomic_add_return(int a, atomic_t *v)
|
||||||
int t;
|
int t;
|
||||||
|
|
||||||
__asm__ __volatile__(
|
__asm__ __volatile__(
|
||||||
LWSYNC_ON_SMP
|
PPC_RELEASE_BARRIER
|
||||||
"1: lwarx %0,0,%2 # atomic_add_return\n\
|
"1: lwarx %0,0,%2 # atomic_add_return\n\
|
||||||
add %0,%1,%0\n"
|
add %0,%1,%0\n"
|
||||||
PPC405_ERR77(0,%2)
|
PPC405_ERR77(0,%2)
|
||||||
" stwcx. %0,0,%2 \n\
|
" stwcx. %0,0,%2 \n\
|
||||||
bne- 1b"
|
bne- 1b"
|
||||||
ISYNC_ON_SMP
|
PPC_ACQUIRE_BARRIER
|
||||||
: "=&r" (t)
|
: "=&r" (t)
|
||||||
: "r" (a), "r" (&v->counter)
|
: "r" (a), "r" (&v->counter)
|
||||||
: "cc", "memory");
|
: "cc", "memory");
|
||||||
|
@ -85,13 +85,13 @@ static __inline__ int atomic_sub_return(int a, atomic_t *v)
|
||||||
int t;
|
int t;
|
||||||
|
|
||||||
__asm__ __volatile__(
|
__asm__ __volatile__(
|
||||||
LWSYNC_ON_SMP
|
PPC_RELEASE_BARRIER
|
||||||
"1: lwarx %0,0,%2 # atomic_sub_return\n\
|
"1: lwarx %0,0,%2 # atomic_sub_return\n\
|
||||||
subf %0,%1,%0\n"
|
subf %0,%1,%0\n"
|
||||||
PPC405_ERR77(0,%2)
|
PPC405_ERR77(0,%2)
|
||||||
" stwcx. %0,0,%2 \n\
|
" stwcx. %0,0,%2 \n\
|
||||||
bne- 1b"
|
bne- 1b"
|
||||||
ISYNC_ON_SMP
|
PPC_ACQUIRE_BARRIER
|
||||||
: "=&r" (t)
|
: "=&r" (t)
|
||||||
: "r" (a), "r" (&v->counter)
|
: "r" (a), "r" (&v->counter)
|
||||||
: "cc", "memory");
|
: "cc", "memory");
|
||||||
|
@ -119,13 +119,13 @@ static __inline__ int atomic_inc_return(atomic_t *v)
|
||||||
int t;
|
int t;
|
||||||
|
|
||||||
__asm__ __volatile__(
|
__asm__ __volatile__(
|
||||||
LWSYNC_ON_SMP
|
PPC_RELEASE_BARRIER
|
||||||
"1: lwarx %0,0,%1 # atomic_inc_return\n\
|
"1: lwarx %0,0,%1 # atomic_inc_return\n\
|
||||||
addic %0,%0,1\n"
|
addic %0,%0,1\n"
|
||||||
PPC405_ERR77(0,%1)
|
PPC405_ERR77(0,%1)
|
||||||
" stwcx. %0,0,%1 \n\
|
" stwcx. %0,0,%1 \n\
|
||||||
bne- 1b"
|
bne- 1b"
|
||||||
ISYNC_ON_SMP
|
PPC_ACQUIRE_BARRIER
|
||||||
: "=&r" (t)
|
: "=&r" (t)
|
||||||
: "r" (&v->counter)
|
: "r" (&v->counter)
|
||||||
: "cc", "xer", "memory");
|
: "cc", "xer", "memory");
|
||||||
|
@ -163,13 +163,13 @@ static __inline__ int atomic_dec_return(atomic_t *v)
|
||||||
int t;
|
int t;
|
||||||
|
|
||||||
__asm__ __volatile__(
|
__asm__ __volatile__(
|
||||||
LWSYNC_ON_SMP
|
PPC_RELEASE_BARRIER
|
||||||
"1: lwarx %0,0,%1 # atomic_dec_return\n\
|
"1: lwarx %0,0,%1 # atomic_dec_return\n\
|
||||||
addic %0,%0,-1\n"
|
addic %0,%0,-1\n"
|
||||||
PPC405_ERR77(0,%1)
|
PPC405_ERR77(0,%1)
|
||||||
" stwcx. %0,0,%1\n\
|
" stwcx. %0,0,%1\n\
|
||||||
bne- 1b"
|
bne- 1b"
|
||||||
ISYNC_ON_SMP
|
PPC_ACQUIRE_BARRIER
|
||||||
: "=&r" (t)
|
: "=&r" (t)
|
||||||
: "r" (&v->counter)
|
: "r" (&v->counter)
|
||||||
: "cc", "xer", "memory");
|
: "cc", "xer", "memory");
|
||||||
|
@ -194,7 +194,7 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u)
|
||||||
int t;
|
int t;
|
||||||
|
|
||||||
__asm__ __volatile__ (
|
__asm__ __volatile__ (
|
||||||
LWSYNC_ON_SMP
|
PPC_RELEASE_BARRIER
|
||||||
"1: lwarx %0,0,%1 # atomic_add_unless\n\
|
"1: lwarx %0,0,%1 # atomic_add_unless\n\
|
||||||
cmpw 0,%0,%3 \n\
|
cmpw 0,%0,%3 \n\
|
||||||
beq- 2f \n\
|
beq- 2f \n\
|
||||||
|
@ -202,7 +202,7 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u)
|
||||||
PPC405_ERR77(0,%2)
|
PPC405_ERR77(0,%2)
|
||||||
" stwcx. %0,0,%1 \n\
|
" stwcx. %0,0,%1 \n\
|
||||||
bne- 1b \n"
|
bne- 1b \n"
|
||||||
ISYNC_ON_SMP
|
PPC_ACQUIRE_BARRIER
|
||||||
" subf %0,%2,%0 \n\
|
" subf %0,%2,%0 \n\
|
||||||
2:"
|
2:"
|
||||||
: "=&r" (t)
|
: "=&r" (t)
|
||||||
|
@ -227,7 +227,7 @@ static __inline__ int atomic_dec_if_positive(atomic_t *v)
|
||||||
int t;
|
int t;
|
||||||
|
|
||||||
__asm__ __volatile__(
|
__asm__ __volatile__(
|
||||||
LWSYNC_ON_SMP
|
PPC_RELEASE_BARRIER
|
||||||
"1: lwarx %0,0,%1 # atomic_dec_if_positive\n\
|
"1: lwarx %0,0,%1 # atomic_dec_if_positive\n\
|
||||||
cmpwi %0,1\n\
|
cmpwi %0,1\n\
|
||||||
addi %0,%0,-1\n\
|
addi %0,%0,-1\n\
|
||||||
|
@ -235,7 +235,7 @@ static __inline__ int atomic_dec_if_positive(atomic_t *v)
|
||||||
PPC405_ERR77(0,%1)
|
PPC405_ERR77(0,%1)
|
||||||
" stwcx. %0,0,%1\n\
|
" stwcx. %0,0,%1\n\
|
||||||
bne- 1b"
|
bne- 1b"
|
||||||
ISYNC_ON_SMP
|
PPC_ACQUIRE_BARRIER
|
||||||
"\n\
|
"\n\
|
||||||
2:" : "=&b" (t)
|
2:" : "=&b" (t)
|
||||||
: "r" (&v->counter)
|
: "r" (&v->counter)
|
||||||
|
@ -286,12 +286,12 @@ static __inline__ long atomic64_add_return(long a, atomic64_t *v)
|
||||||
long t;
|
long t;
|
||||||
|
|
||||||
__asm__ __volatile__(
|
__asm__ __volatile__(
|
||||||
LWSYNC_ON_SMP
|
PPC_RELEASE_BARRIER
|
||||||
"1: ldarx %0,0,%2 # atomic64_add_return\n\
|
"1: ldarx %0,0,%2 # atomic64_add_return\n\
|
||||||
add %0,%1,%0\n\
|
add %0,%1,%0\n\
|
||||||
stdcx. %0,0,%2 \n\
|
stdcx. %0,0,%2 \n\
|
||||||
bne- 1b"
|
bne- 1b"
|
||||||
ISYNC_ON_SMP
|
PPC_ACQUIRE_BARRIER
|
||||||
: "=&r" (t)
|
: "=&r" (t)
|
||||||
: "r" (a), "r" (&v->counter)
|
: "r" (a), "r" (&v->counter)
|
||||||
: "cc", "memory");
|
: "cc", "memory");
|
||||||
|
@ -320,12 +320,12 @@ static __inline__ long atomic64_sub_return(long a, atomic64_t *v)
|
||||||
long t;
|
long t;
|
||||||
|
|
||||||
__asm__ __volatile__(
|
__asm__ __volatile__(
|
||||||
LWSYNC_ON_SMP
|
PPC_RELEASE_BARRIER
|
||||||
"1: ldarx %0,0,%2 # atomic64_sub_return\n\
|
"1: ldarx %0,0,%2 # atomic64_sub_return\n\
|
||||||
subf %0,%1,%0\n\
|
subf %0,%1,%0\n\
|
||||||
stdcx. %0,0,%2 \n\
|
stdcx. %0,0,%2 \n\
|
||||||
bne- 1b"
|
bne- 1b"
|
||||||
ISYNC_ON_SMP
|
PPC_ACQUIRE_BARRIER
|
||||||
: "=&r" (t)
|
: "=&r" (t)
|
||||||
: "r" (a), "r" (&v->counter)
|
: "r" (a), "r" (&v->counter)
|
||||||
: "cc", "memory");
|
: "cc", "memory");
|
||||||
|
@ -352,12 +352,12 @@ static __inline__ long atomic64_inc_return(atomic64_t *v)
|
||||||
long t;
|
long t;
|
||||||
|
|
||||||
__asm__ __volatile__(
|
__asm__ __volatile__(
|
||||||
LWSYNC_ON_SMP
|
PPC_RELEASE_BARRIER
|
||||||
"1: ldarx %0,0,%1 # atomic64_inc_return\n\
|
"1: ldarx %0,0,%1 # atomic64_inc_return\n\
|
||||||
addic %0,%0,1\n\
|
addic %0,%0,1\n\
|
||||||
stdcx. %0,0,%1 \n\
|
stdcx. %0,0,%1 \n\
|
||||||
bne- 1b"
|
bne- 1b"
|
||||||
ISYNC_ON_SMP
|
PPC_ACQUIRE_BARRIER
|
||||||
: "=&r" (t)
|
: "=&r" (t)
|
||||||
: "r" (&v->counter)
|
: "r" (&v->counter)
|
||||||
: "cc", "xer", "memory");
|
: "cc", "xer", "memory");
|
||||||
|
@ -394,12 +394,12 @@ static __inline__ long atomic64_dec_return(atomic64_t *v)
|
||||||
long t;
|
long t;
|
||||||
|
|
||||||
__asm__ __volatile__(
|
__asm__ __volatile__(
|
||||||
LWSYNC_ON_SMP
|
PPC_RELEASE_BARRIER
|
||||||
"1: ldarx %0,0,%1 # atomic64_dec_return\n\
|
"1: ldarx %0,0,%1 # atomic64_dec_return\n\
|
||||||
addic %0,%0,-1\n\
|
addic %0,%0,-1\n\
|
||||||
stdcx. %0,0,%1\n\
|
stdcx. %0,0,%1\n\
|
||||||
bne- 1b"
|
bne- 1b"
|
||||||
ISYNC_ON_SMP
|
PPC_ACQUIRE_BARRIER
|
||||||
: "=&r" (t)
|
: "=&r" (t)
|
||||||
: "r" (&v->counter)
|
: "r" (&v->counter)
|
||||||
: "cc", "xer", "memory");
|
: "cc", "xer", "memory");
|
||||||
|
@ -419,13 +419,13 @@ static __inline__ long atomic64_dec_if_positive(atomic64_t *v)
|
||||||
long t;
|
long t;
|
||||||
|
|
||||||
__asm__ __volatile__(
|
__asm__ __volatile__(
|
||||||
LWSYNC_ON_SMP
|
PPC_RELEASE_BARRIER
|
||||||
"1: ldarx %0,0,%1 # atomic64_dec_if_positive\n\
|
"1: ldarx %0,0,%1 # atomic64_dec_if_positive\n\
|
||||||
addic. %0,%0,-1\n\
|
addic. %0,%0,-1\n\
|
||||||
blt- 2f\n\
|
blt- 2f\n\
|
||||||
stdcx. %0,0,%1\n\
|
stdcx. %0,0,%1\n\
|
||||||
bne- 1b"
|
bne- 1b"
|
||||||
ISYNC_ON_SMP
|
PPC_ACQUIRE_BARRIER
|
||||||
"\n\
|
"\n\
|
||||||
2:" : "=&r" (t)
|
2:" : "=&r" (t)
|
||||||
: "r" (&v->counter)
|
: "r" (&v->counter)
|
||||||
|
@ -451,14 +451,14 @@ static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u)
|
||||||
long t;
|
long t;
|
||||||
|
|
||||||
__asm__ __volatile__ (
|
__asm__ __volatile__ (
|
||||||
LWSYNC_ON_SMP
|
PPC_RELEASE_BARRIER
|
||||||
"1: ldarx %0,0,%1 # atomic_add_unless\n\
|
"1: ldarx %0,0,%1 # atomic_add_unless\n\
|
||||||
cmpd 0,%0,%3 \n\
|
cmpd 0,%0,%3 \n\
|
||||||
beq- 2f \n\
|
beq- 2f \n\
|
||||||
add %0,%2,%0 \n"
|
add %0,%2,%0 \n"
|
||||||
" stdcx. %0,0,%1 \n\
|
" stdcx. %0,0,%1 \n\
|
||||||
bne- 1b \n"
|
bne- 1b \n"
|
||||||
ISYNC_ON_SMP
|
PPC_ACQUIRE_BARRIER
|
||||||
" subf %0,%2,%0 \n\
|
" subf %0,%2,%0 \n\
|
||||||
2:"
|
2:"
|
||||||
: "=&r" (t)
|
: "=&r" (t)
|
||||||
|
|
|
@ -65,7 +65,7 @@ static __inline__ void fn(unsigned long mask, \
|
||||||
unsigned long *p = (unsigned long *)_p; \
|
unsigned long *p = (unsigned long *)_p; \
|
||||||
__asm__ __volatile__ ( \
|
__asm__ __volatile__ ( \
|
||||||
prefix \
|
prefix \
|
||||||
"1:" PPC_LLARX "%0,0,%3\n" \
|
"1:" PPC_LLARX(%0,0,%3,0) "\n" \
|
||||||
stringify_in_c(op) "%0,%0,%2\n" \
|
stringify_in_c(op) "%0,%0,%2\n" \
|
||||||
PPC405_ERR77(0,%3) \
|
PPC405_ERR77(0,%3) \
|
||||||
PPC_STLCX "%0,0,%3\n" \
|
PPC_STLCX "%0,0,%3\n" \
|
||||||
|
@ -78,7 +78,7 @@ static __inline__ void fn(unsigned long mask, \
|
||||||
|
|
||||||
DEFINE_BITOP(set_bits, or, "", "")
|
DEFINE_BITOP(set_bits, or, "", "")
|
||||||
DEFINE_BITOP(clear_bits, andc, "", "")
|
DEFINE_BITOP(clear_bits, andc, "", "")
|
||||||
DEFINE_BITOP(clear_bits_unlock, andc, LWSYNC_ON_SMP, "")
|
DEFINE_BITOP(clear_bits_unlock, andc, PPC_RELEASE_BARRIER, "")
|
||||||
DEFINE_BITOP(change_bits, xor, "", "")
|
DEFINE_BITOP(change_bits, xor, "", "")
|
||||||
|
|
||||||
static __inline__ void set_bit(int nr, volatile unsigned long *addr)
|
static __inline__ void set_bit(int nr, volatile unsigned long *addr)
|
||||||
|
@ -103,7 +103,7 @@ static __inline__ void change_bit(int nr, volatile unsigned long *addr)
|
||||||
|
|
||||||
/* Like DEFINE_BITOP(), with changes to the arguments to 'op' and the output
|
/* Like DEFINE_BITOP(), with changes to the arguments to 'op' and the output
|
||||||
* operands. */
|
* operands. */
|
||||||
#define DEFINE_TESTOP(fn, op, prefix, postfix) \
|
#define DEFINE_TESTOP(fn, op, prefix, postfix, eh) \
|
||||||
static __inline__ unsigned long fn( \
|
static __inline__ unsigned long fn( \
|
||||||
unsigned long mask, \
|
unsigned long mask, \
|
||||||
volatile unsigned long *_p) \
|
volatile unsigned long *_p) \
|
||||||
|
@ -112,7 +112,7 @@ static __inline__ unsigned long fn( \
|
||||||
unsigned long *p = (unsigned long *)_p; \
|
unsigned long *p = (unsigned long *)_p; \
|
||||||
__asm__ __volatile__ ( \
|
__asm__ __volatile__ ( \
|
||||||
prefix \
|
prefix \
|
||||||
"1:" PPC_LLARX "%0,0,%3\n" \
|
"1:" PPC_LLARX(%0,0,%3,eh) "\n" \
|
||||||
stringify_in_c(op) "%1,%0,%2\n" \
|
stringify_in_c(op) "%1,%0,%2\n" \
|
||||||
PPC405_ERR77(0,%3) \
|
PPC405_ERR77(0,%3) \
|
||||||
PPC_STLCX "%1,0,%3\n" \
|
PPC_STLCX "%1,0,%3\n" \
|
||||||
|
@ -124,10 +124,14 @@ static __inline__ unsigned long fn( \
|
||||||
return (old & mask); \
|
return (old & mask); \
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFINE_TESTOP(test_and_set_bits, or, LWSYNC_ON_SMP, ISYNC_ON_SMP)
|
DEFINE_TESTOP(test_and_set_bits, or, PPC_RELEASE_BARRIER,
|
||||||
DEFINE_TESTOP(test_and_set_bits_lock, or, "", ISYNC_ON_SMP)
|
PPC_ACQUIRE_BARRIER, 0)
|
||||||
DEFINE_TESTOP(test_and_clear_bits, andc, LWSYNC_ON_SMP, ISYNC_ON_SMP)
|
DEFINE_TESTOP(test_and_set_bits_lock, or, "",
|
||||||
DEFINE_TESTOP(test_and_change_bits, xor, LWSYNC_ON_SMP, ISYNC_ON_SMP)
|
PPC_ACQUIRE_BARRIER, 1)
|
||||||
|
DEFINE_TESTOP(test_and_clear_bits, andc, PPC_RELEASE_BARRIER,
|
||||||
|
PPC_ACQUIRE_BARRIER, 0)
|
||||||
|
DEFINE_TESTOP(test_and_change_bits, xor, PPC_RELEASE_BARRIER,
|
||||||
|
PPC_ACQUIRE_BARRIER, 0)
|
||||||
|
|
||||||
static __inline__ int test_and_set_bit(unsigned long nr,
|
static __inline__ int test_and_set_bit(unsigned long nr,
|
||||||
volatile unsigned long *addr)
|
volatile unsigned long *addr)
|
||||||
|
@ -158,7 +162,7 @@ static __inline__ int test_and_change_bit(unsigned long nr,
|
||||||
|
|
||||||
static __inline__ void __clear_bit_unlock(int nr, volatile unsigned long *addr)
|
static __inline__ void __clear_bit_unlock(int nr, volatile unsigned long *addr)
|
||||||
{
|
{
|
||||||
__asm__ __volatile__(LWSYNC_ON_SMP "" ::: "memory");
|
__asm__ __volatile__(PPC_RELEASE_BARRIER "" ::: "memory");
|
||||||
__clear_bit(nr, addr);
|
__clear_bit(nr, addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -381,9 +381,9 @@ extern const char *powerpc_base_platform;
|
||||||
#define CPU_FTRS_GENERIC_32 (CPU_FTR_COMMON | CPU_FTR_NODSISRALIGN)
|
#define CPU_FTRS_GENERIC_32 (CPU_FTR_COMMON | CPU_FTR_NODSISRALIGN)
|
||||||
|
|
||||||
/* 64-bit CPUs */
|
/* 64-bit CPUs */
|
||||||
#define CPU_FTRS_POWER3 (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \
|
#define CPU_FTRS_POWER3 (CPU_FTR_USE_TB | \
|
||||||
CPU_FTR_IABR | CPU_FTR_PPC_LE)
|
CPU_FTR_IABR | CPU_FTR_PPC_LE)
|
||||||
#define CPU_FTRS_RS64 (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \
|
#define CPU_FTRS_RS64 (CPU_FTR_USE_TB | \
|
||||||
CPU_FTR_IABR | \
|
CPU_FTR_IABR | \
|
||||||
CPU_FTR_MMCRA | CPU_FTR_CTRL)
|
CPU_FTR_MMCRA | CPU_FTR_CTRL)
|
||||||
#define CPU_FTRS_POWER4 (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \
|
#define CPU_FTRS_POWER4 (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \
|
||||||
|
|
|
@ -73,10 +73,9 @@ static inline unsigned long cputime_to_jiffies(const cputime_t ct)
|
||||||
static inline cputime_t cputime_to_scaled(const cputime_t ct)
|
static inline cputime_t cputime_to_scaled(const cputime_t ct)
|
||||||
{
|
{
|
||||||
if (cpu_has_feature(CPU_FTR_SPURR) &&
|
if (cpu_has_feature(CPU_FTR_SPURR) &&
|
||||||
per_cpu(cputime_last_delta, smp_processor_id()))
|
__get_cpu_var(cputime_last_delta))
|
||||||
return ct *
|
return ct * __get_cpu_var(cputime_scaled_last_delta) /
|
||||||
per_cpu(cputime_scaled_last_delta, smp_processor_id())/
|
__get_cpu_var(cputime_last_delta);
|
||||||
per_cpu(cputime_last_delta, smp_processor_id());
|
|
||||||
return ct;
|
return ct;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -165,7 +165,7 @@ label##2: \
|
||||||
.pushsection sect,"a"; \
|
.pushsection sect,"a"; \
|
||||||
.align 2; \
|
.align 2; \
|
||||||
label##3: \
|
label##3: \
|
||||||
.long label##1b-label##3b; \
|
FTR_ENTRY_OFFSET label##1b-label##3b; \
|
||||||
.popsection;
|
.popsection;
|
||||||
|
|
||||||
#endif /* __ASM_POWERPC_FEATURE_FIXUPS_H */
|
#endif /* __ASM_POWERPC_FEATURE_FIXUPS_H */
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
#define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \
|
#define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \
|
||||||
__asm__ __volatile ( \
|
__asm__ __volatile ( \
|
||||||
LWSYNC_ON_SMP \
|
PPC_RELEASE_BARRIER \
|
||||||
"1: lwarx %0,0,%2\n" \
|
"1: lwarx %0,0,%2\n" \
|
||||||
insn \
|
insn \
|
||||||
PPC405_ERR77(0, %2) \
|
PPC405_ERR77(0, %2) \
|
||||||
|
@ -90,14 +90,14 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
__asm__ __volatile__ (
|
__asm__ __volatile__ (
|
||||||
LWSYNC_ON_SMP
|
PPC_RELEASE_BARRIER
|
||||||
"1: lwarx %0,0,%2 # futex_atomic_cmpxchg_inatomic\n\
|
"1: lwarx %0,0,%2 # futex_atomic_cmpxchg_inatomic\n\
|
||||||
cmpw 0,%0,%3\n\
|
cmpw 0,%0,%3\n\
|
||||||
bne- 3f\n"
|
bne- 3f\n"
|
||||||
PPC405_ERR77(0,%2)
|
PPC405_ERR77(0,%2)
|
||||||
"2: stwcx. %4,0,%2\n\
|
"2: stwcx. %4,0,%2\n\
|
||||||
bne- 1b\n"
|
bne- 1b\n"
|
||||||
ISYNC_ON_SMP
|
PPC_ACQUIRE_BARRIER
|
||||||
"3: .section .fixup,\"ax\"\n\
|
"3: .section .fixup,\"ax\"\n\
|
||||||
4: li %0,%5\n\
|
4: li %0,%5\n\
|
||||||
b 3b\n\
|
b 3b\n\
|
||||||
|
|
|
@ -1 +1,29 @@
|
||||||
#include <asm-generic/hardirq.h>
|
#ifndef _ASM_POWERPC_HARDIRQ_H
|
||||||
|
#define _ASM_POWERPC_HARDIRQ_H
|
||||||
|
|
||||||
|
#include <linux/threads.h>
|
||||||
|
#include <linux/irq.h>
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
unsigned int __softirq_pending;
|
||||||
|
unsigned int timer_irqs;
|
||||||
|
unsigned int pmu_irqs;
|
||||||
|
unsigned int mce_exceptions;
|
||||||
|
unsigned int spurious_irqs;
|
||||||
|
} ____cacheline_aligned irq_cpustat_t;
|
||||||
|
|
||||||
|
DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
|
||||||
|
|
||||||
|
#define __ARCH_IRQ_STAT
|
||||||
|
|
||||||
|
#define local_softirq_pending() __get_cpu_var(irq_stat).__softirq_pending
|
||||||
|
|
||||||
|
static inline void ack_bad_irq(unsigned int irq)
|
||||||
|
{
|
||||||
|
printk(KERN_CRIT "unexpected IRQ trap at vector %02x\n", irq);
|
||||||
|
}
|
||||||
|
|
||||||
|
extern u64 arch_irq_stat_cpu(unsigned int cpu);
|
||||||
|
#define arch_irq_stat_cpu arch_irq_stat_cpu
|
||||||
|
|
||||||
|
#endif /* _ASM_POWERPC_HARDIRQ_H */
|
||||||
|
|
|
@ -24,7 +24,7 @@ static __inline__ long local_add_return(long a, local_t *l)
|
||||||
long t;
|
long t;
|
||||||
|
|
||||||
__asm__ __volatile__(
|
__asm__ __volatile__(
|
||||||
"1:" PPC_LLARX "%0,0,%2 # local_add_return\n\
|
"1:" PPC_LLARX(%0,0,%2,0) " # local_add_return\n\
|
||||||
add %0,%1,%0\n"
|
add %0,%1,%0\n"
|
||||||
PPC405_ERR77(0,%2)
|
PPC405_ERR77(0,%2)
|
||||||
PPC_STLCX "%0,0,%2 \n\
|
PPC_STLCX "%0,0,%2 \n\
|
||||||
|
@ -43,7 +43,7 @@ static __inline__ long local_sub_return(long a, local_t *l)
|
||||||
long t;
|
long t;
|
||||||
|
|
||||||
__asm__ __volatile__(
|
__asm__ __volatile__(
|
||||||
"1:" PPC_LLARX "%0,0,%2 # local_sub_return\n\
|
"1:" PPC_LLARX(%0,0,%2,0) " # local_sub_return\n\
|
||||||
subf %0,%1,%0\n"
|
subf %0,%1,%0\n"
|
||||||
PPC405_ERR77(0,%2)
|
PPC405_ERR77(0,%2)
|
||||||
PPC_STLCX "%0,0,%2 \n\
|
PPC_STLCX "%0,0,%2 \n\
|
||||||
|
@ -60,7 +60,7 @@ static __inline__ long local_inc_return(local_t *l)
|
||||||
long t;
|
long t;
|
||||||
|
|
||||||
__asm__ __volatile__(
|
__asm__ __volatile__(
|
||||||
"1:" PPC_LLARX "%0,0,%1 # local_inc_return\n\
|
"1:" PPC_LLARX(%0,0,%1,0) " # local_inc_return\n\
|
||||||
addic %0,%0,1\n"
|
addic %0,%0,1\n"
|
||||||
PPC405_ERR77(0,%1)
|
PPC405_ERR77(0,%1)
|
||||||
PPC_STLCX "%0,0,%1 \n\
|
PPC_STLCX "%0,0,%1 \n\
|
||||||
|
@ -87,7 +87,7 @@ static __inline__ long local_dec_return(local_t *l)
|
||||||
long t;
|
long t;
|
||||||
|
|
||||||
__asm__ __volatile__(
|
__asm__ __volatile__(
|
||||||
"1:" PPC_LLARX "%0,0,%1 # local_dec_return\n\
|
"1:" PPC_LLARX(%0,0,%1,0) " # local_dec_return\n\
|
||||||
addic %0,%0,-1\n"
|
addic %0,%0,-1\n"
|
||||||
PPC405_ERR77(0,%1)
|
PPC405_ERR77(0,%1)
|
||||||
PPC_STLCX "%0,0,%1\n\
|
PPC_STLCX "%0,0,%1\n\
|
||||||
|
@ -117,7 +117,7 @@ static __inline__ int local_add_unless(local_t *l, long a, long u)
|
||||||
long t;
|
long t;
|
||||||
|
|
||||||
__asm__ __volatile__ (
|
__asm__ __volatile__ (
|
||||||
"1:" PPC_LLARX "%0,0,%1 # local_add_unless\n\
|
"1:" PPC_LLARX(%0,0,%1,0) " # local_add_unless\n\
|
||||||
cmpw 0,%0,%3 \n\
|
cmpw 0,%0,%3 \n\
|
||||||
beq- 2f \n\
|
beq- 2f \n\
|
||||||
add %0,%2,%0 \n"
|
add %0,%2,%0 \n"
|
||||||
|
@ -147,7 +147,7 @@ static __inline__ long local_dec_if_positive(local_t *l)
|
||||||
long t;
|
long t;
|
||||||
|
|
||||||
__asm__ __volatile__(
|
__asm__ __volatile__(
|
||||||
"1:" PPC_LLARX "%0,0,%1 # local_dec_if_positive\n\
|
"1:" PPC_LLARX(%0,0,%1,0) " # local_dec_if_positive\n\
|
||||||
cmpwi %0,1\n\
|
cmpwi %0,1\n\
|
||||||
addi %0,%0,-1\n\
|
addi %0,%0,-1\n\
|
||||||
blt- 2f\n"
|
blt- 2f\n"
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
/*
|
||||||
|
* MPC5121 Prototypes and definitions
|
||||||
|
*
|
||||||
|
* This file is licensed under the terms of the GNU General Public
|
||||||
|
* License version 2.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __ASM_POWERPC_MPC5121_H__
|
||||||
|
#define __ASM_POWERPC_MPC5121_H__
|
||||||
|
|
||||||
|
/* MPC512x Reset module registers */
|
||||||
|
struct mpc512x_reset_module {
|
||||||
|
u32 rcwlr; /* Reset Configuration Word Low Register */
|
||||||
|
u32 rcwhr; /* Reset Configuration Word High Register */
|
||||||
|
u32 reserved1;
|
||||||
|
u32 reserved2;
|
||||||
|
u32 rsr; /* Reset Status Register */
|
||||||
|
u32 rmr; /* Reset Mode Register */
|
||||||
|
u32 rpr; /* Reset Protection Register */
|
||||||
|
u32 rcr; /* Reset Control Register */
|
||||||
|
u32 rcer; /* Reset Control Enable Register */
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* __ASM_POWERPC_MPC5121_H__ */
|
|
@ -25,7 +25,11 @@
|
||||||
#include <asm/types.h>
|
#include <asm/types.h>
|
||||||
|
|
||||||
/* Max number of PSCs */
|
/* Max number of PSCs */
|
||||||
|
#ifdef CONFIG_PPC_MPC512x
|
||||||
|
#define MPC52xx_PSC_MAXNUM 12
|
||||||
|
#else
|
||||||
#define MPC52xx_PSC_MAXNUM 6
|
#define MPC52xx_PSC_MAXNUM 6
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Programmable Serial Controller (PSC) status register bits */
|
/* Programmable Serial Controller (PSC) status register bits */
|
||||||
#define MPC52xx_PSC_SR_UNEX_RX 0x0001
|
#define MPC52xx_PSC_SR_UNEX_RX 0x0001
|
||||||
|
|
|
@ -289,7 +289,7 @@ struct mpic
|
||||||
#ifdef CONFIG_MPIC_U3_HT_IRQS
|
#ifdef CONFIG_MPIC_U3_HT_IRQS
|
||||||
/* The fixup table */
|
/* The fixup table */
|
||||||
struct mpic_irq_fixup *fixups;
|
struct mpic_irq_fixup *fixups;
|
||||||
spinlock_t fixup_lock;
|
raw_spinlock_t fixup_lock;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Register access method */
|
/* Register access method */
|
||||||
|
|
|
@ -15,7 +15,7 @@ static inline int __mutex_cmpxchg_lock(atomic_t *v, int old, int new)
|
||||||
PPC405_ERR77(0,%1)
|
PPC405_ERR77(0,%1)
|
||||||
" stwcx. %3,0,%1\n\
|
" stwcx. %3,0,%1\n\
|
||||||
bne- 1b"
|
bne- 1b"
|
||||||
ISYNC_ON_SMP
|
PPC_ACQUIRE_BARRIER
|
||||||
"\n\
|
"\n\
|
||||||
2:"
|
2:"
|
||||||
: "=&r" (t)
|
: "=&r" (t)
|
||||||
|
@ -35,7 +35,7 @@ static inline int __mutex_dec_return_lock(atomic_t *v)
|
||||||
PPC405_ERR77(0,%1)
|
PPC405_ERR77(0,%1)
|
||||||
" stwcx. %0,0,%1\n\
|
" stwcx. %0,0,%1\n\
|
||||||
bne- 1b"
|
bne- 1b"
|
||||||
ISYNC_ON_SMP
|
PPC_ACQUIRE_BARRIER
|
||||||
: "=&r" (t)
|
: "=&r" (t)
|
||||||
: "r" (&v->counter)
|
: "r" (&v->counter)
|
||||||
: "cc", "memory");
|
: "cc", "memory");
|
||||||
|
@ -48,7 +48,7 @@ static inline int __mutex_inc_return_unlock(atomic_t *v)
|
||||||
int t;
|
int t;
|
||||||
|
|
||||||
__asm__ __volatile__(
|
__asm__ __volatile__(
|
||||||
LWSYNC_ON_SMP
|
PPC_RELEASE_BARRIER
|
||||||
"1: lwarx %0,0,%1 # mutex unlock\n\
|
"1: lwarx %0,0,%1 # mutex unlock\n\
|
||||||
addic %0,%0,1\n"
|
addic %0,%0,1\n"
|
||||||
PPC405_ERR77(0,%1)
|
PPC405_ERR77(0,%1)
|
||||||
|
|
|
@ -1,22 +1 @@
|
||||||
#ifndef _ASM_POWERPC_PARAM_H
|
#include <asm-generic/param.h>
|
||||||
#define _ASM_POWERPC_PARAM_H
|
|
||||||
|
|
||||||
#ifdef __KERNEL__
|
|
||||||
#define HZ CONFIG_HZ /* internal kernel timer frequency */
|
|
||||||
#define USER_HZ 100 /* for user interfaces in "ticks" */
|
|
||||||
#define CLOCKS_PER_SEC (USER_HZ) /* frequency at which times() counts */
|
|
||||||
#endif /* __KERNEL__ */
|
|
||||||
|
|
||||||
#ifndef HZ
|
|
||||||
#define HZ 100
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define EXEC_PAGESIZE 4096
|
|
||||||
|
|
||||||
#ifndef NOGROUP
|
|
||||||
#define NOGROUP (-1)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define MAXHOSTNAMELEN 64 /* max length of hostname */
|
|
||||||
|
|
||||||
#endif /* _ASM_POWERPC_PARAM_H */
|
|
||||||
|
|
|
@ -378,7 +378,7 @@ extern struct macio_chip* macio_find(struct device_node* child, int type);
|
||||||
* Those are exported by pmac feature for internal use by arch code
|
* Those are exported by pmac feature for internal use by arch code
|
||||||
* only like the platform function callbacks, do not use directly in drivers
|
* only like the platform function callbacks, do not use directly in drivers
|
||||||
*/
|
*/
|
||||||
extern spinlock_t feature_lock;
|
extern raw_spinlock_t feature_lock;
|
||||||
extern struct device_node *uninorth_node;
|
extern struct device_node *uninorth_node;
|
||||||
extern u32 __iomem *uninorth_base;
|
extern u32 __iomem *uninorth_base;
|
||||||
|
|
||||||
|
|
|
@ -22,8 +22,10 @@
|
||||||
#define PPC_INST_DCBZL 0x7c2007ec
|
#define PPC_INST_DCBZL 0x7c2007ec
|
||||||
#define PPC_INST_ISEL 0x7c00001e
|
#define PPC_INST_ISEL 0x7c00001e
|
||||||
#define PPC_INST_ISEL_MASK 0xfc00003e
|
#define PPC_INST_ISEL_MASK 0xfc00003e
|
||||||
|
#define PPC_INST_LDARX 0x7c0000a8
|
||||||
#define PPC_INST_LSWI 0x7c0004aa
|
#define PPC_INST_LSWI 0x7c0004aa
|
||||||
#define PPC_INST_LSWX 0x7c00042a
|
#define PPC_INST_LSWX 0x7c00042a
|
||||||
|
#define PPC_INST_LWARX 0x7c000029
|
||||||
#define PPC_INST_LWSYNC 0x7c2004ac
|
#define PPC_INST_LWSYNC 0x7c2004ac
|
||||||
#define PPC_INST_LXVD2X 0x7c000698
|
#define PPC_INST_LXVD2X 0x7c000698
|
||||||
#define PPC_INST_MCRXR 0x7c000400
|
#define PPC_INST_MCRXR 0x7c000400
|
||||||
|
@ -55,15 +57,31 @@
|
||||||
#define __PPC_RA(a) (((a) & 0x1f) << 16)
|
#define __PPC_RA(a) (((a) & 0x1f) << 16)
|
||||||
#define __PPC_RB(b) (((b) & 0x1f) << 11)
|
#define __PPC_RB(b) (((b) & 0x1f) << 11)
|
||||||
#define __PPC_RS(s) (((s) & 0x1f) << 21)
|
#define __PPC_RS(s) (((s) & 0x1f) << 21)
|
||||||
|
#define __PPC_RT(s) __PPC_RS(s)
|
||||||
#define __PPC_XS(s) ((((s) & 0x1f) << 21) | (((s) & 0x20) >> 5))
|
#define __PPC_XS(s) ((((s) & 0x1f) << 21) | (((s) & 0x20) >> 5))
|
||||||
#define __PPC_T_TLB(t) (((t) & 0x3) << 21)
|
#define __PPC_T_TLB(t) (((t) & 0x3) << 21)
|
||||||
#define __PPC_WC(w) (((w) & 0x3) << 21)
|
#define __PPC_WC(w) (((w) & 0x3) << 21)
|
||||||
|
/*
|
||||||
|
* Only use the larx hint bit on 64bit CPUs. Once we verify it doesn't have
|
||||||
|
* any side effects on all 32bit processors, we can do this all the time.
|
||||||
|
*/
|
||||||
|
#ifdef CONFIG_PPC64
|
||||||
|
#define __PPC_EH(eh) (((eh) & 0x1) << 0)
|
||||||
|
#else
|
||||||
|
#define __PPC_EH(eh) 0
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Deal with instructions that older assemblers aren't aware of */
|
/* Deal with instructions that older assemblers aren't aware of */
|
||||||
#define PPC_DCBAL(a, b) stringify_in_c(.long PPC_INST_DCBAL | \
|
#define PPC_DCBAL(a, b) stringify_in_c(.long PPC_INST_DCBAL | \
|
||||||
__PPC_RA(a) | __PPC_RB(b))
|
__PPC_RA(a) | __PPC_RB(b))
|
||||||
#define PPC_DCBZL(a, b) stringify_in_c(.long PPC_INST_DCBZL | \
|
#define PPC_DCBZL(a, b) stringify_in_c(.long PPC_INST_DCBZL | \
|
||||||
__PPC_RA(a) | __PPC_RB(b))
|
__PPC_RA(a) | __PPC_RB(b))
|
||||||
|
#define PPC_LDARX(t, a, b, eh) stringify_in_c(.long PPC_INST_LDARX | \
|
||||||
|
__PPC_RT(t) | __PPC_RA(a) | \
|
||||||
|
__PPC_RB(b) | __PPC_EH(eh))
|
||||||
|
#define PPC_LWARX(t, a, b, eh) stringify_in_c(.long PPC_INST_LWARX | \
|
||||||
|
__PPC_RT(t) | __PPC_RA(a) | \
|
||||||
|
__PPC_RB(b) | __PPC_EH(eh))
|
||||||
#define PPC_MSGSND(b) stringify_in_c(.long PPC_INST_MSGSND | \
|
#define PPC_MSGSND(b) stringify_in_c(.long PPC_INST_MSGSND | \
|
||||||
__PPC_RB(b))
|
__PPC_RB(b))
|
||||||
#define PPC_RFCI stringify_in_c(.long PPC_INST_RFCI)
|
#define PPC_RFCI stringify_in_c(.long PPC_INST_RFCI)
|
||||||
|
|
|
@ -137,6 +137,11 @@ struct device_node * find_device_pe(struct device_node *dn);
|
||||||
void eeh_sysfs_add_device(struct pci_dev *pdev);
|
void eeh_sysfs_add_device(struct pci_dev *pdev);
|
||||||
void eeh_sysfs_remove_device(struct pci_dev *pdev);
|
void eeh_sysfs_remove_device(struct pci_dev *pdev);
|
||||||
|
|
||||||
|
static inline const char *eeh_pci_name(struct pci_dev *pdev)
|
||||||
|
{
|
||||||
|
return pdev ? pci_name(pdev) : "<null>";
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_EEH */
|
#endif /* CONFIG_EEH */
|
||||||
|
|
||||||
#else /* CONFIG_PCI */
|
#else /* CONFIG_PCI */
|
||||||
|
|
|
@ -161,9 +161,41 @@ struct thread_struct {
|
||||||
#ifdef CONFIG_PPC32
|
#ifdef CONFIG_PPC32
|
||||||
void *pgdir; /* root of page-table tree */
|
void *pgdir; /* root of page-table tree */
|
||||||
#endif
|
#endif
|
||||||
#if defined(CONFIG_4xx) || defined (CONFIG_BOOKE)
|
#ifdef CONFIG_PPC_ADV_DEBUG_REGS
|
||||||
unsigned long dbcr0; /* debug control register values */
|
/*
|
||||||
|
* The following help to manage the use of Debug Control Registers
|
||||||
|
* om the BookE platforms.
|
||||||
|
*/
|
||||||
|
unsigned long dbcr0;
|
||||||
unsigned long dbcr1;
|
unsigned long dbcr1;
|
||||||
|
#ifdef CONFIG_BOOKE
|
||||||
|
unsigned long dbcr2;
|
||||||
|
#endif
|
||||||
|
/*
|
||||||
|
* The stored value of the DBSR register will be the value at the
|
||||||
|
* last debug interrupt. This register can only be read from the
|
||||||
|
* user (will never be written to) and has value while helping to
|
||||||
|
* describe the reason for the last debug trap. Torez
|
||||||
|
*/
|
||||||
|
unsigned long dbsr;
|
||||||
|
/*
|
||||||
|
* The following will contain addresses used by debug applications
|
||||||
|
* to help trace and trap on particular address locations.
|
||||||
|
* The bits in the Debug Control Registers above help define which
|
||||||
|
* of the following registers will contain valid data and/or addresses.
|
||||||
|
*/
|
||||||
|
unsigned long iac1;
|
||||||
|
unsigned long iac2;
|
||||||
|
#if CONFIG_PPC_ADV_DEBUG_IACS > 2
|
||||||
|
unsigned long iac3;
|
||||||
|
unsigned long iac4;
|
||||||
|
#endif
|
||||||
|
unsigned long dac1;
|
||||||
|
unsigned long dac2;
|
||||||
|
#if CONFIG_PPC_ADV_DEBUG_DVCS > 0
|
||||||
|
unsigned long dvc1;
|
||||||
|
unsigned long dvc2;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
/* FP and VSX 0-31 register set */
|
/* FP and VSX 0-31 register set */
|
||||||
double fpr[32][TS_FPRWIDTH];
|
double fpr[32][TS_FPRWIDTH];
|
||||||
|
|
|
@ -24,6 +24,12 @@
|
||||||
* 2 of the License, or (at your option) any later version.
|
* 2 of the License, or (at your option) any later version.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef __KERNEL__
|
||||||
|
#include <linux/types.h>
|
||||||
|
#else
|
||||||
|
#include <stdint.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
struct pt_regs {
|
struct pt_regs {
|
||||||
|
@ -294,4 +300,75 @@ extern void user_disable_single_step(struct task_struct *);
|
||||||
|
|
||||||
#define PTRACE_SINGLEBLOCK 0x100 /* resume execution until next branch */
|
#define PTRACE_SINGLEBLOCK 0x100 /* resume execution until next branch */
|
||||||
|
|
||||||
|
#define PPC_PTRACE_GETHWDBGINFO 0x89
|
||||||
|
#define PPC_PTRACE_SETHWDEBUG 0x88
|
||||||
|
#define PPC_PTRACE_DELHWDEBUG 0x87
|
||||||
|
|
||||||
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
|
struct ppc_debug_info {
|
||||||
|
uint32_t version; /* Only version 1 exists to date */
|
||||||
|
uint32_t num_instruction_bps;
|
||||||
|
uint32_t num_data_bps;
|
||||||
|
uint32_t num_condition_regs;
|
||||||
|
uint32_t data_bp_alignment;
|
||||||
|
uint32_t sizeof_condition; /* size of the DVC register */
|
||||||
|
uint64_t features;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* __ASSEMBLY__ */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* features will have bits indication whether there is support for:
|
||||||
|
*/
|
||||||
|
#define PPC_DEBUG_FEATURE_INSN_BP_RANGE 0x0000000000000001
|
||||||
|
#define PPC_DEBUG_FEATURE_INSN_BP_MASK 0x0000000000000002
|
||||||
|
#define PPC_DEBUG_FEATURE_DATA_BP_RANGE 0x0000000000000004
|
||||||
|
#define PPC_DEBUG_FEATURE_DATA_BP_MASK 0x0000000000000008
|
||||||
|
|
||||||
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
|
struct ppc_hw_breakpoint {
|
||||||
|
uint32_t version; /* currently, version must be 1 */
|
||||||
|
uint32_t trigger_type; /* only some combinations allowed */
|
||||||
|
uint32_t addr_mode; /* address match mode */
|
||||||
|
uint32_t condition_mode; /* break/watchpoint condition flags */
|
||||||
|
uint64_t addr; /* break/watchpoint address */
|
||||||
|
uint64_t addr2; /* range end or mask */
|
||||||
|
uint64_t condition_value; /* contents of the DVC register */
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* __ASSEMBLY__ */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Trigger Type
|
||||||
|
*/
|
||||||
|
#define PPC_BREAKPOINT_TRIGGER_EXECUTE 0x00000001
|
||||||
|
#define PPC_BREAKPOINT_TRIGGER_READ 0x00000002
|
||||||
|
#define PPC_BREAKPOINT_TRIGGER_WRITE 0x00000004
|
||||||
|
#define PPC_BREAKPOINT_TRIGGER_RW \
|
||||||
|
(PPC_BREAKPOINT_TRIGGER_READ | PPC_BREAKPOINT_TRIGGER_WRITE)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Address Mode
|
||||||
|
*/
|
||||||
|
#define PPC_BREAKPOINT_MODE_EXACT 0x00000000
|
||||||
|
#define PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE 0x00000001
|
||||||
|
#define PPC_BREAKPOINT_MODE_RANGE_EXCLUSIVE 0x00000002
|
||||||
|
#define PPC_BREAKPOINT_MODE_MASK 0x00000003
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Condition Mode
|
||||||
|
*/
|
||||||
|
#define PPC_BREAKPOINT_CONDITION_MODE 0x00000003
|
||||||
|
#define PPC_BREAKPOINT_CONDITION_NONE 0x00000000
|
||||||
|
#define PPC_BREAKPOINT_CONDITION_AND 0x00000001
|
||||||
|
#define PPC_BREAKPOINT_CONDITION_EXACT PPC_BREAKPOINT_CONDITION_AND
|
||||||
|
#define PPC_BREAKPOINT_CONDITION_OR 0x00000002
|
||||||
|
#define PPC_BREAKPOINT_CONDITION_AND_OR 0x00000003
|
||||||
|
#define PPC_BREAKPOINT_CONDITION_BE_ALL 0x00ff0000
|
||||||
|
#define PPC_BREAKPOINT_CONDITION_BE_SHIFT 16
|
||||||
|
#define PPC_BREAKPOINT_CONDITION_BE(n) \
|
||||||
|
(1<<((n)+PPC_BREAKPOINT_CONDITION_BE_SHIFT))
|
||||||
|
|
||||||
#endif /* _ASM_POWERPC_PTRACE_H */
|
#endif /* _ASM_POWERPC_PTRACE_H */
|
||||||
|
|
|
@ -248,6 +248,8 @@
|
||||||
#define DBSR_RET 0x00008000 /* Return Debug Event */
|
#define DBSR_RET 0x00008000 /* Return Debug Event */
|
||||||
#define DBSR_CIRPT 0x00000040 /* Critical Interrupt Taken Event */
|
#define DBSR_CIRPT 0x00000040 /* Critical Interrupt Taken Event */
|
||||||
#define DBSR_CRET 0x00000020 /* Critical Return Debug Event */
|
#define DBSR_CRET 0x00000020 /* Critical Return Debug Event */
|
||||||
|
#define DBSR_IAC12ATS 0x00000002 /* Instr Address Compare 1/2 Toggle */
|
||||||
|
#define DBSR_IAC34ATS 0x00000001 /* Instr Address Compare 3/4 Toggle */
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_40x
|
#ifdef CONFIG_40x
|
||||||
#define DBSR_IC 0x80000000 /* Instruction Completion */
|
#define DBSR_IC 0x80000000 /* Instruction Completion */
|
||||||
|
@ -313,6 +315,38 @@
|
||||||
#define DBCR0_IA12T 0x00008000 /* Instr Addr 1-2 range Toggle */
|
#define DBCR0_IA12T 0x00008000 /* Instr Addr 1-2 range Toggle */
|
||||||
#define DBCR0_IA34T 0x00004000 /* Instr Addr 3-4 range Toggle */
|
#define DBCR0_IA34T 0x00004000 /* Instr Addr 3-4 range Toggle */
|
||||||
#define DBCR0_FT 0x00000001 /* Freeze Timers on debug event */
|
#define DBCR0_FT 0x00000001 /* Freeze Timers on debug event */
|
||||||
|
|
||||||
|
#define dbcr_iac_range(task) ((task)->thread.dbcr0)
|
||||||
|
#define DBCR_IAC12I DBCR0_IA12 /* Range Inclusive */
|
||||||
|
#define DBCR_IAC12X (DBCR0_IA12 | DBCR0_IA12X) /* Range Exclusive */
|
||||||
|
#define DBCR_IAC12MODE (DBCR0_IA12 | DBCR0_IA12X) /* IAC 1-2 Mode Bits */
|
||||||
|
#define DBCR_IAC34I DBCR0_IA34 /* Range Inclusive */
|
||||||
|
#define DBCR_IAC34X (DBCR0_IA34 | DBCR0_IA34X) /* Range Exclusive */
|
||||||
|
#define DBCR_IAC34MODE (DBCR0_IA34 | DBCR0_IA34X) /* IAC 3-4 Mode Bits */
|
||||||
|
|
||||||
|
/* Bit definitions related to the DBCR1. */
|
||||||
|
#define DBCR1_DAC1R 0x80000000 /* DAC1 Read Debug Event */
|
||||||
|
#define DBCR1_DAC2R 0x40000000 /* DAC2 Read Debug Event */
|
||||||
|
#define DBCR1_DAC1W 0x20000000 /* DAC1 Write Debug Event */
|
||||||
|
#define DBCR1_DAC2W 0x10000000 /* DAC2 Write Debug Event */
|
||||||
|
|
||||||
|
#define dbcr_dac(task) ((task)->thread.dbcr1)
|
||||||
|
#define DBCR_DAC1R DBCR1_DAC1R
|
||||||
|
#define DBCR_DAC1W DBCR1_DAC1W
|
||||||
|
#define DBCR_DAC2R DBCR1_DAC2R
|
||||||
|
#define DBCR_DAC2W DBCR1_DAC2W
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Are there any active Debug Events represented in the
|
||||||
|
* Debug Control Registers?
|
||||||
|
*/
|
||||||
|
#define DBCR0_ACTIVE_EVENTS (DBCR0_ICMP | DBCR0_IAC1 | DBCR0_IAC2 | \
|
||||||
|
DBCR0_IAC3 | DBCR0_IAC4)
|
||||||
|
#define DBCR1_ACTIVE_EVENTS (DBCR1_DAC1R | DBCR1_DAC2R | \
|
||||||
|
DBCR1_DAC1W | DBCR1_DAC2W)
|
||||||
|
#define DBCR_ACTIVE_EVENTS(dbcr0, dbcr1) (((dbcr0) & DBCR0_ACTIVE_EVENTS) || \
|
||||||
|
((dbcr1) & DBCR1_ACTIVE_EVENTS))
|
||||||
|
|
||||||
#elif defined(CONFIG_BOOKE)
|
#elif defined(CONFIG_BOOKE)
|
||||||
#define DBCR0_EDM 0x80000000 /* External Debug Mode */
|
#define DBCR0_EDM 0x80000000 /* External Debug Mode */
|
||||||
#define DBCR0_IDM 0x40000000 /* Internal Debug Mode */
|
#define DBCR0_IDM 0x40000000 /* Internal Debug Mode */
|
||||||
|
@ -342,19 +376,79 @@
|
||||||
#define DBCR0_CRET 0x00000020 /* Critical Return Debug Event */
|
#define DBCR0_CRET 0x00000020 /* Critical Return Debug Event */
|
||||||
#define DBCR0_FT 0x00000001 /* Freeze Timers on debug event */
|
#define DBCR0_FT 0x00000001 /* Freeze Timers on debug event */
|
||||||
|
|
||||||
|
#define dbcr_dac(task) ((task)->thread.dbcr0)
|
||||||
|
#define DBCR_DAC1R DBCR0_DAC1R
|
||||||
|
#define DBCR_DAC1W DBCR0_DAC1W
|
||||||
|
#define DBCR_DAC2R DBCR0_DAC2R
|
||||||
|
#define DBCR_DAC2W DBCR0_DAC2W
|
||||||
|
|
||||||
/* Bit definitions related to the DBCR1. */
|
/* Bit definitions related to the DBCR1. */
|
||||||
|
#define DBCR1_IAC1US 0xC0000000 /* Instr Addr Cmp 1 Sup/User */
|
||||||
|
#define DBCR1_IAC1ER 0x30000000 /* Instr Addr Cmp 1 Eff/Real */
|
||||||
|
#define DBCR1_IAC1ER_01 0x10000000 /* reserved */
|
||||||
|
#define DBCR1_IAC1ER_10 0x20000000 /* Instr Addr Cmp 1 Eff/Real MSR[IS]=0 */
|
||||||
|
#define DBCR1_IAC1ER_11 0x30000000 /* Instr Addr Cmp 1 Eff/Real MSR[IS]=1 */
|
||||||
|
#define DBCR1_IAC2US 0x0C000000 /* Instr Addr Cmp 2 Sup/User */
|
||||||
|
#define DBCR1_IAC2ER 0x03000000 /* Instr Addr Cmp 2 Eff/Real */
|
||||||
|
#define DBCR1_IAC2ER_01 0x01000000 /* reserved */
|
||||||
|
#define DBCR1_IAC2ER_10 0x02000000 /* Instr Addr Cmp 2 Eff/Real MSR[IS]=0 */
|
||||||
|
#define DBCR1_IAC2ER_11 0x03000000 /* Instr Addr Cmp 2 Eff/Real MSR[IS]=1 */
|
||||||
#define DBCR1_IAC12M 0x00800000 /* Instr Addr 1-2 range enable */
|
#define DBCR1_IAC12M 0x00800000 /* Instr Addr 1-2 range enable */
|
||||||
#define DBCR1_IAC12MX 0x00C00000 /* Instr Addr 1-2 range eXclusive */
|
#define DBCR1_IAC12MX 0x00C00000 /* Instr Addr 1-2 range eXclusive */
|
||||||
#define DBCR1_IAC12AT 0x00010000 /* Instr Addr 1-2 range Toggle */
|
#define DBCR1_IAC12AT 0x00010000 /* Instr Addr 1-2 range Toggle */
|
||||||
|
#define DBCR1_IAC3US 0x0000C000 /* Instr Addr Cmp 3 Sup/User */
|
||||||
|
#define DBCR1_IAC3ER 0x00003000 /* Instr Addr Cmp 3 Eff/Real */
|
||||||
|
#define DBCR1_IAC3ER_01 0x00001000 /* reserved */
|
||||||
|
#define DBCR1_IAC3ER_10 0x00002000 /* Instr Addr Cmp 3 Eff/Real MSR[IS]=0 */
|
||||||
|
#define DBCR1_IAC3ER_11 0x00003000 /* Instr Addr Cmp 3 Eff/Real MSR[IS]=1 */
|
||||||
|
#define DBCR1_IAC4US 0x00000C00 /* Instr Addr Cmp 4 Sup/User */
|
||||||
|
#define DBCR1_IAC4ER 0x00000300 /* Instr Addr Cmp 4 Eff/Real */
|
||||||
|
#define DBCR1_IAC4ER_01 0x00000100 /* Instr Addr Cmp 4 Eff/Real MSR[IS]=0 */
|
||||||
|
#define DBCR1_IAC4ER_10 0x00000200 /* Instr Addr Cmp 4 Eff/Real MSR[IS]=0 */
|
||||||
|
#define DBCR1_IAC4ER_11 0x00000300 /* Instr Addr Cmp 4 Eff/Real MSR[IS]=1 */
|
||||||
#define DBCR1_IAC34M 0x00000080 /* Instr Addr 3-4 range enable */
|
#define DBCR1_IAC34M 0x00000080 /* Instr Addr 3-4 range enable */
|
||||||
#define DBCR1_IAC34MX 0x000000C0 /* Instr Addr 3-4 range eXclusive */
|
#define DBCR1_IAC34MX 0x000000C0 /* Instr Addr 3-4 range eXclusive */
|
||||||
#define DBCR1_IAC34AT 0x00000001 /* Instr Addr 3-4 range Toggle */
|
#define DBCR1_IAC34AT 0x00000001 /* Instr Addr 3-4 range Toggle */
|
||||||
|
|
||||||
|
#define dbcr_iac_range(task) ((task)->thread.dbcr1)
|
||||||
|
#define DBCR_IAC12I DBCR1_IAC12M /* Range Inclusive */
|
||||||
|
#define DBCR_IAC12X DBCR1_IAC12MX /* Range Exclusive */
|
||||||
|
#define DBCR_IAC12MODE DBCR1_IAC12MX /* IAC 1-2 Mode Bits */
|
||||||
|
#define DBCR_IAC34I DBCR1_IAC34M /* Range Inclusive */
|
||||||
|
#define DBCR_IAC34X DBCR1_IAC34MX /* Range Exclusive */
|
||||||
|
#define DBCR_IAC34MODE DBCR1_IAC34MX /* IAC 3-4 Mode Bits */
|
||||||
|
|
||||||
/* Bit definitions related to the DBCR2. */
|
/* Bit definitions related to the DBCR2. */
|
||||||
|
#define DBCR2_DAC1US 0xC0000000 /* Data Addr Cmp 1 Sup/User */
|
||||||
|
#define DBCR2_DAC1ER 0x30000000 /* Data Addr Cmp 1 Eff/Real */
|
||||||
|
#define DBCR2_DAC2US 0x00000000 /* Data Addr Cmp 2 Sup/User */
|
||||||
|
#define DBCR2_DAC2ER 0x00000000 /* Data Addr Cmp 2 Eff/Real */
|
||||||
#define DBCR2_DAC12M 0x00800000 /* DAC 1-2 range enable */
|
#define DBCR2_DAC12M 0x00800000 /* DAC 1-2 range enable */
|
||||||
|
#define DBCR2_DAC12MM 0x00400000 /* DAC 1-2 Mask mode*/
|
||||||
#define DBCR2_DAC12MX 0x00C00000 /* DAC 1-2 range eXclusive */
|
#define DBCR2_DAC12MX 0x00C00000 /* DAC 1-2 range eXclusive */
|
||||||
|
#define DBCR2_DAC12MODE 0x00C00000 /* DAC 1-2 Mode Bits */
|
||||||
#define DBCR2_DAC12A 0x00200000 /* DAC 1-2 Asynchronous */
|
#define DBCR2_DAC12A 0x00200000 /* DAC 1-2 Asynchronous */
|
||||||
#endif
|
#define DBCR2_DVC1M 0x000C0000 /* Data Value Comp 1 Mode */
|
||||||
|
#define DBCR2_DVC1M_SHIFT 18 /* # of bits to shift DBCR2_DVC1M */
|
||||||
|
#define DBCR2_DVC2M 0x00030000 /* Data Value Comp 2 Mode */
|
||||||
|
#define DBCR2_DVC2M_SHIFT 16 /* # of bits to shift DBCR2_DVC2M */
|
||||||
|
#define DBCR2_DVC1BE 0x00000F00 /* Data Value Comp 1 Byte */
|
||||||
|
#define DBCR2_DVC1BE_SHIFT 8 /* # of bits to shift DBCR2_DVC1BE */
|
||||||
|
#define DBCR2_DVC2BE 0x0000000F /* Data Value Comp 2 Byte */
|
||||||
|
#define DBCR2_DVC2BE_SHIFT 0 /* # of bits to shift DBCR2_DVC2BE */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Are there any active Debug Events represented in the
|
||||||
|
* Debug Control Registers?
|
||||||
|
*/
|
||||||
|
#define DBCR0_ACTIVE_EVENTS (DBCR0_ICMP | DBCR0_IAC1 | DBCR0_IAC2 | \
|
||||||
|
DBCR0_IAC3 | DBCR0_IAC4 | DBCR0_DAC1R | \
|
||||||
|
DBCR0_DAC1W | DBCR0_DAC2R | DBCR0_DAC2W)
|
||||||
|
#define DBCR1_ACTIVE_EVENTS 0
|
||||||
|
|
||||||
|
#define DBCR_ACTIVE_EVENTS(dbcr0, dbcr1) (((dbcr0) & DBCR0_ACTIVE_EVENTS) || \
|
||||||
|
((dbcr1) & DBCR1_ACTIVE_EVENTS))
|
||||||
|
#endif /* #elif defined(CONFIG_BOOKE) */
|
||||||
|
|
||||||
/* Bit definitions related to the TCR. */
|
/* Bit definitions related to the TCR. */
|
||||||
#define TCR_WP(x) (((x)&0x3)<<30) /* WDT Period */
|
#define TCR_WP(x) (((x)&0x3)<<30) /* WDT Period */
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
#endif
|
#endif
|
||||||
#include <asm/asm-compat.h>
|
#include <asm/asm-compat.h>
|
||||||
#include <asm/synch.h>
|
#include <asm/synch.h>
|
||||||
|
#include <asm/ppc-opcode.h>
|
||||||
|
|
||||||
#define arch_spin_is_locked(x) ((x)->slock != 0)
|
#define arch_spin_is_locked(x) ((x)->slock != 0)
|
||||||
|
|
||||||
|
@ -60,13 +61,14 @@ static inline unsigned long __arch_spin_trylock(arch_spinlock_t *lock)
|
||||||
|
|
||||||
token = LOCK_TOKEN;
|
token = LOCK_TOKEN;
|
||||||
__asm__ __volatile__(
|
__asm__ __volatile__(
|
||||||
"1: lwarx %0,0,%2\n\
|
"1: " PPC_LWARX(%0,0,%2,1) "\n\
|
||||||
cmpwi 0,%0,0\n\
|
cmpwi 0,%0,0\n\
|
||||||
bne- 2f\n\
|
bne- 2f\n\
|
||||||
stwcx. %1,0,%2\n\
|
stwcx. %1,0,%2\n\
|
||||||
bne- 1b\n\
|
bne- 1b\n"
|
||||||
isync\n\
|
PPC_ACQUIRE_BARRIER
|
||||||
2:" : "=&r" (tmp)
|
"2:"
|
||||||
|
: "=&r" (tmp)
|
||||||
: "r" (token), "r" (&lock->slock)
|
: "r" (token), "r" (&lock->slock)
|
||||||
: "cr0", "memory");
|
: "cr0", "memory");
|
||||||
|
|
||||||
|
@ -144,7 +146,7 @@ static inline void arch_spin_unlock(arch_spinlock_t *lock)
|
||||||
{
|
{
|
||||||
SYNC_IO;
|
SYNC_IO;
|
||||||
__asm__ __volatile__("# arch_spin_unlock\n\t"
|
__asm__ __volatile__("# arch_spin_unlock\n\t"
|
||||||
LWSYNC_ON_SMP: : :"memory");
|
PPC_RELEASE_BARRIER: : :"memory");
|
||||||
lock->slock = 0;
|
lock->slock = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -186,15 +188,15 @@ static inline long __arch_read_trylock(arch_rwlock_t *rw)
|
||||||
long tmp;
|
long tmp;
|
||||||
|
|
||||||
__asm__ __volatile__(
|
__asm__ __volatile__(
|
||||||
"1: lwarx %0,0,%1\n"
|
"1: " PPC_LWARX(%0,0,%1,1) "\n"
|
||||||
__DO_SIGN_EXTEND
|
__DO_SIGN_EXTEND
|
||||||
" addic. %0,%0,1\n\
|
" addic. %0,%0,1\n\
|
||||||
ble- 2f\n"
|
ble- 2f\n"
|
||||||
PPC405_ERR77(0,%1)
|
PPC405_ERR77(0,%1)
|
||||||
" stwcx. %0,0,%1\n\
|
" stwcx. %0,0,%1\n\
|
||||||
bne- 1b\n\
|
bne- 1b\n"
|
||||||
isync\n\
|
PPC_ACQUIRE_BARRIER
|
||||||
2:" : "=&r" (tmp)
|
"2:" : "=&r" (tmp)
|
||||||
: "r" (&rw->lock)
|
: "r" (&rw->lock)
|
||||||
: "cr0", "xer", "memory");
|
: "cr0", "xer", "memory");
|
||||||
|
|
||||||
|
@ -211,14 +213,14 @@ static inline long __arch_write_trylock(arch_rwlock_t *rw)
|
||||||
|
|
||||||
token = WRLOCK_TOKEN;
|
token = WRLOCK_TOKEN;
|
||||||
__asm__ __volatile__(
|
__asm__ __volatile__(
|
||||||
"1: lwarx %0,0,%2\n\
|
"1: " PPC_LWARX(%0,0,%2,1) "\n\
|
||||||
cmpwi 0,%0,0\n\
|
cmpwi 0,%0,0\n\
|
||||||
bne- 2f\n"
|
bne- 2f\n"
|
||||||
PPC405_ERR77(0,%1)
|
PPC405_ERR77(0,%1)
|
||||||
" stwcx. %1,0,%2\n\
|
" stwcx. %1,0,%2\n\
|
||||||
bne- 1b\n\
|
bne- 1b\n"
|
||||||
isync\n\
|
PPC_ACQUIRE_BARRIER
|
||||||
2:" : "=&r" (tmp)
|
"2:" : "=&r" (tmp)
|
||||||
: "r" (token), "r" (&rw->lock)
|
: "r" (token), "r" (&rw->lock)
|
||||||
: "cr0", "memory");
|
: "cr0", "memory");
|
||||||
|
|
||||||
|
@ -269,7 +271,7 @@ static inline void arch_read_unlock(arch_rwlock_t *rw)
|
||||||
|
|
||||||
__asm__ __volatile__(
|
__asm__ __volatile__(
|
||||||
"# read_unlock\n\t"
|
"# read_unlock\n\t"
|
||||||
LWSYNC_ON_SMP
|
PPC_RELEASE_BARRIER
|
||||||
"1: lwarx %0,0,%1\n\
|
"1: lwarx %0,0,%1\n\
|
||||||
addic %0,%0,-1\n"
|
addic %0,%0,-1\n"
|
||||||
PPC405_ERR77(0,%1)
|
PPC405_ERR77(0,%1)
|
||||||
|
@ -283,7 +285,7 @@ static inline void arch_read_unlock(arch_rwlock_t *rw)
|
||||||
static inline void arch_write_unlock(arch_rwlock_t *rw)
|
static inline void arch_write_unlock(arch_rwlock_t *rw)
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("# write_unlock\n\t"
|
__asm__ __volatile__("# write_unlock\n\t"
|
||||||
LWSYNC_ON_SMP: : :"memory");
|
PPC_RELEASE_BARRIER: : :"memory");
|
||||||
rw->lock = 0;
|
rw->lock = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,11 +37,15 @@ static inline void isync(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
#define ISYNC_ON_SMP "\n\tisync\n"
|
#define __PPC_ACQUIRE_BARRIER \
|
||||||
#define LWSYNC_ON_SMP stringify_in_c(LWSYNC) "\n"
|
START_LWSYNC_SECTION(97); \
|
||||||
|
isync; \
|
||||||
|
MAKE_LWSYNC_SECTION_ENTRY(97, __lwsync_fixup);
|
||||||
|
#define PPC_ACQUIRE_BARRIER "\n" stringify_in_c(__PPC_ACQUIRE_BARRIER)
|
||||||
|
#define PPC_RELEASE_BARRIER stringify_in_c(LWSYNC) "\n"
|
||||||
#else
|
#else
|
||||||
#define ISYNC_ON_SMP
|
#define PPC_ACQUIRE_BARRIER
|
||||||
#define LWSYNC_ON_SMP
|
#define PPC_RELEASE_BARRIER
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __KERNEL__ */
|
#endif /* __KERNEL__ */
|
||||||
|
|
|
@ -112,8 +112,13 @@ static inline int debugger_fault_handler(struct pt_regs *regs) { return 0; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern int set_dabr(unsigned long dabr);
|
extern int set_dabr(unsigned long dabr);
|
||||||
|
#ifdef CONFIG_PPC_ADV_DEBUG_REGS
|
||||||
|
extern void do_send_trap(struct pt_regs *regs, unsigned long address,
|
||||||
|
unsigned long error_code, int signal_code, int brkpt);
|
||||||
|
#else
|
||||||
extern void do_dabr(struct pt_regs *regs, unsigned long address,
|
extern void do_dabr(struct pt_regs *regs, unsigned long address,
|
||||||
unsigned long error_code);
|
unsigned long error_code);
|
||||||
|
#endif
|
||||||
extern void print_backtrace(unsigned long *);
|
extern void print_backtrace(unsigned long *);
|
||||||
extern void show_regs(struct pt_regs * regs);
|
extern void show_regs(struct pt_regs * regs);
|
||||||
extern void flush_instruction_cache(void);
|
extern void flush_instruction_cache(void);
|
||||||
|
@ -232,12 +237,12 @@ __xchg_u32(volatile void *p, unsigned long val)
|
||||||
unsigned long prev;
|
unsigned long prev;
|
||||||
|
|
||||||
__asm__ __volatile__(
|
__asm__ __volatile__(
|
||||||
LWSYNC_ON_SMP
|
PPC_RELEASE_BARRIER
|
||||||
"1: lwarx %0,0,%2 \n"
|
"1: lwarx %0,0,%2 \n"
|
||||||
PPC405_ERR77(0,%2)
|
PPC405_ERR77(0,%2)
|
||||||
" stwcx. %3,0,%2 \n\
|
" stwcx. %3,0,%2 \n\
|
||||||
bne- 1b"
|
bne- 1b"
|
||||||
ISYNC_ON_SMP
|
PPC_ACQUIRE_BARRIER
|
||||||
: "=&r" (prev), "+m" (*(volatile unsigned int *)p)
|
: "=&r" (prev), "+m" (*(volatile unsigned int *)p)
|
||||||
: "r" (p), "r" (val)
|
: "r" (p), "r" (val)
|
||||||
: "cc", "memory");
|
: "cc", "memory");
|
||||||
|
@ -275,12 +280,12 @@ __xchg_u64(volatile void *p, unsigned long val)
|
||||||
unsigned long prev;
|
unsigned long prev;
|
||||||
|
|
||||||
__asm__ __volatile__(
|
__asm__ __volatile__(
|
||||||
LWSYNC_ON_SMP
|
PPC_RELEASE_BARRIER
|
||||||
"1: ldarx %0,0,%2 \n"
|
"1: ldarx %0,0,%2 \n"
|
||||||
PPC405_ERR77(0,%2)
|
PPC405_ERR77(0,%2)
|
||||||
" stdcx. %3,0,%2 \n\
|
" stdcx. %3,0,%2 \n\
|
||||||
bne- 1b"
|
bne- 1b"
|
||||||
ISYNC_ON_SMP
|
PPC_ACQUIRE_BARRIER
|
||||||
: "=&r" (prev), "+m" (*(volatile unsigned long *)p)
|
: "=&r" (prev), "+m" (*(volatile unsigned long *)p)
|
||||||
: "r" (p), "r" (val)
|
: "r" (p), "r" (val)
|
||||||
: "cc", "memory");
|
: "cc", "memory");
|
||||||
|
@ -366,14 +371,14 @@ __cmpxchg_u32(volatile unsigned int *p, unsigned long old, unsigned long new)
|
||||||
unsigned int prev;
|
unsigned int prev;
|
||||||
|
|
||||||
__asm__ __volatile__ (
|
__asm__ __volatile__ (
|
||||||
LWSYNC_ON_SMP
|
PPC_RELEASE_BARRIER
|
||||||
"1: lwarx %0,0,%2 # __cmpxchg_u32\n\
|
"1: lwarx %0,0,%2 # __cmpxchg_u32\n\
|
||||||
cmpw 0,%0,%3\n\
|
cmpw 0,%0,%3\n\
|
||||||
bne- 2f\n"
|
bne- 2f\n"
|
||||||
PPC405_ERR77(0,%2)
|
PPC405_ERR77(0,%2)
|
||||||
" stwcx. %4,0,%2\n\
|
" stwcx. %4,0,%2\n\
|
||||||
bne- 1b"
|
bne- 1b"
|
||||||
ISYNC_ON_SMP
|
PPC_ACQUIRE_BARRIER
|
||||||
"\n\
|
"\n\
|
||||||
2:"
|
2:"
|
||||||
: "=&r" (prev), "+m" (*p)
|
: "=&r" (prev), "+m" (*p)
|
||||||
|
@ -412,13 +417,13 @@ __cmpxchg_u64(volatile unsigned long *p, unsigned long old, unsigned long new)
|
||||||
unsigned long prev;
|
unsigned long prev;
|
||||||
|
|
||||||
__asm__ __volatile__ (
|
__asm__ __volatile__ (
|
||||||
LWSYNC_ON_SMP
|
PPC_RELEASE_BARRIER
|
||||||
"1: ldarx %0,0,%2 # __cmpxchg_u64\n\
|
"1: ldarx %0,0,%2 # __cmpxchg_u64\n\
|
||||||
cmpd 0,%0,%3\n\
|
cmpd 0,%0,%3\n\
|
||||||
bne- 2f\n\
|
bne- 2f\n\
|
||||||
stdcx. %4,0,%2\n\
|
stdcx. %4,0,%2\n\
|
||||||
bne- 1b"
|
bne- 1b"
|
||||||
ISYNC_ON_SMP
|
PPC_ACQUIRE_BARRIER
|
||||||
"\n\
|
"\n\
|
||||||
2:"
|
2:"
|
||||||
: "=&r" (prev), "+m" (*p)
|
: "=&r" (prev), "+m" (*p)
|
||||||
|
|
|
@ -39,9 +39,6 @@ static inline int pcibus_to_node(struct pci_bus *bus)
|
||||||
|
|
||||||
/* sched_domains SD_NODE_INIT for PPC64 machines */
|
/* sched_domains SD_NODE_INIT for PPC64 machines */
|
||||||
#define SD_NODE_INIT (struct sched_domain) { \
|
#define SD_NODE_INIT (struct sched_domain) { \
|
||||||
.parent = NULL, \
|
|
||||||
.child = NULL, \
|
|
||||||
.groups = NULL, \
|
|
||||||
.min_interval = 8, \
|
.min_interval = 8, \
|
||||||
.max_interval = 32, \
|
.max_interval = 32, \
|
||||||
.busy_factor = 32, \
|
.busy_factor = 32, \
|
||||||
|
@ -51,14 +48,23 @@ static inline int pcibus_to_node(struct pci_bus *bus)
|
||||||
.idle_idx = 1, \
|
.idle_idx = 1, \
|
||||||
.newidle_idx = 0, \
|
.newidle_idx = 0, \
|
||||||
.wake_idx = 0, \
|
.wake_idx = 0, \
|
||||||
.flags = SD_LOAD_BALANCE \
|
.forkexec_idx = 0, \
|
||||||
| SD_BALANCE_EXEC \
|
\
|
||||||
| SD_BALANCE_FORK \
|
.flags = 1*SD_LOAD_BALANCE \
|
||||||
| SD_BALANCE_NEWIDLE \
|
| 1*SD_BALANCE_NEWIDLE \
|
||||||
| SD_SERIALIZE, \
|
| 1*SD_BALANCE_EXEC \
|
||||||
|
| 1*SD_BALANCE_FORK \
|
||||||
|
| 0*SD_BALANCE_WAKE \
|
||||||
|
| 0*SD_WAKE_AFFINE \
|
||||||
|
| 0*SD_PREFER_LOCAL \
|
||||||
|
| 0*SD_SHARE_CPUPOWER \
|
||||||
|
| 0*SD_POWERSAVINGS_BALANCE \
|
||||||
|
| 0*SD_SHARE_PKG_RESOURCES \
|
||||||
|
| 1*SD_SERIALIZE \
|
||||||
|
| 0*SD_PREFER_SIBLING \
|
||||||
|
, \
|
||||||
.last_balance = jiffies, \
|
.last_balance = jiffies, \
|
||||||
.balance_interval = 1, \
|
.balance_interval = 1, \
|
||||||
.nr_balance_failed = 0, \
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extern void __init dump_numa_cpu_topology(void);
|
extern void __init dump_numa_cpu_topology(void);
|
||||||
|
|
|
@ -791,9 +791,8 @@ _GLOBAL(enter_rtas)
|
||||||
|
|
||||||
li r9,1
|
li r9,1
|
||||||
rldicr r9,r9,MSR_SF_LG,(63-MSR_SF_LG)
|
rldicr r9,r9,MSR_SF_LG,(63-MSR_SF_LG)
|
||||||
ori r9,r9,MSR_IR|MSR_DR|MSR_FE0|MSR_FE1|MSR_FP
|
ori r9,r9,MSR_IR|MSR_DR|MSR_FE0|MSR_FE1|MSR_FP|MSR_RI
|
||||||
andc r6,r0,r9
|
andc r6,r0,r9
|
||||||
ori r6,r6,MSR_RI
|
|
||||||
sync /* disable interrupts so SRR0/1 */
|
sync /* disable interrupts so SRR0/1 */
|
||||||
mtmsrd r0 /* don't get trashed */
|
mtmsrd r0 /* don't get trashed */
|
||||||
|
|
||||||
|
|
|
@ -17,5 +17,5 @@
|
||||||
|
|
||||||
#include <asm/firmware.h>
|
#include <asm/firmware.h>
|
||||||
|
|
||||||
unsigned long powerpc_firmware_features;
|
unsigned long powerpc_firmware_features __read_mostly;
|
||||||
EXPORT_SYMBOL_GPL(powerpc_firmware_features);
|
EXPORT_SYMBOL_GPL(powerpc_firmware_features);
|
||||||
|
|
|
@ -214,11 +214,11 @@ skpinv: addi r6,r6,1 /* Increment */
|
||||||
bl 1f /* Find our address */
|
bl 1f /* Find our address */
|
||||||
1: mflr r9
|
1: mflr r9
|
||||||
rlwimi r7,r9,0,20,31
|
rlwimi r7,r9,0,20,31
|
||||||
addi r7,r7,24
|
addi r7,r7,(2f - 1b)
|
||||||
mtspr SPRN_SRR0,r7
|
mtspr SPRN_SRR0,r7
|
||||||
mtspr SPRN_SRR1,r6
|
mtspr SPRN_SRR1,r6
|
||||||
rfi
|
rfi
|
||||||
|
2:
|
||||||
/* 4. Clear out PIDs & Search info */
|
/* 4. Clear out PIDs & Search info */
|
||||||
li r6,0
|
li r6,0
|
||||||
mtspr SPRN_MAS6,r6
|
mtspr SPRN_MAS6,r6
|
||||||
|
|
|
@ -73,8 +73,10 @@
|
||||||
#define CREATE_TRACE_POINTS
|
#define CREATE_TRACE_POINTS
|
||||||
#include <asm/trace.h>
|
#include <asm/trace.h>
|
||||||
|
|
||||||
|
DEFINE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
|
||||||
|
EXPORT_PER_CPU_SYMBOL(irq_stat);
|
||||||
|
|
||||||
int __irq_offset_value;
|
int __irq_offset_value;
|
||||||
static int ppc_spurious_interrupts;
|
|
||||||
|
|
||||||
#ifdef CONFIG_PPC32
|
#ifdef CONFIG_PPC32
|
||||||
EXPORT_SYMBOL(__irq_offset_value);
|
EXPORT_SYMBOL(__irq_offset_value);
|
||||||
|
@ -180,30 +182,64 @@ notrace void raw_local_irq_restore(unsigned long en)
|
||||||
EXPORT_SYMBOL(raw_local_irq_restore);
|
EXPORT_SYMBOL(raw_local_irq_restore);
|
||||||
#endif /* CONFIG_PPC64 */
|
#endif /* CONFIG_PPC64 */
|
||||||
|
|
||||||
int show_interrupts(struct seq_file *p, void *v)
|
static int show_other_interrupts(struct seq_file *p, int prec)
|
||||||
{
|
{
|
||||||
int i = *(loff_t *)v, j;
|
int j;
|
||||||
struct irqaction *action;
|
|
||||||
struct irq_desc *desc;
|
|
||||||
unsigned long flags;
|
|
||||||
|
|
||||||
if (i == 0) {
|
|
||||||
seq_puts(p, " ");
|
|
||||||
for_each_online_cpu(j)
|
|
||||||
seq_printf(p, "CPU%d ", j);
|
|
||||||
seq_putc(p, '\n');
|
|
||||||
} else if (i == nr_irqs) {
|
|
||||||
#if defined(CONFIG_PPC32) && defined(CONFIG_TAU_INT)
|
#if defined(CONFIG_PPC32) && defined(CONFIG_TAU_INT)
|
||||||
if (tau_initialized){
|
if (tau_initialized) {
|
||||||
seq_puts(p, "TAU: ");
|
seq_printf(p, "%*s: ", prec, "TAU");
|
||||||
for_each_online_cpu(j)
|
for_each_online_cpu(j)
|
||||||
seq_printf(p, "%10u ", tau_interrupts(j));
|
seq_printf(p, "%10u ", tau_interrupts(j));
|
||||||
seq_puts(p, " PowerPC Thermal Assist (cpu temp)\n");
|
seq_puts(p, " PowerPC Thermal Assist (cpu temp)\n");
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_PPC32 && CONFIG_TAU_INT*/
|
#endif /* CONFIG_PPC32 && CONFIG_TAU_INT */
|
||||||
seq_printf(p, "BAD: %10u\n", ppc_spurious_interrupts);
|
|
||||||
|
seq_printf(p, "%*s: ", prec, "LOC");
|
||||||
|
for_each_online_cpu(j)
|
||||||
|
seq_printf(p, "%10u ", per_cpu(irq_stat, j).timer_irqs);
|
||||||
|
seq_printf(p, " Local timer interrupts\n");
|
||||||
|
|
||||||
|
seq_printf(p, "%*s: ", prec, "SPU");
|
||||||
|
for_each_online_cpu(j)
|
||||||
|
seq_printf(p, "%10u ", per_cpu(irq_stat, j).spurious_irqs);
|
||||||
|
seq_printf(p, " Spurious interrupts\n");
|
||||||
|
|
||||||
|
seq_printf(p, "%*s: ", prec, "CNT");
|
||||||
|
for_each_online_cpu(j)
|
||||||
|
seq_printf(p, "%10u ", per_cpu(irq_stat, j).pmu_irqs);
|
||||||
|
seq_printf(p, " Performance monitoring interrupts\n");
|
||||||
|
|
||||||
|
seq_printf(p, "%*s: ", prec, "MCE");
|
||||||
|
for_each_online_cpu(j)
|
||||||
|
seq_printf(p, "%10u ", per_cpu(irq_stat, j).mce_exceptions);
|
||||||
|
seq_printf(p, " Machine check exceptions\n");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int show_interrupts(struct seq_file *p, void *v)
|
||||||
|
{
|
||||||
|
unsigned long flags, any_count = 0;
|
||||||
|
int i = *(loff_t *) v, j, prec;
|
||||||
|
struct irqaction *action;
|
||||||
|
struct irq_desc *desc;
|
||||||
|
|
||||||
|
if (i > nr_irqs)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
for (prec = 3, j = 1000; prec < 10 && j <= nr_irqs; ++prec)
|
||||||
|
j *= 10;
|
||||||
|
|
||||||
|
if (i == nr_irqs)
|
||||||
|
return show_other_interrupts(p, prec);
|
||||||
|
|
||||||
|
/* print header */
|
||||||
|
if (i == 0) {
|
||||||
|
seq_printf(p, "%*s", prec + 8, "");
|
||||||
|
for_each_online_cpu(j)
|
||||||
|
seq_printf(p, "CPU%-8d", j);
|
||||||
|
seq_putc(p, '\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
desc = irq_to_desc(i);
|
desc = irq_to_desc(i);
|
||||||
|
@ -211,37 +247,48 @@ int show_interrupts(struct seq_file *p, void *v)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
raw_spin_lock_irqsave(&desc->lock, flags);
|
raw_spin_lock_irqsave(&desc->lock, flags);
|
||||||
|
for_each_online_cpu(j)
|
||||||
|
any_count |= kstat_irqs_cpu(i, j);
|
||||||
action = desc->action;
|
action = desc->action;
|
||||||
if (!action || !action->handler)
|
if (!action && !any_count)
|
||||||
goto skip;
|
goto out;
|
||||||
|
|
||||||
seq_printf(p, "%3d: ", i);
|
seq_printf(p, "%*d: ", prec, i);
|
||||||
#ifdef CONFIG_SMP
|
|
||||||
for_each_online_cpu(j)
|
for_each_online_cpu(j)
|
||||||
seq_printf(p, "%10u ", kstat_irqs_cpu(i, j));
|
seq_printf(p, "%10u ", kstat_irqs_cpu(i, j));
|
||||||
#else
|
|
||||||
seq_printf(p, "%10u ", kstat_irqs(i));
|
|
||||||
#endif /* CONFIG_SMP */
|
|
||||||
|
|
||||||
if (desc->chip)
|
if (desc->chip)
|
||||||
seq_printf(p, " %s ", desc->chip->name);
|
seq_printf(p, " %-16s", desc->chip->name);
|
||||||
else
|
else
|
||||||
seq_puts(p, " None ");
|
seq_printf(p, " %-16s", "None");
|
||||||
|
seq_printf(p, " %-8s", (desc->status & IRQ_LEVEL) ? "Level" : "Edge");
|
||||||
|
|
||||||
seq_printf(p, "%s", (desc->status & IRQ_LEVEL) ? "Level " : "Edge ");
|
if (action) {
|
||||||
seq_printf(p, " %s", action->name);
|
seq_printf(p, " %s", action->name);
|
||||||
|
while ((action = action->next) != NULL)
|
||||||
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');
|
||||||
|
out:
|
||||||
skip:
|
|
||||||
raw_spin_unlock_irqrestore(&desc->lock, flags);
|
raw_spin_unlock_irqrestore(&desc->lock, flags);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* /proc/stat helpers
|
||||||
|
*/
|
||||||
|
u64 arch_irq_stat_cpu(unsigned int cpu)
|
||||||
|
{
|
||||||
|
u64 sum = per_cpu(irq_stat, cpu).timer_irqs;
|
||||||
|
|
||||||
|
sum += per_cpu(irq_stat, cpu).pmu_irqs;
|
||||||
|
sum += per_cpu(irq_stat, cpu).mce_exceptions;
|
||||||
|
sum += per_cpu(irq_stat, cpu).spurious_irqs;
|
||||||
|
|
||||||
|
return sum;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_HOTPLUG_CPU
|
#ifdef CONFIG_HOTPLUG_CPU
|
||||||
void fixup_irqs(cpumask_t map)
|
void fixup_irqs(cpumask_t map)
|
||||||
{
|
{
|
||||||
|
@ -353,8 +400,7 @@ void do_IRQ(struct pt_regs *regs)
|
||||||
if (irq != NO_IRQ && irq != NO_IRQ_IGNORE)
|
if (irq != NO_IRQ && irq != NO_IRQ_IGNORE)
|
||||||
handle_one_irq(irq);
|
handle_one_irq(irq);
|
||||||
else if (irq != NO_IRQ_IGNORE)
|
else if (irq != NO_IRQ_IGNORE)
|
||||||
/* That's not SMP safe ... but who cares ? */
|
__get_cpu_var(irq_stat).spurious_irqs++;
|
||||||
ppc_spurious_interrupts++;
|
|
||||||
|
|
||||||
irq_exit();
|
irq_exit();
|
||||||
set_irq_regs(old_regs);
|
set_irq_regs(old_regs);
|
||||||
|
@ -474,7 +520,7 @@ void do_softirq(void)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static LIST_HEAD(irq_hosts);
|
static LIST_HEAD(irq_hosts);
|
||||||
static DEFINE_SPINLOCK(irq_big_lock);
|
static DEFINE_RAW_SPINLOCK(irq_big_lock);
|
||||||
static unsigned int revmap_trees_allocated;
|
static unsigned int revmap_trees_allocated;
|
||||||
static DEFINE_MUTEX(revmap_trees_mutex);
|
static DEFINE_MUTEX(revmap_trees_mutex);
|
||||||
struct irq_map_entry irq_map[NR_IRQS];
|
struct irq_map_entry irq_map[NR_IRQS];
|
||||||
|
@ -520,14 +566,14 @@ struct irq_host *irq_alloc_host(struct device_node *of_node,
|
||||||
if (host->ops->match == NULL)
|
if (host->ops->match == NULL)
|
||||||
host->ops->match = default_irq_host_match;
|
host->ops->match = default_irq_host_match;
|
||||||
|
|
||||||
spin_lock_irqsave(&irq_big_lock, flags);
|
raw_spin_lock_irqsave(&irq_big_lock, flags);
|
||||||
|
|
||||||
/* If it's a legacy controller, check for duplicates and
|
/* If it's a legacy controller, check for duplicates and
|
||||||
* mark it as allocated (we use irq 0 host pointer for that
|
* mark it as allocated (we use irq 0 host pointer for that
|
||||||
*/
|
*/
|
||||||
if (revmap_type == IRQ_HOST_MAP_LEGACY) {
|
if (revmap_type == IRQ_HOST_MAP_LEGACY) {
|
||||||
if (irq_map[0].host != NULL) {
|
if (irq_map[0].host != NULL) {
|
||||||
spin_unlock_irqrestore(&irq_big_lock, flags);
|
raw_spin_unlock_irqrestore(&irq_big_lock, flags);
|
||||||
/* If we are early boot, we can't free the structure,
|
/* If we are early boot, we can't free the structure,
|
||||||
* too bad...
|
* too bad...
|
||||||
* this will be fixed once slab is made available early
|
* this will be fixed once slab is made available early
|
||||||
|
@ -541,7 +587,7 @@ struct irq_host *irq_alloc_host(struct device_node *of_node,
|
||||||
}
|
}
|
||||||
|
|
||||||
list_add(&host->link, &irq_hosts);
|
list_add(&host->link, &irq_hosts);
|
||||||
spin_unlock_irqrestore(&irq_big_lock, flags);
|
raw_spin_unlock_irqrestore(&irq_big_lock, flags);
|
||||||
|
|
||||||
/* Additional setups per revmap type */
|
/* Additional setups per revmap type */
|
||||||
switch(revmap_type) {
|
switch(revmap_type) {
|
||||||
|
@ -592,13 +638,13 @@ struct irq_host *irq_find_host(struct device_node *node)
|
||||||
* the absence of a device node. This isn't a problem so far
|
* the absence of a device node. This isn't a problem so far
|
||||||
* yet though...
|
* yet though...
|
||||||
*/
|
*/
|
||||||
spin_lock_irqsave(&irq_big_lock, flags);
|
raw_spin_lock_irqsave(&irq_big_lock, flags);
|
||||||
list_for_each_entry(h, &irq_hosts, link)
|
list_for_each_entry(h, &irq_hosts, link)
|
||||||
if (h->ops->match(h, node)) {
|
if (h->ops->match(h, node)) {
|
||||||
found = h;
|
found = h;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
spin_unlock_irqrestore(&irq_big_lock, flags);
|
raw_spin_unlock_irqrestore(&irq_big_lock, flags);
|
||||||
return found;
|
return found;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(irq_find_host);
|
EXPORT_SYMBOL_GPL(irq_find_host);
|
||||||
|
@ -967,7 +1013,7 @@ unsigned int irq_alloc_virt(struct irq_host *host,
|
||||||
if (count == 0 || count > (irq_virq_count - NUM_ISA_INTERRUPTS))
|
if (count == 0 || count > (irq_virq_count - NUM_ISA_INTERRUPTS))
|
||||||
return NO_IRQ;
|
return NO_IRQ;
|
||||||
|
|
||||||
spin_lock_irqsave(&irq_big_lock, flags);
|
raw_spin_lock_irqsave(&irq_big_lock, flags);
|
||||||
|
|
||||||
/* Use hint for 1 interrupt if any */
|
/* Use hint for 1 interrupt if any */
|
||||||
if (count == 1 && hint >= NUM_ISA_INTERRUPTS &&
|
if (count == 1 && hint >= NUM_ISA_INTERRUPTS &&
|
||||||
|
@ -991,7 +1037,7 @@ unsigned int irq_alloc_virt(struct irq_host *host,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (found == NO_IRQ) {
|
if (found == NO_IRQ) {
|
||||||
spin_unlock_irqrestore(&irq_big_lock, flags);
|
raw_spin_unlock_irqrestore(&irq_big_lock, flags);
|
||||||
return NO_IRQ;
|
return NO_IRQ;
|
||||||
}
|
}
|
||||||
hint_found:
|
hint_found:
|
||||||
|
@ -1000,7 +1046,7 @@ unsigned int irq_alloc_virt(struct irq_host *host,
|
||||||
smp_wmb();
|
smp_wmb();
|
||||||
irq_map[i].host = host;
|
irq_map[i].host = host;
|
||||||
}
|
}
|
||||||
spin_unlock_irqrestore(&irq_big_lock, flags);
|
raw_spin_unlock_irqrestore(&irq_big_lock, flags);
|
||||||
return found;
|
return found;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1012,7 +1058,7 @@ void irq_free_virt(unsigned int virq, unsigned int count)
|
||||||
WARN_ON (virq < NUM_ISA_INTERRUPTS);
|
WARN_ON (virq < NUM_ISA_INTERRUPTS);
|
||||||
WARN_ON (count == 0 || (virq + count) > irq_virq_count);
|
WARN_ON (count == 0 || (virq + count) > irq_virq_count);
|
||||||
|
|
||||||
spin_lock_irqsave(&irq_big_lock, flags);
|
raw_spin_lock_irqsave(&irq_big_lock, flags);
|
||||||
for (i = virq; i < (virq + count); i++) {
|
for (i = virq; i < (virq + count); i++) {
|
||||||
struct irq_host *host;
|
struct irq_host *host;
|
||||||
|
|
||||||
|
@ -1025,7 +1071,7 @@ void irq_free_virt(unsigned int virq, unsigned int count)
|
||||||
smp_wmb();
|
smp_wmb();
|
||||||
irq_map[i].host = NULL;
|
irq_map[i].host = NULL;
|
||||||
}
|
}
|
||||||
spin_unlock_irqrestore(&irq_big_lock, flags);
|
raw_spin_unlock_irqrestore(&irq_big_lock, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
int arch_early_irq_init(void)
|
int arch_early_irq_init(void)
|
||||||
|
|
|
@ -333,7 +333,7 @@ int kgdb_arch_handle_exception(int vector, int signo, int err_code,
|
||||||
atomic_set(&kgdb_cpu_doing_single_step, -1);
|
atomic_set(&kgdb_cpu_doing_single_step, -1);
|
||||||
/* set the trace bit if we're stepping */
|
/* set the trace bit if we're stepping */
|
||||||
if (remcom_in_buffer[0] == 's') {
|
if (remcom_in_buffer[0] == 's') {
|
||||||
#if defined(CONFIG_40x) || defined(CONFIG_BOOKE)
|
#ifdef CONFIG_PPC_ADV_DEBUG_REGS
|
||||||
mtspr(SPRN_DBCR0,
|
mtspr(SPRN_DBCR0,
|
||||||
mfspr(SPRN_DBCR0) | DBCR0_IC | DBCR0_IDM);
|
mfspr(SPRN_DBCR0) | DBCR0_IC | DBCR0_IDM);
|
||||||
linux_regs->msr |= MSR_DE;
|
linux_regs->msr |= MSR_DE;
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
#include <asm/uaccess.h>
|
#include <asm/uaccess.h>
|
||||||
#include <asm/system.h>
|
#include <asm/system.h>
|
||||||
|
|
||||||
#ifdef CONFIG_BOOKE
|
#ifdef CONFIG_PPC_ADV_DEBUG_REGS
|
||||||
#define MSR_SINGLESTEP (MSR_DE)
|
#define MSR_SINGLESTEP (MSR_DE)
|
||||||
#else
|
#else
|
||||||
#define MSR_SINGLESTEP (MSR_SE)
|
#define MSR_SINGLESTEP (MSR_SE)
|
||||||
|
@ -110,7 +110,7 @@ static void __kprobes prepare_singlestep(struct kprobe *p, struct pt_regs *regs)
|
||||||
* like Decrementer or External Interrupt */
|
* like Decrementer or External Interrupt */
|
||||||
regs->msr &= ~MSR_EE;
|
regs->msr &= ~MSR_EE;
|
||||||
regs->msr |= MSR_SINGLESTEP;
|
regs->msr |= MSR_SINGLESTEP;
|
||||||
#ifdef CONFIG_BOOKE
|
#ifdef CONFIG_PPC_ADV_DEBUG_REGS
|
||||||
regs->msr &= ~MSR_CE;
|
regs->msr &= ~MSR_CE;
|
||||||
mtspr(SPRN_DBCR0, mfspr(SPRN_DBCR0) | DBCR0_IC | DBCR0_IDM);
|
mtspr(SPRN_DBCR0, mfspr(SPRN_DBCR0) | DBCR0_IC | DBCR0_IDM);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -359,7 +359,7 @@ static void parse_system_parameter_string(struct seq_file *m)
|
||||||
|
|
||||||
unsigned char *local_buffer = kmalloc(SPLPAR_MAXLENGTH, GFP_KERNEL);
|
unsigned char *local_buffer = kmalloc(SPLPAR_MAXLENGTH, GFP_KERNEL);
|
||||||
if (!local_buffer) {
|
if (!local_buffer) {
|
||||||
printk(KERN_ERR "%s %s kmalloc failure at line %d \n",
|
printk(KERN_ERR "%s %s kmalloc failure at line %d\n",
|
||||||
__FILE__, __func__, __LINE__);
|
__FILE__, __func__, __LINE__);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -383,13 +383,13 @@ static void parse_system_parameter_string(struct seq_file *m)
|
||||||
int idx, w_idx;
|
int idx, w_idx;
|
||||||
char *workbuffer = kzalloc(SPLPAR_MAXLENGTH, GFP_KERNEL);
|
char *workbuffer = kzalloc(SPLPAR_MAXLENGTH, GFP_KERNEL);
|
||||||
if (!workbuffer) {
|
if (!workbuffer) {
|
||||||
printk(KERN_ERR "%s %s kmalloc failure at line %d \n",
|
printk(KERN_ERR "%s %s kmalloc failure at line %d\n",
|
||||||
__FILE__, __func__, __LINE__);
|
__FILE__, __func__, __LINE__);
|
||||||
kfree(local_buffer);
|
kfree(local_buffer);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#ifdef LPARCFG_DEBUG
|
#ifdef LPARCFG_DEBUG
|
||||||
printk(KERN_INFO "success calling get-system-parameter \n");
|
printk(KERN_INFO "success calling get-system-parameter\n");
|
||||||
#endif
|
#endif
|
||||||
splpar_strlen = local_buffer[0] * 256 + local_buffer[1];
|
splpar_strlen = local_buffer[0] * 256 + local_buffer[1];
|
||||||
local_buffer += 2; /* step over strlen value */
|
local_buffer += 2; /* step over strlen value */
|
||||||
|
@ -440,7 +440,7 @@ static int lparcfg_count_active_processors(void)
|
||||||
|
|
||||||
while ((cpus_dn = of_find_node_by_type(cpus_dn, "cpu"))) {
|
while ((cpus_dn = of_find_node_by_type(cpus_dn, "cpu"))) {
|
||||||
#ifdef LPARCFG_DEBUG
|
#ifdef LPARCFG_DEBUG
|
||||||
printk(KERN_ERR "cpus_dn %p \n", cpus_dn);
|
printk(KERN_ERR "cpus_dn %p\n", cpus_dn);
|
||||||
#endif
|
#endif
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
@ -725,7 +725,7 @@ static int lparcfg_data(struct seq_file *m, void *v)
|
||||||
const unsigned int *lp_index_ptr;
|
const unsigned int *lp_index_ptr;
|
||||||
unsigned int lp_index = 0;
|
unsigned int lp_index = 0;
|
||||||
|
|
||||||
seq_printf(m, "%s %s \n", MODULE_NAME, MODULE_VERS);
|
seq_printf(m, "%s %s\n", MODULE_NAME, MODULE_VERS);
|
||||||
|
|
||||||
rootdn = of_find_node_by_path("/");
|
rootdn = of_find_node_by_path("/");
|
||||||
if (rootdn) {
|
if (rootdn) {
|
||||||
|
|
|
@ -338,8 +338,8 @@ static int __init nvram_create_os_partition(void)
|
||||||
|
|
||||||
rc = nvram_write_header(new_part);
|
rc = nvram_write_header(new_part);
|
||||||
if (rc <= 0) {
|
if (rc <= 0) {
|
||||||
printk(KERN_ERR "nvram_create_os_partition: nvram_write_header \
|
printk(KERN_ERR "nvram_create_os_partition: nvram_write_header "
|
||||||
failed (%d)\n", rc);
|
"failed (%d)\n", rc);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -304,7 +304,7 @@ static void __devinit __of_scan_bus(struct device_node *node,
|
||||||
int reglen, devfn;
|
int reglen, devfn;
|
||||||
struct pci_dev *dev;
|
struct pci_dev *dev;
|
||||||
|
|
||||||
pr_debug("of_scan_bus(%s) bus no %d... \n",
|
pr_debug("of_scan_bus(%s) bus no %d...\n",
|
||||||
node->full_name, bus->number);
|
node->full_name, bus->number);
|
||||||
|
|
||||||
/* Scan direct children */
|
/* Scan direct children */
|
||||||
|
|
|
@ -37,7 +37,7 @@ static void dummy_perf(struct pt_regs *regs)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static DEFINE_SPINLOCK(pmc_owner_lock);
|
static DEFINE_RAW_SPINLOCK(pmc_owner_lock);
|
||||||
static void *pmc_owner_caller; /* mostly for debugging */
|
static void *pmc_owner_caller; /* mostly for debugging */
|
||||||
perf_irq_t perf_irq = dummy_perf;
|
perf_irq_t perf_irq = dummy_perf;
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ int reserve_pmc_hardware(perf_irq_t new_perf_irq)
|
||||||
{
|
{
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
|
||||||
spin_lock(&pmc_owner_lock);
|
raw_spin_lock(&pmc_owner_lock);
|
||||||
|
|
||||||
if (pmc_owner_caller) {
|
if (pmc_owner_caller) {
|
||||||
printk(KERN_WARNING "reserve_pmc_hardware: "
|
printk(KERN_WARNING "reserve_pmc_hardware: "
|
||||||
|
@ -59,21 +59,21 @@ int reserve_pmc_hardware(perf_irq_t new_perf_irq)
|
||||||
perf_irq = new_perf_irq ? new_perf_irq : dummy_perf;
|
perf_irq = new_perf_irq ? new_perf_irq : dummy_perf;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
spin_unlock(&pmc_owner_lock);
|
raw_spin_unlock(&pmc_owner_lock);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(reserve_pmc_hardware);
|
EXPORT_SYMBOL_GPL(reserve_pmc_hardware);
|
||||||
|
|
||||||
void release_pmc_hardware(void)
|
void release_pmc_hardware(void)
|
||||||
{
|
{
|
||||||
spin_lock(&pmc_owner_lock);
|
raw_spin_lock(&pmc_owner_lock);
|
||||||
|
|
||||||
WARN_ON(! pmc_owner_caller);
|
WARN_ON(! pmc_owner_caller);
|
||||||
|
|
||||||
pmc_owner_caller = NULL;
|
pmc_owner_caller = NULL;
|
||||||
perf_irq = dummy_perf;
|
perf_irq = dummy_perf;
|
||||||
|
|
||||||
spin_unlock(&pmc_owner_lock);
|
raw_spin_unlock(&pmc_owner_lock);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(release_pmc_hardware);
|
EXPORT_SYMBOL_GPL(release_pmc_hardware);
|
||||||
|
|
||||||
|
|
|
@ -245,6 +245,24 @@ void discard_lazy_cpu_state(void)
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_SMP */
|
#endif /* CONFIG_SMP */
|
||||||
|
|
||||||
|
#ifdef CONFIG_PPC_ADV_DEBUG_REGS
|
||||||
|
void do_send_trap(struct pt_regs *regs, unsigned long address,
|
||||||
|
unsigned long error_code, int signal_code, int breakpt)
|
||||||
|
{
|
||||||
|
siginfo_t info;
|
||||||
|
|
||||||
|
if (notify_die(DIE_DABR_MATCH, "dabr_match", regs, error_code,
|
||||||
|
11, SIGSEGV) == NOTIFY_STOP)
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* Deliver the signal to userspace */
|
||||||
|
info.si_signo = SIGTRAP;
|
||||||
|
info.si_errno = breakpt; /* breakpoint or watchpoint id */
|
||||||
|
info.si_code = signal_code;
|
||||||
|
info.si_addr = (void __user *)address;
|
||||||
|
force_sig_info(SIGTRAP, &info, current);
|
||||||
|
}
|
||||||
|
#else /* !CONFIG_PPC_ADV_DEBUG_REGS */
|
||||||
void do_dabr(struct pt_regs *regs, unsigned long address,
|
void do_dabr(struct pt_regs *regs, unsigned long address,
|
||||||
unsigned long error_code)
|
unsigned long error_code)
|
||||||
{
|
{
|
||||||
|
@ -257,12 +275,6 @@ void do_dabr(struct pt_regs *regs, unsigned long address,
|
||||||
if (debugger_dabr_match(regs))
|
if (debugger_dabr_match(regs))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Clear the DAC and struct entries. One shot trigger */
|
|
||||||
#if defined(CONFIG_BOOKE)
|
|
||||||
mtspr(SPRN_DBCR0, mfspr(SPRN_DBCR0) & ~(DBSR_DAC1R | DBSR_DAC1W
|
|
||||||
| DBCR0_IDM));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Clear the DABR */
|
/* Clear the DABR */
|
||||||
set_dabr(0);
|
set_dabr(0);
|
||||||
|
|
||||||
|
@ -273,9 +285,82 @@ void do_dabr(struct pt_regs *regs, unsigned long address,
|
||||||
info.si_addr = (void __user *)address;
|
info.si_addr = (void __user *)address;
|
||||||
force_sig_info(SIGTRAP, &info, current);
|
force_sig_info(SIGTRAP, &info, current);
|
||||||
}
|
}
|
||||||
|
#endif /* CONFIG_PPC_ADV_DEBUG_REGS */
|
||||||
|
|
||||||
static DEFINE_PER_CPU(unsigned long, current_dabr);
|
static DEFINE_PER_CPU(unsigned long, current_dabr);
|
||||||
|
|
||||||
|
#ifdef CONFIG_PPC_ADV_DEBUG_REGS
|
||||||
|
/*
|
||||||
|
* Set the debug registers back to their default "safe" values.
|
||||||
|
*/
|
||||||
|
static void set_debug_reg_defaults(struct thread_struct *thread)
|
||||||
|
{
|
||||||
|
thread->iac1 = thread->iac2 = 0;
|
||||||
|
#if CONFIG_PPC_ADV_DEBUG_IACS > 2
|
||||||
|
thread->iac3 = thread->iac4 = 0;
|
||||||
|
#endif
|
||||||
|
thread->dac1 = thread->dac2 = 0;
|
||||||
|
#if CONFIG_PPC_ADV_DEBUG_DVCS > 0
|
||||||
|
thread->dvc1 = thread->dvc2 = 0;
|
||||||
|
#endif
|
||||||
|
thread->dbcr0 = 0;
|
||||||
|
#ifdef CONFIG_BOOKE
|
||||||
|
/*
|
||||||
|
* Force User/Supervisor bits to b11 (user-only MSR[PR]=1)
|
||||||
|
*/
|
||||||
|
thread->dbcr1 = DBCR1_IAC1US | DBCR1_IAC2US | \
|
||||||
|
DBCR1_IAC3US | DBCR1_IAC4US;
|
||||||
|
/*
|
||||||
|
* Force Data Address Compare User/Supervisor bits to be User-only
|
||||||
|
* (0b11 MSR[PR]=1) and set all other bits in DBCR2 register to be 0.
|
||||||
|
*/
|
||||||
|
thread->dbcr2 = DBCR2_DAC1US | DBCR2_DAC2US;
|
||||||
|
#else
|
||||||
|
thread->dbcr1 = 0;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
static void prime_debug_regs(struct thread_struct *thread)
|
||||||
|
{
|
||||||
|
mtspr(SPRN_IAC1, thread->iac1);
|
||||||
|
mtspr(SPRN_IAC2, thread->iac2);
|
||||||
|
#if CONFIG_PPC_ADV_DEBUG_IACS > 2
|
||||||
|
mtspr(SPRN_IAC3, thread->iac3);
|
||||||
|
mtspr(SPRN_IAC4, thread->iac4);
|
||||||
|
#endif
|
||||||
|
mtspr(SPRN_DAC1, thread->dac1);
|
||||||
|
mtspr(SPRN_DAC2, thread->dac2);
|
||||||
|
#if CONFIG_PPC_ADV_DEBUG_DVCS > 0
|
||||||
|
mtspr(SPRN_DVC1, thread->dvc1);
|
||||||
|
mtspr(SPRN_DVC2, thread->dvc2);
|
||||||
|
#endif
|
||||||
|
mtspr(SPRN_DBCR0, thread->dbcr0);
|
||||||
|
mtspr(SPRN_DBCR1, thread->dbcr1);
|
||||||
|
#ifdef CONFIG_BOOKE
|
||||||
|
mtspr(SPRN_DBCR2, thread->dbcr2);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
* Unless neither the old or new thread are making use of the
|
||||||
|
* debug registers, set the debug registers from the values
|
||||||
|
* stored in the new thread.
|
||||||
|
*/
|
||||||
|
static void switch_booke_debug_regs(struct thread_struct *new_thread)
|
||||||
|
{
|
||||||
|
if ((current->thread.dbcr0 & DBCR0_IDM)
|
||||||
|
|| (new_thread->dbcr0 & DBCR0_IDM))
|
||||||
|
prime_debug_regs(new_thread);
|
||||||
|
}
|
||||||
|
#else /* !CONFIG_PPC_ADV_DEBUG_REGS */
|
||||||
|
static void set_debug_reg_defaults(struct thread_struct *thread)
|
||||||
|
{
|
||||||
|
if (thread->dabr) {
|
||||||
|
thread->dabr = 0;
|
||||||
|
set_dabr(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif /* CONFIG_PPC_ADV_DEBUG_REGS */
|
||||||
|
|
||||||
int set_dabr(unsigned long dabr)
|
int set_dabr(unsigned long dabr)
|
||||||
{
|
{
|
||||||
__get_cpu_var(current_dabr) = dabr;
|
__get_cpu_var(current_dabr) = dabr;
|
||||||
|
@ -284,7 +369,7 @@ int set_dabr(unsigned long dabr)
|
||||||
return ppc_md.set_dabr(dabr);
|
return ppc_md.set_dabr(dabr);
|
||||||
|
|
||||||
/* XXX should we have a CPU_FTR_HAS_DABR ? */
|
/* XXX should we have a CPU_FTR_HAS_DABR ? */
|
||||||
#if defined(CONFIG_BOOKE)
|
#ifdef CONFIG_PPC_ADV_DEBUG_REGS
|
||||||
mtspr(SPRN_DAC1, dabr);
|
mtspr(SPRN_DAC1, dabr);
|
||||||
#elif defined(CONFIG_PPC_BOOK3S)
|
#elif defined(CONFIG_PPC_BOOK3S)
|
||||||
mtspr(SPRN_DABR, dabr);
|
mtspr(SPRN_DABR, dabr);
|
||||||
|
@ -371,10 +456,8 @@ struct task_struct *__switch_to(struct task_struct *prev,
|
||||||
|
|
||||||
#endif /* CONFIG_SMP */
|
#endif /* CONFIG_SMP */
|
||||||
|
|
||||||
#if defined(CONFIG_BOOKE)
|
#ifdef CONFIG_PPC_ADV_DEBUG_REGS
|
||||||
/* If new thread DAC (HW breakpoint) is the same then leave it */
|
switch_booke_debug_regs(&new->thread);
|
||||||
if (new->thread.dabr)
|
|
||||||
set_dabr(new->thread.dabr);
|
|
||||||
#else
|
#else
|
||||||
if (unlikely(__get_cpu_var(current_dabr) != new->thread.dabr))
|
if (unlikely(__get_cpu_var(current_dabr) != new->thread.dabr))
|
||||||
set_dabr(new->thread.dabr);
|
set_dabr(new->thread.dabr);
|
||||||
|
@ -514,7 +597,7 @@ void show_regs(struct pt_regs * regs)
|
||||||
printk(" CR: %08lx XER: %08lx\n", regs->ccr, regs->xer);
|
printk(" CR: %08lx XER: %08lx\n", regs->ccr, regs->xer);
|
||||||
trap = TRAP(regs);
|
trap = TRAP(regs);
|
||||||
if (trap == 0x300 || trap == 0x600)
|
if (trap == 0x300 || trap == 0x600)
|
||||||
#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
|
#ifdef CONFIG_PPC_ADV_DEBUG_REGS
|
||||||
printk("DEAR: "REG", ESR: "REG"\n", regs->dar, regs->dsisr);
|
printk("DEAR: "REG", ESR: "REG"\n", regs->dar, regs->dsisr);
|
||||||
#else
|
#else
|
||||||
printk("DAR: "REG", DSISR: "REG"\n", regs->dar, regs->dsisr);
|
printk("DAR: "REG", DSISR: "REG"\n", regs->dar, regs->dsisr);
|
||||||
|
@ -556,14 +639,7 @@ void flush_thread(void)
|
||||||
{
|
{
|
||||||
discard_lazy_cpu_state();
|
discard_lazy_cpu_state();
|
||||||
|
|
||||||
if (current->thread.dabr) {
|
set_debug_reg_defaults(¤t->thread);
|
||||||
current->thread.dabr = 0;
|
|
||||||
set_dabr(0);
|
|
||||||
|
|
||||||
#if defined(CONFIG_BOOKE)
|
|
||||||
current->thread.dbcr0 &= ~(DBSR_DAC1R | DBSR_DAC1W);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -654,6 +654,9 @@ static void __init early_cmdline_parse(void)
|
||||||
#define OV5_CMO 0x00
|
#define OV5_CMO 0x00
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Option Vector 6: IBM PAPR hints */
|
||||||
|
#define OV6_LINUX 0x02 /* Linux is our OS */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The architecture vector has an array of PVR mask/value pairs,
|
* The architecture vector has an array of PVR mask/value pairs,
|
||||||
* followed by # option vectors - 1, followed by the option vectors.
|
* followed by # option vectors - 1, followed by the option vectors.
|
||||||
|
@ -665,7 +668,7 @@ static unsigned char ibm_architecture_vec[] = {
|
||||||
W(0xffffffff), W(0x0f000003), /* all 2.06-compliant */
|
W(0xffffffff), W(0x0f000003), /* all 2.06-compliant */
|
||||||
W(0xffffffff), W(0x0f000002), /* all 2.05-compliant */
|
W(0xffffffff), W(0x0f000002), /* all 2.05-compliant */
|
||||||
W(0xfffffffe), W(0x0f000001), /* all 2.04-compliant and earlier */
|
W(0xfffffffe), W(0x0f000001), /* all 2.04-compliant and earlier */
|
||||||
5 - 1, /* 5 option vectors */
|
6 - 1, /* 6 option vectors */
|
||||||
|
|
||||||
/* option vector 1: processor architectures supported */
|
/* option vector 1: processor architectures supported */
|
||||||
3 - 2, /* length */
|
3 - 2, /* length */
|
||||||
|
@ -697,12 +700,29 @@ static unsigned char ibm_architecture_vec[] = {
|
||||||
0, /* don't halt */
|
0, /* don't halt */
|
||||||
|
|
||||||
/* option vector 5: PAPR/OF options */
|
/* option vector 5: PAPR/OF options */
|
||||||
5 - 2, /* length */
|
13 - 2, /* length */
|
||||||
0, /* don't ignore, don't halt */
|
0, /* don't ignore, don't halt */
|
||||||
OV5_LPAR | OV5_SPLPAR | OV5_LARGE_PAGES | OV5_DRCONF_MEMORY |
|
OV5_LPAR | OV5_SPLPAR | OV5_LARGE_PAGES | OV5_DRCONF_MEMORY |
|
||||||
OV5_DONATE_DEDICATE_CPU | OV5_MSI,
|
OV5_DONATE_DEDICATE_CPU | OV5_MSI,
|
||||||
0,
|
0,
|
||||||
OV5_CMO,
|
OV5_CMO,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
/* WARNING: The offset of the "number of cores" field below
|
||||||
|
* must match by the macro below. Update the definition if
|
||||||
|
* the structure layout changes.
|
||||||
|
*/
|
||||||
|
#define IBM_ARCH_VEC_NRCORES_OFFSET 100
|
||||||
|
W(NR_CPUS), /* number of cores supported */
|
||||||
|
|
||||||
|
/* option vector 6: IBM PAPR hints */
|
||||||
|
4 - 2, /* length */
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
OV6_LINUX,
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Old method - ELF header with PT_NOTE sections */
|
/* Old method - ELF header with PT_NOTE sections */
|
||||||
|
@ -792,13 +812,70 @@ static struct fake_elf {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static int __init prom_count_smt_threads(void)
|
||||||
|
{
|
||||||
|
phandle node;
|
||||||
|
char type[64];
|
||||||
|
unsigned int plen;
|
||||||
|
|
||||||
|
/* Pick up th first CPU node we can find */
|
||||||
|
for (node = 0; prom_next_node(&node); ) {
|
||||||
|
type[0] = 0;
|
||||||
|
prom_getprop(node, "device_type", type, sizeof(type));
|
||||||
|
|
||||||
|
if (strcmp(type, RELOC("cpu")))
|
||||||
|
continue;
|
||||||
|
/*
|
||||||
|
* There is an entry for each smt thread, each entry being
|
||||||
|
* 4 bytes long. All cpus should have the same number of
|
||||||
|
* smt threads, so return after finding the first.
|
||||||
|
*/
|
||||||
|
plen = prom_getproplen(node, "ibm,ppc-interrupt-server#s");
|
||||||
|
if (plen == PROM_ERROR)
|
||||||
|
break;
|
||||||
|
plen >>= 2;
|
||||||
|
prom_debug("Found 0x%x smt threads per core\n", (unsigned long)plen);
|
||||||
|
|
||||||
|
/* Sanity check */
|
||||||
|
if (plen < 1 || plen > 64) {
|
||||||
|
prom_printf("Threads per core 0x%x out of bounds, assuming 1\n",
|
||||||
|
(unsigned long)plen);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return plen;
|
||||||
|
}
|
||||||
|
prom_debug("No threads found, assuming 1 per core\n");
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static void __init prom_send_capabilities(void)
|
static void __init prom_send_capabilities(void)
|
||||||
{
|
{
|
||||||
ihandle elfloader, root;
|
ihandle elfloader, root;
|
||||||
prom_arg_t ret;
|
prom_arg_t ret;
|
||||||
|
u32 *cores;
|
||||||
|
|
||||||
root = call_prom("open", 1, 1, ADDR("/"));
|
root = call_prom("open", 1, 1, ADDR("/"));
|
||||||
if (root != 0) {
|
if (root != 0) {
|
||||||
|
/* We need to tell the FW about the number of cores we support.
|
||||||
|
*
|
||||||
|
* To do that, we count the number of threads on the first core
|
||||||
|
* (we assume this is the same for all cores) and use it to
|
||||||
|
* divide NR_CPUS.
|
||||||
|
*/
|
||||||
|
cores = (u32 *)PTRRELOC(&ibm_architecture_vec[IBM_ARCH_VEC_NRCORES_OFFSET]);
|
||||||
|
if (*cores != NR_CPUS) {
|
||||||
|
prom_printf("WARNING ! "
|
||||||
|
"ibm_architecture_vec structure inconsistent: 0x%x !\n",
|
||||||
|
*cores);
|
||||||
|
} else {
|
||||||
|
*cores = NR_CPUS / prom_count_smt_threads();
|
||||||
|
prom_printf("Max number of cores passed to firmware: 0x%x\n",
|
||||||
|
(unsigned long)*cores);
|
||||||
|
}
|
||||||
|
|
||||||
/* try calling the ibm,client-architecture-support method */
|
/* try calling the ibm,client-architecture-support method */
|
||||||
prom_printf("Calling ibm,client-architecture-support...");
|
prom_printf("Calling ibm,client-architecture-support...");
|
||||||
if (call_prom_ret("call-method", 3, 2, &ret,
|
if (call_prom_ret("call-method", 3, 2, &ret,
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
/*
|
/*
|
||||||
* Set of msr bits that gdb can change on behalf of a process.
|
* Set of msr bits that gdb can change on behalf of a process.
|
||||||
*/
|
*/
|
||||||
#if defined(CONFIG_40x) || defined(CONFIG_BOOKE)
|
#ifdef CONFIG_PPC_ADV_DEBUG_REGS
|
||||||
#define MSR_DEBUGCHANGE 0
|
#define MSR_DEBUGCHANGE 0
|
||||||
#else
|
#else
|
||||||
#define MSR_DEBUGCHANGE (MSR_SE | MSR_BE)
|
#define MSR_DEBUGCHANGE (MSR_SE | MSR_BE)
|
||||||
|
@ -703,7 +703,7 @@ void user_enable_single_step(struct task_struct *task)
|
||||||
struct pt_regs *regs = task->thread.regs;
|
struct pt_regs *regs = task->thread.regs;
|
||||||
|
|
||||||
if (regs != NULL) {
|
if (regs != NULL) {
|
||||||
#if defined(CONFIG_40x) || defined(CONFIG_BOOKE)
|
#ifdef CONFIG_PPC_ADV_DEBUG_REGS
|
||||||
task->thread.dbcr0 &= ~DBCR0_BT;
|
task->thread.dbcr0 &= ~DBCR0_BT;
|
||||||
task->thread.dbcr0 |= DBCR0_IDM | DBCR0_IC;
|
task->thread.dbcr0 |= DBCR0_IDM | DBCR0_IC;
|
||||||
regs->msr |= MSR_DE;
|
regs->msr |= MSR_DE;
|
||||||
|
@ -720,7 +720,7 @@ void user_enable_block_step(struct task_struct *task)
|
||||||
struct pt_regs *regs = task->thread.regs;
|
struct pt_regs *regs = task->thread.regs;
|
||||||
|
|
||||||
if (regs != NULL) {
|
if (regs != NULL) {
|
||||||
#if defined(CONFIG_40x) || defined(CONFIG_BOOKE)
|
#ifdef CONFIG_PPC_ADV_DEBUG_REGS
|
||||||
task->thread.dbcr0 &= ~DBCR0_IC;
|
task->thread.dbcr0 &= ~DBCR0_IC;
|
||||||
task->thread.dbcr0 = DBCR0_IDM | DBCR0_BT;
|
task->thread.dbcr0 = DBCR0_IDM | DBCR0_BT;
|
||||||
regs->msr |= MSR_DE;
|
regs->msr |= MSR_DE;
|
||||||
|
@ -737,17 +737,25 @@ void user_disable_single_step(struct task_struct *task)
|
||||||
struct pt_regs *regs = task->thread.regs;
|
struct pt_regs *regs = task->thread.regs;
|
||||||
|
|
||||||
if (regs != NULL) {
|
if (regs != NULL) {
|
||||||
#if defined(CONFIG_BOOKE)
|
#ifdef CONFIG_PPC_ADV_DEBUG_REGS
|
||||||
/* If DAC don't clear DBCRO_IDM or MSR_DE */
|
/*
|
||||||
if (task->thread.dabr)
|
* The logic to disable single stepping should be as
|
||||||
task->thread.dbcr0 &= ~(DBCR0_IC | DBCR0_BT);
|
* simple as turning off the Instruction Complete flag.
|
||||||
else {
|
* And, after doing so, if all debug flags are off, turn
|
||||||
task->thread.dbcr0 &= ~(DBCR0_IC | DBCR0_BT | DBCR0_IDM);
|
* off DBCR0(IDM) and MSR(DE) .... Torez
|
||||||
|
*/
|
||||||
|
task->thread.dbcr0 &= ~DBCR0_IC;
|
||||||
|
/*
|
||||||
|
* Test to see if any of the DBCR_ACTIVE_EVENTS bits are set.
|
||||||
|
*/
|
||||||
|
if (!DBCR_ACTIVE_EVENTS(task->thread.dbcr0,
|
||||||
|
task->thread.dbcr1)) {
|
||||||
|
/*
|
||||||
|
* All debug events were off.....
|
||||||
|
*/
|
||||||
|
task->thread.dbcr0 &= ~DBCR0_IDM;
|
||||||
regs->msr &= ~MSR_DE;
|
regs->msr &= ~MSR_DE;
|
||||||
}
|
}
|
||||||
#elif defined(CONFIG_40x)
|
|
||||||
task->thread.dbcr0 &= ~(DBCR0_IC | DBCR0_BT | DBCR0_IDM);
|
|
||||||
regs->msr &= ~MSR_DE;
|
|
||||||
#else
|
#else
|
||||||
regs->msr &= ~(MSR_SE | MSR_BE);
|
regs->msr &= ~(MSR_SE | MSR_BE);
|
||||||
#endif
|
#endif
|
||||||
|
@ -769,8 +777,7 @@ int ptrace_set_debugreg(struct task_struct *task, unsigned long addr,
|
||||||
if ((data & ~0x7UL) >= TASK_SIZE)
|
if ((data & ~0x7UL) >= TASK_SIZE)
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
|
||||||
#ifndef CONFIG_BOOKE
|
#ifndef CONFIG_PPC_ADV_DEBUG_REGS
|
||||||
|
|
||||||
/* For processors using DABR (i.e. 970), the bottom 3 bits are flags.
|
/* For processors using DABR (i.e. 970), the bottom 3 bits are flags.
|
||||||
* It was assumed, on previous implementations, that 3 bits were
|
* It was assumed, on previous implementations, that 3 bits were
|
||||||
* passed together with the data address, fitting the design of the
|
* passed together with the data address, fitting the design of the
|
||||||
|
@ -789,21 +796,22 @@ int ptrace_set_debugreg(struct task_struct *task, unsigned long addr,
|
||||||
|
|
||||||
/* Move contents to the DABR register */
|
/* Move contents to the DABR register */
|
||||||
task->thread.dabr = data;
|
task->thread.dabr = data;
|
||||||
|
#else /* CONFIG_PPC_ADV_DEBUG_REGS */
|
||||||
#endif
|
|
||||||
#if defined(CONFIG_BOOKE)
|
|
||||||
|
|
||||||
/* As described above, it was assumed 3 bits were passed with the data
|
/* As described above, it was assumed 3 bits were passed with the data
|
||||||
* address, but we will assume only the mode bits will be passed
|
* address, but we will assume only the mode bits will be passed
|
||||||
* as to not cause alignment restrictions for DAC-based processors.
|
* as to not cause alignment restrictions for DAC-based processors.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* DAC's hold the whole address without any mode flags */
|
/* DAC's hold the whole address without any mode flags */
|
||||||
task->thread.dabr = data & ~0x3UL;
|
task->thread.dac1 = data & ~0x3UL;
|
||||||
|
|
||||||
if (task->thread.dabr == 0) {
|
if (task->thread.dac1 == 0) {
|
||||||
task->thread.dbcr0 &= ~(DBSR_DAC1R | DBSR_DAC1W | DBCR0_IDM);
|
dbcr_dac(task) &= ~(DBCR_DAC1R | DBCR_DAC1W);
|
||||||
|
if (!DBCR_ACTIVE_EVENTS(task->thread.dbcr0,
|
||||||
|
task->thread.dbcr1)) {
|
||||||
task->thread.regs->msr &= ~MSR_DE;
|
task->thread.regs->msr &= ~MSR_DE;
|
||||||
|
task->thread.dbcr0 &= ~DBCR0_IDM;
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -814,17 +822,17 @@ int ptrace_set_debugreg(struct task_struct *task, unsigned long addr,
|
||||||
|
|
||||||
/* Set the Internal Debugging flag (IDM bit 1) for the DBCR0
|
/* Set the Internal Debugging flag (IDM bit 1) for the DBCR0
|
||||||
register */
|
register */
|
||||||
task->thread.dbcr0 = DBCR0_IDM;
|
task->thread.dbcr0 |= DBCR0_IDM;
|
||||||
|
|
||||||
/* Check for write and read flags and set DBCR0
|
/* Check for write and read flags and set DBCR0
|
||||||
accordingly */
|
accordingly */
|
||||||
|
dbcr_dac(task) &= ~(DBCR_DAC1R|DBCR_DAC1W);
|
||||||
if (data & 0x1UL)
|
if (data & 0x1UL)
|
||||||
task->thread.dbcr0 |= DBSR_DAC1R;
|
dbcr_dac(task) |= DBCR_DAC1R;
|
||||||
if (data & 0x2UL)
|
if (data & 0x2UL)
|
||||||
task->thread.dbcr0 |= DBSR_DAC1W;
|
dbcr_dac(task) |= DBCR_DAC1W;
|
||||||
|
|
||||||
task->thread.regs->msr |= MSR_DE;
|
task->thread.regs->msr |= MSR_DE;
|
||||||
#endif
|
#endif /* CONFIG_PPC_ADV_DEBUG_REGS */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -839,6 +847,394 @@ void ptrace_disable(struct task_struct *child)
|
||||||
user_disable_single_step(child);
|
user_disable_single_step(child);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_PPC_ADV_DEBUG_REGS
|
||||||
|
static long set_intruction_bp(struct task_struct *child,
|
||||||
|
struct ppc_hw_breakpoint *bp_info)
|
||||||
|
{
|
||||||
|
int slot;
|
||||||
|
int slot1_in_use = ((child->thread.dbcr0 & DBCR0_IAC1) != 0);
|
||||||
|
int slot2_in_use = ((child->thread.dbcr0 & DBCR0_IAC2) != 0);
|
||||||
|
int slot3_in_use = ((child->thread.dbcr0 & DBCR0_IAC3) != 0);
|
||||||
|
int slot4_in_use = ((child->thread.dbcr0 & DBCR0_IAC4) != 0);
|
||||||
|
|
||||||
|
if (dbcr_iac_range(child) & DBCR_IAC12MODE)
|
||||||
|
slot2_in_use = 1;
|
||||||
|
if (dbcr_iac_range(child) & DBCR_IAC34MODE)
|
||||||
|
slot4_in_use = 1;
|
||||||
|
|
||||||
|
if (bp_info->addr >= TASK_SIZE)
|
||||||
|
return -EIO;
|
||||||
|
|
||||||
|
if (bp_info->addr_mode != PPC_BREAKPOINT_MODE_EXACT) {
|
||||||
|
|
||||||
|
/* Make sure range is valid. */
|
||||||
|
if (bp_info->addr2 >= TASK_SIZE)
|
||||||
|
return -EIO;
|
||||||
|
|
||||||
|
/* We need a pair of IAC regsisters */
|
||||||
|
if ((!slot1_in_use) && (!slot2_in_use)) {
|
||||||
|
slot = 1;
|
||||||
|
child->thread.iac1 = bp_info->addr;
|
||||||
|
child->thread.iac2 = bp_info->addr2;
|
||||||
|
child->thread.dbcr0 |= DBCR0_IAC1;
|
||||||
|
if (bp_info->addr_mode ==
|
||||||
|
PPC_BREAKPOINT_MODE_RANGE_EXCLUSIVE)
|
||||||
|
dbcr_iac_range(child) |= DBCR_IAC12X;
|
||||||
|
else
|
||||||
|
dbcr_iac_range(child) |= DBCR_IAC12I;
|
||||||
|
#if CONFIG_PPC_ADV_DEBUG_IACS > 2
|
||||||
|
} else if ((!slot3_in_use) && (!slot4_in_use)) {
|
||||||
|
slot = 3;
|
||||||
|
child->thread.iac3 = bp_info->addr;
|
||||||
|
child->thread.iac4 = bp_info->addr2;
|
||||||
|
child->thread.dbcr0 |= DBCR0_IAC3;
|
||||||
|
if (bp_info->addr_mode ==
|
||||||
|
PPC_BREAKPOINT_MODE_RANGE_EXCLUSIVE)
|
||||||
|
dbcr_iac_range(child) |= DBCR_IAC34X;
|
||||||
|
else
|
||||||
|
dbcr_iac_range(child) |= DBCR_IAC34I;
|
||||||
|
#endif
|
||||||
|
} else
|
||||||
|
return -ENOSPC;
|
||||||
|
} else {
|
||||||
|
/* We only need one. If possible leave a pair free in
|
||||||
|
* case a range is needed later
|
||||||
|
*/
|
||||||
|
if (!slot1_in_use) {
|
||||||
|
/*
|
||||||
|
* Don't use iac1 if iac1-iac2 are free and either
|
||||||
|
* iac3 or iac4 (but not both) are free
|
||||||
|
*/
|
||||||
|
if (slot2_in_use || (slot3_in_use == slot4_in_use)) {
|
||||||
|
slot = 1;
|
||||||
|
child->thread.iac1 = bp_info->addr;
|
||||||
|
child->thread.dbcr0 |= DBCR0_IAC1;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!slot2_in_use) {
|
||||||
|
slot = 2;
|
||||||
|
child->thread.iac2 = bp_info->addr;
|
||||||
|
child->thread.dbcr0 |= DBCR0_IAC2;
|
||||||
|
#if CONFIG_PPC_ADV_DEBUG_IACS > 2
|
||||||
|
} else if (!slot3_in_use) {
|
||||||
|
slot = 3;
|
||||||
|
child->thread.iac3 = bp_info->addr;
|
||||||
|
child->thread.dbcr0 |= DBCR0_IAC3;
|
||||||
|
} else if (!slot4_in_use) {
|
||||||
|
slot = 4;
|
||||||
|
child->thread.iac4 = bp_info->addr;
|
||||||
|
child->thread.dbcr0 |= DBCR0_IAC4;
|
||||||
|
#endif
|
||||||
|
} else
|
||||||
|
return -ENOSPC;
|
||||||
|
}
|
||||||
|
out:
|
||||||
|
child->thread.dbcr0 |= DBCR0_IDM;
|
||||||
|
child->thread.regs->msr |= MSR_DE;
|
||||||
|
|
||||||
|
return slot;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int del_instruction_bp(struct task_struct *child, int slot)
|
||||||
|
{
|
||||||
|
switch (slot) {
|
||||||
|
case 1:
|
||||||
|
if (child->thread.iac1 == 0)
|
||||||
|
return -ENOENT;
|
||||||
|
|
||||||
|
if (dbcr_iac_range(child) & DBCR_IAC12MODE) {
|
||||||
|
/* address range - clear slots 1 & 2 */
|
||||||
|
child->thread.iac2 = 0;
|
||||||
|
dbcr_iac_range(child) &= ~DBCR_IAC12MODE;
|
||||||
|
}
|
||||||
|
child->thread.iac1 = 0;
|
||||||
|
child->thread.dbcr0 &= ~DBCR0_IAC1;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
if (child->thread.iac2 == 0)
|
||||||
|
return -ENOENT;
|
||||||
|
|
||||||
|
if (dbcr_iac_range(child) & DBCR_IAC12MODE)
|
||||||
|
/* used in a range */
|
||||||
|
return -EINVAL;
|
||||||
|
child->thread.iac2 = 0;
|
||||||
|
child->thread.dbcr0 &= ~DBCR0_IAC2;
|
||||||
|
break;
|
||||||
|
#if CONFIG_PPC_ADV_DEBUG_IACS > 2
|
||||||
|
case 3:
|
||||||
|
if (child->thread.iac3 == 0)
|
||||||
|
return -ENOENT;
|
||||||
|
|
||||||
|
if (dbcr_iac_range(child) & DBCR_IAC34MODE) {
|
||||||
|
/* address range - clear slots 3 & 4 */
|
||||||
|
child->thread.iac4 = 0;
|
||||||
|
dbcr_iac_range(child) &= ~DBCR_IAC34MODE;
|
||||||
|
}
|
||||||
|
child->thread.iac3 = 0;
|
||||||
|
child->thread.dbcr0 &= ~DBCR0_IAC3;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
if (child->thread.iac4 == 0)
|
||||||
|
return -ENOENT;
|
||||||
|
|
||||||
|
if (dbcr_iac_range(child) & DBCR_IAC34MODE)
|
||||||
|
/* Used in a range */
|
||||||
|
return -EINVAL;
|
||||||
|
child->thread.iac4 = 0;
|
||||||
|
child->thread.dbcr0 &= ~DBCR0_IAC4;
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
default:
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int set_dac(struct task_struct *child, struct ppc_hw_breakpoint *bp_info)
|
||||||
|
{
|
||||||
|
int byte_enable =
|
||||||
|
(bp_info->condition_mode >> PPC_BREAKPOINT_CONDITION_BE_SHIFT)
|
||||||
|
& 0xf;
|
||||||
|
int condition_mode =
|
||||||
|
bp_info->condition_mode & PPC_BREAKPOINT_CONDITION_MODE;
|
||||||
|
int slot;
|
||||||
|
|
||||||
|
if (byte_enable && (condition_mode == 0))
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
if (bp_info->addr >= TASK_SIZE)
|
||||||
|
return -EIO;
|
||||||
|
|
||||||
|
if ((dbcr_dac(child) & (DBCR_DAC1R | DBCR_DAC1W)) == 0) {
|
||||||
|
slot = 1;
|
||||||
|
if (bp_info->trigger_type & PPC_BREAKPOINT_TRIGGER_READ)
|
||||||
|
dbcr_dac(child) |= DBCR_DAC1R;
|
||||||
|
if (bp_info->trigger_type & PPC_BREAKPOINT_TRIGGER_WRITE)
|
||||||
|
dbcr_dac(child) |= DBCR_DAC1W;
|
||||||
|
child->thread.dac1 = (unsigned long)bp_info->addr;
|
||||||
|
#if CONFIG_PPC_ADV_DEBUG_DVCS > 0
|
||||||
|
if (byte_enable) {
|
||||||
|
child->thread.dvc1 =
|
||||||
|
(unsigned long)bp_info->condition_value;
|
||||||
|
child->thread.dbcr2 |=
|
||||||
|
((byte_enable << DBCR2_DVC1BE_SHIFT) |
|
||||||
|
(condition_mode << DBCR2_DVC1M_SHIFT));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_PPC_ADV_DEBUG_DAC_RANGE
|
||||||
|
} else if (child->thread.dbcr2 & DBCR2_DAC12MODE) {
|
||||||
|
/* Both dac1 and dac2 are part of a range */
|
||||||
|
return -ENOSPC;
|
||||||
|
#endif
|
||||||
|
} else if ((dbcr_dac(child) & (DBCR_DAC2R | DBCR_DAC2W)) == 0) {
|
||||||
|
slot = 2;
|
||||||
|
if (bp_info->trigger_type & PPC_BREAKPOINT_TRIGGER_READ)
|
||||||
|
dbcr_dac(child) |= DBCR_DAC2R;
|
||||||
|
if (bp_info->trigger_type & PPC_BREAKPOINT_TRIGGER_WRITE)
|
||||||
|
dbcr_dac(child) |= DBCR_DAC2W;
|
||||||
|
child->thread.dac2 = (unsigned long)bp_info->addr;
|
||||||
|
#if CONFIG_PPC_ADV_DEBUG_DVCS > 0
|
||||||
|
if (byte_enable) {
|
||||||
|
child->thread.dvc2 =
|
||||||
|
(unsigned long)bp_info->condition_value;
|
||||||
|
child->thread.dbcr2 |=
|
||||||
|
((byte_enable << DBCR2_DVC2BE_SHIFT) |
|
||||||
|
(condition_mode << DBCR2_DVC2M_SHIFT));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
} else
|
||||||
|
return -ENOSPC;
|
||||||
|
child->thread.dbcr0 |= DBCR0_IDM;
|
||||||
|
child->thread.regs->msr |= MSR_DE;
|
||||||
|
|
||||||
|
return slot + 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int del_dac(struct task_struct *child, int slot)
|
||||||
|
{
|
||||||
|
if (slot == 1) {
|
||||||
|
if (child->thread.dac1 == 0)
|
||||||
|
return -ENOENT;
|
||||||
|
|
||||||
|
child->thread.dac1 = 0;
|
||||||
|
dbcr_dac(child) &= ~(DBCR_DAC1R | DBCR_DAC1W);
|
||||||
|
#ifdef CONFIG_PPC_ADV_DEBUG_DAC_RANGE
|
||||||
|
if (child->thread.dbcr2 & DBCR2_DAC12MODE) {
|
||||||
|
child->thread.dac2 = 0;
|
||||||
|
child->thread.dbcr2 &= ~DBCR2_DAC12MODE;
|
||||||
|
}
|
||||||
|
child->thread.dbcr2 &= ~(DBCR2_DVC1M | DBCR2_DVC1BE);
|
||||||
|
#endif
|
||||||
|
#if CONFIG_PPC_ADV_DEBUG_DVCS > 0
|
||||||
|
child->thread.dvc1 = 0;
|
||||||
|
#endif
|
||||||
|
} else if (slot == 2) {
|
||||||
|
if (child->thread.dac1 == 0)
|
||||||
|
return -ENOENT;
|
||||||
|
|
||||||
|
#ifdef CONFIG_PPC_ADV_DEBUG_DAC_RANGE
|
||||||
|
if (child->thread.dbcr2 & DBCR2_DAC12MODE)
|
||||||
|
/* Part of a range */
|
||||||
|
return -EINVAL;
|
||||||
|
child->thread.dbcr2 &= ~(DBCR2_DVC2M | DBCR2_DVC2BE);
|
||||||
|
#endif
|
||||||
|
#if CONFIG_PPC_ADV_DEBUG_DVCS > 0
|
||||||
|
child->thread.dvc2 = 0;
|
||||||
|
#endif
|
||||||
|
child->thread.dac2 = 0;
|
||||||
|
dbcr_dac(child) &= ~(DBCR_DAC2R | DBCR_DAC2W);
|
||||||
|
} else
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif /* CONFIG_PPC_ADV_DEBUG_REGS */
|
||||||
|
|
||||||
|
#ifdef CONFIG_PPC_ADV_DEBUG_DAC_RANGE
|
||||||
|
static int set_dac_range(struct task_struct *child,
|
||||||
|
struct ppc_hw_breakpoint *bp_info)
|
||||||
|
{
|
||||||
|
int mode = bp_info->addr_mode & PPC_BREAKPOINT_MODE_MASK;
|
||||||
|
|
||||||
|
/* We don't allow range watchpoints to be used with DVC */
|
||||||
|
if (bp_info->condition_mode)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Best effort to verify the address range. The user/supervisor bits
|
||||||
|
* prevent trapping in kernel space, but let's fail on an obvious bad
|
||||||
|
* range. The simple test on the mask is not fool-proof, and any
|
||||||
|
* exclusive range will spill over into kernel space.
|
||||||
|
*/
|
||||||
|
if (bp_info->addr >= TASK_SIZE)
|
||||||
|
return -EIO;
|
||||||
|
if (mode == PPC_BREAKPOINT_MODE_MASK) {
|
||||||
|
/*
|
||||||
|
* dac2 is a bitmask. Don't allow a mask that makes a
|
||||||
|
* kernel space address from a valid dac1 value
|
||||||
|
*/
|
||||||
|
if (~((unsigned long)bp_info->addr2) >= TASK_SIZE)
|
||||||
|
return -EIO;
|
||||||
|
} else {
|
||||||
|
/*
|
||||||
|
* For range breakpoints, addr2 must also be a valid address
|
||||||
|
*/
|
||||||
|
if (bp_info->addr2 >= TASK_SIZE)
|
||||||
|
return -EIO;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (child->thread.dbcr0 &
|
||||||
|
(DBCR0_DAC1R | DBCR0_DAC1W | DBCR0_DAC2R | DBCR0_DAC2W))
|
||||||
|
return -ENOSPC;
|
||||||
|
|
||||||
|
if (bp_info->trigger_type & PPC_BREAKPOINT_TRIGGER_READ)
|
||||||
|
child->thread.dbcr0 |= (DBCR0_DAC1R | DBCR0_IDM);
|
||||||
|
if (bp_info->trigger_type & PPC_BREAKPOINT_TRIGGER_WRITE)
|
||||||
|
child->thread.dbcr0 |= (DBCR0_DAC1W | DBCR0_IDM);
|
||||||
|
child->thread.dac1 = bp_info->addr;
|
||||||
|
child->thread.dac2 = bp_info->addr2;
|
||||||
|
if (mode == PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE)
|
||||||
|
child->thread.dbcr2 |= DBCR2_DAC12M;
|
||||||
|
else if (mode == PPC_BREAKPOINT_MODE_RANGE_EXCLUSIVE)
|
||||||
|
child->thread.dbcr2 |= DBCR2_DAC12MX;
|
||||||
|
else /* PPC_BREAKPOINT_MODE_MASK */
|
||||||
|
child->thread.dbcr2 |= DBCR2_DAC12MM;
|
||||||
|
child->thread.regs->msr |= MSR_DE;
|
||||||
|
|
||||||
|
return 5;
|
||||||
|
}
|
||||||
|
#endif /* CONFIG_PPC_ADV_DEBUG_DAC_RANGE */
|
||||||
|
|
||||||
|
static long ppc_set_hwdebug(struct task_struct *child,
|
||||||
|
struct ppc_hw_breakpoint *bp_info)
|
||||||
|
{
|
||||||
|
if (bp_info->version != 1)
|
||||||
|
return -ENOTSUPP;
|
||||||
|
#ifdef CONFIG_PPC_ADV_DEBUG_REGS
|
||||||
|
/*
|
||||||
|
* Check for invalid flags and combinations
|
||||||
|
*/
|
||||||
|
if ((bp_info->trigger_type == 0) ||
|
||||||
|
(bp_info->trigger_type & ~(PPC_BREAKPOINT_TRIGGER_EXECUTE |
|
||||||
|
PPC_BREAKPOINT_TRIGGER_RW)) ||
|
||||||
|
(bp_info->addr_mode & ~PPC_BREAKPOINT_MODE_MASK) ||
|
||||||
|
(bp_info->condition_mode &
|
||||||
|
~(PPC_BREAKPOINT_CONDITION_MODE |
|
||||||
|
PPC_BREAKPOINT_CONDITION_BE_ALL)))
|
||||||
|
return -EINVAL;
|
||||||
|
#if CONFIG_PPC_ADV_DEBUG_DVCS == 0
|
||||||
|
if (bp_info->condition_mode != PPC_BREAKPOINT_CONDITION_NONE)
|
||||||
|
return -EINVAL;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (bp_info->trigger_type & PPC_BREAKPOINT_TRIGGER_EXECUTE) {
|
||||||
|
if ((bp_info->trigger_type != PPC_BREAKPOINT_TRIGGER_EXECUTE) ||
|
||||||
|
(bp_info->condition_mode != PPC_BREAKPOINT_CONDITION_NONE))
|
||||||
|
return -EINVAL;
|
||||||
|
return set_intruction_bp(child, bp_info);
|
||||||
|
}
|
||||||
|
if (bp_info->addr_mode == PPC_BREAKPOINT_MODE_EXACT)
|
||||||
|
return set_dac(child, bp_info);
|
||||||
|
|
||||||
|
#ifdef CONFIG_PPC_ADV_DEBUG_DAC_RANGE
|
||||||
|
return set_dac_range(child, bp_info);
|
||||||
|
#else
|
||||||
|
return -EINVAL;
|
||||||
|
#endif
|
||||||
|
#else /* !CONFIG_PPC_ADV_DEBUG_DVCS */
|
||||||
|
/*
|
||||||
|
* We only support one data breakpoint
|
||||||
|
*/
|
||||||
|
if (((bp_info->trigger_type & PPC_BREAKPOINT_TRIGGER_RW) == 0) ||
|
||||||
|
((bp_info->trigger_type & ~PPC_BREAKPOINT_TRIGGER_RW) != 0) ||
|
||||||
|
(bp_info->trigger_type != PPC_BREAKPOINT_TRIGGER_WRITE) ||
|
||||||
|
(bp_info->addr_mode != PPC_BREAKPOINT_MODE_EXACT) ||
|
||||||
|
(bp_info->condition_mode != PPC_BREAKPOINT_CONDITION_NONE))
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
if (child->thread.dabr)
|
||||||
|
return -ENOSPC;
|
||||||
|
|
||||||
|
if ((unsigned long)bp_info->addr >= TASK_SIZE)
|
||||||
|
return -EIO;
|
||||||
|
|
||||||
|
child->thread.dabr = (unsigned long)bp_info->addr;
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
#endif /* !CONFIG_PPC_ADV_DEBUG_DVCS */
|
||||||
|
}
|
||||||
|
|
||||||
|
static long ppc_del_hwdebug(struct task_struct *child, long addr, long data)
|
||||||
|
{
|
||||||
|
#ifdef CONFIG_PPC_ADV_DEBUG_REGS
|
||||||
|
int rc;
|
||||||
|
|
||||||
|
if (data <= 4)
|
||||||
|
rc = del_instruction_bp(child, (int)data);
|
||||||
|
else
|
||||||
|
rc = del_dac(child, (int)data - 4);
|
||||||
|
|
||||||
|
if (!rc) {
|
||||||
|
if (!DBCR_ACTIVE_EVENTS(child->thread.dbcr0,
|
||||||
|
child->thread.dbcr1)) {
|
||||||
|
child->thread.dbcr0 &= ~DBCR0_IDM;
|
||||||
|
child->thread.regs->msr &= ~MSR_DE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return rc;
|
||||||
|
#else
|
||||||
|
if (data != 1)
|
||||||
|
return -EINVAL;
|
||||||
|
if (child->thread.dabr == 0)
|
||||||
|
return -ENOENT;
|
||||||
|
|
||||||
|
child->thread.dabr = 0;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Here are the old "legacy" powerpc specific getregs/setregs ptrace calls,
|
* Here are the old "legacy" powerpc specific getregs/setregs ptrace calls,
|
||||||
* we mark them as obsolete now, they will be removed in a future version
|
* we mark them as obsolete now, they will be removed in a future version
|
||||||
|
@ -932,13 +1328,77 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case PPC_PTRACE_GETHWDBGINFO: {
|
||||||
|
struct ppc_debug_info dbginfo;
|
||||||
|
|
||||||
|
dbginfo.version = 1;
|
||||||
|
#ifdef CONFIG_PPC_ADV_DEBUG_REGS
|
||||||
|
dbginfo.num_instruction_bps = CONFIG_PPC_ADV_DEBUG_IACS;
|
||||||
|
dbginfo.num_data_bps = CONFIG_PPC_ADV_DEBUG_DACS;
|
||||||
|
dbginfo.num_condition_regs = CONFIG_PPC_ADV_DEBUG_DVCS;
|
||||||
|
dbginfo.data_bp_alignment = 4;
|
||||||
|
dbginfo.sizeof_condition = 4;
|
||||||
|
dbginfo.features = PPC_DEBUG_FEATURE_INSN_BP_RANGE |
|
||||||
|
PPC_DEBUG_FEATURE_INSN_BP_MASK;
|
||||||
|
#ifdef CONFIG_PPC_ADV_DEBUG_DAC_RANGE
|
||||||
|
dbginfo.features |=
|
||||||
|
PPC_DEBUG_FEATURE_DATA_BP_RANGE |
|
||||||
|
PPC_DEBUG_FEATURE_DATA_BP_MASK;
|
||||||
|
#endif
|
||||||
|
#else /* !CONFIG_PPC_ADV_DEBUG_REGS */
|
||||||
|
dbginfo.num_instruction_bps = 0;
|
||||||
|
dbginfo.num_data_bps = 1;
|
||||||
|
dbginfo.num_condition_regs = 0;
|
||||||
|
#ifdef CONFIG_PPC64
|
||||||
|
dbginfo.data_bp_alignment = 8;
|
||||||
|
#else
|
||||||
|
dbginfo.data_bp_alignment = 4;
|
||||||
|
#endif
|
||||||
|
dbginfo.sizeof_condition = 0;
|
||||||
|
dbginfo.features = 0;
|
||||||
|
#endif /* CONFIG_PPC_ADV_DEBUG_REGS */
|
||||||
|
|
||||||
|
if (!access_ok(VERIFY_WRITE, data,
|
||||||
|
sizeof(struct ppc_debug_info)))
|
||||||
|
return -EFAULT;
|
||||||
|
ret = __copy_to_user((struct ppc_debug_info __user *)data,
|
||||||
|
&dbginfo, sizeof(struct ppc_debug_info)) ?
|
||||||
|
-EFAULT : 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case PPC_PTRACE_SETHWDEBUG: {
|
||||||
|
struct ppc_hw_breakpoint bp_info;
|
||||||
|
|
||||||
|
if (!access_ok(VERIFY_READ, data,
|
||||||
|
sizeof(struct ppc_hw_breakpoint)))
|
||||||
|
return -EFAULT;
|
||||||
|
ret = __copy_from_user(&bp_info,
|
||||||
|
(struct ppc_hw_breakpoint __user *)data,
|
||||||
|
sizeof(struct ppc_hw_breakpoint)) ?
|
||||||
|
-EFAULT : 0;
|
||||||
|
if (!ret)
|
||||||
|
ret = ppc_set_hwdebug(child, &bp_info);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case PPC_PTRACE_DELHWDEBUG: {
|
||||||
|
ret = ppc_del_hwdebug(child, addr, data);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case PTRACE_GET_DEBUGREG: {
|
case PTRACE_GET_DEBUGREG: {
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
/* We only support one DABR and no IABRS at the moment */
|
/* We only support one DABR and no IABRS at the moment */
|
||||||
if (addr > 0)
|
if (addr > 0)
|
||||||
break;
|
break;
|
||||||
|
#ifdef CONFIG_PPC_ADV_DEBUG_REGS
|
||||||
|
ret = put_user(child->thread.dac1,
|
||||||
|
(unsigned long __user *)data);
|
||||||
|
#else
|
||||||
ret = put_user(child->thread.dabr,
|
ret = put_user(child->thread.dabr,
|
||||||
(unsigned long __user *)data);
|
(unsigned long __user *)data);
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -140,17 +140,15 @@ static int do_signal_pending(sigset_t *oldset, struct pt_regs *regs)
|
||||||
return 0; /* no signals delivered */
|
return 0; /* no signals delivered */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef CONFIG_PPC_ADV_DEBUG_REGS
|
||||||
/*
|
/*
|
||||||
* Reenable the DABR before delivering the signal to
|
* Reenable the DABR before delivering the signal to
|
||||||
* user space. The DABR will have been cleared if it
|
* user space. The DABR will have been cleared if it
|
||||||
* triggered inside the kernel.
|
* triggered inside the kernel.
|
||||||
*/
|
*/
|
||||||
if (current->thread.dabr) {
|
if (current->thread.dabr)
|
||||||
set_dabr(current->thread.dabr);
|
set_dabr(current->thread.dabr);
|
||||||
#if defined(CONFIG_BOOKE)
|
|
||||||
mtspr(SPRN_DBCR0, current->thread.dbcr0);
|
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
|
|
||||||
if (is32) {
|
if (is32) {
|
||||||
if (ka.sa.sa_flags & SA_SIGINFO)
|
if (ka.sa.sa_flags & SA_SIGINFO)
|
||||||
|
|
|
@ -1078,7 +1078,7 @@ int sys_debug_setcontext(struct ucontext __user *ctx,
|
||||||
int i;
|
int i;
|
||||||
unsigned char tmp;
|
unsigned char tmp;
|
||||||
unsigned long new_msr = regs->msr;
|
unsigned long new_msr = regs->msr;
|
||||||
#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
|
#ifdef CONFIG_PPC_ADV_DEBUG_REGS
|
||||||
unsigned long new_dbcr0 = current->thread.dbcr0;
|
unsigned long new_dbcr0 = current->thread.dbcr0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1087,13 +1087,17 @@ int sys_debug_setcontext(struct ucontext __user *ctx,
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
switch (op.dbg_type) {
|
switch (op.dbg_type) {
|
||||||
case SIG_DBG_SINGLE_STEPPING:
|
case SIG_DBG_SINGLE_STEPPING:
|
||||||
#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
|
#ifdef CONFIG_PPC_ADV_DEBUG_REGS
|
||||||
if (op.dbg_value) {
|
if (op.dbg_value) {
|
||||||
new_msr |= MSR_DE;
|
new_msr |= MSR_DE;
|
||||||
new_dbcr0 |= (DBCR0_IDM | DBCR0_IC);
|
new_dbcr0 |= (DBCR0_IDM | DBCR0_IC);
|
||||||
} else {
|
} else {
|
||||||
|
new_dbcr0 &= ~DBCR0_IC;
|
||||||
|
if (!DBCR_ACTIVE_EVENTS(new_dbcr0,
|
||||||
|
current->thread.dbcr1)) {
|
||||||
new_msr &= ~MSR_DE;
|
new_msr &= ~MSR_DE;
|
||||||
new_dbcr0 &= ~(DBCR0_IDM | DBCR0_IC);
|
new_dbcr0 &= ~DBCR0_IDM;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if (op.dbg_value)
|
if (op.dbg_value)
|
||||||
|
@ -1103,7 +1107,7 @@ int sys_debug_setcontext(struct ucontext __user *ctx,
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case SIG_DBG_BRANCH_TRACING:
|
case SIG_DBG_BRANCH_TRACING:
|
||||||
#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
|
#ifdef CONFIG_PPC_ADV_DEBUG_REGS
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
#else
|
#else
|
||||||
if (op.dbg_value)
|
if (op.dbg_value)
|
||||||
|
@ -1124,7 +1128,7 @@ int sys_debug_setcontext(struct ucontext __user *ctx,
|
||||||
failure is a problem, anyway, and it's very unlikely unless
|
failure is a problem, anyway, and it's very unlikely unless
|
||||||
the user is really doing something wrong. */
|
the user is really doing something wrong. */
|
||||||
regs->msr = new_msr;
|
regs->msr = new_msr;
|
||||||
#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
|
#ifdef CONFIG_PPC_ADV_DEBUG_REGS
|
||||||
current->thread.dbcr0 = new_dbcr0;
|
current->thread.dbcr0 = new_dbcr0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -265,8 +265,8 @@ void account_system_vtime(struct task_struct *tsk)
|
||||||
account_system_time(tsk, 0, delta, deltascaled);
|
account_system_time(tsk, 0, delta, deltascaled);
|
||||||
else
|
else
|
||||||
account_idle_time(delta);
|
account_idle_time(delta);
|
||||||
per_cpu(cputime_last_delta, smp_processor_id()) = delta;
|
__get_cpu_var(cputime_last_delta) = delta;
|
||||||
per_cpu(cputime_scaled_last_delta, smp_processor_id()) = deltascaled;
|
__get_cpu_var(cputime_scaled_last_delta) = deltascaled;
|
||||||
local_irq_restore(flags);
|
local_irq_restore(flags);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(account_system_vtime);
|
EXPORT_SYMBOL_GPL(account_system_vtime);
|
||||||
|
@ -575,6 +575,8 @@ void timer_interrupt(struct pt_regs * regs)
|
||||||
|
|
||||||
trace_timer_interrupt_entry(regs);
|
trace_timer_interrupt_entry(regs);
|
||||||
|
|
||||||
|
__get_cpu_var(irq_stat).timer_irqs++;
|
||||||
|
|
||||||
/* Ensure a positive value is written to the decrementer, or else
|
/* Ensure a positive value is written to the decrementer, or else
|
||||||
* some CPUs will continuue to take decrementer exceptions */
|
* some CPUs will continuue to take decrementer exceptions */
|
||||||
set_dec(DECREMENTER_MAX);
|
set_dec(DECREMENTER_MAX);
|
||||||
|
@ -935,7 +937,7 @@ static void register_decrementer_clockevent(int cpu)
|
||||||
*dec = decrementer_clockevent;
|
*dec = decrementer_clockevent;
|
||||||
dec->cpumask = cpumask_of(cpu);
|
dec->cpumask = cpumask_of(cpu);
|
||||||
|
|
||||||
printk(KERN_DEBUG "clockevent: %s mult[%x] shift[%d] cpu[%d]\n",
|
printk_once(KERN_DEBUG "clockevent: %s mult[%x] shift[%d] cpu[%d]\n",
|
||||||
dec->name, dec->mult, dec->shift, cpu);
|
dec->name, dec->mult, dec->shift, cpu);
|
||||||
|
|
||||||
clockevents_register_device(dec);
|
clockevents_register_device(dec);
|
||||||
|
|
|
@ -60,13 +60,13 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC)
|
#if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC)
|
||||||
int (*__debugger)(struct pt_regs *regs);
|
int (*__debugger)(struct pt_regs *regs) __read_mostly;
|
||||||
int (*__debugger_ipi)(struct pt_regs *regs);
|
int (*__debugger_ipi)(struct pt_regs *regs) __read_mostly;
|
||||||
int (*__debugger_bpt)(struct pt_regs *regs);
|
int (*__debugger_bpt)(struct pt_regs *regs) __read_mostly;
|
||||||
int (*__debugger_sstep)(struct pt_regs *regs);
|
int (*__debugger_sstep)(struct pt_regs *regs) __read_mostly;
|
||||||
int (*__debugger_iabr_match)(struct pt_regs *regs);
|
int (*__debugger_iabr_match)(struct pt_regs *regs) __read_mostly;
|
||||||
int (*__debugger_dabr_match)(struct pt_regs *regs);
|
int (*__debugger_dabr_match)(struct pt_regs *regs) __read_mostly;
|
||||||
int (*__debugger_fault_handler)(struct pt_regs *regs);
|
int (*__debugger_fault_handler)(struct pt_regs *regs) __read_mostly;
|
||||||
|
|
||||||
EXPORT_SYMBOL(__debugger);
|
EXPORT_SYMBOL(__debugger);
|
||||||
EXPORT_SYMBOL(__debugger_ipi);
|
EXPORT_SYMBOL(__debugger_ipi);
|
||||||
|
@ -102,11 +102,11 @@ static inline void pmac_backlight_unblank(void) { }
|
||||||
int die(const char *str, struct pt_regs *regs, long err)
|
int die(const char *str, struct pt_regs *regs, long err)
|
||||||
{
|
{
|
||||||
static struct {
|
static struct {
|
||||||
spinlock_t lock;
|
raw_spinlock_t lock;
|
||||||
u32 lock_owner;
|
u32 lock_owner;
|
||||||
int lock_owner_depth;
|
int lock_owner_depth;
|
||||||
} die = {
|
} die = {
|
||||||
.lock = __SPIN_LOCK_UNLOCKED(die.lock),
|
.lock = __RAW_SPIN_LOCK_UNLOCKED(die.lock),
|
||||||
.lock_owner = -1,
|
.lock_owner = -1,
|
||||||
.lock_owner_depth = 0
|
.lock_owner_depth = 0
|
||||||
};
|
};
|
||||||
|
@ -120,7 +120,7 @@ int die(const char *str, struct pt_regs *regs, long err)
|
||||||
|
|
||||||
if (die.lock_owner != raw_smp_processor_id()) {
|
if (die.lock_owner != raw_smp_processor_id()) {
|
||||||
console_verbose();
|
console_verbose();
|
||||||
spin_lock_irqsave(&die.lock, flags);
|
raw_spin_lock_irqsave(&die.lock, flags);
|
||||||
die.lock_owner = smp_processor_id();
|
die.lock_owner = smp_processor_id();
|
||||||
die.lock_owner_depth = 0;
|
die.lock_owner_depth = 0;
|
||||||
bust_spinlocks(1);
|
bust_spinlocks(1);
|
||||||
|
@ -146,6 +146,11 @@ int die(const char *str, struct pt_regs *regs, long err)
|
||||||
#endif
|
#endif
|
||||||
printk("%s\n", ppc_md.name ? ppc_md.name : "");
|
printk("%s\n", ppc_md.name ? ppc_md.name : "");
|
||||||
|
|
||||||
|
sysfs_printk_last_file();
|
||||||
|
if (notify_die(DIE_OOPS, str, regs, err, 255,
|
||||||
|
SIGSEGV) == NOTIFY_STOP)
|
||||||
|
return 1;
|
||||||
|
|
||||||
print_modules();
|
print_modules();
|
||||||
show_regs(regs);
|
show_regs(regs);
|
||||||
} else {
|
} else {
|
||||||
|
@ -155,7 +160,7 @@ int die(const char *str, struct pt_regs *regs, long err)
|
||||||
bust_spinlocks(0);
|
bust_spinlocks(0);
|
||||||
die.lock_owner = -1;
|
die.lock_owner = -1;
|
||||||
add_taint(TAINT_DIE);
|
add_taint(TAINT_DIE);
|
||||||
spin_unlock_irqrestore(&die.lock, flags);
|
raw_spin_unlock_irqrestore(&die.lock, flags);
|
||||||
|
|
||||||
if (kexec_should_crash(current) ||
|
if (kexec_should_crash(current) ||
|
||||||
kexec_sr_activated(smp_processor_id()))
|
kexec_sr_activated(smp_processor_id()))
|
||||||
|
@ -294,7 +299,7 @@ static inline int check_io_access(struct pt_regs *regs)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
|
#ifdef CONFIG_PPC_ADV_DEBUG_REGS
|
||||||
/* On 4xx, the reason for the machine check or program exception
|
/* On 4xx, the reason for the machine check or program exception
|
||||||
is in the ESR. */
|
is in the ESR. */
|
||||||
#define get_reason(regs) ((regs)->dsisr)
|
#define get_reason(regs) ((regs)->dsisr)
|
||||||
|
@ -478,6 +483,8 @@ void machine_check_exception(struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
int recover = 0;
|
int recover = 0;
|
||||||
|
|
||||||
|
__get_cpu_var(irq_stat).mce_exceptions++;
|
||||||
|
|
||||||
/* See if any machine dependent calls. In theory, we would want
|
/* See if any machine dependent calls. In theory, we would want
|
||||||
* to call the CPU first, and call the ppc_md. one if the CPU
|
* to call the CPU first, and call the ppc_md. one if the CPU
|
||||||
* one returns a positive number. However there is existing code
|
* one returns a positive number. However there is existing code
|
||||||
|
@ -960,6 +967,8 @@ void vsx_unavailable_exception(struct pt_regs *regs)
|
||||||
|
|
||||||
void performance_monitor_exception(struct pt_regs *regs)
|
void performance_monitor_exception(struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
|
__get_cpu_var(irq_stat).pmu_irqs++;
|
||||||
|
|
||||||
perf_irq(regs);
|
perf_irq(regs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1024,10 +1033,69 @@ void SoftwareEmulation(struct pt_regs *regs)
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_8xx */
|
#endif /* CONFIG_8xx */
|
||||||
|
|
||||||
#if defined(CONFIG_40x) || defined(CONFIG_BOOKE)
|
#ifdef CONFIG_PPC_ADV_DEBUG_REGS
|
||||||
|
static void handle_debug(struct pt_regs *regs, unsigned long debug_status)
|
||||||
|
{
|
||||||
|
int changed = 0;
|
||||||
|
/*
|
||||||
|
* Determine the cause of the debug event, clear the
|
||||||
|
* event flags and send a trap to the handler. Torez
|
||||||
|
*/
|
||||||
|
if (debug_status & (DBSR_DAC1R | DBSR_DAC1W)) {
|
||||||
|
dbcr_dac(current) &= ~(DBCR_DAC1R | DBCR_DAC1W);
|
||||||
|
#ifdef CONFIG_PPC_ADV_DEBUG_DAC_RANGE
|
||||||
|
current->thread.dbcr2 &= ~DBCR2_DAC12MODE;
|
||||||
|
#endif
|
||||||
|
do_send_trap(regs, mfspr(SPRN_DAC1), debug_status, TRAP_HWBKPT,
|
||||||
|
5);
|
||||||
|
changed |= 0x01;
|
||||||
|
} else if (debug_status & (DBSR_DAC2R | DBSR_DAC2W)) {
|
||||||
|
dbcr_dac(current) &= ~(DBCR_DAC2R | DBCR_DAC2W);
|
||||||
|
do_send_trap(regs, mfspr(SPRN_DAC2), debug_status, TRAP_HWBKPT,
|
||||||
|
6);
|
||||||
|
changed |= 0x01;
|
||||||
|
} else if (debug_status & DBSR_IAC1) {
|
||||||
|
current->thread.dbcr0 &= ~DBCR0_IAC1;
|
||||||
|
dbcr_iac_range(current) &= ~DBCR_IAC12MODE;
|
||||||
|
do_send_trap(regs, mfspr(SPRN_IAC1), debug_status, TRAP_HWBKPT,
|
||||||
|
1);
|
||||||
|
changed |= 0x01;
|
||||||
|
} else if (debug_status & DBSR_IAC2) {
|
||||||
|
current->thread.dbcr0 &= ~DBCR0_IAC2;
|
||||||
|
do_send_trap(regs, mfspr(SPRN_IAC2), debug_status, TRAP_HWBKPT,
|
||||||
|
2);
|
||||||
|
changed |= 0x01;
|
||||||
|
} else if (debug_status & DBSR_IAC3) {
|
||||||
|
current->thread.dbcr0 &= ~DBCR0_IAC3;
|
||||||
|
dbcr_iac_range(current) &= ~DBCR_IAC34MODE;
|
||||||
|
do_send_trap(regs, mfspr(SPRN_IAC3), debug_status, TRAP_HWBKPT,
|
||||||
|
3);
|
||||||
|
changed |= 0x01;
|
||||||
|
} else if (debug_status & DBSR_IAC4) {
|
||||||
|
current->thread.dbcr0 &= ~DBCR0_IAC4;
|
||||||
|
do_send_trap(regs, mfspr(SPRN_IAC4), debug_status, TRAP_HWBKPT,
|
||||||
|
4);
|
||||||
|
changed |= 0x01;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
* At the point this routine was called, the MSR(DE) was turned off.
|
||||||
|
* Check all other debug flags and see if that bit needs to be turned
|
||||||
|
* back on or not.
|
||||||
|
*/
|
||||||
|
if (DBCR_ACTIVE_EVENTS(current->thread.dbcr0, current->thread.dbcr1))
|
||||||
|
regs->msr |= MSR_DE;
|
||||||
|
else
|
||||||
|
/* Make sure the IDM flag is off */
|
||||||
|
current->thread.dbcr0 &= ~DBCR0_IDM;
|
||||||
|
|
||||||
|
if (changed & 0x01)
|
||||||
|
mtspr(SPRN_DBCR0, current->thread.dbcr0);
|
||||||
|
}
|
||||||
|
|
||||||
void __kprobes DebugException(struct pt_regs *regs, unsigned long debug_status)
|
void __kprobes DebugException(struct pt_regs *regs, unsigned long debug_status)
|
||||||
{
|
{
|
||||||
|
current->thread.dbsr = debug_status;
|
||||||
|
|
||||||
/* Hack alert: On BookE, Branch Taken stops on the branch itself, while
|
/* Hack alert: On BookE, Branch Taken stops on the branch itself, while
|
||||||
* on server, it stops on the target of the branch. In order to simulate
|
* on server, it stops on the target of the branch. In order to simulate
|
||||||
* the server behaviour, we thus restart right away with a single step
|
* the server behaviour, we thus restart right away with a single step
|
||||||
|
@ -1071,29 +1139,23 @@ void __kprobes DebugException(struct pt_regs *regs, unsigned long debug_status)
|
||||||
if (debugger_sstep(regs))
|
if (debugger_sstep(regs))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (user_mode(regs))
|
if (user_mode(regs)) {
|
||||||
current->thread.dbcr0 &= ~(DBCR0_IC);
|
current->thread.dbcr0 &= ~DBCR0_IC;
|
||||||
|
#ifdef CONFIG_PPC_ADV_DEBUG_REGS
|
||||||
|
if (DBCR_ACTIVE_EVENTS(current->thread.dbcr0,
|
||||||
|
current->thread.dbcr1))
|
||||||
|
regs->msr |= MSR_DE;
|
||||||
|
else
|
||||||
|
/* Make sure the IDM bit is off */
|
||||||
|
current->thread.dbcr0 &= ~DBCR0_IDM;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
_exception(SIGTRAP, regs, TRAP_TRACE, regs->nip);
|
_exception(SIGTRAP, regs, TRAP_TRACE, regs->nip);
|
||||||
} else if (debug_status & (DBSR_DAC1R | DBSR_DAC1W)) {
|
} else
|
||||||
regs->msr &= ~MSR_DE;
|
handle_debug(regs, debug_status);
|
||||||
|
|
||||||
if (user_mode(regs)) {
|
|
||||||
current->thread.dbcr0 &= ~(DBSR_DAC1R | DBSR_DAC1W |
|
|
||||||
DBCR0_IDM);
|
|
||||||
} else {
|
|
||||||
/* Disable DAC interupts */
|
|
||||||
mtspr(SPRN_DBCR0, mfspr(SPRN_DBCR0) & ~(DBSR_DAC1R |
|
|
||||||
DBSR_DAC1W | DBCR0_IDM));
|
|
||||||
|
|
||||||
/* Clear the DAC event */
|
|
||||||
mtspr(SPRN_DBSR, (DBSR_DAC1R | DBSR_DAC1W));
|
|
||||||
}
|
|
||||||
/* Setup and send the trap to the handler */
|
|
||||||
do_dabr(regs, mfspr(SPRN_DAC1), debug_status);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_4xx || CONFIG_BOOKE */
|
#endif /* CONFIG_PPC_ADV_DEBUG_REGS */
|
||||||
|
|
||||||
#if !defined(CONFIG_TAU_INT)
|
#if !defined(CONFIG_TAU_INT)
|
||||||
void TAUException(struct pt_regs *regs)
|
void TAUException(struct pt_regs *regs)
|
||||||
|
|
|
@ -43,62 +43,62 @@ END_FTR_SECTION_IFSET(CPU_FTR_CP_USE_DCBTZ)
|
||||||
ld r7,16(r4)
|
ld r7,16(r4)
|
||||||
ldu r8,24(r4)
|
ldu r8,24(r4)
|
||||||
1: std r5,8(r3)
|
1: std r5,8(r3)
|
||||||
ld r9,8(r4)
|
|
||||||
std r6,16(r3)
|
std r6,16(r3)
|
||||||
|
ld r9,8(r4)
|
||||||
ld r10,16(r4)
|
ld r10,16(r4)
|
||||||
std r7,24(r3)
|
std r7,24(r3)
|
||||||
ld r11,24(r4)
|
|
||||||
std r8,32(r3)
|
std r8,32(r3)
|
||||||
|
ld r11,24(r4)
|
||||||
ld r12,32(r4)
|
ld r12,32(r4)
|
||||||
std r9,40(r3)
|
std r9,40(r3)
|
||||||
ld r5,40(r4)
|
|
||||||
std r10,48(r3)
|
std r10,48(r3)
|
||||||
|
ld r5,40(r4)
|
||||||
ld r6,48(r4)
|
ld r6,48(r4)
|
||||||
std r11,56(r3)
|
std r11,56(r3)
|
||||||
ld r7,56(r4)
|
|
||||||
std r12,64(r3)
|
std r12,64(r3)
|
||||||
|
ld r7,56(r4)
|
||||||
ld r8,64(r4)
|
ld r8,64(r4)
|
||||||
std r5,72(r3)
|
std r5,72(r3)
|
||||||
ld r9,72(r4)
|
|
||||||
std r6,80(r3)
|
std r6,80(r3)
|
||||||
|
ld r9,72(r4)
|
||||||
ld r10,80(r4)
|
ld r10,80(r4)
|
||||||
std r7,88(r3)
|
std r7,88(r3)
|
||||||
ld r11,88(r4)
|
|
||||||
std r8,96(r3)
|
std r8,96(r3)
|
||||||
|
ld r11,88(r4)
|
||||||
ld r12,96(r4)
|
ld r12,96(r4)
|
||||||
std r9,104(r3)
|
std r9,104(r3)
|
||||||
ld r5,104(r4)
|
|
||||||
std r10,112(r3)
|
std r10,112(r3)
|
||||||
|
ld r5,104(r4)
|
||||||
ld r6,112(r4)
|
ld r6,112(r4)
|
||||||
std r11,120(r3)
|
std r11,120(r3)
|
||||||
ld r7,120(r4)
|
|
||||||
stdu r12,128(r3)
|
stdu r12,128(r3)
|
||||||
|
ld r7,120(r4)
|
||||||
ldu r8,128(r4)
|
ldu r8,128(r4)
|
||||||
bdnz 1b
|
bdnz 1b
|
||||||
|
|
||||||
std r5,8(r3)
|
std r5,8(r3)
|
||||||
ld r9,8(r4)
|
|
||||||
std r6,16(r3)
|
std r6,16(r3)
|
||||||
|
ld r9,8(r4)
|
||||||
ld r10,16(r4)
|
ld r10,16(r4)
|
||||||
std r7,24(r3)
|
std r7,24(r3)
|
||||||
ld r11,24(r4)
|
|
||||||
std r8,32(r3)
|
std r8,32(r3)
|
||||||
|
ld r11,24(r4)
|
||||||
ld r12,32(r4)
|
ld r12,32(r4)
|
||||||
std r9,40(r3)
|
std r9,40(r3)
|
||||||
ld r5,40(r4)
|
|
||||||
std r10,48(r3)
|
std r10,48(r3)
|
||||||
|
ld r5,40(r4)
|
||||||
ld r6,48(r4)
|
ld r6,48(r4)
|
||||||
std r11,56(r3)
|
std r11,56(r3)
|
||||||
ld r7,56(r4)
|
|
||||||
std r12,64(r3)
|
std r12,64(r3)
|
||||||
|
ld r7,56(r4)
|
||||||
ld r8,64(r4)
|
ld r8,64(r4)
|
||||||
std r5,72(r3)
|
std r5,72(r3)
|
||||||
ld r9,72(r4)
|
|
||||||
std r6,80(r3)
|
std r6,80(r3)
|
||||||
|
ld r9,72(r4)
|
||||||
ld r10,80(r4)
|
ld r10,80(r4)
|
||||||
std r7,88(r3)
|
std r7,88(r3)
|
||||||
ld r11,88(r4)
|
|
||||||
std r8,96(r3)
|
std r8,96(r3)
|
||||||
|
ld r11,88(r4)
|
||||||
ld r12,96(r4)
|
ld r12,96(r4)
|
||||||
std r9,104(r3)
|
std r9,104(r3)
|
||||||
std r10,112(r3)
|
std r10,112(r3)
|
||||||
|
|
|
@ -44,37 +44,55 @@ BEGIN_FTR_SECTION
|
||||||
andi. r0,r4,7
|
andi. r0,r4,7
|
||||||
bne .Lsrc_unaligned
|
bne .Lsrc_unaligned
|
||||||
END_FTR_SECTION_IFCLR(CPU_FTR_UNALIGNED_LD_STD)
|
END_FTR_SECTION_IFCLR(CPU_FTR_UNALIGNED_LD_STD)
|
||||||
srdi r7,r5,4
|
blt cr1,.Ldo_tail /* if < 16 bytes to copy */
|
||||||
20: ld r9,0(r4)
|
srdi r0,r5,5
|
||||||
addi r4,r4,-8
|
cmpdi cr1,r0,0
|
||||||
mtctr r7
|
20: ld r7,0(r4)
|
||||||
andi. r5,r5,7
|
220: ld r6,8(r4)
|
||||||
bf cr7*4+0,22f
|
addi r4,r4,16
|
||||||
addi r3,r3,8
|
mtctr r0
|
||||||
addi r4,r4,8
|
andi. r0,r5,0x10
|
||||||
mr r8,r9
|
beq 22f
|
||||||
blt cr1,72f
|
|
||||||
21: ld r9,8(r4)
|
|
||||||
70: std r8,8(r3)
|
|
||||||
22: ldu r8,16(r4)
|
|
||||||
71: stdu r9,16(r3)
|
|
||||||
bdnz 21b
|
|
||||||
72: std r8,8(r3)
|
|
||||||
beq+ 3f
|
|
||||||
addi r3,r3,16
|
addi r3,r3,16
|
||||||
|
addi r4,r4,-16
|
||||||
|
mr r9,r7
|
||||||
|
mr r8,r6
|
||||||
|
beq cr1,72f
|
||||||
|
21: ld r7,16(r4)
|
||||||
|
221: ld r6,24(r4)
|
||||||
|
addi r4,r4,32
|
||||||
|
70: std r9,0(r3)
|
||||||
|
270: std r8,8(r3)
|
||||||
|
22: ld r9,0(r4)
|
||||||
|
222: ld r8,8(r4)
|
||||||
|
71: std r7,16(r3)
|
||||||
|
271: std r6,24(r3)
|
||||||
|
addi r3,r3,32
|
||||||
|
bdnz 21b
|
||||||
|
72: std r9,0(r3)
|
||||||
|
272: std r8,8(r3)
|
||||||
|
andi. r5,r5,0xf
|
||||||
|
beq+ 3f
|
||||||
|
addi r4,r4,16
|
||||||
.Ldo_tail:
|
.Ldo_tail:
|
||||||
bf cr7*4+1,1f
|
addi r3,r3,16
|
||||||
23: lwz r9,8(r4)
|
bf cr7*4+0,246f
|
||||||
|
244: ld r9,0(r4)
|
||||||
|
addi r4,r4,8
|
||||||
|
245: std r9,0(r3)
|
||||||
|
addi r3,r3,8
|
||||||
|
246: bf cr7*4+1,1f
|
||||||
|
23: lwz r9,0(r4)
|
||||||
addi r4,r4,4
|
addi r4,r4,4
|
||||||
73: stw r9,0(r3)
|
73: stw r9,0(r3)
|
||||||
addi r3,r3,4
|
addi r3,r3,4
|
||||||
1: bf cr7*4+2,2f
|
1: bf cr7*4+2,2f
|
||||||
44: lhz r9,8(r4)
|
44: lhz r9,0(r4)
|
||||||
addi r4,r4,2
|
addi r4,r4,2
|
||||||
74: sth r9,0(r3)
|
74: sth r9,0(r3)
|
||||||
addi r3,r3,2
|
addi r3,r3,2
|
||||||
2: bf cr7*4+3,3f
|
2: bf cr7*4+3,3f
|
||||||
45: lbz r9,8(r4)
|
45: lbz r9,0(r4)
|
||||||
75: stb r9,0(r3)
|
75: stb r9,0(r3)
|
||||||
3: li r3,0
|
3: li r3,0
|
||||||
blr
|
blr
|
||||||
|
@ -220,7 +238,9 @@ END_FTR_SECTION_IFCLR(CPU_FTR_UNALIGNED_LD_STD)
|
||||||
131:
|
131:
|
||||||
addi r3,r3,8
|
addi r3,r3,8
|
||||||
120:
|
120:
|
||||||
|
320:
|
||||||
122:
|
122:
|
||||||
|
322:
|
||||||
124:
|
124:
|
||||||
125:
|
125:
|
||||||
126:
|
126:
|
||||||
|
@ -229,9 +249,11 @@ END_FTR_SECTION_IFCLR(CPU_FTR_UNALIGNED_LD_STD)
|
||||||
129:
|
129:
|
||||||
133:
|
133:
|
||||||
addi r3,r3,8
|
addi r3,r3,8
|
||||||
121:
|
|
||||||
132:
|
132:
|
||||||
addi r3,r3,8
|
addi r3,r3,8
|
||||||
|
121:
|
||||||
|
321:
|
||||||
|
344:
|
||||||
134:
|
134:
|
||||||
135:
|
135:
|
||||||
138:
|
138:
|
||||||
|
@ -303,18 +325,22 @@ END_FTR_SECTION_IFCLR(CPU_FTR_UNALIGNED_LD_STD)
|
||||||
183:
|
183:
|
||||||
add r3,r3,r7
|
add r3,r3,r7
|
||||||
b 1f
|
b 1f
|
||||||
|
371:
|
||||||
180:
|
180:
|
||||||
addi r3,r3,8
|
addi r3,r3,8
|
||||||
171:
|
171:
|
||||||
177:
|
177:
|
||||||
addi r3,r3,8
|
addi r3,r3,8
|
||||||
170:
|
370:
|
||||||
172:
|
372:
|
||||||
176:
|
176:
|
||||||
178:
|
178:
|
||||||
addi r3,r3,4
|
addi r3,r3,4
|
||||||
185:
|
185:
|
||||||
addi r3,r3,4
|
addi r3,r3,4
|
||||||
|
170:
|
||||||
|
172:
|
||||||
|
345:
|
||||||
173:
|
173:
|
||||||
174:
|
174:
|
||||||
175:
|
175:
|
||||||
|
@ -341,11 +367,19 @@ END_FTR_SECTION_IFCLR(CPU_FTR_UNALIGNED_LD_STD)
|
||||||
.section __ex_table,"a"
|
.section __ex_table,"a"
|
||||||
.align 3
|
.align 3
|
||||||
.llong 20b,120b
|
.llong 20b,120b
|
||||||
|
.llong 220b,320b
|
||||||
.llong 21b,121b
|
.llong 21b,121b
|
||||||
|
.llong 221b,321b
|
||||||
.llong 70b,170b
|
.llong 70b,170b
|
||||||
|
.llong 270b,370b
|
||||||
.llong 22b,122b
|
.llong 22b,122b
|
||||||
|
.llong 222b,322b
|
||||||
.llong 71b,171b
|
.llong 71b,171b
|
||||||
|
.llong 271b,371b
|
||||||
.llong 72b,172b
|
.llong 72b,172b
|
||||||
|
.llong 272b,372b
|
||||||
|
.llong 244b,344b
|
||||||
|
.llong 245b,345b
|
||||||
.llong 23b,123b
|
.llong 23b,123b
|
||||||
.llong 73b,173b
|
.llong 73b,173b
|
||||||
.llong 44b,144b
|
.llong 44b,144b
|
||||||
|
|
|
@ -112,7 +112,8 @@ void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
|
||||||
|
|
||||||
void do_lwsync_fixups(unsigned long value, void *fixup_start, void *fixup_end)
|
void do_lwsync_fixups(unsigned long value, void *fixup_start, void *fixup_end)
|
||||||
{
|
{
|
||||||
unsigned int *start, *end, *dest;
|
long *start, *end;
|
||||||
|
unsigned int *dest;
|
||||||
|
|
||||||
if (!(value & CPU_FTR_LWSYNC))
|
if (!(value & CPU_FTR_LWSYNC))
|
||||||
return ;
|
return ;
|
||||||
|
|
|
@ -84,8 +84,8 @@ void __init MMU_init_hw(void)
|
||||||
* vectors and the kernel live in real-mode.
|
* vectors and the kernel live in real-mode.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
mtspr(SPRN_DCCR, 0xF0000000); /* 512 MB of data space at 0x0. */
|
mtspr(SPRN_DCCR, 0xFFFF0000); /* 2GByte of data space at 0x0. */
|
||||||
mtspr(SPRN_ICCR, 0xF0000000); /* 512 MB of instr. space at 0x0. */
|
mtspr(SPRN_ICCR, 0xFFFF0000); /* 2GByte of instr. space at 0x0. */
|
||||||
}
|
}
|
||||||
|
|
||||||
#define LARGE_PAGE_SIZE_16M (1<<24)
|
#define LARGE_PAGE_SIZE_16M (1<<24)
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
#define HPTE_LOCK_BIT 3
|
#define HPTE_LOCK_BIT 3
|
||||||
|
|
||||||
static DEFINE_SPINLOCK(native_tlbie_lock);
|
static DEFINE_RAW_SPINLOCK(native_tlbie_lock);
|
||||||
|
|
||||||
static inline void __tlbie(unsigned long va, int psize, int ssize)
|
static inline void __tlbie(unsigned long va, int psize, int ssize)
|
||||||
{
|
{
|
||||||
|
@ -104,7 +104,7 @@ static inline void tlbie(unsigned long va, int psize, int ssize, int local)
|
||||||
if (use_local)
|
if (use_local)
|
||||||
use_local = mmu_psize_defs[psize].tlbiel;
|
use_local = mmu_psize_defs[psize].tlbiel;
|
||||||
if (lock_tlbie && !use_local)
|
if (lock_tlbie && !use_local)
|
||||||
spin_lock(&native_tlbie_lock);
|
raw_spin_lock(&native_tlbie_lock);
|
||||||
asm volatile("ptesync": : :"memory");
|
asm volatile("ptesync": : :"memory");
|
||||||
if (use_local) {
|
if (use_local) {
|
||||||
__tlbiel(va, psize, ssize);
|
__tlbiel(va, psize, ssize);
|
||||||
|
@ -114,7 +114,7 @@ static inline void tlbie(unsigned long va, int psize, int ssize, int local)
|
||||||
asm volatile("eieio; tlbsync; ptesync": : :"memory");
|
asm volatile("eieio; tlbsync; ptesync": : :"memory");
|
||||||
}
|
}
|
||||||
if (lock_tlbie && !use_local)
|
if (lock_tlbie && !use_local)
|
||||||
spin_unlock(&native_tlbie_lock);
|
raw_spin_unlock(&native_tlbie_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void native_lock_hpte(struct hash_pte *hptep)
|
static inline void native_lock_hpte(struct hash_pte *hptep)
|
||||||
|
@ -122,7 +122,7 @@ static inline void native_lock_hpte(struct hash_pte *hptep)
|
||||||
unsigned long *word = &hptep->v;
|
unsigned long *word = &hptep->v;
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
if (!test_and_set_bit(HPTE_LOCK_BIT, word))
|
if (!test_and_set_bit_lock(HPTE_LOCK_BIT, word))
|
||||||
break;
|
break;
|
||||||
while(test_bit(HPTE_LOCK_BIT, word))
|
while(test_bit(HPTE_LOCK_BIT, word))
|
||||||
cpu_relax();
|
cpu_relax();
|
||||||
|
@ -133,8 +133,7 @@ static inline void native_unlock_hpte(struct hash_pte *hptep)
|
||||||
{
|
{
|
||||||
unsigned long *word = &hptep->v;
|
unsigned long *word = &hptep->v;
|
||||||
|
|
||||||
asm volatile("lwsync":::"memory");
|
clear_bit_unlock(HPTE_LOCK_BIT, word);
|
||||||
clear_bit(HPTE_LOCK_BIT, word);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static long native_hpte_insert(unsigned long hpte_group, unsigned long va,
|
static long native_hpte_insert(unsigned long hpte_group, unsigned long va,
|
||||||
|
@ -434,7 +433,7 @@ static void native_hpte_clear(void)
|
||||||
/* we take the tlbie lock and hold it. Some hardware will
|
/* we take the tlbie lock and hold it. Some hardware will
|
||||||
* deadlock if we try to tlbie from two processors at once.
|
* deadlock if we try to tlbie from two processors at once.
|
||||||
*/
|
*/
|
||||||
spin_lock(&native_tlbie_lock);
|
raw_spin_lock(&native_tlbie_lock);
|
||||||
|
|
||||||
slots = pteg_count * HPTES_PER_GROUP;
|
slots = pteg_count * HPTES_PER_GROUP;
|
||||||
|
|
||||||
|
@ -458,7 +457,7 @@ static void native_hpte_clear(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
asm volatile("eieio; tlbsync; ptesync":::"memory");
|
asm volatile("eieio; tlbsync; ptesync":::"memory");
|
||||||
spin_unlock(&native_tlbie_lock);
|
raw_spin_unlock(&native_tlbie_lock);
|
||||||
local_irq_restore(flags);
|
local_irq_restore(flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -521,7 +520,7 @@ static void native_flush_hash_range(unsigned long number, int local)
|
||||||
int lock_tlbie = !cpu_has_feature(CPU_FTR_LOCKLESS_TLBIE);
|
int lock_tlbie = !cpu_has_feature(CPU_FTR_LOCKLESS_TLBIE);
|
||||||
|
|
||||||
if (lock_tlbie)
|
if (lock_tlbie)
|
||||||
spin_lock(&native_tlbie_lock);
|
raw_spin_lock(&native_tlbie_lock);
|
||||||
|
|
||||||
asm volatile("ptesync":::"memory");
|
asm volatile("ptesync":::"memory");
|
||||||
for (i = 0; i < number; i++) {
|
for (i = 0; i < number; i++) {
|
||||||
|
@ -536,7 +535,7 @@ static void native_flush_hash_range(unsigned long number, int local)
|
||||||
asm volatile("eieio; tlbsync; ptesync":::"memory");
|
asm volatile("eieio; tlbsync; ptesync":::"memory");
|
||||||
|
|
||||||
if (lock_tlbie)
|
if (lock_tlbie)
|
||||||
spin_unlock(&native_tlbie_lock);
|
raw_spin_unlock(&native_tlbie_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
local_irq_restore(flags);
|
local_irq_restore(flags);
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include <asm/mmu_context.h>
|
#include <asm/mmu_context.h>
|
||||||
|
|
||||||
static DEFINE_SPINLOCK(mmu_context_lock);
|
static DEFINE_SPINLOCK(mmu_context_lock);
|
||||||
static DEFINE_IDR(mmu_context_idr);
|
static DEFINE_IDA(mmu_context_ida);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The proto-VSID space has 2^35 - 1 segments available for user mappings.
|
* The proto-VSID space has 2^35 - 1 segments available for user mappings.
|
||||||
|
@ -39,11 +39,11 @@ int __init_new_context(void)
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
again:
|
again:
|
||||||
if (!idr_pre_get(&mmu_context_idr, GFP_KERNEL))
|
if (!ida_pre_get(&mmu_context_ida, GFP_KERNEL))
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
spin_lock(&mmu_context_lock);
|
spin_lock(&mmu_context_lock);
|
||||||
err = idr_get_new_above(&mmu_context_idr, NULL, 1, &index);
|
err = ida_get_new_above(&mmu_context_ida, 1, &index);
|
||||||
spin_unlock(&mmu_context_lock);
|
spin_unlock(&mmu_context_lock);
|
||||||
|
|
||||||
if (err == -EAGAIN)
|
if (err == -EAGAIN)
|
||||||
|
@ -53,7 +53,7 @@ again:
|
||||||
|
|
||||||
if (index > MAX_CONTEXT) {
|
if (index > MAX_CONTEXT) {
|
||||||
spin_lock(&mmu_context_lock);
|
spin_lock(&mmu_context_lock);
|
||||||
idr_remove(&mmu_context_idr, index);
|
ida_remove(&mmu_context_ida, index);
|
||||||
spin_unlock(&mmu_context_lock);
|
spin_unlock(&mmu_context_lock);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,7 @@ int init_new_context(struct task_struct *tsk, struct mm_struct *mm)
|
||||||
void __destroy_context(int context_id)
|
void __destroy_context(int context_id)
|
||||||
{
|
{
|
||||||
spin_lock(&mmu_context_lock);
|
spin_lock(&mmu_context_lock);
|
||||||
idr_remove(&mmu_context_idr, context_id);
|
ida_remove(&mmu_context_ida, context_id);
|
||||||
spin_unlock(&mmu_context_lock);
|
spin_unlock(&mmu_context_lock);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(__destroy_context);
|
EXPORT_SYMBOL_GPL(__destroy_context);
|
||||||
|
|
|
@ -56,7 +56,7 @@ static unsigned int next_context, nr_free_contexts;
|
||||||
static unsigned long *context_map;
|
static unsigned long *context_map;
|
||||||
static unsigned long *stale_map[NR_CPUS];
|
static unsigned long *stale_map[NR_CPUS];
|
||||||
static struct mm_struct **context_mm;
|
static struct mm_struct **context_mm;
|
||||||
static DEFINE_SPINLOCK(context_lock);
|
static DEFINE_RAW_SPINLOCK(context_lock);
|
||||||
|
|
||||||
#define CTX_MAP_SIZE \
|
#define CTX_MAP_SIZE \
|
||||||
(sizeof(unsigned long) * (last_context / BITS_PER_LONG + 1))
|
(sizeof(unsigned long) * (last_context / BITS_PER_LONG + 1))
|
||||||
|
@ -121,9 +121,9 @@ static unsigned int steal_context_smp(unsigned int id)
|
||||||
/* This will happen if you have more CPUs than available contexts,
|
/* This will happen if you have more CPUs than available contexts,
|
||||||
* all we can do here is wait a bit and try again
|
* all we can do here is wait a bit and try again
|
||||||
*/
|
*/
|
||||||
spin_unlock(&context_lock);
|
raw_spin_unlock(&context_lock);
|
||||||
cpu_relax();
|
cpu_relax();
|
||||||
spin_lock(&context_lock);
|
raw_spin_lock(&context_lock);
|
||||||
|
|
||||||
/* This will cause the caller to try again */
|
/* This will cause the caller to try again */
|
||||||
return MMU_NO_CONTEXT;
|
return MMU_NO_CONTEXT;
|
||||||
|
@ -194,7 +194,7 @@ void switch_mmu_context(struct mm_struct *prev, struct mm_struct *next)
|
||||||
unsigned long *map;
|
unsigned long *map;
|
||||||
|
|
||||||
/* No lockless fast path .. yet */
|
/* No lockless fast path .. yet */
|
||||||
spin_lock(&context_lock);
|
raw_spin_lock(&context_lock);
|
||||||
|
|
||||||
pr_hard("[%d] activating context for mm @%p, active=%d, id=%d",
|
pr_hard("[%d] activating context for mm @%p, active=%d, id=%d",
|
||||||
cpu, next, next->context.active, next->context.id);
|
cpu, next, next->context.active, next->context.id);
|
||||||
|
@ -278,7 +278,7 @@ void switch_mmu_context(struct mm_struct *prev, struct mm_struct *next)
|
||||||
/* Flick the MMU and release lock */
|
/* Flick the MMU and release lock */
|
||||||
pr_hardcont(" -> %d\n", id);
|
pr_hardcont(" -> %d\n", id);
|
||||||
set_context(id, next->pgd);
|
set_context(id, next->pgd);
|
||||||
spin_unlock(&context_lock);
|
raw_spin_unlock(&context_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -307,7 +307,7 @@ void destroy_context(struct mm_struct *mm)
|
||||||
|
|
||||||
WARN_ON(mm->context.active != 0);
|
WARN_ON(mm->context.active != 0);
|
||||||
|
|
||||||
spin_lock_irqsave(&context_lock, flags);
|
raw_spin_lock_irqsave(&context_lock, flags);
|
||||||
id = mm->context.id;
|
id = mm->context.id;
|
||||||
if (id != MMU_NO_CONTEXT) {
|
if (id != MMU_NO_CONTEXT) {
|
||||||
__clear_bit(id, context_map);
|
__clear_bit(id, context_map);
|
||||||
|
@ -318,7 +318,7 @@ void destroy_context(struct mm_struct *mm)
|
||||||
context_mm[id] = NULL;
|
context_mm[id] = NULL;
|
||||||
nr_free_contexts++;
|
nr_free_contexts++;
|
||||||
}
|
}
|
||||||
spin_unlock_irqrestore(&context_lock, flags);
|
raw_spin_unlock_irqrestore(&context_lock, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Low leve TLB miss handlers for Book3E
|
* Low level TLB miss handlers for Book3E
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2009
|
* Copyright (C) 2008-2009
|
||||||
* Ben. Herrenschmidt (benh@kernel.crashing.org), IBM Corp.
|
* Ben. Herrenschmidt (benh@kernel.crashing.org), IBM Corp.
|
||||||
|
|
|
@ -150,7 +150,7 @@ EXPORT_SYMBOL(local_flush_tlb_page);
|
||||||
*/
|
*/
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
|
|
||||||
static DEFINE_SPINLOCK(tlbivax_lock);
|
static DEFINE_RAW_SPINLOCK(tlbivax_lock);
|
||||||
|
|
||||||
static int mm_is_core_local(struct mm_struct *mm)
|
static int mm_is_core_local(struct mm_struct *mm)
|
||||||
{
|
{
|
||||||
|
@ -232,10 +232,10 @@ void __flush_tlb_page(struct mm_struct *mm, unsigned long vmaddr,
|
||||||
if (mmu_has_feature(MMU_FTR_USE_TLBIVAX_BCAST)) {
|
if (mmu_has_feature(MMU_FTR_USE_TLBIVAX_BCAST)) {
|
||||||
int lock = mmu_has_feature(MMU_FTR_LOCK_BCAST_INVAL);
|
int lock = mmu_has_feature(MMU_FTR_LOCK_BCAST_INVAL);
|
||||||
if (lock)
|
if (lock)
|
||||||
spin_lock(&tlbivax_lock);
|
raw_spin_lock(&tlbivax_lock);
|
||||||
_tlbivax_bcast(vmaddr, pid, tsize, ind);
|
_tlbivax_bcast(vmaddr, pid, tsize, ind);
|
||||||
if (lock)
|
if (lock)
|
||||||
spin_unlock(&tlbivax_lock);
|
raw_spin_unlock(&tlbivax_lock);
|
||||||
goto bail;
|
goto bail;
|
||||||
} else {
|
} else {
|
||||||
struct tlb_flush_param p = {
|
struct tlb_flush_param p = {
|
||||||
|
|
|
@ -698,8 +698,7 @@ static struct clk_interface mpc5121_clk_functions = {
|
||||||
.clk_get_parent = NULL,
|
.clk_get_parent = NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int
|
int __init mpc5121_clk_init(void)
|
||||||
mpc5121_clk_init(void)
|
|
||||||
{
|
{
|
||||||
struct device_node *np;
|
struct device_node *np;
|
||||||
|
|
||||||
|
@ -724,6 +723,3 @@ mpc5121_clk_init(void)
|
||||||
clk_functions = mpc5121_clk_functions;
|
clk_functions = mpc5121_clk_functions;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
arch_initcall(mpc5121_clk_init);
|
|
||||||
|
|
|
@ -64,8 +64,9 @@ define_machine(mpc5121_ads) {
|
||||||
.name = "MPC5121 ADS",
|
.name = "MPC5121 ADS",
|
||||||
.probe = mpc5121_ads_probe,
|
.probe = mpc5121_ads_probe,
|
||||||
.setup_arch = mpc5121_ads_setup_arch,
|
.setup_arch = mpc5121_ads_setup_arch,
|
||||||
.init = mpc512x_declare_of_platform_devices,
|
.init = mpc512x_init,
|
||||||
.init_IRQ = mpc5121_ads_init_IRQ,
|
.init_IRQ = mpc5121_ads_init_IRQ,
|
||||||
.get_irq = ipic_get_irq,
|
.get_irq = ipic_get_irq,
|
||||||
.calibrate_decr = generic_calibrate_decr,
|
.calibrate_decr = generic_calibrate_decr,
|
||||||
|
.restart = mpc512x_restart,
|
||||||
};
|
};
|
||||||
|
|
|
@ -79,7 +79,7 @@ cpld_unmask_irq(unsigned int irq)
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct irq_chip cpld_pic = {
|
static struct irq_chip cpld_pic = {
|
||||||
.name = " CPLD PIC ",
|
.name = "CPLD PIC",
|
||||||
.mask = cpld_mask_irq,
|
.mask = cpld_mask_irq,
|
||||||
.ack = cpld_mask_irq,
|
.ack = cpld_mask_irq,
|
||||||
.unmask = cpld_unmask_irq,
|
.unmask = cpld_unmask_irq,
|
||||||
|
|
|
@ -51,8 +51,9 @@ static int __init mpc5121_generic_probe(void)
|
||||||
define_machine(mpc5121_generic) {
|
define_machine(mpc5121_generic) {
|
||||||
.name = "MPC5121 generic",
|
.name = "MPC5121 generic",
|
||||||
.probe = mpc5121_generic_probe,
|
.probe = mpc5121_generic_probe,
|
||||||
.init = mpc512x_declare_of_platform_devices,
|
.init = mpc512x_init,
|
||||||
.init_IRQ = mpc512x_init_IRQ,
|
.init_IRQ = mpc512x_init_IRQ,
|
||||||
.get_irq = ipic_get_irq,
|
.get_irq = ipic_get_irq,
|
||||||
.calibrate_decr = generic_calibrate_decr,
|
.calibrate_decr = generic_calibrate_decr,
|
||||||
|
.restart = mpc512x_restart,
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,5 +12,8 @@
|
||||||
#ifndef __MPC512X_H__
|
#ifndef __MPC512X_H__
|
||||||
#define __MPC512X_H__
|
#define __MPC512X_H__
|
||||||
extern void __init mpc512x_init_IRQ(void);
|
extern void __init mpc512x_init_IRQ(void);
|
||||||
|
extern void __init mpc512x_init(void);
|
||||||
|
extern int __init mpc5121_clk_init(void);
|
||||||
void __init mpc512x_declare_of_platform_devices(void);
|
void __init mpc512x_declare_of_platform_devices(void);
|
||||||
|
extern void mpc512x_restart(char *cmd);
|
||||||
#endif /* __MPC512X_H__ */
|
#endif /* __MPC512X_H__ */
|
||||||
|
|
|
@ -21,9 +21,38 @@
|
||||||
#include <asm/ipic.h>
|
#include <asm/ipic.h>
|
||||||
#include <asm/prom.h>
|
#include <asm/prom.h>
|
||||||
#include <asm/time.h>
|
#include <asm/time.h>
|
||||||
|
#include <asm/mpc5121.h>
|
||||||
|
|
||||||
#include "mpc512x.h"
|
#include "mpc512x.h"
|
||||||
|
|
||||||
|
static struct mpc512x_reset_module __iomem *reset_module_base;
|
||||||
|
|
||||||
|
static void __init mpc512x_restart_init(void)
|
||||||
|
{
|
||||||
|
struct device_node *np;
|
||||||
|
|
||||||
|
np = of_find_compatible_node(NULL, NULL, "fsl,mpc5121-reset");
|
||||||
|
if (!np)
|
||||||
|
return;
|
||||||
|
|
||||||
|
reset_module_base = of_iomap(np, 0);
|
||||||
|
of_node_put(np);
|
||||||
|
}
|
||||||
|
|
||||||
|
void mpc512x_restart(char *cmd)
|
||||||
|
{
|
||||||
|
if (reset_module_base) {
|
||||||
|
/* Enable software reset "RSTE" */
|
||||||
|
out_be32(&reset_module_base->rpr, 0x52535445);
|
||||||
|
/* Set software hard reset */
|
||||||
|
out_be32(&reset_module_base->rcr, 0x2);
|
||||||
|
} else {
|
||||||
|
pr_err("Restart module not mapped.\n");
|
||||||
|
}
|
||||||
|
for (;;)
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
void __init mpc512x_init_IRQ(void)
|
void __init mpc512x_init_IRQ(void)
|
||||||
{
|
{
|
||||||
struct device_node *np;
|
struct device_node *np;
|
||||||
|
@ -53,8 +82,22 @@ static struct of_device_id __initdata of_bus_ids[] = {
|
||||||
|
|
||||||
void __init mpc512x_declare_of_platform_devices(void)
|
void __init mpc512x_declare_of_platform_devices(void)
|
||||||
{
|
{
|
||||||
|
struct device_node *np;
|
||||||
|
|
||||||
if (of_platform_bus_probe(NULL, of_bus_ids, NULL))
|
if (of_platform_bus_probe(NULL, of_bus_ids, NULL))
|
||||||
printk(KERN_ERR __FILE__ ": "
|
printk(KERN_ERR __FILE__ ": "
|
||||||
"Error while probing of_platform bus\n");
|
"Error while probing of_platform bus\n");
|
||||||
|
|
||||||
|
np = of_find_compatible_node(NULL, NULL, "fsl,mpc5121-nfc");
|
||||||
|
if (np) {
|
||||||
|
of_platform_device_create(np, NULL, NULL);
|
||||||
|
of_node_put(np);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void __init mpc512x_init(void)
|
||||||
|
{
|
||||||
|
mpc512x_declare_of_platform_devices();
|
||||||
|
mpc5121_clk_init();
|
||||||
|
mpc512x_restart_init();
|
||||||
|
}
|
||||||
|
|
|
@ -302,11 +302,14 @@ static struct of_device_id mpc85xx_ids[] = {
|
||||||
{ .compatible = "gianfar", },
|
{ .compatible = "gianfar", },
|
||||||
{ .compatible = "fsl,rapidio-delta", },
|
{ .compatible = "fsl,rapidio-delta", },
|
||||||
{ .compatible = "fsl,mpc8548-guts", },
|
{ .compatible = "fsl,mpc8548-guts", },
|
||||||
|
{ .compatible = "gpio-leds", },
|
||||||
{},
|
{},
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init mpc85xx_publish_devices(void)
|
static int __init mpc85xx_publish_devices(void)
|
||||||
{
|
{
|
||||||
|
if (machine_is(mpc8568_mds))
|
||||||
|
simple_gpiochip_init("fsl,mpc8568mds-bcsr-gpio");
|
||||||
if (machine_is(mpc8569_mds))
|
if (machine_is(mpc8569_mds))
|
||||||
simple_gpiochip_init("fsl,mpc8569mds-bcsr-gpio");
|
simple_gpiochip_init("fsl,mpc8569mds-bcsr-gpio");
|
||||||
|
|
||||||
|
|
|
@ -232,7 +232,7 @@ static int socrates_fpga_pic_set_type(unsigned int virq,
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct irq_chip socrates_fpga_pic_chip = {
|
static struct irq_chip socrates_fpga_pic_chip = {
|
||||||
.name = " FPGA-PIC ",
|
.name = "FPGA-PIC",
|
||||||
.ack = socrates_fpga_pic_ack,
|
.ack = socrates_fpga_pic_ack,
|
||||||
.mask = socrates_fpga_pic_mask,
|
.mask = socrates_fpga_pic_mask,
|
||||||
.mask_ack = socrates_fpga_pic_mask_ack,
|
.mask_ack = socrates_fpga_pic_mask_ack,
|
||||||
|
|
|
@ -134,7 +134,7 @@ static void stx_gp3_show_cpuinfo(struct seq_file *m)
|
||||||
pvid = mfspr(SPRN_PVR);
|
pvid = mfspr(SPRN_PVR);
|
||||||
svid = mfspr(SPRN_SVR);
|
svid = mfspr(SPRN_SVR);
|
||||||
|
|
||||||
seq_printf(m, "Vendor\t\t: RPC Electronics STx \n");
|
seq_printf(m, "Vendor\t\t: RPC Electronics STx\n");
|
||||||
seq_printf(m, "PVR\t\t: 0x%x\n", pvid);
|
seq_printf(m, "PVR\t\t: 0x%x\n", pvid);
|
||||||
seq_printf(m, "SVR\t\t: 0x%x\n", svid);
|
seq_printf(m, "SVR\t\t: 0x%x\n", svid);
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
#define DBG_LOW(fmt...) do { } while (0)
|
#define DBG_LOW(fmt...) do { } while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static DEFINE_SPINLOCK(beat_htab_lock);
|
static DEFINE_RAW_SPINLOCK(beat_htab_lock);
|
||||||
|
|
||||||
static inline unsigned int beat_read_mask(unsigned hpte_group)
|
static inline unsigned int beat_read_mask(unsigned hpte_group)
|
||||||
{
|
{
|
||||||
|
@ -114,18 +114,18 @@ static long beat_lpar_hpte_insert(unsigned long hpte_group,
|
||||||
if (rflags & _PAGE_NO_CACHE)
|
if (rflags & _PAGE_NO_CACHE)
|
||||||
hpte_r &= ~_PAGE_COHERENT;
|
hpte_r &= ~_PAGE_COHERENT;
|
||||||
|
|
||||||
spin_lock(&beat_htab_lock);
|
raw_spin_lock(&beat_htab_lock);
|
||||||
lpar_rc = beat_read_mask(hpte_group);
|
lpar_rc = beat_read_mask(hpte_group);
|
||||||
if (lpar_rc == 0) {
|
if (lpar_rc == 0) {
|
||||||
if (!(vflags & HPTE_V_BOLTED))
|
if (!(vflags & HPTE_V_BOLTED))
|
||||||
DBG_LOW(" full\n");
|
DBG_LOW(" full\n");
|
||||||
spin_unlock(&beat_htab_lock);
|
raw_spin_unlock(&beat_htab_lock);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
lpar_rc = beat_insert_htab_entry(0, hpte_group, lpar_rc << 48,
|
lpar_rc = beat_insert_htab_entry(0, hpte_group, lpar_rc << 48,
|
||||||
hpte_v, hpte_r, &slot);
|
hpte_v, hpte_r, &slot);
|
||||||
spin_unlock(&beat_htab_lock);
|
raw_spin_unlock(&beat_htab_lock);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Since we try and ioremap PHBs we don't own, the pte insert
|
* Since we try and ioremap PHBs we don't own, the pte insert
|
||||||
|
@ -198,17 +198,17 @@ static long beat_lpar_hpte_updatepp(unsigned long slot,
|
||||||
"avpnv=%016lx, slot=%016lx, psize: %d, newpp %016lx ... ",
|
"avpnv=%016lx, slot=%016lx, psize: %d, newpp %016lx ... ",
|
||||||
want_v & HPTE_V_AVPN, slot, psize, newpp);
|
want_v & HPTE_V_AVPN, slot, psize, newpp);
|
||||||
|
|
||||||
spin_lock(&beat_htab_lock);
|
raw_spin_lock(&beat_htab_lock);
|
||||||
dummy0 = beat_lpar_hpte_getword0(slot);
|
dummy0 = beat_lpar_hpte_getword0(slot);
|
||||||
if ((dummy0 & ~0x7FUL) != (want_v & ~0x7FUL)) {
|
if ((dummy0 & ~0x7FUL) != (want_v & ~0x7FUL)) {
|
||||||
DBG_LOW("not found !\n");
|
DBG_LOW("not found !\n");
|
||||||
spin_unlock(&beat_htab_lock);
|
raw_spin_unlock(&beat_htab_lock);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
lpar_rc = beat_write_htab_entry(0, slot, 0, newpp, 0, 7, &dummy0,
|
lpar_rc = beat_write_htab_entry(0, slot, 0, newpp, 0, 7, &dummy0,
|
||||||
&dummy1);
|
&dummy1);
|
||||||
spin_unlock(&beat_htab_lock);
|
raw_spin_unlock(&beat_htab_lock);
|
||||||
if (lpar_rc != 0 || dummy0 == 0) {
|
if (lpar_rc != 0 || dummy0 == 0) {
|
||||||
DBG_LOW("not found !\n");
|
DBG_LOW("not found !\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -262,13 +262,13 @@ static void beat_lpar_hpte_updateboltedpp(unsigned long newpp,
|
||||||
vsid = get_kernel_vsid(ea, MMU_SEGSIZE_256M);
|
vsid = get_kernel_vsid(ea, MMU_SEGSIZE_256M);
|
||||||
va = (vsid << 28) | (ea & 0x0fffffff);
|
va = (vsid << 28) | (ea & 0x0fffffff);
|
||||||
|
|
||||||
spin_lock(&beat_htab_lock);
|
raw_spin_lock(&beat_htab_lock);
|
||||||
slot = beat_lpar_hpte_find(va, psize);
|
slot = beat_lpar_hpte_find(va, psize);
|
||||||
BUG_ON(slot == -1);
|
BUG_ON(slot == -1);
|
||||||
|
|
||||||
lpar_rc = beat_write_htab_entry(0, slot, 0, newpp, 0, 7,
|
lpar_rc = beat_write_htab_entry(0, slot, 0, newpp, 0, 7,
|
||||||
&dummy0, &dummy1);
|
&dummy0, &dummy1);
|
||||||
spin_unlock(&beat_htab_lock);
|
raw_spin_unlock(&beat_htab_lock);
|
||||||
|
|
||||||
BUG_ON(lpar_rc != 0);
|
BUG_ON(lpar_rc != 0);
|
||||||
}
|
}
|
||||||
|
@ -285,18 +285,18 @@ static void beat_lpar_hpte_invalidate(unsigned long slot, unsigned long va,
|
||||||
slot, va, psize, local);
|
slot, va, psize, local);
|
||||||
want_v = hpte_encode_v(va, psize, MMU_SEGSIZE_256M);
|
want_v = hpte_encode_v(va, psize, MMU_SEGSIZE_256M);
|
||||||
|
|
||||||
spin_lock_irqsave(&beat_htab_lock, flags);
|
raw_spin_lock_irqsave(&beat_htab_lock, flags);
|
||||||
dummy1 = beat_lpar_hpte_getword0(slot);
|
dummy1 = beat_lpar_hpte_getword0(slot);
|
||||||
|
|
||||||
if ((dummy1 & ~0x7FUL) != (want_v & ~0x7FUL)) {
|
if ((dummy1 & ~0x7FUL) != (want_v & ~0x7FUL)) {
|
||||||
DBG_LOW("not found !\n");
|
DBG_LOW("not found !\n");
|
||||||
spin_unlock_irqrestore(&beat_htab_lock, flags);
|
raw_spin_unlock_irqrestore(&beat_htab_lock, flags);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
lpar_rc = beat_write_htab_entry(0, slot, 0, 0, HPTE_V_VALID, 0,
|
lpar_rc = beat_write_htab_entry(0, slot, 0, 0, HPTE_V_VALID, 0,
|
||||||
&dummy1, &dummy2);
|
&dummy1, &dummy2);
|
||||||
spin_unlock_irqrestore(&beat_htab_lock, flags);
|
raw_spin_unlock_irqrestore(&beat_htab_lock, flags);
|
||||||
|
|
||||||
BUG_ON(lpar_rc != 0);
|
BUG_ON(lpar_rc != 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#include "beat_wrapper.h"
|
#include "beat_wrapper.h"
|
||||||
|
|
||||||
#define MAX_IRQS NR_IRQS
|
#define MAX_IRQS NR_IRQS
|
||||||
static DEFINE_SPINLOCK(beatic_irq_mask_lock);
|
static DEFINE_RAW_SPINLOCK(beatic_irq_mask_lock);
|
||||||
static uint64_t beatic_irq_mask_enable[(MAX_IRQS+255)/64];
|
static uint64_t beatic_irq_mask_enable[(MAX_IRQS+255)/64];
|
||||||
static uint64_t beatic_irq_mask_ack[(MAX_IRQS+255)/64];
|
static uint64_t beatic_irq_mask_ack[(MAX_IRQS+255)/64];
|
||||||
|
|
||||||
|
@ -65,30 +65,30 @@ static void beatic_mask_irq(unsigned int irq_plug)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
spin_lock_irqsave(&beatic_irq_mask_lock, flags);
|
raw_spin_lock_irqsave(&beatic_irq_mask_lock, flags);
|
||||||
beatic_irq_mask_enable[irq_plug/64] &= ~(1UL << (63 - (irq_plug%64)));
|
beatic_irq_mask_enable[irq_plug/64] &= ~(1UL << (63 - (irq_plug%64)));
|
||||||
beatic_update_irq_mask(irq_plug);
|
beatic_update_irq_mask(irq_plug);
|
||||||
spin_unlock_irqrestore(&beatic_irq_mask_lock, flags);
|
raw_spin_unlock_irqrestore(&beatic_irq_mask_lock, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void beatic_unmask_irq(unsigned int irq_plug)
|
static void beatic_unmask_irq(unsigned int irq_plug)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
spin_lock_irqsave(&beatic_irq_mask_lock, flags);
|
raw_spin_lock_irqsave(&beatic_irq_mask_lock, flags);
|
||||||
beatic_irq_mask_enable[irq_plug/64] |= 1UL << (63 - (irq_plug%64));
|
beatic_irq_mask_enable[irq_plug/64] |= 1UL << (63 - (irq_plug%64));
|
||||||
beatic_update_irq_mask(irq_plug);
|
beatic_update_irq_mask(irq_plug);
|
||||||
spin_unlock_irqrestore(&beatic_irq_mask_lock, flags);
|
raw_spin_unlock_irqrestore(&beatic_irq_mask_lock, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void beatic_ack_irq(unsigned int irq_plug)
|
static void beatic_ack_irq(unsigned int irq_plug)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
spin_lock_irqsave(&beatic_irq_mask_lock, flags);
|
raw_spin_lock_irqsave(&beatic_irq_mask_lock, flags);
|
||||||
beatic_irq_mask_ack[irq_plug/64] &= ~(1UL << (63 - (irq_plug%64)));
|
beatic_irq_mask_ack[irq_plug/64] &= ~(1UL << (63 - (irq_plug%64)));
|
||||||
beatic_update_irq_mask(irq_plug);
|
beatic_update_irq_mask(irq_plug);
|
||||||
spin_unlock_irqrestore(&beatic_irq_mask_lock, flags);
|
raw_spin_unlock_irqrestore(&beatic_irq_mask_lock, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void beatic_end_irq(unsigned int irq_plug)
|
static void beatic_end_irq(unsigned int irq_plug)
|
||||||
|
@ -103,14 +103,14 @@ static void beatic_end_irq(unsigned int irq_plug)
|
||||||
|
|
||||||
printk(KERN_ERR "IRQ over-downcounted, plug %d\n", irq_plug);
|
printk(KERN_ERR "IRQ over-downcounted, plug %d\n", irq_plug);
|
||||||
}
|
}
|
||||||
spin_lock_irqsave(&beatic_irq_mask_lock, flags);
|
raw_spin_lock_irqsave(&beatic_irq_mask_lock, flags);
|
||||||
beatic_irq_mask_ack[irq_plug/64] |= 1UL << (63 - (irq_plug%64));
|
beatic_irq_mask_ack[irq_plug/64] |= 1UL << (63 - (irq_plug%64));
|
||||||
beatic_update_irq_mask(irq_plug);
|
beatic_update_irq_mask(irq_plug);
|
||||||
spin_unlock_irqrestore(&beatic_irq_mask_lock, flags);
|
raw_spin_unlock_irqrestore(&beatic_irq_mask_lock, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct irq_chip beatic_pic = {
|
static struct irq_chip beatic_pic = {
|
||||||
.name = " CELL-BEAT ",
|
.name = "CELL-BEAT",
|
||||||
.unmask = beatic_unmask_irq,
|
.unmask = beatic_unmask_irq,
|
||||||
.mask = beatic_mask_irq,
|
.mask = beatic_mask_irq,
|
||||||
.eoi = beatic_end_irq,
|
.eoi = beatic_end_irq,
|
||||||
|
|
|
@ -88,7 +88,7 @@ static void iic_eoi(unsigned int irq)
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct irq_chip iic_chip = {
|
static struct irq_chip iic_chip = {
|
||||||
.name = " CELL-IIC ",
|
.name = "CELL-IIC",
|
||||||
.mask = iic_mask,
|
.mask = iic_mask,
|
||||||
.unmask = iic_unmask,
|
.unmask = iic_unmask,
|
||||||
.eoi = iic_eoi,
|
.eoi = iic_eoi,
|
||||||
|
@ -133,7 +133,7 @@ static void iic_ioexc_cascade(unsigned int irq, struct irq_desc *desc)
|
||||||
|
|
||||||
|
|
||||||
static struct irq_chip iic_ioexc_chip = {
|
static struct irq_chip iic_ioexc_chip = {
|
||||||
.name = " CELL-IOEX",
|
.name = "CELL-IOEX",
|
||||||
.mask = iic_mask,
|
.mask = iic_mask,
|
||||||
.unmask = iic_unmask,
|
.unmask = iic_unmask,
|
||||||
.eoi = iic_ioexc_eoi,
|
.eoi = iic_ioexc_eoi,
|
||||||
|
|
|
@ -168,7 +168,7 @@ static int spider_set_irq_type(unsigned int virq, unsigned int type)
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct irq_chip spider_pic = {
|
static struct irq_chip spider_pic = {
|
||||||
.name = " SPIDER ",
|
.name = "SPIDER",
|
||||||
.unmask = spider_unmask_irq,
|
.unmask = spider_unmask_irq,
|
||||||
.mask = spider_mask_irq,
|
.mask = spider_mask_irq,
|
||||||
.ack = spider_ack_irq,
|
.ack = spider_ack_irq,
|
||||||
|
|
|
@ -273,7 +273,7 @@ static void iseries_end_IRQ(unsigned int irq)
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct irq_chip iseries_pic = {
|
static struct irq_chip iseries_pic = {
|
||||||
.name = "iSeries irq controller",
|
.name = "iSeries",
|
||||||
.startup = iseries_startup_IRQ,
|
.startup = iseries_startup_IRQ,
|
||||||
.shutdown = iseries_shutdown_IRQ,
|
.shutdown = iseries_shutdown_IRQ,
|
||||||
.unmask = iseries_enable_IRQ,
|
.unmask = iseries_enable_IRQ,
|
||||||
|
|
|
@ -85,7 +85,7 @@ static int proc_titantod_show(struct seq_file *m, void *v)
|
||||||
|
|
||||||
seq_printf(m, " titan elapsed = %lu uSec\n", titan_usec);
|
seq_printf(m, " titan elapsed = %lu uSec\n", titan_usec);
|
||||||
seq_printf(m, " tb elapsed = %lu ticks\n", tb_ticks);
|
seq_printf(m, " tb elapsed = %lu ticks\n", tb_ticks);
|
||||||
seq_printf(m, " titan jiffies = %lu.%04lu \n", titan_jiffies,
|
seq_printf(m, " titan jiffies = %lu.%04lu\n", titan_jiffies,
|
||||||
titan_jiff_rem_usec);
|
titan_jiff_rem_usec);
|
||||||
seq_printf(m, " tb jiffies = %lu.%04lu\n", tb_jiffies,
|
seq_printf(m, " tb jiffies = %lu.%04lu\n", tb_jiffies,
|
||||||
tb_jiff_rem_usec);
|
tb_jiff_rem_usec);
|
||||||
|
|
|
@ -256,7 +256,7 @@ static unsigned long iSeries_process_mainstore_vpd(struct MemoryBlock *mb_array,
|
||||||
mem_blocks = iSeries_process_Condor_mainstore_vpd(mb_array,
|
mem_blocks = iSeries_process_Condor_mainstore_vpd(mb_array,
|
||||||
max_entries);
|
max_entries);
|
||||||
|
|
||||||
printk("Mainstore_VPD: numMemoryBlocks = %ld \n", mem_blocks);
|
printk("Mainstore_VPD: numMemoryBlocks = %ld\n", mem_blocks);
|
||||||
for (i = 0; i < mem_blocks; ++i) {
|
for (i = 0; i < mem_blocks; ++i) {
|
||||||
printk("Mainstore_VPD: block %3ld logical chunks %016lx - %016lx\n"
|
printk("Mainstore_VPD: block %3ld logical chunks %016lx - %016lx\n"
|
||||||
" abs chunks %016lx - %016lx\n",
|
" abs chunks %016lx - %016lx\n",
|
||||||
|
|
|
@ -539,7 +539,7 @@ void __init bootx_init(unsigned long r3, unsigned long r4)
|
||||||
if (model
|
if (model
|
||||||
&& (strcmp(model, "iMac,1") == 0
|
&& (strcmp(model, "iMac,1") == 0
|
||||||
|| strcmp(model, "PowerMac1,1") == 0)) {
|
|| strcmp(model, "PowerMac1,1") == 0)) {
|
||||||
bootx_printf("iMac,1 detected, shutting down USB \n");
|
bootx_printf("iMac,1 detected, shutting down USB\n");
|
||||||
out_le32((unsigned __iomem *)0x80880008, 1); /* XXX */
|
out_le32((unsigned __iomem *)0x80880008, 1); /* XXX */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -554,7 +554,7 @@ void __init bootx_init(unsigned long r3, unsigned long r4)
|
||||||
} else
|
} else
|
||||||
space = bi->totalParamsSize;
|
space = bi->totalParamsSize;
|
||||||
|
|
||||||
bootx_printf("Total space used by parameters & ramdisk: 0x%x \n", space);
|
bootx_printf("Total space used by parameters & ramdisk: 0x%x\n", space);
|
||||||
|
|
||||||
/* New BootX will have flushed all TLBs and enters kernel with
|
/* New BootX will have flushed all TLBs and enters kernel with
|
||||||
* MMU switched OFF, so this should not be useful anymore.
|
* MMU switched OFF, so this should not be useful anymore.
|
||||||
|
|
|
@ -59,10 +59,10 @@ extern struct device_node *k2_skiplist[2];
|
||||||
* We use a single global lock to protect accesses. Each driver has
|
* We use a single global lock to protect accesses. Each driver has
|
||||||
* to take care of its own locking
|
* to take care of its own locking
|
||||||
*/
|
*/
|
||||||
DEFINE_SPINLOCK(feature_lock);
|
DEFINE_RAW_SPINLOCK(feature_lock);
|
||||||
|
|
||||||
#define LOCK(flags) spin_lock_irqsave(&feature_lock, flags);
|
#define LOCK(flags) raw_spin_lock_irqsave(&feature_lock, flags);
|
||||||
#define UNLOCK(flags) spin_unlock_irqrestore(&feature_lock, flags);
|
#define UNLOCK(flags) raw_spin_unlock_irqrestore(&feature_lock, flags);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -80,7 +80,7 @@ static int is_core_99;
|
||||||
static int core99_bank = 0;
|
static int core99_bank = 0;
|
||||||
static int nvram_partitions[3];
|
static int nvram_partitions[3];
|
||||||
// XXX Turn that into a sem
|
// XXX Turn that into a sem
|
||||||
static DEFINE_SPINLOCK(nv_lock);
|
static DEFINE_RAW_SPINLOCK(nv_lock);
|
||||||
|
|
||||||
static int (*core99_write_bank)(int bank, u8* datas);
|
static int (*core99_write_bank)(int bank, u8* datas);
|
||||||
static int (*core99_erase_bank)(int bank);
|
static int (*core99_erase_bank)(int bank);
|
||||||
|
@ -165,10 +165,10 @@ static unsigned char indirect_nvram_read_byte(int addr)
|
||||||
unsigned char val;
|
unsigned char val;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
spin_lock_irqsave(&nv_lock, flags);
|
raw_spin_lock_irqsave(&nv_lock, flags);
|
||||||
out_8(nvram_addr, addr >> 5);
|
out_8(nvram_addr, addr >> 5);
|
||||||
val = in_8(&nvram_data[(addr & 0x1f) << 4]);
|
val = in_8(&nvram_data[(addr & 0x1f) << 4]);
|
||||||
spin_unlock_irqrestore(&nv_lock, flags);
|
raw_spin_unlock_irqrestore(&nv_lock, flags);
|
||||||
|
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
@ -177,10 +177,10 @@ static void indirect_nvram_write_byte(int addr, unsigned char val)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
spin_lock_irqsave(&nv_lock, flags);
|
raw_spin_lock_irqsave(&nv_lock, flags);
|
||||||
out_8(nvram_addr, addr >> 5);
|
out_8(nvram_addr, addr >> 5);
|
||||||
out_8(&nvram_data[(addr & 0x1f) << 4], val);
|
out_8(&nvram_data[(addr & 0x1f) << 4], val);
|
||||||
spin_unlock_irqrestore(&nv_lock, flags);
|
raw_spin_unlock_irqrestore(&nv_lock, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -481,7 +481,7 @@ static void core99_nvram_sync(void)
|
||||||
if (!is_core_99 || !nvram_data || !nvram_image)
|
if (!is_core_99 || !nvram_data || !nvram_image)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
spin_lock_irqsave(&nv_lock, flags);
|
raw_spin_lock_irqsave(&nv_lock, flags);
|
||||||
if (!memcmp(nvram_image, (u8*)nvram_data + core99_bank*NVRAM_SIZE,
|
if (!memcmp(nvram_image, (u8*)nvram_data + core99_bank*NVRAM_SIZE,
|
||||||
NVRAM_SIZE))
|
NVRAM_SIZE))
|
||||||
goto bail;
|
goto bail;
|
||||||
|
@ -503,7 +503,7 @@ static void core99_nvram_sync(void)
|
||||||
if (core99_write_bank(core99_bank, nvram_image))
|
if (core99_write_bank(core99_bank, nvram_image))
|
||||||
printk("nvram: Error writing bank %d\n", core99_bank);
|
printk("nvram: Error writing bank %d\n", core99_bank);
|
||||||
bail:
|
bail:
|
||||||
spin_unlock_irqrestore(&nv_lock, flags);
|
raw_spin_unlock_irqrestore(&nv_lock, flags);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
mdelay(2000);
|
mdelay(2000);
|
||||||
|
|
|
@ -50,13 +50,13 @@ static int macio_do_gpio_write(PMF_STD_ARGS, u8 value, u8 mask)
|
||||||
value = ~value;
|
value = ~value;
|
||||||
|
|
||||||
/* Toggle the GPIO */
|
/* Toggle the GPIO */
|
||||||
spin_lock_irqsave(&feature_lock, flags);
|
raw_spin_lock_irqsave(&feature_lock, flags);
|
||||||
tmp = readb(addr);
|
tmp = readb(addr);
|
||||||
tmp = (tmp & ~mask) | (value & mask);
|
tmp = (tmp & ~mask) | (value & mask);
|
||||||
DBG("Do write 0x%02x to GPIO %s (%p)\n",
|
DBG("Do write 0x%02x to GPIO %s (%p)\n",
|
||||||
tmp, func->node->full_name, addr);
|
tmp, func->node->full_name, addr);
|
||||||
writeb(tmp, addr);
|
writeb(tmp, addr);
|
||||||
spin_unlock_irqrestore(&feature_lock, flags);
|
raw_spin_unlock_irqrestore(&feature_lock, flags);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -145,9 +145,9 @@ static int macio_do_write_reg32(PMF_STD_ARGS, u32 offset, u32 value, u32 mask)
|
||||||
struct macio_chip *macio = func->driver_data;
|
struct macio_chip *macio = func->driver_data;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
spin_lock_irqsave(&feature_lock, flags);
|
raw_spin_lock_irqsave(&feature_lock, flags);
|
||||||
MACIO_OUT32(offset, (MACIO_IN32(offset) & ~mask) | (value & mask));
|
MACIO_OUT32(offset, (MACIO_IN32(offset) & ~mask) | (value & mask));
|
||||||
spin_unlock_irqrestore(&feature_lock, flags);
|
raw_spin_unlock_irqrestore(&feature_lock, flags);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -168,9 +168,9 @@ static int macio_do_write_reg8(PMF_STD_ARGS, u32 offset, u8 value, u8 mask)
|
||||||
struct macio_chip *macio = func->driver_data;
|
struct macio_chip *macio = func->driver_data;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
spin_lock_irqsave(&feature_lock, flags);
|
raw_spin_lock_irqsave(&feature_lock, flags);
|
||||||
MACIO_OUT8(offset, (MACIO_IN8(offset) & ~mask) | (value & mask));
|
MACIO_OUT8(offset, (MACIO_IN8(offset) & ~mask) | (value & mask));
|
||||||
spin_unlock_irqrestore(&feature_lock, flags);
|
raw_spin_unlock_irqrestore(&feature_lock, flags);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -223,12 +223,12 @@ static int macio_do_write_reg32_slm(PMF_STD_ARGS, u32 offset, u32 shift,
|
||||||
if (args == NULL || args->count == 0)
|
if (args == NULL || args->count == 0)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
spin_lock_irqsave(&feature_lock, flags);
|
raw_spin_lock_irqsave(&feature_lock, flags);
|
||||||
tmp = MACIO_IN32(offset);
|
tmp = MACIO_IN32(offset);
|
||||||
val = args->u[0].v << shift;
|
val = args->u[0].v << shift;
|
||||||
tmp = (tmp & ~mask) | (val & mask);
|
tmp = (tmp & ~mask) | (val & mask);
|
||||||
MACIO_OUT32(offset, tmp);
|
MACIO_OUT32(offset, tmp);
|
||||||
spin_unlock_irqrestore(&feature_lock, flags);
|
raw_spin_unlock_irqrestore(&feature_lock, flags);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -243,12 +243,12 @@ static int macio_do_write_reg8_slm(PMF_STD_ARGS, u32 offset, u32 shift,
|
||||||
if (args == NULL || args->count == 0)
|
if (args == NULL || args->count == 0)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
spin_lock_irqsave(&feature_lock, flags);
|
raw_spin_lock_irqsave(&feature_lock, flags);
|
||||||
tmp = MACIO_IN8(offset);
|
tmp = MACIO_IN8(offset);
|
||||||
val = args->u[0].v << shift;
|
val = args->u[0].v << shift;
|
||||||
tmp = (tmp & ~mask) | (val & mask);
|
tmp = (tmp & ~mask) | (val & mask);
|
||||||
MACIO_OUT8(offset, tmp);
|
MACIO_OUT8(offset, tmp);
|
||||||
spin_unlock_irqrestore(&feature_lock, flags);
|
raw_spin_unlock_irqrestore(&feature_lock, flags);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -278,12 +278,12 @@ static int unin_do_write_reg32(PMF_STD_ARGS, u32 offset, u32 value, u32 mask)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
spin_lock_irqsave(&feature_lock, flags);
|
raw_spin_lock_irqsave(&feature_lock, flags);
|
||||||
/* This is fairly bogus in darwin, but it should work for our needs
|
/* This is fairly bogus in darwin, but it should work for our needs
|
||||||
* implemeted that way:
|
* implemeted that way:
|
||||||
*/
|
*/
|
||||||
UN_OUT(offset, (UN_IN(offset) & ~mask) | (value & mask));
|
UN_OUT(offset, (UN_IN(offset) & ~mask) | (value & mask));
|
||||||
spin_unlock_irqrestore(&feature_lock, flags);
|
raw_spin_unlock_irqrestore(&feature_lock, flags);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ static int max_irqs;
|
||||||
static int max_real_irqs;
|
static int max_real_irqs;
|
||||||
static u32 level_mask[4];
|
static u32 level_mask[4];
|
||||||
|
|
||||||
static DEFINE_SPINLOCK(pmac_pic_lock);
|
static DEFINE_RAW_SPINLOCK(pmac_pic_lock);
|
||||||
|
|
||||||
#define NR_MASK_WORDS ((NR_IRQS + 31) / 32)
|
#define NR_MASK_WORDS ((NR_IRQS + 31) / 32)
|
||||||
static unsigned long ppc_lost_interrupts[NR_MASK_WORDS];
|
static unsigned long ppc_lost_interrupts[NR_MASK_WORDS];
|
||||||
|
@ -85,7 +85,7 @@ static void pmac_mask_and_ack_irq(unsigned int virq)
|
||||||
int i = src >> 5;
|
int i = src >> 5;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
spin_lock_irqsave(&pmac_pic_lock, flags);
|
raw_spin_lock_irqsave(&pmac_pic_lock, flags);
|
||||||
__clear_bit(src, ppc_cached_irq_mask);
|
__clear_bit(src, ppc_cached_irq_mask);
|
||||||
if (__test_and_clear_bit(src, ppc_lost_interrupts))
|
if (__test_and_clear_bit(src, ppc_lost_interrupts))
|
||||||
atomic_dec(&ppc_n_lost_interrupts);
|
atomic_dec(&ppc_n_lost_interrupts);
|
||||||
|
@ -97,7 +97,7 @@ static void pmac_mask_and_ack_irq(unsigned int virq)
|
||||||
mb();
|
mb();
|
||||||
} while((in_le32(&pmac_irq_hw[i]->enable) & bit)
|
} while((in_le32(&pmac_irq_hw[i]->enable) & bit)
|
||||||
!= (ppc_cached_irq_mask[i] & bit));
|
!= (ppc_cached_irq_mask[i] & bit));
|
||||||
spin_unlock_irqrestore(&pmac_pic_lock, flags);
|
raw_spin_unlock_irqrestore(&pmac_pic_lock, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pmac_ack_irq(unsigned int virq)
|
static void pmac_ack_irq(unsigned int virq)
|
||||||
|
@ -107,12 +107,12 @@ static void pmac_ack_irq(unsigned int virq)
|
||||||
int i = src >> 5;
|
int i = src >> 5;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
spin_lock_irqsave(&pmac_pic_lock, flags);
|
raw_spin_lock_irqsave(&pmac_pic_lock, flags);
|
||||||
if (__test_and_clear_bit(src, ppc_lost_interrupts))
|
if (__test_and_clear_bit(src, ppc_lost_interrupts))
|
||||||
atomic_dec(&ppc_n_lost_interrupts);
|
atomic_dec(&ppc_n_lost_interrupts);
|
||||||
out_le32(&pmac_irq_hw[i]->ack, bit);
|
out_le32(&pmac_irq_hw[i]->ack, bit);
|
||||||
(void)in_le32(&pmac_irq_hw[i]->ack);
|
(void)in_le32(&pmac_irq_hw[i]->ack);
|
||||||
spin_unlock_irqrestore(&pmac_pic_lock, flags);
|
raw_spin_unlock_irqrestore(&pmac_pic_lock, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __pmac_set_irq_mask(unsigned int irq_nr, int nokicklost)
|
static void __pmac_set_irq_mask(unsigned int irq_nr, int nokicklost)
|
||||||
|
@ -152,12 +152,12 @@ static unsigned int pmac_startup_irq(unsigned int virq)
|
||||||
unsigned long bit = 1UL << (src & 0x1f);
|
unsigned long bit = 1UL << (src & 0x1f);
|
||||||
int i = src >> 5;
|
int i = src >> 5;
|
||||||
|
|
||||||
spin_lock_irqsave(&pmac_pic_lock, flags);
|
raw_spin_lock_irqsave(&pmac_pic_lock, flags);
|
||||||
if ((irq_to_desc(virq)->status & IRQ_LEVEL) == 0)
|
if ((irq_to_desc(virq)->status & IRQ_LEVEL) == 0)
|
||||||
out_le32(&pmac_irq_hw[i]->ack, bit);
|
out_le32(&pmac_irq_hw[i]->ack, bit);
|
||||||
__set_bit(src, ppc_cached_irq_mask);
|
__set_bit(src, ppc_cached_irq_mask);
|
||||||
__pmac_set_irq_mask(src, 0);
|
__pmac_set_irq_mask(src, 0);
|
||||||
spin_unlock_irqrestore(&pmac_pic_lock, flags);
|
raw_spin_unlock_irqrestore(&pmac_pic_lock, flags);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -167,10 +167,10 @@ static void pmac_mask_irq(unsigned int virq)
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
unsigned int src = irq_map[virq].hwirq;
|
unsigned int src = irq_map[virq].hwirq;
|
||||||
|
|
||||||
spin_lock_irqsave(&pmac_pic_lock, flags);
|
raw_spin_lock_irqsave(&pmac_pic_lock, flags);
|
||||||
__clear_bit(src, ppc_cached_irq_mask);
|
__clear_bit(src, ppc_cached_irq_mask);
|
||||||
__pmac_set_irq_mask(src, 1);
|
__pmac_set_irq_mask(src, 1);
|
||||||
spin_unlock_irqrestore(&pmac_pic_lock, flags);
|
raw_spin_unlock_irqrestore(&pmac_pic_lock, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pmac_unmask_irq(unsigned int virq)
|
static void pmac_unmask_irq(unsigned int virq)
|
||||||
|
@ -178,24 +178,24 @@ static void pmac_unmask_irq(unsigned int virq)
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
unsigned int src = irq_map[virq].hwirq;
|
unsigned int src = irq_map[virq].hwirq;
|
||||||
|
|
||||||
spin_lock_irqsave(&pmac_pic_lock, flags);
|
raw_spin_lock_irqsave(&pmac_pic_lock, flags);
|
||||||
__set_bit(src, ppc_cached_irq_mask);
|
__set_bit(src, ppc_cached_irq_mask);
|
||||||
__pmac_set_irq_mask(src, 0);
|
__pmac_set_irq_mask(src, 0);
|
||||||
spin_unlock_irqrestore(&pmac_pic_lock, flags);
|
raw_spin_unlock_irqrestore(&pmac_pic_lock, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int pmac_retrigger(unsigned int virq)
|
static int pmac_retrigger(unsigned int virq)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
spin_lock_irqsave(&pmac_pic_lock, flags);
|
raw_spin_lock_irqsave(&pmac_pic_lock, flags);
|
||||||
__pmac_retrigger(irq_map[virq].hwirq);
|
__pmac_retrigger(irq_map[virq].hwirq);
|
||||||
spin_unlock_irqrestore(&pmac_pic_lock, flags);
|
raw_spin_unlock_irqrestore(&pmac_pic_lock, flags);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct irq_chip pmac_pic = {
|
static struct irq_chip pmac_pic = {
|
||||||
.name = " PMAC-PIC ",
|
.name = "PMAC-PIC",
|
||||||
.startup = pmac_startup_irq,
|
.startup = pmac_startup_irq,
|
||||||
.mask = pmac_mask_irq,
|
.mask = pmac_mask_irq,
|
||||||
.ack = pmac_ack_irq,
|
.ack = pmac_ack_irq,
|
||||||
|
@ -210,7 +210,7 @@ static irqreturn_t gatwick_action(int cpl, void *dev_id)
|
||||||
int irq, bits;
|
int irq, bits;
|
||||||
int rc = IRQ_NONE;
|
int rc = IRQ_NONE;
|
||||||
|
|
||||||
spin_lock_irqsave(&pmac_pic_lock, flags);
|
raw_spin_lock_irqsave(&pmac_pic_lock, flags);
|
||||||
for (irq = max_irqs; (irq -= 32) >= max_real_irqs; ) {
|
for (irq = max_irqs; (irq -= 32) >= max_real_irqs; ) {
|
||||||
int i = irq >> 5;
|
int i = irq >> 5;
|
||||||
bits = in_le32(&pmac_irq_hw[i]->event) | ppc_lost_interrupts[i];
|
bits = in_le32(&pmac_irq_hw[i]->event) | ppc_lost_interrupts[i];
|
||||||
|
@ -220,12 +220,12 @@ static irqreturn_t gatwick_action(int cpl, void *dev_id)
|
||||||
if (bits == 0)
|
if (bits == 0)
|
||||||
continue;
|
continue;
|
||||||
irq += __ilog2(bits);
|
irq += __ilog2(bits);
|
||||||
spin_unlock_irqrestore(&pmac_pic_lock, flags);
|
raw_spin_unlock_irqrestore(&pmac_pic_lock, flags);
|
||||||
generic_handle_irq(irq);
|
generic_handle_irq(irq);
|
||||||
spin_lock_irqsave(&pmac_pic_lock, flags);
|
raw_spin_lock_irqsave(&pmac_pic_lock, flags);
|
||||||
rc = IRQ_HANDLED;
|
rc = IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
spin_unlock_irqrestore(&pmac_pic_lock, flags);
|
raw_spin_unlock_irqrestore(&pmac_pic_lock, flags);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -244,7 +244,7 @@ static unsigned int pmac_pic_get_irq(void)
|
||||||
return NO_IRQ_IGNORE; /* ignore, already handled */
|
return NO_IRQ_IGNORE; /* ignore, already handled */
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_SMP */
|
#endif /* CONFIG_SMP */
|
||||||
spin_lock_irqsave(&pmac_pic_lock, flags);
|
raw_spin_lock_irqsave(&pmac_pic_lock, flags);
|
||||||
for (irq = max_real_irqs; (irq -= 32) >= 0; ) {
|
for (irq = max_real_irqs; (irq -= 32) >= 0; ) {
|
||||||
int i = irq >> 5;
|
int i = irq >> 5;
|
||||||
bits = in_le32(&pmac_irq_hw[i]->event) | ppc_lost_interrupts[i];
|
bits = in_le32(&pmac_irq_hw[i]->event) | ppc_lost_interrupts[i];
|
||||||
|
@ -256,7 +256,7 @@ static unsigned int pmac_pic_get_irq(void)
|
||||||
irq += __ilog2(bits);
|
irq += __ilog2(bits);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
spin_unlock_irqrestore(&pmac_pic_lock, flags);
|
raw_spin_unlock_irqrestore(&pmac_pic_lock, flags);
|
||||||
if (unlikely(irq < 0))
|
if (unlikely(irq < 0))
|
||||||
return NO_IRQ;
|
return NO_IRQ;
|
||||||
return irq_linear_revmap(pmac_pic_host, irq);
|
return irq_linear_revmap(pmac_pic_host, irq);
|
||||||
|
|
|
@ -100,7 +100,7 @@ int eeh_subsystem_enabled;
|
||||||
EXPORT_SYMBOL(eeh_subsystem_enabled);
|
EXPORT_SYMBOL(eeh_subsystem_enabled);
|
||||||
|
|
||||||
/* Lock to avoid races due to multiple reports of an error */
|
/* Lock to avoid races due to multiple reports of an error */
|
||||||
static DEFINE_SPINLOCK(confirm_error_lock);
|
static DEFINE_RAW_SPINLOCK(confirm_error_lock);
|
||||||
|
|
||||||
/* Buffer for reporting slot-error-detail rtas calls. Its here
|
/* Buffer for reporting slot-error-detail rtas calls. Its here
|
||||||
* in BSS, and not dynamically alloced, so that it ends up in
|
* in BSS, and not dynamically alloced, so that it ends up in
|
||||||
|
@ -436,7 +436,7 @@ static void __eeh_clear_slot(struct device_node *parent, int mode_flag)
|
||||||
void eeh_clear_slot (struct device_node *dn, int mode_flag)
|
void eeh_clear_slot (struct device_node *dn, int mode_flag)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
spin_lock_irqsave(&confirm_error_lock, flags);
|
raw_spin_lock_irqsave(&confirm_error_lock, flags);
|
||||||
|
|
||||||
dn = find_device_pe (dn);
|
dn = find_device_pe (dn);
|
||||||
|
|
||||||
|
@ -447,7 +447,7 @@ void eeh_clear_slot (struct device_node *dn, int mode_flag)
|
||||||
PCI_DN(dn)->eeh_mode &= ~mode_flag;
|
PCI_DN(dn)->eeh_mode &= ~mode_flag;
|
||||||
PCI_DN(dn)->eeh_check_count = 0;
|
PCI_DN(dn)->eeh_check_count = 0;
|
||||||
__eeh_clear_slot(dn, mode_flag);
|
__eeh_clear_slot(dn, mode_flag);
|
||||||
spin_unlock_irqrestore(&confirm_error_lock, flags);
|
raw_spin_unlock_irqrestore(&confirm_error_lock, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -491,7 +491,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
|
||||||
pdn->eeh_mode & EEH_MODE_NOCHECK) {
|
pdn->eeh_mode & EEH_MODE_NOCHECK) {
|
||||||
ignored_check++;
|
ignored_check++;
|
||||||
pr_debug("EEH: Ignored check (%x) for %s %s\n",
|
pr_debug("EEH: Ignored check (%x) for %s %s\n",
|
||||||
pdn->eeh_mode, pci_name (dev), dn->full_name);
|
pdn->eeh_mode, eeh_pci_name(dev), dn->full_name);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -506,7 +506,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
|
||||||
* in one slot might report errors simultaneously, and we
|
* in one slot might report errors simultaneously, and we
|
||||||
* only want one error recovery routine running.
|
* only want one error recovery routine running.
|
||||||
*/
|
*/
|
||||||
spin_lock_irqsave(&confirm_error_lock, flags);
|
raw_spin_lock_irqsave(&confirm_error_lock, flags);
|
||||||
rc = 1;
|
rc = 1;
|
||||||
if (pdn->eeh_mode & EEH_MODE_ISOLATED) {
|
if (pdn->eeh_mode & EEH_MODE_ISOLATED) {
|
||||||
pdn->eeh_check_count ++;
|
pdn->eeh_check_count ++;
|
||||||
|
@ -515,7 +515,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
|
||||||
printk (KERN_ERR "EEH: %d reads ignored for recovering device at "
|
printk (KERN_ERR "EEH: %d reads ignored for recovering device at "
|
||||||
"location=%s driver=%s pci addr=%s\n",
|
"location=%s driver=%s pci addr=%s\n",
|
||||||
pdn->eeh_check_count, location,
|
pdn->eeh_check_count, location,
|
||||||
dev->driver->name, pci_name(dev));
|
dev->driver->name, eeh_pci_name(dev));
|
||||||
printk (KERN_ERR "EEH: Might be infinite loop in %s driver\n",
|
printk (KERN_ERR "EEH: Might be infinite loop in %s driver\n",
|
||||||
dev->driver->name);
|
dev->driver->name);
|
||||||
dump_stack();
|
dump_stack();
|
||||||
|
@ -575,7 +575,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
|
||||||
* with other functions on this device, and functions under
|
* with other functions on this device, and functions under
|
||||||
* bridges. */
|
* bridges. */
|
||||||
eeh_mark_slot (dn, EEH_MODE_ISOLATED);
|
eeh_mark_slot (dn, EEH_MODE_ISOLATED);
|
||||||
spin_unlock_irqrestore(&confirm_error_lock, flags);
|
raw_spin_unlock_irqrestore(&confirm_error_lock, flags);
|
||||||
|
|
||||||
eeh_send_failure_event (dn, dev);
|
eeh_send_failure_event (dn, dev);
|
||||||
|
|
||||||
|
@ -586,7 +586,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
dn_unlock:
|
dn_unlock:
|
||||||
spin_unlock_irqrestore(&confirm_error_lock, flags);
|
raw_spin_unlock_irqrestore(&confirm_error_lock, flags);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1064,7 +1064,7 @@ void __init eeh_init(void)
|
||||||
struct device_node *phb, *np;
|
struct device_node *phb, *np;
|
||||||
struct eeh_early_enable_info info;
|
struct eeh_early_enable_info info;
|
||||||
|
|
||||||
spin_lock_init(&confirm_error_lock);
|
raw_spin_lock_init(&confirm_error_lock);
|
||||||
spin_lock_init(&slot_errbuf_lock);
|
spin_lock_init(&slot_errbuf_lock);
|
||||||
|
|
||||||
np = of_find_node_by_path("/rtas");
|
np = of_find_node_by_path("/rtas");
|
||||||
|
|
|
@ -337,7 +337,7 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event)
|
||||||
location = location ? location : "unknown";
|
location = location ? location : "unknown";
|
||||||
printk(KERN_ERR "EEH: Error: Cannot find partition endpoint "
|
printk(KERN_ERR "EEH: Error: Cannot find partition endpoint "
|
||||||
"for location=%s pci addr=%s\n",
|
"for location=%s pci addr=%s\n",
|
||||||
location, pci_name(event->dev));
|
location, eeh_pci_name(event->dev));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -368,7 +368,7 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event)
|
||||||
pci_str = pci_name (frozen_pdn->pcidev);
|
pci_str = pci_name (frozen_pdn->pcidev);
|
||||||
drv_str = pcid_name (frozen_pdn->pcidev);
|
drv_str = pcid_name (frozen_pdn->pcidev);
|
||||||
} else {
|
} else {
|
||||||
pci_str = pci_name (event->dev);
|
pci_str = eeh_pci_name(event->dev);
|
||||||
drv_str = pcid_name (event->dev);
|
drv_str = pcid_name (event->dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -478,9 +478,9 @@ excess_failures:
|
||||||
* due to actual, failed cards.
|
* due to actual, failed cards.
|
||||||
*/
|
*/
|
||||||
printk(KERN_ERR
|
printk(KERN_ERR
|
||||||
"EEH: PCI device at location=%s driver=%s pci addr=%s \n"
|
"EEH: PCI device at location=%s driver=%s pci addr=%s\n"
|
||||||
"has failed %d times in the last hour "
|
"has failed %d times in the last hour "
|
||||||
"and has been permanently disabled. \n"
|
"and has been permanently disabled.\n"
|
||||||
"Please try reseating this device or replacing it.\n",
|
"Please try reseating this device or replacing it.\n",
|
||||||
location, drv_str, pci_str, frozen_pdn->eeh_freeze_count);
|
location, drv_str, pci_str, frozen_pdn->eeh_freeze_count);
|
||||||
goto perm_error;
|
goto perm_error;
|
||||||
|
@ -488,7 +488,7 @@ excess_failures:
|
||||||
hard_fail:
|
hard_fail:
|
||||||
printk(KERN_ERR
|
printk(KERN_ERR
|
||||||
"EEH: Unable to recover from failure of PCI device "
|
"EEH: Unable to recover from failure of PCI device "
|
||||||
"at location=%s driver=%s pci addr=%s \n"
|
"at location=%s driver=%s pci addr=%s\n"
|
||||||
"Please try reseating this device or replacing it.\n",
|
"Please try reseating this device or replacing it.\n",
|
||||||
location, drv_str, pci_str);
|
location, drv_str, pci_str);
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,7 @@ static int eeh_event_handler(void * dummy)
|
||||||
eeh_mark_slot(event->dn, EEH_MODE_RECOVERING);
|
eeh_mark_slot(event->dn, EEH_MODE_RECOVERING);
|
||||||
|
|
||||||
printk(KERN_INFO "EEH: Detected PCI bus error on device %s\n",
|
printk(KERN_INFO "EEH: Detected PCI bus error on device %s\n",
|
||||||
pci_name(event->dev));
|
eeh_pci_name(event->dev));
|
||||||
|
|
||||||
pdn = handle_eeh_events(event);
|
pdn = handle_eeh_events(event);
|
||||||
|
|
||||||
|
|
|
@ -387,24 +387,12 @@ static char cede_parameters[CEDE_LATENCY_PARAM_MAX_LENGTH];
|
||||||
|
|
||||||
static int parse_cede_parameters(void)
|
static int parse_cede_parameters(void)
|
||||||
{
|
{
|
||||||
int call_status;
|
|
||||||
|
|
||||||
memset(cede_parameters, 0, CEDE_LATENCY_PARAM_MAX_LENGTH);
|
memset(cede_parameters, 0, CEDE_LATENCY_PARAM_MAX_LENGTH);
|
||||||
call_status = rtas_call(rtas_token("ibm,get-system-parameter"), 3, 1,
|
return rtas_call(rtas_token("ibm,get-system-parameter"), 3, 1,
|
||||||
NULL,
|
NULL,
|
||||||
CEDE_LATENCY_TOKEN,
|
CEDE_LATENCY_TOKEN,
|
||||||
__pa(cede_parameters),
|
__pa(cede_parameters),
|
||||||
CEDE_LATENCY_PARAM_MAX_LENGTH);
|
CEDE_LATENCY_PARAM_MAX_LENGTH);
|
||||||
|
|
||||||
if (call_status != 0)
|
|
||||||
printk(KERN_INFO "CEDE_LATENCY: \
|
|
||||||
%s %s Error calling get-system-parameter(0x%x)\n",
|
|
||||||
__FILE__, __func__, call_status);
|
|
||||||
else
|
|
||||||
printk(KERN_INFO "CEDE_LATENCY: \
|
|
||||||
get-system-parameter successful.\n");
|
|
||||||
|
|
||||||
return call_status;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __init pseries_cpu_hotplug_init(void)
|
static int __init pseries_cpu_hotplug_init(void)
|
||||||
|
|
|
@ -124,8 +124,8 @@ static void probe_hcall_exit(unsigned long opcode, unsigned long retval,
|
||||||
|
|
||||||
h = &__get_cpu_var(hcall_stats)[opcode / 4];
|
h = &__get_cpu_var(hcall_stats)[opcode / 4];
|
||||||
h->num_calls++;
|
h->num_calls++;
|
||||||
h->tb_total = mftb() - h->tb_start;
|
h->tb_total += mftb() - h->tb_start;
|
||||||
h->purr_total = mfspr(SPRN_PURR) - h->purr_start;
|
h->purr_total += mfspr(SPRN_PURR) - h->purr_start;
|
||||||
|
|
||||||
put_cpu_var(hcall_stats);
|
put_cpu_var(hcall_stats);
|
||||||
}
|
}
|
||||||
|
|
|
@ -165,7 +165,7 @@ int remove_phb_dynamic(struct pci_controller *phb)
|
||||||
struct resource *res;
|
struct resource *res;
|
||||||
int rc, i;
|
int rc, i;
|
||||||
|
|
||||||
pr_debug("PCI: Removing PHB %04x:%02x... \n",
|
pr_debug("PCI: Removing PHB %04x:%02x...\n",
|
||||||
pci_domain_nr(b), b->number);
|
pci_domain_nr(b), b->number);
|
||||||
|
|
||||||
/* We cannot to remove a root bus that has children */
|
/* We cannot to remove a root bus that has children */
|
||||||
|
|
|
@ -150,7 +150,7 @@ static void print_dump_header(const struct phyp_dump_header *ph)
|
||||||
printk(KERN_INFO "Max auto time= %d\n", ph->maxtime_to_auto);
|
printk(KERN_INFO "Max auto time= %d\n", ph->maxtime_to_auto);
|
||||||
|
|
||||||
/*set cpu state and hpte states as well scratch pad area */
|
/*set cpu state and hpte states as well scratch pad area */
|
||||||
printk(KERN_INFO " CPU AREA \n");
|
printk(KERN_INFO " CPU AREA\n");
|
||||||
printk(KERN_INFO "cpu dump_flags =%d\n", ph->cpu_data.dump_flags);
|
printk(KERN_INFO "cpu dump_flags =%d\n", ph->cpu_data.dump_flags);
|
||||||
printk(KERN_INFO "cpu source_type =%d\n", ph->cpu_data.source_type);
|
printk(KERN_INFO "cpu source_type =%d\n", ph->cpu_data.source_type);
|
||||||
printk(KERN_INFO "cpu error_flags =%d\n", ph->cpu_data.error_flags);
|
printk(KERN_INFO "cpu error_flags =%d\n", ph->cpu_data.error_flags);
|
||||||
|
@ -161,7 +161,7 @@ static void print_dump_header(const struct phyp_dump_header *ph)
|
||||||
printk(KERN_INFO "cpu length_copied =%llx\n",
|
printk(KERN_INFO "cpu length_copied =%llx\n",
|
||||||
ph->cpu_data.length_copied);
|
ph->cpu_data.length_copied);
|
||||||
|
|
||||||
printk(KERN_INFO " HPTE AREA \n");
|
printk(KERN_INFO " HPTE AREA\n");
|
||||||
printk(KERN_INFO "HPTE dump_flags =%d\n", ph->hpte_data.dump_flags);
|
printk(KERN_INFO "HPTE dump_flags =%d\n", ph->hpte_data.dump_flags);
|
||||||
printk(KERN_INFO "HPTE source_type =%d\n", ph->hpte_data.source_type);
|
printk(KERN_INFO "HPTE source_type =%d\n", ph->hpte_data.source_type);
|
||||||
printk(KERN_INFO "HPTE error_flags =%d\n", ph->hpte_data.error_flags);
|
printk(KERN_INFO "HPTE error_flags =%d\n", ph->hpte_data.error_flags);
|
||||||
|
@ -172,7 +172,7 @@ static void print_dump_header(const struct phyp_dump_header *ph)
|
||||||
printk(KERN_INFO "HPTE length_copied =%llx\n",
|
printk(KERN_INFO "HPTE length_copied =%llx\n",
|
||||||
ph->hpte_data.length_copied);
|
ph->hpte_data.length_copied);
|
||||||
|
|
||||||
printk(KERN_INFO " SRSD AREA \n");
|
printk(KERN_INFO " SRSD AREA\n");
|
||||||
printk(KERN_INFO "SRSD dump_flags =%d\n", ph->kernel_data.dump_flags);
|
printk(KERN_INFO "SRSD dump_flags =%d\n", ph->kernel_data.dump_flags);
|
||||||
printk(KERN_INFO "SRSD source_type =%d\n", ph->kernel_data.source_type);
|
printk(KERN_INFO "SRSD source_type =%d\n", ph->kernel_data.source_type);
|
||||||
printk(KERN_INFO "SRSD error_flags =%d\n", ph->kernel_data.error_flags);
|
printk(KERN_INFO "SRSD error_flags =%d\n", ph->kernel_data.error_flags);
|
||||||
|
|
|
@ -144,8 +144,8 @@ static void __devinit smp_pSeries_kick_cpu(int nr)
|
||||||
hcpuid = get_hard_smp_processor_id(nr);
|
hcpuid = get_hard_smp_processor_id(nr);
|
||||||
rc = plpar_hcall_norets(H_PROD, hcpuid);
|
rc = plpar_hcall_norets(H_PROD, hcpuid);
|
||||||
if (rc != H_SUCCESS)
|
if (rc != H_SUCCESS)
|
||||||
printk(KERN_ERR "Error: Prod to wake up processor %d\
|
printk(KERN_ERR "Error: Prod to wake up processor %d "
|
||||||
Ret= %ld\n", nr, rc);
|
"Ret= %ld\n", nr, rc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -127,7 +127,7 @@ static inline unsigned int lpar_xirr_info_get(void)
|
||||||
|
|
||||||
lpar_rc = plpar_xirr(&return_value);
|
lpar_rc = plpar_xirr(&return_value);
|
||||||
if (lpar_rc != H_SUCCESS)
|
if (lpar_rc != H_SUCCESS)
|
||||||
panic(" bad return code xirr - rc = %lx \n", lpar_rc);
|
panic(" bad return code xirr - rc = %lx\n", lpar_rc);
|
||||||
return (unsigned int)return_value;
|
return (unsigned int)return_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -424,7 +424,7 @@ static int xics_set_affinity(unsigned int virq, const struct cpumask *cpumask)
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct irq_chip xics_pic_direct = {
|
static struct irq_chip xics_pic_direct = {
|
||||||
.name = " XICS ",
|
.name = "XICS",
|
||||||
.startup = xics_startup,
|
.startup = xics_startup,
|
||||||
.mask = xics_mask_irq,
|
.mask = xics_mask_irq,
|
||||||
.unmask = xics_unmask_irq,
|
.unmask = xics_unmask_irq,
|
||||||
|
@ -433,7 +433,7 @@ static struct irq_chip xics_pic_direct = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct irq_chip xics_pic_lpar = {
|
static struct irq_chip xics_pic_lpar = {
|
||||||
.name = " XICS ",
|
.name = "XICS",
|
||||||
.startup = xics_startup,
|
.startup = xics_startup,
|
||||||
.mask = xics_mask_irq,
|
.mask = xics_mask_irq,
|
||||||
.unmask = xics_unmask_irq,
|
.unmask = xics_unmask_irq,
|
||||||
|
@ -510,15 +510,13 @@ static void __init xics_init_host(void)
|
||||||
/*
|
/*
|
||||||
* XICS only has a single IPI, so encode the messages per CPU
|
* XICS only has a single IPI, so encode the messages per CPU
|
||||||
*/
|
*/
|
||||||
struct xics_ipi_struct {
|
static DEFINE_PER_CPU_SHARED_ALIGNED(unsigned long, xics_ipi_message);
|
||||||
unsigned long value;
|
|
||||||
} ____cacheline_aligned;
|
|
||||||
|
|
||||||
static struct xics_ipi_struct xics_ipi_message[NR_CPUS] __cacheline_aligned;
|
|
||||||
|
|
||||||
static inline void smp_xics_do_message(int cpu, int msg)
|
static inline void smp_xics_do_message(int cpu, int msg)
|
||||||
{
|
{
|
||||||
set_bit(msg, &xics_ipi_message[cpu].value);
|
unsigned long *tgt = &per_cpu(xics_ipi_message, cpu);
|
||||||
|
|
||||||
|
set_bit(msg, tgt);
|
||||||
mb();
|
mb();
|
||||||
if (firmware_has_feature(FW_FEATURE_LPAR))
|
if (firmware_has_feature(FW_FEATURE_LPAR))
|
||||||
lpar_qirr_info(cpu, IPI_PRIORITY);
|
lpar_qirr_info(cpu, IPI_PRIORITY);
|
||||||
|
@ -544,25 +542,23 @@ void smp_xics_message_pass(int target, int msg)
|
||||||
|
|
||||||
static irqreturn_t xics_ipi_dispatch(int cpu)
|
static irqreturn_t xics_ipi_dispatch(int cpu)
|
||||||
{
|
{
|
||||||
|
unsigned long *tgt = &per_cpu(xics_ipi_message, cpu);
|
||||||
|
|
||||||
WARN_ON(cpu_is_offline(cpu));
|
WARN_ON(cpu_is_offline(cpu));
|
||||||
|
|
||||||
mb(); /* order mmio clearing qirr */
|
mb(); /* order mmio clearing qirr */
|
||||||
while (xics_ipi_message[cpu].value) {
|
while (*tgt) {
|
||||||
if (test_and_clear_bit(PPC_MSG_CALL_FUNCTION,
|
if (test_and_clear_bit(PPC_MSG_CALL_FUNCTION, tgt)) {
|
||||||
&xics_ipi_message[cpu].value)) {
|
|
||||||
smp_message_recv(PPC_MSG_CALL_FUNCTION);
|
smp_message_recv(PPC_MSG_CALL_FUNCTION);
|
||||||
}
|
}
|
||||||
if (test_and_clear_bit(PPC_MSG_RESCHEDULE,
|
if (test_and_clear_bit(PPC_MSG_RESCHEDULE, tgt)) {
|
||||||
&xics_ipi_message[cpu].value)) {
|
|
||||||
smp_message_recv(PPC_MSG_RESCHEDULE);
|
smp_message_recv(PPC_MSG_RESCHEDULE);
|
||||||
}
|
}
|
||||||
if (test_and_clear_bit(PPC_MSG_CALL_FUNC_SINGLE,
|
if (test_and_clear_bit(PPC_MSG_CALL_FUNC_SINGLE, tgt)) {
|
||||||
&xics_ipi_message[cpu].value)) {
|
|
||||||
smp_message_recv(PPC_MSG_CALL_FUNC_SINGLE);
|
smp_message_recv(PPC_MSG_CALL_FUNC_SINGLE);
|
||||||
}
|
}
|
||||||
#if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC)
|
#if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC)
|
||||||
if (test_and_clear_bit(PPC_MSG_DEBUGGER_BREAK,
|
if (test_and_clear_bit(PPC_MSG_DEBUGGER_BREAK, tgt)) {
|
||||||
&xics_ipi_message[cpu].value)) {
|
|
||||||
smp_message_recv(PPC_MSG_DEBUGGER_BREAK);
|
smp_message_recv(PPC_MSG_DEBUGGER_BREAK);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -77,7 +77,7 @@ static void cpm_end_irq(unsigned int irq)
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct irq_chip cpm_pic = {
|
static struct irq_chip cpm_pic = {
|
||||||
.name = " CPM PIC ",
|
.name = "CPM PIC",
|
||||||
.mask = cpm_mask_irq,
|
.mask = cpm_mask_irq,
|
||||||
.unmask = cpm_unmask_irq,
|
.unmask = cpm_unmask_irq,
|
||||||
.eoi = cpm_end_irq,
|
.eoi = cpm_end_irq,
|
||||||
|
|
|
@ -198,7 +198,7 @@ err_sense:
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct irq_chip cpm2_pic = {
|
static struct irq_chip cpm2_pic = {
|
||||||
.name = " CPM2 SIU ",
|
.name = "CPM2 SIU",
|
||||||
.mask = cpm2_mask_irq,
|
.mask = cpm2_mask_irq,
|
||||||
.unmask = cpm2_unmask_irq,
|
.unmask = cpm2_unmask_irq,
|
||||||
.ack = cpm2_ack,
|
.ack = cpm2_ack,
|
||||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче