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

Commit 9ef9dc69 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm

* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (44 commits)
  [ARM] 4822/1: RealView: Change the REALVIEW_MPCORE configuration option
  [ARM] 4821/1: RealView: Remove the platform dependencies from localtimer.c
  [ARM] 4820/1: RealView: Select the timer IRQ at run-time
  [ARM] 4819/1: RealView: Fix entry-macro.S to work with multiple platforms
  [ARM] 4818/1: RealView: Add core-tile detection
  [ARM] 4817/1: RealView: Move the AMBA resource definitions to realview_eb.c
  [ARM] 4816/1: RealView: Move the platform-specific definitions into board-eb.h
  [ARM] 4815/1: RealView: Add clockevents suport for the local timers
  [ARM] 4814/1: RealView: Add broadcasting clockevents support for ARM11MPCore
  [ARM] 4813/1: Add SMP helper functions for clockevents support
  [ARM] 4812/1: RealView: clockevents support for the RealView platforms
  [ARM] 4811/1: RealView: clocksource support for the RealView platforms
  [ARM] 4736/1: Export atags to userspace and allow kexec to use customised atags
  [ARM] 4798/1: pcm027: fix missing header file
  [ARM] 4803/1: pxa: fix building issue of poodle.c caused by patch 4737/1
  [ARM] 4801/1: pxa: fix building issues of missing pxa2xx-regs.h
  [ARM] pxa: introduce sysdev for pxa3xx static memory controller
  [ARM] pxa: add preliminary suspend/resume code for pxa3xx
  [ARM] pxa: introduce sysdev for GPIO register saving/restoring
  [ARM] pxa: introduce sysdev for IRQ register saving/restoring
  ...
parents 2c8296f8 0d899e1b
Loading
Loading
Loading
Loading
+16 −2
Original line number Diff line number Diff line
@@ -35,6 +35,11 @@ config GENERIC_CLOCKEVENTS
	bool
	default n

config GENERIC_CLOCKEVENTS_BROADCAST
	bool
	depends on GENERIC_CLOCKEVENTS
	default y if SMP && !LOCAL_TIMERS

config MMU
	bool
	default y
@@ -187,6 +192,8 @@ config ARCH_REALVIEW
	bool "ARM Ltd. RealView family"
	select ARM_AMBA
	select ICST307
	select GENERIC_TIME
	select GENERIC_CLOCKEVENTS
	help
	  This enables support for ARM Ltd RealView boards.

@@ -623,7 +630,7 @@ source "kernel/time/Kconfig"

config SMP
	bool "Symmetric Multi-Processing (EXPERIMENTAL)"
	depends on EXPERIMENTAL && REALVIEW_MPCORE
	depends on EXPERIMENTAL && REALVIEW_EB_ARM11MP
	help
	  This enables support for systems with more than one CPU. If you have
	  a system with only one CPU, like most personal computers, say N. If
@@ -656,7 +663,7 @@ config HOTPLUG_CPU

config LOCAL_TIMERS
	bool "Use local timer interrupts"
	depends on SMP && REALVIEW_MPCORE
	depends on SMP && REALVIEW_EB_ARM11MP
	default y
	help
	  Enable support for local timers on SMP platforms, rather then the
@@ -912,6 +919,13 @@ config KEXEC
	  initially work for you.  It may help to enable device hotplugging
	  support.

config ATAGS_PROC
	bool "Export atags in procfs"
	default n
	help
	  Should the atags used to boot the kernel be exported in an "atags"
	  file in procfs. Useful with kexec.

endmenu

if (ARCH_SA1100 || ARCH_INTEGRATOR || ARCH_OMAP || ARCH_IMX || ARCH_PXA)
+0 −2
Original line number Diff line number Diff line
@@ -69,9 +69,7 @@ void __init ioctime_init(void)
static irqreturn_t
ioc_timer_interrupt(int irq, void *dev_id)
{
	write_seqlock(&xtime_lock);
	timer_tick();
	write_sequnlock(&xtime_lock);
	return IRQ_HANDLED;
}

+649 −333

File changed.

Preview size limit exceeded, changes collapsed.

+1 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ obj-$(CONFIG_PCI) += bios32.o isa.o
obj-$(CONFIG_SMP)		+= smp.o
obj-$(CONFIG_KEXEC)		+= machine_kexec.o relocate_kernel.o
obj-$(CONFIG_KPROBES)		+= kprobes.o kprobes-decode.o
obj-$(CONFIG_ATAGS_PROC)	+= atags.o
obj-$(CONFIG_OABI_COMPAT)	+= sys_oabi-compat.o

obj-$(CONFIG_CRUNCH)		+= crunch.o crunch-bits.o
+86 −0
Original line number Diff line number Diff line
#include <linux/slab.h>
#include <linux/kexec.h>
#include <linux/proc_fs.h>
#include <asm/setup.h>
#include <asm/types.h>
#include <asm/page.h>

struct buffer {
	size_t size;
	char *data;
};
static struct buffer tags_buffer;

static int
read_buffer(char* page, char** start, off_t off, int count,
	int* eof, void* data)
{
	struct buffer *buffer = (struct buffer *)data;

	if (off >= buffer->size) {
		*eof = 1;
		return 0;
	}

	count = min((int) (buffer->size - off), count);

	memcpy(page, &buffer->data[off], count);

	return count;
}


static int
create_proc_entries(void)
{
	struct proc_dir_entry* tags_entry;

	tags_entry = create_proc_read_entry("atags", 0400, &proc_root, read_buffer, &tags_buffer);
	if (!tags_entry)
		return -ENOMEM;

	return 0;
}


static char __initdata atags_copy_buf[KEXEC_BOOT_PARAMS_SIZE];
static char __initdata *atags_copy;

void __init save_atags(const struct tag *tags)
{
	atags_copy = atags_copy_buf;
	memcpy(atags_copy, tags, KEXEC_BOOT_PARAMS_SIZE);
}


static int __init init_atags_procfs(void)
{
	struct tag *tag;
	int error;

	if (!atags_copy) {
		printk(KERN_WARNING "Exporting ATAGs: No saved tags found\n");
		return -EIO;
	}

	for (tag = (struct tag *) atags_copy; tag->hdr.size; tag = tag_next(tag))
		;

	tags_buffer.size = ((char *) tag - atags_copy) + sizeof(tag->hdr);
	tags_buffer.data = kmalloc(tags_buffer.size, GFP_KERNEL);
	if (tags_buffer.data == NULL)
		return -ENOMEM;
	memcpy(tags_buffer.data, atags_copy, tags_buffer.size);

	error = create_proc_entries();
	if (error) {
		printk(KERN_ERR "Exporting ATAGs: not enough memory\n");
		kfree(tags_buffer.data);
		tags_buffer.size = 0;
		tags_buffer.data = NULL;
	}

	return error;
}

arch_initcall(init_atags_procfs);
Loading