Merge branch 'fixes' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'fixes' of master.kernel.org:/home/rmk/linux-2.6-arm: ARM: 6879/1: fix personality test wrt usage of domain handlers ARM: 6878/1: fix personality flag propagation across an exec ARM: 6877/1: the ADDR_NO_RANDOMIZE personality flag should be honored with mmap() ARM: 6876/1: Kconfig.debug: Remove unused CONFIG_DEBUG_ERRORS ARM: pxa: convert incorrect IRQ_TO_IRQ() to irq_to_gpio() ARM: mmp: align NR_BUILTIN_GPIO with gpio interrupt number ARM: pxa: align NR_BUILTIN_GPIO with GPIO interrupt number ARM: pxa: always clear LPM bits for PXA168 MFPR pcmcia: limit pxa2xx_trizeps4 subdriver to trizeps4 platform pcmcia: limit pxa2xx_balloon3 subdriver to balloon3 platform ARM: pxafb: Fix access to nonexistent member of pxafb_info ARM: 6872/1: arch:common:Makefile Remove unused config in the Makefile. ARM: 6868/1: Preserve the VFP state during fork ARM: 6867/1: Introduce THREAD_NOTIFY_COPY for copy_thread() hooks ARM: 6866/1: Do not restrict HIGHPTE to !OUTER_CACHE ARM: 6865/1: perf: ensure pass through zero is counted on overflow ARM: 6864/1: hw_breakpoint: clear DBGVCR out of reset ARM: Only allow PM_SLEEP with CPUs which support suspend ARM: Make consolidated PM sleep code depend on PM_SLEEP
This commit is contained in:
@@ -1540,7 +1540,6 @@ config HIGHMEM
|
|||||||
config HIGHPTE
|
config HIGHPTE
|
||||||
bool "Allocate 2nd-level pagetables from highmem"
|
bool "Allocate 2nd-level pagetables from highmem"
|
||||||
depends on HIGHMEM
|
depends on HIGHMEM
|
||||||
depends on !OUTER_CACHE
|
|
||||||
|
|
||||||
config HW_PERF_EVENTS
|
config HW_PERF_EVENTS
|
||||||
bool "Enable hardware performance counter support for perf events"
|
bool "Enable hardware performance counter support for perf events"
|
||||||
@@ -2012,6 +2011,8 @@ source "kernel/power/Kconfig"
|
|||||||
|
|
||||||
config ARCH_SUSPEND_POSSIBLE
|
config ARCH_SUSPEND_POSSIBLE
|
||||||
depends on !ARCH_S5P64X0 && !ARCH_S5P6442
|
depends on !ARCH_S5P64X0 && !ARCH_S5P6442
|
||||||
|
depends on CPU_ARM920T || CPU_ARM926T || CPU_SA1100 || \
|
||||||
|
CPU_V6 || CPU_V6K || CPU_V7 || CPU_XSC3 || CPU_XSCALE
|
||||||
def_bool y
|
def_bool y
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
@@ -63,17 +63,6 @@ config DEBUG_USER
|
|||||||
8 - SIGSEGV faults
|
8 - SIGSEGV faults
|
||||||
16 - SIGBUS faults
|
16 - SIGBUS faults
|
||||||
|
|
||||||
config DEBUG_ERRORS
|
|
||||||
bool "Verbose kernel error messages"
|
|
||||||
depends on DEBUG_KERNEL
|
|
||||||
help
|
|
||||||
This option controls verbose debugging information which can be
|
|
||||||
printed when the kernel detects an internal error. This debugging
|
|
||||||
information is useful to kernel hackers when tracking down problems,
|
|
||||||
but mostly meaningless to other people. It's safe to say Y unless
|
|
||||||
you are concerned with the code size or don't want to see these
|
|
||||||
messages.
|
|
||||||
|
|
||||||
config DEBUG_STACK_USAGE
|
config DEBUG_STACK_USAGE
|
||||||
bool "Enable stack utilization instrumentation"
|
bool "Enable stack utilization instrumentation"
|
||||||
depends on DEBUG_KERNEL
|
depends on DEBUG_KERNEL
|
||||||
|
@@ -16,5 +16,4 @@ obj-$(CONFIG_SHARP_SCOOP) += scoop.o
|
|||||||
obj-$(CONFIG_ARCH_IXP2000) += uengine.o
|
obj-$(CONFIG_ARCH_IXP2000) += uengine.o
|
||||||
obj-$(CONFIG_ARCH_IXP23XX) += uengine.o
|
obj-$(CONFIG_ARCH_IXP23XX) += uengine.o
|
||||||
obj-$(CONFIG_PCI_HOST_ITE8152) += it8152.o
|
obj-$(CONFIG_PCI_HOST_ITE8152) += it8152.o
|
||||||
obj-$(CONFIG_COMMON_CLKDEV) += clkdev.o
|
|
||||||
obj-$(CONFIG_ARM_TIMER_SP804) += timer-sp.o
|
obj-$(CONFIG_ARM_TIMER_SP804) += timer-sp.o
|
||||||
|
@@ -43,6 +43,7 @@ static inline void thread_notify(unsigned long rc, struct thread_info *thread)
|
|||||||
#define THREAD_NOTIFY_FLUSH 0
|
#define THREAD_NOTIFY_FLUSH 0
|
||||||
#define THREAD_NOTIFY_EXIT 1
|
#define THREAD_NOTIFY_EXIT 1
|
||||||
#define THREAD_NOTIFY_SWITCH 2
|
#define THREAD_NOTIFY_SWITCH 2
|
||||||
|
#define THREAD_NOTIFY_COPY 3
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@@ -29,7 +29,7 @@ obj-$(CONFIG_MODULES) += armksyms.o module.o
|
|||||||
obj-$(CONFIG_ARTHUR) += arthur.o
|
obj-$(CONFIG_ARTHUR) += arthur.o
|
||||||
obj-$(CONFIG_ISA_DMA) += dma-isa.o
|
obj-$(CONFIG_ISA_DMA) += dma-isa.o
|
||||||
obj-$(CONFIG_PCI) += bios32.o isa.o
|
obj-$(CONFIG_PCI) += bios32.o isa.o
|
||||||
obj-$(CONFIG_PM) += sleep.o
|
obj-$(CONFIG_PM_SLEEP) += sleep.o
|
||||||
obj-$(CONFIG_HAVE_SCHED_CLOCK) += sched_clock.o
|
obj-$(CONFIG_HAVE_SCHED_CLOCK) += sched_clock.o
|
||||||
obj-$(CONFIG_SMP) += smp.o smp_tlb.o
|
obj-$(CONFIG_SMP) += smp.o smp_tlb.o
|
||||||
obj-$(CONFIG_HAVE_ARM_SCU) += smp_scu.o
|
obj-$(CONFIG_HAVE_ARM_SCU) += smp_scu.o
|
||||||
|
@@ -40,15 +40,22 @@ EXPORT_SYMBOL(elf_check_arch);
|
|||||||
void elf_set_personality(const struct elf32_hdr *x)
|
void elf_set_personality(const struct elf32_hdr *x)
|
||||||
{
|
{
|
||||||
unsigned int eflags = x->e_flags;
|
unsigned int eflags = x->e_flags;
|
||||||
unsigned int personality = PER_LINUX_32BIT;
|
unsigned int personality = current->personality & ~PER_MASK;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* We only support Linux ELF executables, so always set the
|
||||||
|
* personality to LINUX.
|
||||||
|
*/
|
||||||
|
personality |= PER_LINUX;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* APCS-26 is only valid for OABI executables
|
* APCS-26 is only valid for OABI executables
|
||||||
*/
|
*/
|
||||||
if ((eflags & EF_ARM_EABI_MASK) == EF_ARM_EABI_UNKNOWN) {
|
if ((eflags & EF_ARM_EABI_MASK) == EF_ARM_EABI_UNKNOWN &&
|
||||||
if (eflags & EF_ARM_APCS_26)
|
(eflags & EF_ARM_APCS_26))
|
||||||
personality = PER_LINUX;
|
personality &= ~ADDR_LIMIT_32BIT;
|
||||||
}
|
else
|
||||||
|
personality |= ADDR_LIMIT_32BIT;
|
||||||
|
|
||||||
set_personality(personality);
|
set_personality(personality);
|
||||||
|
|
||||||
|
@@ -868,6 +868,13 @@ static void reset_ctrl_regs(void *info)
|
|||||||
*/
|
*/
|
||||||
asm volatile("mcr p14, 0, %0, c1, c0, 4" : : "r" (0));
|
asm volatile("mcr p14, 0, %0, c1, c0, 4" : : "r" (0));
|
||||||
isb();
|
isb();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Clear any configured vector-catch events before
|
||||||
|
* enabling monitor mode.
|
||||||
|
*/
|
||||||
|
asm volatile("mcr p14, 0, %0, c0, c7, 0" : : "r" (0));
|
||||||
|
isb();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (enable_monitor_mode())
|
if (enable_monitor_mode())
|
||||||
|
@@ -221,7 +221,7 @@ again:
|
|||||||
prev_raw_count &= armpmu->max_period;
|
prev_raw_count &= armpmu->max_period;
|
||||||
|
|
||||||
if (overflow)
|
if (overflow)
|
||||||
delta = armpmu->max_period - prev_raw_count + new_raw_count;
|
delta = armpmu->max_period - prev_raw_count + new_raw_count + 1;
|
||||||
else
|
else
|
||||||
delta = new_raw_count - prev_raw_count;
|
delta = new_raw_count - prev_raw_count;
|
||||||
|
|
||||||
|
@@ -372,6 +372,8 @@ copy_thread(unsigned long clone_flags, unsigned long stack_start,
|
|||||||
if (clone_flags & CLONE_SETTLS)
|
if (clone_flags & CLONE_SETTLS)
|
||||||
thread->tp_value = regs->ARM_r3;
|
thread->tp_value = regs->ARM_r3;
|
||||||
|
|
||||||
|
thread_notify(THREAD_NOTIFY_COPY, thread);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -410,8 +410,7 @@ static int bad_syscall(int n, struct pt_regs *regs)
|
|||||||
struct thread_info *thread = current_thread_info();
|
struct thread_info *thread = current_thread_info();
|
||||||
siginfo_t info;
|
siginfo_t info;
|
||||||
|
|
||||||
if (current->personality != PER_LINUX &&
|
if ((current->personality & PER_MASK) != PER_LINUX &&
|
||||||
current->personality != PER_LINUX_32BIT &&
|
|
||||||
thread->exec_domain->handler) {
|
thread->exec_domain->handler) {
|
||||||
thread->exec_domain->handler(n, regs);
|
thread->exec_domain->handler(n, regs);
|
||||||
return regs->ARM_r0;
|
return regs->ARM_r0;
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
#define BANK_OFF(n) (((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2))
|
#define BANK_OFF(n) (((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2))
|
||||||
#define GPIO_REG(x) (*((volatile u32 *)(GPIO_REGS_VIRT + (x))))
|
#define GPIO_REG(x) (*((volatile u32 *)(GPIO_REGS_VIRT + (x))))
|
||||||
|
|
||||||
#define NR_BUILTIN_GPIO (192)
|
#define NR_BUILTIN_GPIO IRQ_GPIO_NUM
|
||||||
|
|
||||||
#define gpio_to_bank(gpio) ((gpio) >> 5)
|
#define gpio_to_bank(gpio) ((gpio) >> 5)
|
||||||
#define gpio_to_irq(gpio) (IRQ_GPIO_START + (gpio))
|
#define gpio_to_irq(gpio) (IRQ_GPIO_START + (gpio))
|
||||||
|
@@ -8,6 +8,15 @@
|
|||||||
#define MFP_DRIVE_MEDIUM (0x2 << 13)
|
#define MFP_DRIVE_MEDIUM (0x2 << 13)
|
||||||
#define MFP_DRIVE_FAST (0x3 << 13)
|
#define MFP_DRIVE_FAST (0x3 << 13)
|
||||||
|
|
||||||
|
#undef MFP_CFG
|
||||||
|
#undef MFP_CFG_DRV
|
||||||
|
|
||||||
|
#define MFP_CFG(pin, af) \
|
||||||
|
(MFP_LPM_INPUT | MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_DRIVE_MEDIUM)
|
||||||
|
|
||||||
|
#define MFP_CFG_DRV(pin, af, drv) \
|
||||||
|
(MFP_LPM_INPUT | MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_DRIVE_##drv)
|
||||||
|
|
||||||
/* GPIO */
|
/* GPIO */
|
||||||
#define GPIO0_GPIO MFP_CFG(GPIO0, AF5)
|
#define GPIO0_GPIO MFP_CFG(GPIO0, AF5)
|
||||||
#define GPIO1_GPIO MFP_CFG(GPIO1, AF5)
|
#define GPIO1_GPIO MFP_CFG(GPIO1, AF5)
|
||||||
|
@@ -99,11 +99,24 @@
|
|||||||
#define GAFR(x) GPIO_REG(0x54 + (((x) & 0x70) >> 2))
|
#define GAFR(x) GPIO_REG(0x54 + (((x) & 0x70) >> 2))
|
||||||
|
|
||||||
|
|
||||||
#define NR_BUILTIN_GPIO 128
|
#define NR_BUILTIN_GPIO PXA_GPIO_IRQ_NUM
|
||||||
|
|
||||||
#define gpio_to_bank(gpio) ((gpio) >> 5)
|
#define gpio_to_bank(gpio) ((gpio) >> 5)
|
||||||
#define gpio_to_irq(gpio) IRQ_GPIO(gpio)
|
#define gpio_to_irq(gpio) IRQ_GPIO(gpio)
|
||||||
#define irq_to_gpio(irq) IRQ_TO_GPIO(irq)
|
|
||||||
|
static inline int irq_to_gpio(unsigned int irq)
|
||||||
|
{
|
||||||
|
int gpio;
|
||||||
|
|
||||||
|
if (irq == IRQ_GPIO0 || irq == IRQ_GPIO1)
|
||||||
|
return irq - IRQ_GPIO0;
|
||||||
|
|
||||||
|
gpio = irq - PXA_GPIO_IRQ_BASE;
|
||||||
|
if (gpio >= 2 && gpio < NR_BUILTIN_GPIO)
|
||||||
|
return gpio;
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_CPU_PXA26x
|
#ifdef CONFIG_CPU_PXA26x
|
||||||
/* GPIO86/87/88/89 on PXA26x have their direction bits in GPDR2 inverted,
|
/* GPIO86/87/88/89 on PXA26x have their direction bits in GPDR2 inverted,
|
||||||
|
@@ -93,9 +93,6 @@
|
|||||||
#define GPIO_2_x_TO_IRQ(x) (PXA_GPIO_IRQ_BASE + (x))
|
#define GPIO_2_x_TO_IRQ(x) (PXA_GPIO_IRQ_BASE + (x))
|
||||||
#define IRQ_GPIO(x) (((x) < 2) ? (IRQ_GPIO0 + (x)) : GPIO_2_x_TO_IRQ(x))
|
#define IRQ_GPIO(x) (((x) < 2) ? (IRQ_GPIO0 + (x)) : GPIO_2_x_TO_IRQ(x))
|
||||||
|
|
||||||
#define IRQ_TO_GPIO_2_x(i) ((i) - PXA_GPIO_IRQ_BASE)
|
|
||||||
#define IRQ_TO_GPIO(i) (((i) < IRQ_GPIO(2)) ? ((i) - IRQ_GPIO0) : IRQ_TO_GPIO_2_x(i))
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The following interrupts are for board specific purposes. Since
|
* The following interrupts are for board specific purposes. Since
|
||||||
* the kernel can only run on one machine at a time, we can re-use
|
* the kernel can only run on one machine at a time, we can re-use
|
||||||
|
@@ -285,7 +285,7 @@ static inline void pxa25x_init_pm(void) {}
|
|||||||
|
|
||||||
static int pxa25x_set_wake(struct irq_data *d, unsigned int on)
|
static int pxa25x_set_wake(struct irq_data *d, unsigned int on)
|
||||||
{
|
{
|
||||||
int gpio = IRQ_TO_GPIO(d->irq);
|
int gpio = irq_to_gpio(d->irq);
|
||||||
uint32_t mask = 0;
|
uint32_t mask = 0;
|
||||||
|
|
||||||
if (gpio >= 0 && gpio < 85)
|
if (gpio >= 0 && gpio < 85)
|
||||||
|
@@ -345,7 +345,7 @@ static inline void pxa27x_init_pm(void) {}
|
|||||||
*/
|
*/
|
||||||
static int pxa27x_set_wake(struct irq_data *d, unsigned int on)
|
static int pxa27x_set_wake(struct irq_data *d, unsigned int on)
|
||||||
{
|
{
|
||||||
int gpio = IRQ_TO_GPIO(d->irq);
|
int gpio = irq_to_gpio(d->irq);
|
||||||
uint32_t mask;
|
uint32_t mask;
|
||||||
|
|
||||||
if (gpio >= 0 && gpio < 128)
|
if (gpio >= 0 && gpio < 128)
|
||||||
|
@@ -7,6 +7,7 @@
|
|||||||
#include <linux/shm.h>
|
#include <linux/shm.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
|
#include <linux/personality.h>
|
||||||
#include <linux/random.h>
|
#include <linux/random.h>
|
||||||
#include <asm/cputype.h>
|
#include <asm/cputype.h>
|
||||||
#include <asm/system.h>
|
#include <asm/system.h>
|
||||||
@@ -82,7 +83,8 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
|
|||||||
mm->cached_hole_size = 0;
|
mm->cached_hole_size = 0;
|
||||||
}
|
}
|
||||||
/* 8 bits of randomness in 20 address space bits */
|
/* 8 bits of randomness in 20 address space bits */
|
||||||
if (current->flags & PF_RANDOMIZE)
|
if ((current->flags & PF_RANDOMIZE) &&
|
||||||
|
!(current->personality & ADDR_NO_RANDOMIZE))
|
||||||
addr += (get_random_int() % (1 << 8)) << PAGE_SHIFT;
|
addr += (get_random_int() % (1 << 8)) << PAGE_SHIFT;
|
||||||
|
|
||||||
full_search:
|
full_search:
|
||||||
|
@@ -390,7 +390,7 @@ ENTRY(cpu_arm920_set_pte_ext)
|
|||||||
/* Suspend/resume support: taken from arch/arm/plat-s3c24xx/sleep.S */
|
/* Suspend/resume support: taken from arch/arm/plat-s3c24xx/sleep.S */
|
||||||
.globl cpu_arm920_suspend_size
|
.globl cpu_arm920_suspend_size
|
||||||
.equ cpu_arm920_suspend_size, 4 * 3
|
.equ cpu_arm920_suspend_size, 4 * 3
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM_SLEEP
|
||||||
ENTRY(cpu_arm920_do_suspend)
|
ENTRY(cpu_arm920_do_suspend)
|
||||||
stmfd sp!, {r4 - r7, lr}
|
stmfd sp!, {r4 - r7, lr}
|
||||||
mrc p15, 0, r4, c13, c0, 0 @ PID
|
mrc p15, 0, r4, c13, c0, 0 @ PID
|
||||||
|
@@ -404,7 +404,7 @@ ENTRY(cpu_arm926_set_pte_ext)
|
|||||||
/* Suspend/resume support: taken from arch/arm/plat-s3c24xx/sleep.S */
|
/* Suspend/resume support: taken from arch/arm/plat-s3c24xx/sleep.S */
|
||||||
.globl cpu_arm926_suspend_size
|
.globl cpu_arm926_suspend_size
|
||||||
.equ cpu_arm926_suspend_size, 4 * 3
|
.equ cpu_arm926_suspend_size, 4 * 3
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM_SLEEP
|
||||||
ENTRY(cpu_arm926_do_suspend)
|
ENTRY(cpu_arm926_do_suspend)
|
||||||
stmfd sp!, {r4 - r7, lr}
|
stmfd sp!, {r4 - r7, lr}
|
||||||
mrc p15, 0, r4, c13, c0, 0 @ PID
|
mrc p15, 0, r4, c13, c0, 0 @ PID
|
||||||
|
@@ -171,7 +171,7 @@ ENTRY(cpu_sa1100_set_pte_ext)
|
|||||||
|
|
||||||
.globl cpu_sa1100_suspend_size
|
.globl cpu_sa1100_suspend_size
|
||||||
.equ cpu_sa1100_suspend_size, 4*4
|
.equ cpu_sa1100_suspend_size, 4*4
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM_SLEEP
|
||||||
ENTRY(cpu_sa1100_do_suspend)
|
ENTRY(cpu_sa1100_do_suspend)
|
||||||
stmfd sp!, {r4 - r7, lr}
|
stmfd sp!, {r4 - r7, lr}
|
||||||
mrc p15, 0, r4, c3, c0, 0 @ domain ID
|
mrc p15, 0, r4, c3, c0, 0 @ domain ID
|
||||||
|
@@ -124,7 +124,7 @@ ENTRY(cpu_v6_set_pte_ext)
|
|||||||
/* Suspend/resume support: taken from arch/arm/mach-s3c64xx/sleep.S */
|
/* Suspend/resume support: taken from arch/arm/mach-s3c64xx/sleep.S */
|
||||||
.globl cpu_v6_suspend_size
|
.globl cpu_v6_suspend_size
|
||||||
.equ cpu_v6_suspend_size, 4 * 8
|
.equ cpu_v6_suspend_size, 4 * 8
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM_SLEEP
|
||||||
ENTRY(cpu_v6_do_suspend)
|
ENTRY(cpu_v6_do_suspend)
|
||||||
stmfd sp!, {r4 - r11, lr}
|
stmfd sp!, {r4 - r11, lr}
|
||||||
mrc p15, 0, r4, c13, c0, 0 @ FCSE/PID
|
mrc p15, 0, r4, c13, c0, 0 @ FCSE/PID
|
||||||
|
@@ -211,7 +211,7 @@ cpu_v7_name:
|
|||||||
/* Suspend/resume support: derived from arch/arm/mach-s5pv210/sleep.S */
|
/* Suspend/resume support: derived from arch/arm/mach-s5pv210/sleep.S */
|
||||||
.globl cpu_v7_suspend_size
|
.globl cpu_v7_suspend_size
|
||||||
.equ cpu_v7_suspend_size, 4 * 8
|
.equ cpu_v7_suspend_size, 4 * 8
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM_SLEEP
|
||||||
ENTRY(cpu_v7_do_suspend)
|
ENTRY(cpu_v7_do_suspend)
|
||||||
stmfd sp!, {r4 - r11, lr}
|
stmfd sp!, {r4 - r11, lr}
|
||||||
mrc p15, 0, r4, c13, c0, 0 @ FCSE/PID
|
mrc p15, 0, r4, c13, c0, 0 @ FCSE/PID
|
||||||
|
@@ -417,7 +417,7 @@ ENTRY(cpu_xsc3_set_pte_ext)
|
|||||||
|
|
||||||
.globl cpu_xsc3_suspend_size
|
.globl cpu_xsc3_suspend_size
|
||||||
.equ cpu_xsc3_suspend_size, 4 * 8
|
.equ cpu_xsc3_suspend_size, 4 * 8
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM_SLEEP
|
||||||
ENTRY(cpu_xsc3_do_suspend)
|
ENTRY(cpu_xsc3_do_suspend)
|
||||||
stmfd sp!, {r4 - r10, lr}
|
stmfd sp!, {r4 - r10, lr}
|
||||||
mrc p14, 0, r4, c6, c0, 0 @ clock configuration, for turbo mode
|
mrc p14, 0, r4, c6, c0, 0 @ clock configuration, for turbo mode
|
||||||
|
@@ -518,7 +518,7 @@ ENTRY(cpu_xscale_set_pte_ext)
|
|||||||
|
|
||||||
.globl cpu_xscale_suspend_size
|
.globl cpu_xscale_suspend_size
|
||||||
.equ cpu_xscale_suspend_size, 4 * 7
|
.equ cpu_xscale_suspend_size, 4 * 7
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM_SLEEP
|
||||||
ENTRY(cpu_xscale_do_suspend)
|
ENTRY(cpu_xscale_do_suspend)
|
||||||
stmfd sp!, {r4 - r10, lr}
|
stmfd sp!, {r4 - r10, lr}
|
||||||
mrc p14, 0, r4, c6, c0, 0 @ clock configuration, for turbo mode
|
mrc p14, 0, r4, c6, c0, 0 @ clock configuration, for turbo mode
|
||||||
|
@@ -78,6 +78,14 @@ static void vfp_thread_exit(struct thread_info *thread)
|
|||||||
put_cpu();
|
put_cpu();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void vfp_thread_copy(struct thread_info *thread)
|
||||||
|
{
|
||||||
|
struct thread_info *parent = current_thread_info();
|
||||||
|
|
||||||
|
vfp_sync_hwstate(parent);
|
||||||
|
thread->vfpstate = parent->vfpstate;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* When this function is called with the following 'cmd's, the following
|
* When this function is called with the following 'cmd's, the following
|
||||||
* is true while this function is being run:
|
* is true while this function is being run:
|
||||||
@@ -104,12 +112,17 @@ static void vfp_thread_exit(struct thread_info *thread)
|
|||||||
static int vfp_notifier(struct notifier_block *self, unsigned long cmd, void *v)
|
static int vfp_notifier(struct notifier_block *self, unsigned long cmd, void *v)
|
||||||
{
|
{
|
||||||
struct thread_info *thread = v;
|
struct thread_info *thread = v;
|
||||||
|
u32 fpexc;
|
||||||
|
#ifdef CONFIG_SMP
|
||||||
|
unsigned int cpu;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (likely(cmd == THREAD_NOTIFY_SWITCH)) {
|
switch (cmd) {
|
||||||
u32 fpexc = fmrx(FPEXC);
|
case THREAD_NOTIFY_SWITCH:
|
||||||
|
fpexc = fmrx(FPEXC);
|
||||||
|
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
unsigned int cpu = thread->cpu;
|
cpu = thread->cpu;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* On SMP, if VFP is enabled, save the old state in
|
* On SMP, if VFP is enabled, save the old state in
|
||||||
@@ -134,13 +147,20 @@ static int vfp_notifier(struct notifier_block *self, unsigned long cmd, void *v)
|
|||||||
* old state.
|
* old state.
|
||||||
*/
|
*/
|
||||||
fmxr(FPEXC, fpexc & ~FPEXC_EN);
|
fmxr(FPEXC, fpexc & ~FPEXC_EN);
|
||||||
return NOTIFY_DONE;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
if (cmd == THREAD_NOTIFY_FLUSH)
|
case THREAD_NOTIFY_FLUSH:
|
||||||
vfp_thread_flush(thread);
|
vfp_thread_flush(thread);
|
||||||
else
|
break;
|
||||||
|
|
||||||
|
case THREAD_NOTIFY_EXIT:
|
||||||
vfp_thread_exit(thread);
|
vfp_thread_exit(thread);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case THREAD_NOTIFY_COPY:
|
||||||
|
vfp_thread_copy(thread);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
return NOTIFY_DONE;
|
return NOTIFY_DONE;
|
||||||
}
|
}
|
||||||
|
@@ -25,6 +25,8 @@
|
|||||||
|
|
||||||
#include <mach/balloon3.h>
|
#include <mach/balloon3.h>
|
||||||
|
|
||||||
|
#include <asm/mach-types.h>
|
||||||
|
|
||||||
#include "soc_common.h"
|
#include "soc_common.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -127,6 +129,9 @@ static int __init balloon3_pcmcia_init(void)
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
if (!machine_is_balloon3())
|
||||||
|
return -ENODEV;
|
||||||
|
|
||||||
balloon3_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1);
|
balloon3_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1);
|
||||||
if (!balloon3_pcmcia_device)
|
if (!balloon3_pcmcia_device)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
@@ -69,15 +69,15 @@ static int trizeps_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
|
|||||||
for (i = 0; i < ARRAY_SIZE(irqs); i++) {
|
for (i = 0; i < ARRAY_SIZE(irqs); i++) {
|
||||||
if (irqs[i].sock != skt->nr)
|
if (irqs[i].sock != skt->nr)
|
||||||
continue;
|
continue;
|
||||||
if (gpio_request(IRQ_TO_GPIO(irqs[i].irq), irqs[i].str) < 0) {
|
if (gpio_request(irq_to_gpio(irqs[i].irq), irqs[i].str) < 0) {
|
||||||
pr_err("%s: sock %d unable to request gpio %d\n",
|
pr_err("%s: sock %d unable to request gpio %d\n",
|
||||||
__func__, skt->nr, IRQ_TO_GPIO(irqs[i].irq));
|
__func__, skt->nr, irq_to_gpio(irqs[i].irq));
|
||||||
ret = -EBUSY;
|
ret = -EBUSY;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
if (gpio_direction_input(IRQ_TO_GPIO(irqs[i].irq)) < 0) {
|
if (gpio_direction_input(irq_to_gpio(irqs[i].irq)) < 0) {
|
||||||
pr_err("%s: sock %d unable to set input gpio %d\n",
|
pr_err("%s: sock %d unable to set input gpio %d\n",
|
||||||
__func__, skt->nr, IRQ_TO_GPIO(irqs[i].irq));
|
__func__, skt->nr, irq_to_gpio(irqs[i].irq));
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
@@ -86,7 +86,7 @@ static int trizeps_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
|
|||||||
|
|
||||||
error:
|
error:
|
||||||
for (; i >= 0; i--) {
|
for (; i >= 0; i--) {
|
||||||
gpio_free(IRQ_TO_GPIO(irqs[i].irq));
|
gpio_free(irq_to_gpio(irqs[i].irq));
|
||||||
}
|
}
|
||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
@@ -97,7 +97,7 @@ static void trizeps_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt)
|
|||||||
/* free allocated gpio's */
|
/* free allocated gpio's */
|
||||||
gpio_free(GPIO_PRDY);
|
gpio_free(GPIO_PRDY);
|
||||||
for (i = 0; i < ARRAY_SIZE(irqs); i++)
|
for (i = 0; i < ARRAY_SIZE(irqs); i++)
|
||||||
gpio_free(IRQ_TO_GPIO(irqs[i].irq));
|
gpio_free(irq_to_gpio(irqs[i].irq));
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned long trizeps_pcmcia_status[2];
|
static unsigned long trizeps_pcmcia_status[2];
|
||||||
@@ -226,6 +226,9 @@ static int __init trizeps_pcmcia_init(void)
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
if (!machine_is_trizeps4() && !machine_is_trizeps4wl())
|
||||||
|
return -ENODEV;
|
||||||
|
|
||||||
trizeps_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1);
|
trizeps_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1);
|
||||||
if (!trizeps_pcmcia_device)
|
if (!trizeps_pcmcia_device)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
@@ -1648,7 +1648,9 @@ pxafb_freq_transition(struct notifier_block *nb, unsigned long val, void *data)
|
|||||||
|
|
||||||
switch (val) {
|
switch (val) {
|
||||||
case CPUFREQ_PRECHANGE:
|
case CPUFREQ_PRECHANGE:
|
||||||
if (!fbi->overlay[0].usage && !fbi->overlay[1].usage)
|
#ifdef CONFIG_FB_PXA_OVERLAY
|
||||||
|
if (!(fbi->overlay[0].usage || fbi->overlay[1].usage))
|
||||||
|
#endif
|
||||||
set_ctrlr_state(fbi, C_DISABLE_CLKCHANGE);
|
set_ctrlr_state(fbi, C_DISABLE_CLKCHANGE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user