Commit 3e25a2d9 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  powerpc: Fix for getting CPU number in power_save_ppc32_restore()
  powerpc: Fix build error with 64K pages and !hugetlbfs
  powerpc: Work around gcc's -fno-omit-frame-pointer bug
  powerpc: Make sure _etext is after all kernel text
  powerpc: Only make kernel text pages of linear mapping executable
  powerpc: Fix uninitialised variable in VSX alignment code
parents 316343e2 7888bc2b
...@@ -116,6 +116,11 @@ ifeq ($(CONFIG_6xx),y) ...@@ -116,6 +116,11 @@ ifeq ($(CONFIG_6xx),y)
KBUILD_CFLAGS += -mcpu=powerpc KBUILD_CFLAGS += -mcpu=powerpc
endif endif
# Work around a gcc code-gen bug with -fno-omit-frame-pointer.
ifeq ($(CONFIG_FTRACE),y)
KBUILD_CFLAGS += -mno-sched-epilog
endif
cpu-as-$(CONFIG_4xx) += -Wa,-m405 cpu-as-$(CONFIG_4xx) += -Wa,-m405
cpu-as-$(CONFIG_6xx) += -Wa,-maltivec cpu-as-$(CONFIG_6xx) += -Wa,-maltivec
cpu-as-$(CONFIG_POWER4) += -Wa,-maltivec cpu-as-$(CONFIG_POWER4) += -Wa,-maltivec
......
...@@ -153,12 +153,10 @@ ...@@ -153,12 +153,10 @@
#define __S110 PAGE_SHARED_X #define __S110 PAGE_SHARED_X
#define __S111 PAGE_SHARED_X #define __S111 PAGE_SHARED_X
#ifdef CONFIG_HUGETLB_PAGE #ifdef CONFIG_PPC_MM_SLICES
#define HAVE_ARCH_UNMAPPED_AREA #define HAVE_ARCH_UNMAPPED_AREA
#define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN #define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN
#endif /* CONFIG_PPC_MM_SLICES */
#endif
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
......
...@@ -14,12 +14,13 @@ endif ...@@ -14,12 +14,13 @@ endif
ifdef CONFIG_FTRACE ifdef CONFIG_FTRACE
# Do not trace early boot code # Do not trace early boot code
CFLAGS_REMOVE_cputable.o = -pg CFLAGS_REMOVE_cputable.o = -pg -mno-sched-epilog
CFLAGS_REMOVE_prom_init.o = -pg CFLAGS_REMOVE_prom_init.o = -pg -mno-sched-epilog
CFLAGS_REMOVE_btext.o = -pg -mno-sched-epilog
ifdef CONFIG_DYNAMIC_FTRACE ifdef CONFIG_DYNAMIC_FTRACE
# dynamic ftrace setup. # dynamic ftrace setup.
CFLAGS_REMOVE_ftrace.o = -pg CFLAGS_REMOVE_ftrace.o = -pg -mno-sched-epilog
endif endif
endif endif
......
...@@ -647,7 +647,7 @@ static int emulate_vsx(unsigned char __user *addr, unsigned int reg, ...@@ -647,7 +647,7 @@ static int emulate_vsx(unsigned char __user *addr, unsigned int reg,
unsigned int flags, unsigned int length) unsigned int flags, unsigned int length)
{ {
char *ptr = (char *) &current->thread.TS_FPR(reg); char *ptr = (char *) &current->thread.TS_FPR(reg);
int ret; int ret = 0;
flush_vsx_to_thread(current); flush_vsx_to_thread(current);
......
...@@ -158,7 +158,7 @@ _GLOBAL(power_save_ppc32_restore) ...@@ -158,7 +158,7 @@ _GLOBAL(power_save_ppc32_restore)
stw r9,_NIP(r11) /* make it do a blr */ stw r9,_NIP(r11) /* make it do a blr */
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
mfspr r12,SPRN_SPRG3 rlwinm r12,r11,0,0,31-THREAD_SHIFT
lwz r11,TI_CPU(r12) /* get cpu number * 4 */ lwz r11,TI_CPU(r12) /* get cpu number * 4 */
slwi r11,r11,2 slwi r11,r11,2
#else #else
......
...@@ -84,10 +84,11 @@ _GLOBAL(power_save_ppc32_restore) ...@@ -84,10 +84,11 @@ _GLOBAL(power_save_ppc32_restore)
stw r9,_NIP(r11) /* make it do a blr */ stw r9,_NIP(r11) /* make it do a blr */
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
mfspr r12,SPRN_SPRG3 rlwinm r12,r1,0,0,31-THREAD_SHIFT
lwz r11,TI_CPU(r12) /* get cpu number * 4 */ lwz r11,TI_CPU(r12) /* get cpu number * 4 */
slwi r11,r11,2 slwi r11,r11,2
#else #else
li r11,0 li r11,0
#endif #endif
b transfer_to_handler_cont b transfer_to_handler_cont
...@@ -66,11 +66,12 @@ SECTIONS ...@@ -66,11 +66,12 @@ SECTIONS
__got2_end = .; __got2_end = .;
#endif /* CONFIG_PPC32 */ #endif /* CONFIG_PPC32 */
. = ALIGN(PAGE_SIZE);
_etext = .;
PROVIDE32 (etext = .);
} :kernel } :kernel
. = ALIGN(PAGE_SIZE);
_etext = .;
PROVIDE32 (etext = .);
/* Read-only data */ /* Read-only data */
RODATA RODATA
......
...@@ -191,12 +191,17 @@ int htab_bolt_mapping(unsigned long vstart, unsigned long vend, ...@@ -191,12 +191,17 @@ int htab_bolt_mapping(unsigned long vstart, unsigned long vend,
unsigned long hash, hpteg; unsigned long hash, hpteg;
unsigned long vsid = get_kernel_vsid(vaddr, ssize); unsigned long vsid = get_kernel_vsid(vaddr, ssize);
unsigned long va = hpt_va(vaddr, vsid, ssize); unsigned long va = hpt_va(vaddr, vsid, ssize);
unsigned long tprot = prot;
/* Make kernel text executable */
if (in_kernel_text(vaddr))
tprot &= ~HPTE_R_N;
hash = hpt_hash(va, shift, ssize); hash = hpt_hash(va, shift, ssize);
hpteg = ((hash & htab_hash_mask) * HPTES_PER_GROUP); hpteg = ((hash & htab_hash_mask) * HPTES_PER_GROUP);
BUG_ON(!ppc_md.hpte_insert); BUG_ON(!ppc_md.hpte_insert);
ret = ppc_md.hpte_insert(hpteg, va, paddr, prot, ret = ppc_md.hpte_insert(hpteg, va, paddr, tprot,
HPTE_V_BOLTED, psize, ssize); HPTE_V_BOLTED, psize, ssize);
if (ret < 0) if (ret < 0)
...@@ -584,7 +589,7 @@ void __init htab_initialize(void) ...@@ -584,7 +589,7 @@ void __init htab_initialize(void)
{ {
unsigned long table; unsigned long table;
unsigned long pteg_count; unsigned long pteg_count;
unsigned long prot, tprot; unsigned long prot;
unsigned long base = 0, size = 0, limit; unsigned long base = 0, size = 0, limit;
int i; int i;
...@@ -660,10 +665,9 @@ void __init htab_initialize(void) ...@@ -660,10 +665,9 @@ void __init htab_initialize(void)
for (i=0; i < lmb.memory.cnt; i++) { for (i=0; i < lmb.memory.cnt; i++) {
base = (unsigned long)__va(lmb.memory.region[i].base); base = (unsigned long)__va(lmb.memory.region[i].base);
size = lmb.memory.region[i].size; size = lmb.memory.region[i].size;
tprot = prot | (in_kernel_text(base) ? _PAGE_EXEC : 0);
DBG("creating mapping for region: %lx..%lx (prot: %x)\n", DBG("creating mapping for region: %lx..%lx (prot: %x)\n",
base, size, tprot); base, size, prot);
#ifdef CONFIG_U3_DART #ifdef CONFIG_U3_DART
/* Do not map the DART space. Fortunately, it will be aligned /* Do not map the DART space. Fortunately, it will be aligned
...@@ -680,21 +684,21 @@ void __init htab_initialize(void) ...@@ -680,21 +684,21 @@ void __init htab_initialize(void)
unsigned long dart_table_end = dart_tablebase + 16 * MB; unsigned long dart_table_end = dart_tablebase + 16 * MB;
if (base != dart_tablebase) if (base != dart_tablebase)
BUG_ON(htab_bolt_mapping(base, dart_tablebase, BUG_ON(htab_bolt_mapping(base, dart_tablebase,
__pa(base), tprot, __pa(base), prot,
mmu_linear_psize, mmu_linear_psize,
mmu_kernel_ssize)); mmu_kernel_ssize));
if ((base + size) > dart_table_end) if ((base + size) > dart_table_end)
BUG_ON(htab_bolt_mapping(dart_tablebase+16*MB, BUG_ON(htab_bolt_mapping(dart_tablebase+16*MB,
base + size, base + size,
__pa(dart_table_end), __pa(dart_table_end),
tprot, prot,
mmu_linear_psize, mmu_linear_psize,
mmu_kernel_ssize)); mmu_kernel_ssize));
continue; continue;
} }
#endif /* CONFIG_U3_DART */ #endif /* CONFIG_U3_DART */
BUG_ON(htab_bolt_mapping(base, base + size, __pa(base), BUG_ON(htab_bolt_mapping(base, base + size, __pa(base),
tprot, mmu_linear_psize, mmu_kernel_ssize)); prot, mmu_linear_psize, mmu_kernel_ssize));
} }
/* /*
......
...@@ -2,7 +2,7 @@ CFLAGS_bootx_init.o += -fPIC ...@@ -2,7 +2,7 @@ CFLAGS_bootx_init.o += -fPIC
ifdef CONFIG_FTRACE ifdef CONFIG_FTRACE
# Do not trace early boot code # Do not trace early boot code
CFLAGS_REMOVE_bootx_init.o = -pg CFLAGS_REMOVE_bootx_init.o = -pg -mno-sched-epilog
endif endif
obj-y += pic.o setup.o time.o feature.o pci.o \ obj-y += pic.o setup.o time.o feature.o pci.o \
......
...@@ -394,7 +394,7 @@ config LOCKDEP ...@@ -394,7 +394,7 @@ config LOCKDEP
bool bool
depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
select STACKTRACE select STACKTRACE
select FRAME_POINTER if !X86 && !MIPS select FRAME_POINTER if !X86 && !MIPS && !PPC
select KALLSYMS select KALLSYMS
select KALLSYMS_ALL select KALLSYMS_ALL
...@@ -676,13 +676,13 @@ config FAULT_INJECTION_STACKTRACE_FILTER ...@@ -676,13 +676,13 @@ config FAULT_INJECTION_STACKTRACE_FILTER
depends on FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT depends on FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT
depends on !X86_64 depends on !X86_64
select STACKTRACE select STACKTRACE
select FRAME_POINTER select FRAME_POINTER if !PPC
help help
Provide stacktrace filter for fault-injection capabilities Provide stacktrace filter for fault-injection capabilities
config LATENCYTOP config LATENCYTOP
bool "Latency measuring infrastructure" bool "Latency measuring infrastructure"
select FRAME_POINTER if !MIPS select FRAME_POINTER if !MIPS && !PPC
select KALLSYMS select KALLSYMS
select KALLSYMS_ALL select KALLSYMS_ALL
select STACKTRACE select STACKTRACE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment