You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (34 commits) powerpc/mpic: Fix mask/unmask timeout message powerpc/pseries: Add BNX2=m to defconfig powerpc: Enable 64kB pages and 1024 threads in pseries config powerpc: Disable mcount tracers in pseries defconfig powerpc/boot/dts: Install dts from the right directory powerpc: machine_check_generic is wrong on 64bit powerpc: Check RTAS extended log flag before checking length powerpc: Fix corruption when grabbing FWNMI data powerpc: Rework pseries machine check handler powerpc: Don't silently handle machine checks from userspace powerpc: Remove duplicate debugger hook in machine_check_exception powerpc: Never halt RTAS error logging after receiving an unrecoverable machine check powerpc: Don't force MSR_RI in machine_check_exception powerpc: Print 32 bits of DSISR in show_regs powerpc/kdump: Disable ftrace during kexec powerpc/kdump: Move crash_kexec_stop_spus to kdump crash handler powerpc/kexec: Remove empty ppc_md.machine_kexec_prepare powerpc/kexec: Don't initialise kexec hooks to default handlers powerpc/kdump: Remove ppc_md.machine_crash_shutdown powerpc/kexec: Remove ppc_md.machine_kexec ...
This commit is contained in:
@@ -368,7 +368,7 @@ INSTALL := install
|
||||
extra-installed := $(patsubst $(obj)/%, $(DESTDIR)$(WRAPPER_OBJDIR)/%, $(extra-y))
|
||||
hostprogs-installed := $(patsubst %, $(DESTDIR)$(WRAPPER_BINDIR)/%, $(hostprogs-y))
|
||||
wrapper-installed := $(DESTDIR)$(WRAPPER_BINDIR)/wrapper
|
||||
dts-installed := $(patsubst $(obj)/dts/%, $(DESTDIR)$(WRAPPER_DTSDIR)/%, $(wildcard $(obj)/dts/*.dts))
|
||||
dts-installed := $(patsubst $(dtstree)/%, $(DESTDIR)$(WRAPPER_DTSDIR)/%, $(wildcard $(dtstree)/*.dts))
|
||||
|
||||
all-installed := $(extra-installed) $(hostprogs-installed) $(wrapper-installed) $(dts-installed)
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
device_type = "soc";
|
||||
compatible = "fsl,mpc8315-immr", "simple-bus";
|
||||
compatible = "fsl,mpc8308-immr", "simple-bus";
|
||||
ranges = <0 0xe0000000 0x00100000>;
|
||||
reg = <0xe0000000 0x00000200>;
|
||||
bus-frequency = <0>;
|
||||
|
||||
@@ -291,13 +291,13 @@
|
||||
ranges = <0x0 0xc100 0x200>;
|
||||
cell-index = <1>;
|
||||
dma00: dma-channel@0 {
|
||||
compatible = "fsl,eloplus-dma-channel";
|
||||
compatible = "fsl,ssi-dma-channel";
|
||||
reg = <0x0 0x80>;
|
||||
cell-index = <0>;
|
||||
interrupts = <76 2>;
|
||||
};
|
||||
dma01: dma-channel@80 {
|
||||
compatible = "fsl,eloplus-dma-channel";
|
||||
compatible = "fsl,ssi-dma-channel";
|
||||
reg = <0x80 0x80>;
|
||||
cell-index = <1>;
|
||||
interrupts = <77 2>;
|
||||
|
||||
@@ -2,7 +2,7 @@ CONFIG_PPC64=y
|
||||
CONFIG_ALTIVEC=y
|
||||
CONFIG_VSX=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_NR_CPUS=128
|
||||
CONFIG_NR_CPUS=1024
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
CONFIG_SYSVIPC=y
|
||||
CONFIG_POSIX_MQUEUE=y
|
||||
@@ -45,6 +45,8 @@ CONFIG_KEXEC=y
|
||||
CONFIG_IRQ_ALL_CPUS=y
|
||||
CONFIG_MEMORY_HOTPLUG=y
|
||||
CONFIG_MEMORY_HOTREMOVE=y
|
||||
CONFIG_PPC_64K_PAGES=y
|
||||
CONFIG_PPC_SUBPAGE_PROT=y
|
||||
CONFIG_SCHED_SMT=y
|
||||
CONFIG_HOTPLUG_PCI=m
|
||||
CONFIG_HOTPLUG_PCI_RPA=m
|
||||
@@ -184,6 +186,7 @@ CONFIG_ACENIC_OMIT_TIGON_I=y
|
||||
CONFIG_E1000=y
|
||||
CONFIG_E1000E=y
|
||||
CONFIG_TIGON3=y
|
||||
CONFIG_BNX2=m
|
||||
CONFIG_CHELSIO_T1=m
|
||||
CONFIG_CHELSIO_T3=m
|
||||
CONFIG_EHEA=y
|
||||
@@ -311,9 +314,7 @@ CONFIG_DEBUG_KERNEL=y
|
||||
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
|
||||
CONFIG_LATENCYTOP=y
|
||||
CONFIG_SYSCTL_SYSCALL_CHECK=y
|
||||
CONFIG_IRQSOFF_TRACER=y
|
||||
CONFIG_SCHED_TRACER=y
|
||||
CONFIG_STACK_TRACER=y
|
||||
CONFIG_BLK_DEV_IO_TRACE=y
|
||||
CONFIG_DEBUG_STACKOVERFLOW=y
|
||||
CONFIG_DEBUG_STACK_USAGE=y
|
||||
|
||||
@@ -37,18 +37,21 @@ label##2: \
|
||||
.align 2; \
|
||||
label##3:
|
||||
|
||||
#define MAKE_FTR_SECTION_ENTRY(msk, val, label, sect) \
|
||||
label##4: \
|
||||
.popsection; \
|
||||
.pushsection sect,"a"; \
|
||||
.align 3; \
|
||||
label##5: \
|
||||
FTR_ENTRY_LONG msk; \
|
||||
FTR_ENTRY_LONG val; \
|
||||
FTR_ENTRY_OFFSET label##1b-label##5b; \
|
||||
FTR_ENTRY_OFFSET label##2b-label##5b; \
|
||||
FTR_ENTRY_OFFSET label##3b-label##5b; \
|
||||
FTR_ENTRY_OFFSET label##4b-label##5b; \
|
||||
#define MAKE_FTR_SECTION_ENTRY(msk, val, label, sect) \
|
||||
label##4: \
|
||||
.popsection; \
|
||||
.pushsection sect,"a"; \
|
||||
.align 3; \
|
||||
label##5: \
|
||||
FTR_ENTRY_LONG msk; \
|
||||
FTR_ENTRY_LONG val; \
|
||||
FTR_ENTRY_OFFSET label##1b-label##5b; \
|
||||
FTR_ENTRY_OFFSET label##2b-label##5b; \
|
||||
FTR_ENTRY_OFFSET label##3b-label##5b; \
|
||||
FTR_ENTRY_OFFSET label##4b-label##5b; \
|
||||
.ifgt (label##4b-label##3b)-(label##2b-label##1b); \
|
||||
.error "Feature section else case larger than body"; \
|
||||
.endif; \
|
||||
.popsection;
|
||||
|
||||
|
||||
|
||||
@@ -467,13 +467,22 @@ struct qe_immap {
|
||||
extern struct qe_immap __iomem *qe_immr;
|
||||
extern phys_addr_t get_qe_base(void);
|
||||
|
||||
static inline unsigned long immrbar_virt_to_phys(void *address)
|
||||
/*
|
||||
* Returns the offset within the QE address space of the given pointer.
|
||||
*
|
||||
* Note that the QE does not support 36-bit physical addresses, so if
|
||||
* get_qe_base() returns a number above 4GB, the caller will probably fail.
|
||||
*/
|
||||
static inline phys_addr_t immrbar_virt_to_phys(void *address)
|
||||
{
|
||||
if ( ((u32)address >= (u32)qe_immr) &&
|
||||
((u32)address < ((u32)qe_immr + QE_IMMAP_SIZE)) )
|
||||
return (unsigned long)(address - (u32)qe_immr +
|
||||
(u32)get_qe_base());
|
||||
return (unsigned long)virt_to_phys(address);
|
||||
void *q = (void *)qe_immr;
|
||||
|
||||
/* Is it a MURAM address? */
|
||||
if ((address >= q) && (address < (q + QE_IMMAP_SIZE)))
|
||||
return get_qe_base() + (address - q);
|
||||
|
||||
/* It's an address returned by kmalloc */
|
||||
return virt_to_phys(address);
|
||||
}
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
@@ -12,24 +12,44 @@
|
||||
|
||||
#else
|
||||
#ifdef CONFIG_TRACE_IRQFLAGS
|
||||
#ifdef CONFIG_IRQSOFF_TRACER
|
||||
/*
|
||||
* Since the ftrace irqsoff latency trace checks CALLER_ADDR1,
|
||||
* which is the stack frame here, we need to force a stack frame
|
||||
* in case we came from user space.
|
||||
*/
|
||||
#define TRACE_WITH_FRAME_BUFFER(func) \
|
||||
mflr r0; \
|
||||
stdu r1, -32(r1); \
|
||||
std r0, 16(r1); \
|
||||
stdu r1, -32(r1); \
|
||||
bl func; \
|
||||
ld r1, 0(r1); \
|
||||
ld r1, 0(r1);
|
||||
#else
|
||||
#define TRACE_WITH_FRAME_BUFFER(func) \
|
||||
bl func;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Most of the CPU's IRQ-state tracing is done from assembly code; we
|
||||
* have to call a C function so call a wrapper that saves all the
|
||||
* C-clobbered registers.
|
||||
*/
|
||||
#define TRACE_ENABLE_INTS bl .trace_hardirqs_on
|
||||
#define TRACE_DISABLE_INTS bl .trace_hardirqs_off
|
||||
#define TRACE_AND_RESTORE_IRQ_PARTIAL(en,skip) \
|
||||
cmpdi en,0; \
|
||||
bne 95f; \
|
||||
stb en,PACASOFTIRQEN(r13); \
|
||||
bl .trace_hardirqs_off; \
|
||||
b skip; \
|
||||
95: bl .trace_hardirqs_on; \
|
||||
#define TRACE_ENABLE_INTS TRACE_WITH_FRAME_BUFFER(.trace_hardirqs_on)
|
||||
#define TRACE_DISABLE_INTS TRACE_WITH_FRAME_BUFFER(.trace_hardirqs_off)
|
||||
|
||||
#define TRACE_AND_RESTORE_IRQ_PARTIAL(en,skip) \
|
||||
cmpdi en,0; \
|
||||
bne 95f; \
|
||||
stb en,PACASOFTIRQEN(r13); \
|
||||
TRACE_WITH_FRAME_BUFFER(.trace_hardirqs_off) \
|
||||
b skip; \
|
||||
95: TRACE_WITH_FRAME_BUFFER(.trace_hardirqs_on) \
|
||||
li en,1;
|
||||
#define TRACE_AND_RESTORE_IRQ(en) \
|
||||
TRACE_AND_RESTORE_IRQ_PARTIAL(en,96f); \
|
||||
stb en,PACASOFTIRQEN(r13); \
|
||||
stb en,PACASOFTIRQEN(r13); \
|
||||
96:
|
||||
#else
|
||||
#define TRACE_ENABLE_INTS
|
||||
|
||||
@@ -116,9 +116,6 @@ struct machdep_calls {
|
||||
* If for some reason there is no irq, but the interrupt
|
||||
* shouldn't be counted as spurious, return NO_IRQ_IGNORE. */
|
||||
unsigned int (*get_irq)(void);
|
||||
#ifdef CONFIG_KEXEC
|
||||
void (*kexec_cpu_down)(int crash_shutdown, int secondary);
|
||||
#endif
|
||||
|
||||
/* PCI stuff */
|
||||
/* Called after scanning the bus, before allocating resources */
|
||||
@@ -235,11 +232,7 @@ struct machdep_calls {
|
||||
void (*machine_shutdown)(void);
|
||||
|
||||
#ifdef CONFIG_KEXEC
|
||||
/* Called to do the minimal shutdown needed to run a kexec'd kernel
|
||||
* to run successfully.
|
||||
* XXX Should we move this one out of kexec scope?
|
||||
*/
|
||||
void (*machine_crash_shutdown)(struct pt_regs *regs);
|
||||
void (*kexec_cpu_down)(int crash_shutdown, int secondary);
|
||||
|
||||
/* Called to do what every setup is needed on image and the
|
||||
* reboot code buffer. Returns 0 on success.
|
||||
@@ -247,15 +240,6 @@ struct machdep_calls {
|
||||
* claims to support kexec.
|
||||
*/
|
||||
int (*machine_kexec_prepare)(struct kimage *image);
|
||||
|
||||
/* Called to handle any machine specific cleanup on image */
|
||||
void (*machine_kexec_cleanup)(struct kimage *image);
|
||||
|
||||
/* Called to perform the _real_ kexec.
|
||||
* Do NOT allocate memory or fail here. We are past the point of
|
||||
* no return.
|
||||
*/
|
||||
void (*machine_kexec)(struct kimage *image);
|
||||
#endif /* CONFIG_KEXEC */
|
||||
|
||||
#ifdef CONFIG_SUSPEND
|
||||
|
||||
@@ -283,6 +283,7 @@
|
||||
#define HID0_NOPTI (1<<0) /* No-op dcbt and dcbst instr. */
|
||||
|
||||
#define SPRN_HID1 0x3F1 /* Hardware Implementation Register 1 */
|
||||
#ifdef CONFIG_6xx
|
||||
#define HID1_EMCP (1<<31) /* 7450 Machine Check Pin Enable */
|
||||
#define HID1_DFS (1<<22) /* 7447A Dynamic Frequency Scaling */
|
||||
#define HID1_PC0 (1<<16) /* 7450 PLL_CFG[0] */
|
||||
@@ -292,6 +293,7 @@
|
||||
#define HID1_SYNCBE (1<<11) /* 7450 ABE for sync, eieio */
|
||||
#define HID1_ABE (1<<10) /* 7450 Address Broadcast Enable */
|
||||
#define HID1_PS (1<<16) /* 750FX PLL selection */
|
||||
#endif
|
||||
#define SPRN_HID2 0x3F8 /* Hardware Implementation Register 2 */
|
||||
#define SPRN_HID2_GEKKO 0x398 /* Gekko HID2 Register */
|
||||
#define SPRN_IABR 0x3F2 /* Instruction Address Breakpoint Register */
|
||||
|
||||
@@ -246,6 +246,20 @@
|
||||
store or cache line push */
|
||||
#endif
|
||||
|
||||
/* Bit definitions for the HID1 */
|
||||
#ifdef CONFIG_E500
|
||||
/* e500v1/v2 */
|
||||
#define HID1_PLL_CFG_MASK 0xfc000000 /* PLL_CFG input pins */
|
||||
#define HID1_RFXE 0x00020000 /* Read fault exception enable */
|
||||
#define HID1_R1DPE 0x00008000 /* R1 data bus parity enable */
|
||||
#define HID1_R2DPE 0x00004000 /* R2 data bus parity enable */
|
||||
#define HID1_ASTME 0x00002000 /* Address bus streaming mode enable */
|
||||
#define HID1_ABE 0x00001000 /* Address broadcast enable */
|
||||
#define HID1_MPXTT 0x00000400 /* MPX re-map transfer type */
|
||||
#define HID1_ATS 0x00000080 /* Atomic status */
|
||||
#define HID1_MID_MASK 0x0000000f /* MID input pins */
|
||||
#endif
|
||||
|
||||
/* Bit definitions for the DBSR. */
|
||||
/*
|
||||
* DBSR bits which have conflicting definitions on true Book E versus IBM 40x.
|
||||
|
||||
@@ -203,14 +203,6 @@ void spu_irq_setaffinity(struct spu *spu, int cpu);
|
||||
void spu_setup_kernel_slbs(struct spu *spu, struct spu_lscsa *lscsa,
|
||||
void *code, int code_size);
|
||||
|
||||
#ifdef CONFIG_KEXEC
|
||||
void crash_register_spus(struct list_head *list);
|
||||
#else
|
||||
static inline void crash_register_spus(struct list_head *list)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
extern void spu_invalidate_slbs(struct spu *spu);
|
||||
extern void spu_associate_mm(struct spu *spu, struct mm_struct *mm);
|
||||
int spu_64k_pages_available(void);
|
||||
|
||||
@@ -64,6 +64,12 @@ _GLOBAL(__setup_cpu_e500v2)
|
||||
bl __e500_icache_setup
|
||||
bl __e500_dcache_setup
|
||||
bl __setup_e500_ivors
|
||||
#ifdef CONFIG_RAPIDIO
|
||||
/* Ensure that RFXE is set */
|
||||
mfspr r3,SPRN_HID1
|
||||
oris r3,r3,HID1_RFXE@h
|
||||
mtspr SPRN_HID1,r3
|
||||
#endif
|
||||
mtlr r4
|
||||
blr
|
||||
_GLOBAL(__setup_cpu_e500mc)
|
||||
|
||||
@@ -116,7 +116,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
|
||||
.pmc_type = PPC_PMC_IBM,
|
||||
.oprofile_cpu_type = "ppc64/power3",
|
||||
.oprofile_type = PPC_OPROFILE_RS64,
|
||||
.machine_check = machine_check_generic,
|
||||
.platform = "power3",
|
||||
},
|
||||
{ /* Power3+ */
|
||||
@@ -132,7 +131,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
|
||||
.pmc_type = PPC_PMC_IBM,
|
||||
.oprofile_cpu_type = "ppc64/power3",
|
||||
.oprofile_type = PPC_OPROFILE_RS64,
|
||||
.machine_check = machine_check_generic,
|
||||
.platform = "power3",
|
||||
},
|
||||
{ /* Northstar */
|
||||
@@ -148,7 +146,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
|
||||
.pmc_type = PPC_PMC_IBM,
|
||||
.oprofile_cpu_type = "ppc64/rs64",
|
||||
.oprofile_type = PPC_OPROFILE_RS64,
|
||||
.machine_check = machine_check_generic,
|
||||
.platform = "rs64",
|
||||
},
|
||||
{ /* Pulsar */
|
||||
@@ -164,7 +161,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
|
||||
.pmc_type = PPC_PMC_IBM,
|
||||
.oprofile_cpu_type = "ppc64/rs64",
|
||||
.oprofile_type = PPC_OPROFILE_RS64,
|
||||
.machine_check = machine_check_generic,
|
||||
.platform = "rs64",
|
||||
},
|
||||
{ /* I-star */
|
||||
@@ -180,7 +176,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
|
||||
.pmc_type = PPC_PMC_IBM,
|
||||
.oprofile_cpu_type = "ppc64/rs64",
|
||||
.oprofile_type = PPC_OPROFILE_RS64,
|
||||
.machine_check = machine_check_generic,
|
||||
.platform = "rs64",
|
||||
},
|
||||
{ /* S-star */
|
||||
@@ -196,7 +191,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
|
||||
.pmc_type = PPC_PMC_IBM,
|
||||
.oprofile_cpu_type = "ppc64/rs64",
|
||||
.oprofile_type = PPC_OPROFILE_RS64,
|
||||
.machine_check = machine_check_generic,
|
||||
.platform = "rs64",
|
||||
},
|
||||
{ /* Power4 */
|
||||
@@ -212,7 +206,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
|
||||
.pmc_type = PPC_PMC_IBM,
|
||||
.oprofile_cpu_type = "ppc64/power4",
|
||||
.oprofile_type = PPC_OPROFILE_POWER4,
|
||||
.machine_check = machine_check_generic,
|
||||
.platform = "power4",
|
||||
},
|
||||
{ /* Power4+ */
|
||||
@@ -228,7 +221,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
|
||||
.pmc_type = PPC_PMC_IBM,
|
||||
.oprofile_cpu_type = "ppc64/power4",
|
||||
.oprofile_type = PPC_OPROFILE_POWER4,
|
||||
.machine_check = machine_check_generic,
|
||||
.platform = "power4",
|
||||
},
|
||||
{ /* PPC970 */
|
||||
@@ -247,7 +239,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
|
||||
.cpu_restore = __restore_cpu_ppc970,
|
||||
.oprofile_cpu_type = "ppc64/970",
|
||||
.oprofile_type = PPC_OPROFILE_POWER4,
|
||||
.machine_check = machine_check_generic,
|
||||
.platform = "ppc970",
|
||||
},
|
||||
{ /* PPC970FX */
|
||||
@@ -266,7 +257,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
|
||||
.cpu_restore = __restore_cpu_ppc970,
|
||||
.oprofile_cpu_type = "ppc64/970",
|
||||
.oprofile_type = PPC_OPROFILE_POWER4,
|
||||
.machine_check = machine_check_generic,
|
||||
.platform = "ppc970",
|
||||
},
|
||||
{ /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
|
||||
@@ -285,7 +275,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
|
||||
.cpu_restore = __restore_cpu_ppc970,
|
||||
.oprofile_cpu_type = "ppc64/970MP",
|
||||
.oprofile_type = PPC_OPROFILE_POWER4,
|
||||
.machine_check = machine_check_generic,
|
||||
.platform = "ppc970",
|
||||
},
|
||||
{ /* PPC970MP */
|
||||
@@ -304,7 +293,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
|
||||
.cpu_restore = __restore_cpu_ppc970,
|
||||
.oprofile_cpu_type = "ppc64/970MP",
|
||||
.oprofile_type = PPC_OPROFILE_POWER4,
|
||||
.machine_check = machine_check_generic,
|
||||
.platform = "ppc970",
|
||||
},
|
||||
{ /* PPC970GX */
|
||||
@@ -322,7 +310,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
|
||||
.cpu_setup = __setup_cpu_ppc970,
|
||||
.oprofile_cpu_type = "ppc64/970",
|
||||
.oprofile_type = PPC_OPROFILE_POWER4,
|
||||
.machine_check = machine_check_generic,
|
||||
.platform = "ppc970",
|
||||
},
|
||||
{ /* Power5 GR */
|
||||
@@ -343,7 +330,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
|
||||
*/
|
||||
.oprofile_mmcra_sihv = MMCRA_SIHV,
|
||||
.oprofile_mmcra_sipr = MMCRA_SIPR,
|
||||
.machine_check = machine_check_generic,
|
||||
.platform = "power5",
|
||||
},
|
||||
{ /* Power5++ */
|
||||
@@ -360,7 +346,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
|
||||
.oprofile_type = PPC_OPROFILE_POWER4,
|
||||
.oprofile_mmcra_sihv = MMCRA_SIHV,
|
||||
.oprofile_mmcra_sipr = MMCRA_SIPR,
|
||||
.machine_check = machine_check_generic,
|
||||
.platform = "power5+",
|
||||
},
|
||||
{ /* Power5 GS */
|
||||
@@ -378,7 +363,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
|
||||
.oprofile_type = PPC_OPROFILE_POWER4,
|
||||
.oprofile_mmcra_sihv = MMCRA_SIHV,
|
||||
.oprofile_mmcra_sipr = MMCRA_SIPR,
|
||||
.machine_check = machine_check_generic,
|
||||
.platform = "power5+",
|
||||
},
|
||||
{ /* POWER6 in P5+ mode; 2.04-compliant processor */
|
||||
@@ -390,7 +374,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
|
||||
.mmu_features = MMU_FTR_HPTE_TABLE,
|
||||
.icache_bsize = 128,
|
||||
.dcache_bsize = 128,
|
||||
.machine_check = machine_check_generic,
|
||||
.oprofile_cpu_type = "ppc64/ibm-compat-v1",
|
||||
.oprofile_type = PPC_OPROFILE_POWER4,
|
||||
.platform = "power5+",
|
||||
@@ -413,7 +396,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
|
||||
.oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
|
||||
.oprofile_mmcra_clear = POWER6_MMCRA_THRM |
|
||||
POWER6_MMCRA_OTHER,
|
||||
.machine_check = machine_check_generic,
|
||||
.platform = "power6x",
|
||||
},
|
||||
{ /* 2.05-compliant processor, i.e. Power6 "architected" mode */
|
||||
@@ -425,7 +407,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
|
||||
.mmu_features = MMU_FTR_HPTE_TABLE,
|
||||
.icache_bsize = 128,
|
||||
.dcache_bsize = 128,
|
||||
.machine_check = machine_check_generic,
|
||||
.oprofile_cpu_type = "ppc64/ibm-compat-v1",
|
||||
.oprofile_type = PPC_OPROFILE_POWER4,
|
||||
.platform = "power6",
|
||||
@@ -440,7 +421,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
|
||||
MMU_FTR_TLBIE_206,
|
||||
.icache_bsize = 128,
|
||||
.dcache_bsize = 128,
|
||||
.machine_check = machine_check_generic,
|
||||
.oprofile_type = PPC_OPROFILE_POWER4,
|
||||
.oprofile_cpu_type = "ppc64/ibm-compat-v1",
|
||||
.platform = "power7",
|
||||
@@ -492,7 +472,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
|
||||
.pmc_type = PPC_PMC_IBM,
|
||||
.oprofile_cpu_type = "ppc64/cell-be",
|
||||
.oprofile_type = PPC_OPROFILE_CELL,
|
||||
.machine_check = machine_check_generic,
|
||||
.platform = "ppc-cell-be",
|
||||
},
|
||||
{ /* PA Semi PA6T */
|
||||
@@ -510,7 +489,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
|
||||
.cpu_restore = __restore_cpu_pa6t,
|
||||
.oprofile_cpu_type = "ppc64/pa6t",
|
||||
.oprofile_type = PPC_OPROFILE_PA6T,
|
||||
.machine_check = machine_check_generic,
|
||||
.platform = "pa6t",
|
||||
},
|
||||
{ /* default match */
|
||||
@@ -524,7 +502,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
|
||||
.dcache_bsize = 128,
|
||||
.num_pmcs = 6,
|
||||
.pmc_type = PPC_PMC_IBM,
|
||||
.machine_check = machine_check_generic,
|
||||
.platform = "power4",
|
||||
}
|
||||
#endif /* CONFIG_PPC_BOOK3S_64 */
|
||||
|
||||
@@ -48,7 +48,7 @@ int crashing_cpu = -1;
|
||||
static cpumask_t cpus_in_crash = CPU_MASK_NONE;
|
||||
cpumask_t cpus_in_sr = CPU_MASK_NONE;
|
||||
|
||||
#define CRASH_HANDLER_MAX 2
|
||||
#define CRASH_HANDLER_MAX 3
|
||||
/* NULL terminated list of shutdown handles */
|
||||
static crash_shutdown_t crash_shutdown_handles[CRASH_HANDLER_MAX+1];
|
||||
static DEFINE_SPINLOCK(crash_handlers_lock);
|
||||
@@ -125,7 +125,7 @@ static void crash_kexec_prepare_cpus(int cpu)
|
||||
smp_wmb();
|
||||
|
||||
/*
|
||||
* FIXME: Until we will have the way to stop other CPUSs reliabally,
|
||||
* FIXME: Until we will have the way to stop other CPUs reliably,
|
||||
* the crash CPU will send an IPI and wait for other CPUs to
|
||||
* respond.
|
||||
* Delay of at least 10 seconds.
|
||||
@@ -254,72 +254,6 @@ void crash_kexec_secondary(struct pt_regs *regs)
|
||||
cpus_in_sr = CPU_MASK_NONE;
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_SPU_BASE
|
||||
|
||||
#include <asm/spu.h>
|
||||
#include <asm/spu_priv1.h>
|
||||
|
||||
struct crash_spu_info {
|
||||
struct spu *spu;
|
||||
u32 saved_spu_runcntl_RW;
|
||||
u32 saved_spu_status_R;
|
||||
u32 saved_spu_npc_RW;
|
||||
u64 saved_mfc_sr1_RW;
|
||||
u64 saved_mfc_dar;
|
||||
u64 saved_mfc_dsisr;
|
||||
};
|
||||
|
||||
#define CRASH_NUM_SPUS 16 /* Enough for current hardware */
|
||||
static struct crash_spu_info crash_spu_info[CRASH_NUM_SPUS];
|
||||
|
||||
static void crash_kexec_stop_spus(void)
|
||||
{
|
||||
struct spu *spu;
|
||||
int i;
|
||||
u64 tmp;
|
||||
|
||||
for (i = 0; i < CRASH_NUM_SPUS; i++) {
|
||||
if (!crash_spu_info[i].spu)
|
||||
continue;
|
||||
|
||||
spu = crash_spu_info[i].spu;
|
||||
|
||||
crash_spu_info[i].saved_spu_runcntl_RW =
|
||||
in_be32(&spu->problem->spu_runcntl_RW);
|
||||
crash_spu_info[i].saved_spu_status_R =
|
||||
in_be32(&spu->problem->spu_status_R);
|
||||
crash_spu_info[i].saved_spu_npc_RW =
|
||||
in_be32(&spu->problem->spu_npc_RW);
|
||||
|
||||
crash_spu_info[i].saved_mfc_dar = spu_mfc_dar_get(spu);
|
||||
crash_spu_info[i].saved_mfc_dsisr = spu_mfc_dsisr_get(spu);
|
||||
tmp = spu_mfc_sr1_get(spu);
|
||||
crash_spu_info[i].saved_mfc_sr1_RW = tmp;
|
||||
|
||||
tmp &= ~MFC_STATE1_MASTER_RUN_CONTROL_MASK;
|
||||
spu_mfc_sr1_set(spu, tmp);
|
||||
|
||||
__delay(200);
|
||||
}
|
||||
}
|
||||
|
||||
void crash_register_spus(struct list_head *list)
|
||||
{
|
||||
struct spu *spu;
|
||||
|
||||
list_for_each_entry(spu, list, full_list) {
|
||||
if (WARN_ON(spu->number >= CRASH_NUM_SPUS))
|
||||
continue;
|
||||
|
||||
crash_spu_info[spu->number].spu = spu;
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
static inline void crash_kexec_stop_spus(void)
|
||||
{
|
||||
}
|
||||
#endif /* CONFIG_SPU_BASE */
|
||||
|
||||
/*
|
||||
* Register a function to be called on shutdown. Only use this if you
|
||||
@@ -439,8 +373,6 @@ void default_machine_crash_shutdown(struct pt_regs *regs)
|
||||
crash_shutdown_cpu = -1;
|
||||
__debugger_fault_handler = old_handler;
|
||||
|
||||
crash_kexec_stop_spus();
|
||||
|
||||
if (ppc_md.kexec_cpu_down)
|
||||
ppc_md.kexec_cpu_down(1, 0);
|
||||
}
|
||||
|
||||
@@ -880,7 +880,18 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_TYPE_47x)
|
||||
*/
|
||||
andi. r10,r9,MSR_EE
|
||||
beq 1f
|
||||
/*
|
||||
* Since the ftrace irqsoff latency trace checks CALLER_ADDR1,
|
||||
* which is the stack frame here, we need to force a stack frame
|
||||
* in case we came from user space.
|
||||
*/
|
||||
stwu r1,-32(r1)
|
||||
mflr r0
|
||||
stw r0,4(r1)
|
||||
stwu r1,-32(r1)
|
||||
bl trace_hardirqs_on
|
||||
lwz r1,0(r1)
|
||||
lwz r1,0(r1)
|
||||
lwz r9,_MSR(r1)
|
||||
1:
|
||||
#endif /* CONFIG_TRACE_IRQFLAGS */
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <linux/memblock.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/ftrace.h>
|
||||
|
||||
#include <asm/machdep.h>
|
||||
#include <asm/prom.h>
|
||||
@@ -44,10 +45,7 @@ void machine_kexec_mask_interrupts(void) {
|
||||
|
||||
void machine_crash_shutdown(struct pt_regs *regs)
|
||||
{
|
||||
if (ppc_md.machine_crash_shutdown)
|
||||
ppc_md.machine_crash_shutdown(regs);
|
||||
else
|
||||
default_machine_crash_shutdown(regs);
|
||||
default_machine_crash_shutdown(regs);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -65,8 +63,6 @@ int machine_kexec_prepare(struct kimage *image)
|
||||
|
||||
void machine_kexec_cleanup(struct kimage *image)
|
||||
{
|
||||
if (ppc_md.machine_kexec_cleanup)
|
||||
ppc_md.machine_kexec_cleanup(image);
|
||||
}
|
||||
|
||||
void arch_crash_save_vmcoreinfo(void)
|
||||
@@ -87,10 +83,13 @@ void arch_crash_save_vmcoreinfo(void)
|
||||
*/
|
||||
void machine_kexec(struct kimage *image)
|
||||
{
|
||||
if (ppc_md.machine_kexec)
|
||||
ppc_md.machine_kexec(image);
|
||||
else
|
||||
default_machine_kexec(image);
|
||||
int save_ftrace_enabled;
|
||||
|
||||
save_ftrace_enabled = __ftrace_enabled_save();
|
||||
|
||||
default_machine_kexec(image);
|
||||
|
||||
__ftrace_enabled_restore(save_ftrace_enabled);
|
||||
|
||||
/* Fall back to normal restart if we're still alive. */
|
||||
machine_restart(NULL);
|
||||
|
||||
@@ -631,7 +631,7 @@ void show_regs(struct pt_regs * regs)
|
||||
#ifdef CONFIG_PPC_ADV_DEBUG_REGS
|
||||
printk("DEAR: "REG", ESR: "REG"\n", regs->dar, regs->dsisr);
|
||||
#else
|
||||
printk("DAR: "REG", DSISR: "REG"\n", regs->dar, regs->dsisr);
|
||||
printk("DAR: "REG", DSISR: %08lx\n", regs->dar, regs->dsisr);
|
||||
#endif
|
||||
printk("TASK = %p[%d] '%s' THREAD: %p",
|
||||
current, task_pid_nr(current), current->comm, task_thread_info(current));
|
||||
|
||||
@@ -256,31 +256,16 @@ static ssize_t rtas_flash_read(struct file *file, char __user *buf,
|
||||
struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode);
|
||||
struct rtas_update_flash_t *uf;
|
||||
char msg[RTAS_MSG_MAXLEN];
|
||||
int msglen;
|
||||
|
||||
uf = (struct rtas_update_flash_t *) dp->data;
|
||||
uf = dp->data;
|
||||
|
||||
if (!strcmp(dp->name, FIRMWARE_FLASH_NAME)) {
|
||||
get_flash_status_msg(uf->status, msg);
|
||||
} else { /* FIRMWARE_UPDATE_NAME */
|
||||
sprintf(msg, "%d\n", uf->status);
|
||||
}
|
||||
msglen = strlen(msg);
|
||||
if (msglen > count)
|
||||
msglen = count;
|
||||
|
||||
if (ppos && *ppos != 0)
|
||||
return 0; /* be cheap */
|
||||
|
||||
if (!access_ok(VERIFY_WRITE, buf, msglen))
|
||||
return -EINVAL;
|
||||
|
||||
if (copy_to_user(buf, msg, msglen))
|
||||
return -EFAULT;
|
||||
|
||||
if (ppos)
|
||||
*ppos = msglen;
|
||||
return msglen;
|
||||
return simple_read_from_buffer(buf, count, ppos, msg, strlen(msg));
|
||||
}
|
||||
|
||||
/* constructor for flash_block_cache */
|
||||
@@ -394,26 +379,13 @@ static ssize_t manage_flash_read(struct file *file, char __user *buf,
|
||||
char msg[RTAS_MSG_MAXLEN];
|
||||
int msglen;
|
||||
|
||||
args_buf = (struct rtas_manage_flash_t *) dp->data;
|
||||
args_buf = dp->data;
|
||||
if (args_buf == NULL)
|
||||
return 0;
|
||||
|
||||
msglen = sprintf(msg, "%d\n", args_buf->status);
|
||||
if (msglen > count)
|
||||
msglen = count;
|
||||
|
||||
if (ppos && *ppos != 0)
|
||||
return 0; /* be cheap */
|
||||
|
||||
if (!access_ok(VERIFY_WRITE, buf, msglen))
|
||||
return -EINVAL;
|
||||
|
||||
if (copy_to_user(buf, msg, msglen))
|
||||
return -EFAULT;
|
||||
|
||||
if (ppos)
|
||||
*ppos = msglen;
|
||||
return msglen;
|
||||
return simple_read_from_buffer(buf, count, ppos, msg, msglen);
|
||||
}
|
||||
|
||||
static ssize_t manage_flash_write(struct file *file, const char __user *buf,
|
||||
@@ -495,24 +467,11 @@ static ssize_t validate_flash_read(struct file *file, char __user *buf,
|
||||
char msg[RTAS_MSG_MAXLEN];
|
||||
int msglen;
|
||||
|
||||
args_buf = (struct rtas_validate_flash_t *) dp->data;
|
||||
args_buf = dp->data;
|
||||
|
||||
if (ppos && *ppos != 0)
|
||||
return 0; /* be cheap */
|
||||
|
||||
msglen = get_validate_flash_msg(args_buf, msg);
|
||||
if (msglen > count)
|
||||
msglen = count;
|
||||
|
||||
if (!access_ok(VERIFY_WRITE, buf, msglen))
|
||||
return -EINVAL;
|
||||
|
||||
if (copy_to_user(buf, msg, msglen))
|
||||
return -EFAULT;
|
||||
|
||||
if (ppos)
|
||||
*ppos = msglen;
|
||||
return msglen;
|
||||
return simple_read_from_buffer(buf, count, ppos, msg, msglen);
|
||||
}
|
||||
|
||||
static ssize_t validate_flash_write(struct file *file, const char __user *buf,
|
||||
|
||||
@@ -160,7 +160,7 @@ static int log_rtas_len(char * buf)
|
||||
/* rtas fixed header */
|
||||
len = 8;
|
||||
err = (struct rtas_error_log *)buf;
|
||||
if (err->extended_log_length) {
|
||||
if (err->extended && err->extended_log_length) {
|
||||
|
||||
/* extended header */
|
||||
len += err->extended_log_length;
|
||||
|
||||
@@ -265,11 +265,26 @@ void accumulate_stolen_time(void)
|
||||
{
|
||||
u64 sst, ust;
|
||||
|
||||
sst = scan_dispatch_log(get_paca()->starttime_user);
|
||||
ust = scan_dispatch_log(get_paca()->starttime);
|
||||
get_paca()->system_time -= sst;
|
||||
get_paca()->user_time -= ust;
|
||||
get_paca()->stolen_time += ust + sst;
|
||||
u8 save_soft_enabled = local_paca->soft_enabled;
|
||||
u8 save_hard_enabled = local_paca->hard_enabled;
|
||||
|
||||
/* We are called early in the exception entry, before
|
||||
* soft/hard_enabled are sync'ed to the expected state
|
||||
* for the exception. We are hard disabled but the PACA
|
||||
* needs to reflect that so various debug stuff doesn't
|
||||
* complain
|
||||
*/
|
||||
local_paca->soft_enabled = 0;
|
||||
local_paca->hard_enabled = 0;
|
||||
|
||||
sst = scan_dispatch_log(local_paca->starttime_user);
|
||||
ust = scan_dispatch_log(local_paca->starttime);
|
||||
local_paca->system_time -= sst;
|
||||
local_paca->user_time -= ust;
|
||||
local_paca->stolen_time += ust + sst;
|
||||
|
||||
local_paca->soft_enabled = save_soft_enabled;
|
||||
local_paca->hard_enabled = save_hard_enabled;
|
||||
}
|
||||
|
||||
static inline u64 calculate_stolen_time(u64 stop_tb)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user