From a2f526994e92ea54be181efccda261c4b1a6ae8d Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Fri, 1 Jul 2011 23:04:40 -0400 Subject: microblaze/irqs: Do not trace arch_local_{*,irq_*} functions Do not trace arch_local_save_flags(), arch_local_irq_*() and friends. Although they are marked inline, gcc may still make a function out of them and add it to the pool of functions that are traced by the function tracer. This can cause undesirable results (kernel panic, triple faults, etc). Add the notrace notation to prevent them from ever being traced. Cc: Michal Simek Signed-off-by: Steven Rostedt --- arch/microblaze/include/asm/irqflags.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'arch/microblaze/include') diff --git a/arch/microblaze/include/asm/irqflags.h b/arch/microblaze/include/asm/irqflags.h index c4532f032b3..c9a6262832c 100644 --- a/arch/microblaze/include/asm/irqflags.h +++ b/arch/microblaze/include/asm/irqflags.h @@ -14,7 +14,7 @@ #if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR -static inline unsigned long arch_local_irq_save(void) +static inline notrace unsigned long arch_local_irq_save(void) { unsigned long flags; asm volatile(" msrclr %0, %1 \n" @@ -25,7 +25,7 @@ static inline unsigned long arch_local_irq_save(void) return flags; } -static inline void arch_local_irq_disable(void) +static inline notrace void arch_local_irq_disable(void) { /* this uses r0 without declaring it - is that correct? */ asm volatile(" msrclr r0, %0 \n" @@ -35,7 +35,7 @@ static inline void arch_local_irq_disable(void) : "memory"); } -static inline void arch_local_irq_enable(void) +static inline notrace void arch_local_irq_enable(void) { /* this uses r0 without declaring it - is that correct? */ asm volatile(" msrset r0, %0 \n" @@ -47,7 +47,7 @@ static inline void arch_local_irq_enable(void) #else /* !CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR */ -static inline unsigned long arch_local_irq_save(void) +static inline notrace unsigned long arch_local_irq_save(void) { unsigned long flags, tmp; asm volatile (" mfs %0, rmsr \n" @@ -61,7 +61,7 @@ static inline unsigned long arch_local_irq_save(void) return flags; } -static inline void arch_local_irq_disable(void) +static inline notrace void arch_local_irq_disable(void) { unsigned long tmp; asm volatile(" mfs %0, rmsr \n" @@ -74,7 +74,7 @@ static inline void arch_local_irq_disable(void) : "memory"); } -static inline void arch_local_irq_enable(void) +static inline notrace void arch_local_irq_enable(void) { unsigned long tmp; asm volatile(" mfs %0, rmsr \n" @@ -89,7 +89,7 @@ static inline void arch_local_irq_enable(void) #endif /* CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR */ -static inline unsigned long arch_local_save_flags(void) +static inline notrace unsigned long arch_local_save_flags(void) { unsigned long flags; asm volatile(" mfs %0, rmsr \n" @@ -100,7 +100,7 @@ static inline unsigned long arch_local_save_flags(void) return flags; } -static inline void arch_local_irq_restore(unsigned long flags) +static inline notrace void arch_local_irq_restore(unsigned long flags) { asm volatile(" mts rmsr, %0 \n" " nop \n" @@ -109,12 +109,12 @@ static inline void arch_local_irq_restore(unsigned long flags) : "memory"); } -static inline bool arch_irqs_disabled_flags(unsigned long flags) +static inline notrace bool arch_irqs_disabled_flags(unsigned long flags) { return (flags & MSR_IE) == 0; } -static inline bool arch_irqs_disabled(void) +static inline notrace bool arch_irqs_disabled(void) { return arch_irqs_disabled_flags(arch_local_save_flags()); } -- cgit v1.2.3-18-g5258 From 504a84c4806af58ae842b8716f603baad2757dd9 Mon Sep 17 00:00:00 2001 From: Mathias Krause Date: Wed, 8 Jun 2011 14:30:05 +0200 Subject: microblaze: Remove duplicated prototype of start_thread() The prototype for start_thread() is already present in the MMU/NOMMU independent part of the file. Remove the duplicate. Signed-off-by: Mathias Krause Signed-off-by: Michal Simek --- arch/microblaze/include/asm/processor.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'arch/microblaze/include') diff --git a/arch/microblaze/include/asm/processor.h b/arch/microblaze/include/asm/processor.h index aed2a6be8e2..7283bfb2f7e 100644 --- a/arch/microblaze/include/asm/processor.h +++ b/arch/microblaze/include/asm/processor.h @@ -125,9 +125,6 @@ struct thread_struct { .pgdir = swapper_pg_dir, \ } -/* Do necessary setup to start up a newly executed thread. */ -void start_thread(struct pt_regs *regs, - unsigned long pc, unsigned long usp); /* Free all resources held by a thread. */ extern inline void release_thread(struct task_struct *dead_task) -- cgit v1.2.3-18-g5258 From 5db34eb92f5699361de355dcd7958fdd2a9fb98a Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Tue, 12 Jul 2011 12:36:29 +0200 Subject: microblaze: trivial: Fix typo fault descrtiption -> description Signed-off-by: Michal Simek --- arch/microblaze/include/asm/pvr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/microblaze/include') diff --git a/arch/microblaze/include/asm/pvr.h b/arch/microblaze/include/asm/pvr.h index a10bec62e85..56a80e45c4e 100644 --- a/arch/microblaze/include/asm/pvr.h +++ b/arch/microblaze/include/asm/pvr.h @@ -111,7 +111,7 @@ struct pvr_s { /* Target family PVR mask */ #define PVR10_TARGET_FAMILY_MASK 0xFF000000 -/* MMU descrtiption */ +/* MMU description */ #define PVR11_USE_MMU 0xC0000000 #define PVR11_MMU_ITLB_SIZE 0x38000000 #define PVR11_MMU_DTLB_SIZE 0x07000000 -- cgit v1.2.3-18-g5258 From 8904976e8ca45be3ec75acc71f5d855ef671a079 Mon Sep 17 00:00:00 2001 From: "John A. Williams" Date: Tue, 24 May 2011 18:57:11 +1000 Subject: microblaze: Unprivileged stream instruction awareness Add cpuinfo support for the new MicroBlaze option permitting userspace (unprivileged) access to the streaming instructions (FSL / AXI-stream). Emit a noisy warning at bootup if this is enabled, because bad user code can potentially lockup the CPU. Signed-off-by: John A. Williams Signed-off-by: Michal Simek --- arch/microblaze/include/asm/cpuinfo.h | 1 + arch/microblaze/include/asm/pvr.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'arch/microblaze/include') diff --git a/arch/microblaze/include/asm/cpuinfo.h b/arch/microblaze/include/asm/cpuinfo.h index d8f013347a9..7d6831ac8a4 100644 --- a/arch/microblaze/include/asm/cpuinfo.h +++ b/arch/microblaze/include/asm/cpuinfo.h @@ -38,6 +38,7 @@ struct cpuinfo { u32 use_exc; u32 ver_code; u32 mmu; + u32 mmu_privins; u32 endian; /* CPU caches */ diff --git a/arch/microblaze/include/asm/pvr.h b/arch/microblaze/include/asm/pvr.h index 56a80e45c4e..4bbdb4c03b5 100644 --- a/arch/microblaze/include/asm/pvr.h +++ b/arch/microblaze/include/asm/pvr.h @@ -117,10 +117,10 @@ struct pvr_s { #define PVR11_MMU_DTLB_SIZE 0x07000000 #define PVR11_MMU_TLB_ACCESS 0x00C00000 #define PVR11_MMU_ZONES 0x003C0000 +#define PVR11_MMU_PRIVINS 0x00010000 /* MSR Reset value PVR mask */ #define PVR11_MSR_RESET_VALUE_MASK 0x000007FF - /* PVR access macros */ #define PVR_IS_FULL(_pvr) (_pvr.pvr[0] & PVR0_PVR_FULL_MASK) #define PVR_USE_BARREL(_pvr) (_pvr.pvr[0] & PVR0_USE_BARREL_MASK) @@ -216,6 +216,7 @@ struct pvr_s { #define PVR_MMU_DTLB_SIZE(_pvr) (_pvr.pvr[11] & PVR11_MMU_DTLB_SIZE) #define PVR_MMU_TLB_ACCESS(_pvr) (_pvr.pvr[11] & PVR11_MMU_TLB_ACCESS) #define PVR_MMU_ZONES(_pvr) (_pvr.pvr[11] & PVR11_MMU_ZONES) +#define PVR_MMU_PRIVINS(pvr) (pvr.pvr[11] & PVR11_MMU_PRIVINS) /* endian */ #define PVR_ENDIAN(_pvr) (_pvr.pvr[0] & PVR0_ENDI) -- cgit v1.2.3-18-g5258 From e721a45fbed13a52093d2cc1962dbb8a754462ea Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Mon, 4 Apr 2011 15:45:06 +0200 Subject: microblaze: Get early printk console earlier 1. Register early console as standard console 2. Enable CON_BOOT console flag to ensure auto-unregistering by the kernel 3. remap_early_printk function remap physical console baseaddr to virtual space Usage specific function for console remap is done after memory initialization with IRQ turn off that's why there is not necessary to protect it. The reason for remapping is that the kernel use TLB 63 for 1:1 address mapping to be able to use console in very early boot-up phase. But allocating one TLB just for console caused performance degression that's why ioremaps create new mapping and TLB 63 is automatically released and ready to use. Signed-off-by: Michal Simek CC: Russell King CC: Ralf Baechle CC: Ingo Molnar CC: Alan Cox CC: CC: Arnd Bergmann --- arch/microblaze/include/asm/setup.h | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/microblaze/include') diff --git a/arch/microblaze/include/asm/setup.h b/arch/microblaze/include/asm/setup.h index 8f3968971e4..904e5ef6a11 100644 --- a/arch/microblaze/include/asm/setup.h +++ b/arch/microblaze/include/asm/setup.h @@ -23,6 +23,7 @@ extern char cmd_line[COMMAND_LINE_SIZE]; void early_printk(const char *fmt, ...); int setup_early_printk(char *opt); +void remap_early_printk(void); void disable_early_printk(void); #if defined(CONFIG_EARLY_PRINTK) -- cgit v1.2.3-18-g5258 From 2aa8e37596933a43fc3e46e1e385045635674429 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Thu, 14 Apr 2011 11:48:43 +0200 Subject: microblaze: Simplify early console binding from DT Recognize early Linux console from chosen - linux,stdout-path instead of detecting the first console with appropriate compatible strings. This patch solved the problem on system with multiple consoles. Signed-off-by: Michal Simek --- arch/microblaze/include/asm/prom.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'arch/microblaze/include') diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h index d0890d36ef6..34c4e8b2780 100644 --- a/arch/microblaze/include/asm/prom.h +++ b/arch/microblaze/include/asm/prom.h @@ -26,8 +26,12 @@ #define HAVE_ARCH_DEVTREE_FIXUPS /* Other Prototypes */ -extern int early_uartlite_console(void); -extern int early_uart16550_console(void); +enum early_consoles { + UARTLITE = 1, + UART16550 = 2, +}; + +extern int of_early_console(void *version); #ifdef CONFIG_PCI /* -- cgit v1.2.3-18-g5258