Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d6099aeb authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull ARM fixes from Russell King:
 "Some more ARM fixes, nothing particularly major here.  The biggest
  change is to fix the SMP_ON_UP code so that it works with TI's Aegis
  cores"

* 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
  ARM: 7851/1: check for number of arguments in syscall_get/set_arguments()
  ARM: 7846/1: Update SMP_ON_UP code to detect A9MPCore with 1 CPU devices
  ARM: 7845/1: sharpsl_param.c: fix invalid memory access for pxa devices
  ARM: 7843/1: drop asm/types.h from generic-y
  ARM: 7842/1: MCPM: don't explode if invoked without being initialized first
parents 4b60667a 3c1532df
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -51,7 +51,8 @@ void mcpm_cpu_power_down(void)
{
	phys_reset_t phys_reset;

	BUG_ON(!platform_ops);
	if (WARN_ON_ONCE(!platform_ops || !platform_ops->power_down))
		return;
	BUG_ON(!irqs_disabled());

	/*
@@ -93,7 +94,8 @@ void mcpm_cpu_suspend(u64 expected_residency)
{
	phys_reset_t phys_reset;

	BUG_ON(!platform_ops);
	if (WARN_ON_ONCE(!platform_ops || !platform_ops->suspend))
		return;
	BUG_ON(!irqs_disabled());

	/* Very similar to mcpm_cpu_power_down() */
+4 −1
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
#include <linux/module.h>
#include <linux/string.h>
#include <asm/mach/sharpsl_param.h>
#include <asm/memory.h>

/*
 * Certain hardware parameters determined at the time of device manufacture,
@@ -25,8 +26,10 @@
 */
#ifdef CONFIG_ARCH_SA1100
#define PARAM_BASE	0xe8ffc000
#define param_start(x)	(void *)(x)
#else
#define PARAM_BASE	0xa0000a00
#define param_start(x)	__va(x)
#endif
#define MAGIC_CHG(a,b,c,d) ( ( d << 24 ) | ( c << 16 )  | ( b << 8 ) | a )

@@ -41,7 +44,7 @@ EXPORT_SYMBOL(sharpsl_param);

void sharpsl_save_param(void)
{
	memcpy(&sharpsl_param, (void *)PARAM_BASE, sizeof(struct sharpsl_param_info));
	memcpy(&sharpsl_param, param_start(PARAM_BASE), sizeof(struct sharpsl_param_info));

	if (sharpsl_param.comadj_keyword != COMADJ_MAGIC)
		sharpsl_param.comadj=-1;
+0 −1
Original line number Diff line number Diff line
@@ -31,5 +31,4 @@ generic-y += termbits.h
generic-y += termios.h
generic-y += timex.h
generic-y += trace_clock.h
generic-y += types.h
generic-y += unaligned.h
+10 −4
Original line number Diff line number Diff line
@@ -76,8 +76,11 @@ int mcpm_cpu_power_up(unsigned int cpu, unsigned int cluster);
 *
 * This must be called with interrupts disabled.
 *
 * This does not return.  Re-entry in the kernel is expected via
 * mcpm_entry_point.
 * On success this does not return.  Re-entry in the kernel is expected
 * via mcpm_entry_point.
 *
 * This will return if mcpm_platform_register() has not been called
 * previously in which case the caller should take appropriate action.
 */
void mcpm_cpu_power_down(void);

@@ -98,8 +101,11 @@ void mcpm_cpu_power_down(void);
 *
 * This must be called with interrupts disabled.
 *
 * This does not return.  Re-entry in the kernel is expected via
 * mcpm_entry_point.
 * On success this does not return.  Re-entry in the kernel is expected
 * via mcpm_entry_point.
 *
 * This will return if mcpm_platform_register() has not been called
 * previously in which case the caller should take appropriate action.
 */
void mcpm_cpu_suspend(u64 expected_residency);

+6 −0
Original line number Diff line number Diff line
@@ -57,6 +57,9 @@ static inline void syscall_get_arguments(struct task_struct *task,
					 unsigned int i, unsigned int n,
					 unsigned long *args)
{
	if (n == 0)
		return;

	if (i + n > SYSCALL_MAX_ARGS) {
		unsigned long *args_bad = args + SYSCALL_MAX_ARGS - i;
		unsigned int n_bad = n + i - SYSCALL_MAX_ARGS;
@@ -81,6 +84,9 @@ static inline void syscall_set_arguments(struct task_struct *task,
					 unsigned int i, unsigned int n,
					 const unsigned long *args)
{
	if (n == 0)
		return;

	if (i + n > SYSCALL_MAX_ARGS) {
		pr_warning("%s called with max args %d, handling only %d\n",
			   __func__, i + n, SYSCALL_MAX_ARGS);
Loading