All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/13] Misc cleanup patches to prepare for unified zImage
@ 2010-07-13 15:33 Eric Miao
  2010-07-13 15:33 ` [PATCH 01/13] [ARM] Introduce 'struct machine_class' for SoC level abstraction Eric Miao
                   ` (12 more replies)
  0 siblings, 13 replies; 18+ messages in thread
From: Eric Miao @ 2010-07-13 15:33 UTC (permalink / raw)
  To: linux-arm-kernel

Ideas when converting those conflicting symbols:

1. Keep the original one as much as possible
2. Introduce an alternative global variable when it's not already defined
3. Kconfig option to control if header file needs to be included (if no
   other way around)

Preliminary at this moment, just RFC.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 01/13] [ARM] Introduce 'struct machine_class' for SoC level abstraction
  2010-07-13 15:33 [RFC PATCH 0/13] Misc cleanup patches to prepare for unified zImage Eric Miao
@ 2010-07-13 15:33 ` Eric Miao
  2010-07-13 15:33 ` [PATCH 02/13] [ARM] Allow machine to specify it's own IRQ handlers at run-time Eric Miao
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Eric Miao @ 2010-07-13 15:33 UTC (permalink / raw)
  To: linux-arm-kernel

Introduce 'struct machine_class' to group common elements shared by a
class of machines (i.e. normally SoC level). The elements in 'struct
machine_desc' will override if provided. (Note zero is considered
invalid for phys_io, io_pg_offst and boot_params, and if they are
zero, the version in 'class' will be used)

Signed-off-by: Eric Miao <eric.miao@canonical.com>
---
 arch/arm/include/asm/mach/arch.h |   20 ++++++++++++++++++++
 arch/arm/kernel/asm-offsets.c    |    4 ++++
 arch/arm/kernel/head-common.S    |    3 +++
 arch/arm/kernel/head.S           |    8 +++++++-
 arch/arm/kernel/setup.c          |   15 +++++++++++----
 arch/arm/mm/mmu.c                |    5 +++++
 6 files changed, 50 insertions(+), 5 deletions(-)

diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h
index dd15c0f..d43bdb5 100644
--- a/arch/arm/include/asm/mach/arch.h
+++ b/arch/arm/include/asm/mach/arch.h
@@ -14,6 +14,25 @@ struct tag;
 struct meminfo;
 struct sys_timer;
 
+/*
+ * 'struct machine_class' groups the common elements shared by a class
+ * of machines. The elements in 'struct machine_desc' will override if
+ * provided. (Note zero is considered invalid for phys_io, io_pg_offst
+ * and boot_params, and if they are zero, the version in 'class' will
+ * be used)
+ */
+struct machine_class {
+	unsigned int		phys_io;	/* start of physical io	*/
+	unsigned int		io_pg_offst;	/* byte offset for io
+						 * page tabe entry	*/
+	const char		*name;		/* machine class name	*/
+	unsigned long		boot_params;	/* tagged list		*/
+
+	void			(*map_io)(void);/* IO mapping function */
+	void			(*init_irq)(void);
+	struct sys_timer	*timer;
+};
+
 struct machine_desc {
 	/*
 	 * Note! The first four elements are used
@@ -26,6 +45,7 @@ struct machine_desc {
 						 * page tabe entry	*/
 
 	const char		*name;		/* architecture name	*/
+	struct machine_class	*class;		/* machine class */
 	unsigned long		boot_params;	/* tagged list		*/
 
 	unsigned int		video_start;	/* start of video RAM	*/
diff --git a/arch/arm/kernel/asm-offsets.c b/arch/arm/kernel/asm-offsets.c
index 8835115..5c9038a 100644
--- a/arch/arm/kernel/asm-offsets.c
+++ b/arch/arm/kernel/asm-offsets.c
@@ -101,6 +101,10 @@ int main(void)
   DEFINE(MACHINFO_NAME,		offsetof(struct machine_desc, name));
   DEFINE(MACHINFO_PHYSIO,	offsetof(struct machine_desc, phys_io));
   DEFINE(MACHINFO_PGOFFIO,	offsetof(struct machine_desc, io_pg_offst));
+  DEFINE(MACHINFO_CLASS,	offsetof(struct machine_desc, class));
+  BLANK();
+  DEFINE(MACHCLASS_PHYSIO,	offsetof(struct machine_class, phys_io));
+  DEFINE(MACHCLASS_PGOFFIO,	offsetof(struct machine_class, io_pg_offst));
   BLANK();
   DEFINE(PROC_INFO_SZ,		sizeof(struct proc_info_list));
   DEFINE(PROCINFO_INITFUNC,	offsetof(struct proc_info_list, __cpu_flush));
diff --git a/arch/arm/kernel/head-common.S b/arch/arm/kernel/head-common.S
index b9505aa..660756b 100644
--- a/arch/arm/kernel/head-common.S
+++ b/arch/arm/kernel/head-common.S
@@ -207,6 +207,7 @@ ENDPROC(lookup_processor_type)
  * Returns:
  *  r3, r4, r6 corrupted
  *  r5 = mach_info pointer in physical address space
+ *  r7 = machine_class pointer in physical address space
  */
 __lookup_machine_type:
 	adr	r3, 4b
@@ -214,6 +215,8 @@ __lookup_machine_type:
 	sub	r3, r3, r4			@ get offset between virt&phys
 	add	r5, r5, r3			@ convert virt addresses to
 	add	r6, r6, r3			@ physical address space
+	ldr	r7, [r5, #MACHINFO_CLASS]	@ get machine class
+	add	r7, r7, r3
 1:	ldr	r3, [r5, #MACHINFO_TYPE]	@ get machine type
 	teq	r3, r1				@ matches loader number?
 	beq	2f				@ found
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
index eb62bf9..974d19d 100644
--- a/arch/arm/kernel/head.S
+++ b/arch/arm/kernel/head.S
@@ -82,8 +82,9 @@ ENTRY(stext)
 	bl	__lookup_processor_type		@ r5=procinfo r9=cpuid
 	movs	r10, r5				@ invalid processor (r5=0)?
 	beq	__error_p			@ yes, error 'p'
-	bl	__lookup_machine_type		@ r5=machinfo
+	bl	__lookup_machine_type		@ r5=machinfo,r7=machine_class
 	movs	r8, r5				@ invalid machine (r5=0)?
+	mov	r11, r7
 	beq	__error_a			@ yes, error 'a'
 	bl	__vet_atags
 	bl	__create_page_tables
@@ -211,6 +212,7 @@ ENDPROC(__turn_mmu_on)
  * r8  = machinfo
  * r9  = cpuid
  * r10 = procinfo
+ * r11 = machine_class
  *
  * Returns:
  *  r0, r3, r6, r7 corrupted
@@ -296,12 +298,16 @@ __create_page_tables:
 	 * via a serial console before paging_init.
 	 */
 	ldr	r3, [r8, #MACHINFO_PGOFFIO]
+	cmp	r3, #0				@ use class->io_pg_offst if
+	ldreq	r3, [r11, #MACHCLASS_PGOFFIO]	@ mdesc->io_pg_offst == 0
 	add	r0, r4, r3
 	rsb	r3, r3, #0x4000			@ PTRS_PER_PGD*sizeof(long)
 	cmp	r3, #0x0800			@ limit to 512MB
 	movhi	r3, #0x0800
 	add	r6, r0, r3
 	ldr	r3, [r8, #MACHINFO_PHYSIO]
+	cmp	r3, #0				@ use class->phys_io if
+	ldreq	r3, [r11, #MACHINFO_PHYSIO]	@ mdesc->phys_io == 0
 	orr	r3, r3, r7
 1:	str	r3, [r0], #4
 	add	r3, r3, #1 << 20
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 55a5851..b5233ab 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -665,12 +665,14 @@ void __init setup_arch(char **cmdline_p)
 {
 	struct tag *tags = (struct tag *)&init_tags;
 	struct machine_desc *mdesc;
+	struct machine_class *class;
 	char *from = default_command_line;
 
 	unwind_init();
 
 	setup_processor();
 	mdesc = setup_machine(machine_arch_type);
+	class = mdesc->class;
 	machine_name = mdesc->name;
 
 	if (mdesc->soft_reboot)
@@ -678,8 +680,13 @@ void __init setup_arch(char **cmdline_p)
 
 	if (__atags_pointer)
 		tags = phys_to_virt(__atags_pointer);
-	else if (mdesc->boot_params)
-		tags = phys_to_virt(mdesc->boot_params);
+	else {
+		unsigned long boot_params = mdesc->boot_params ?
+					    mdesc->boot_params :
+					   (class ? class->boot_params: 0);
+		if (boot_params)
+			tags = phys_to_virt(boot_params);
+	}
 
 	/*
 	 * If we have the old style parameters, convert them to
@@ -730,8 +737,8 @@ void __init setup_arch(char **cmdline_p)
 	 * Set up various architecture-specific pointers
 	 */
 	arch_nr_irqs = mdesc->nr_irqs;
-	init_arch_irq = mdesc->init_irq;
-	system_timer = mdesc->timer;
+	init_arch_irq = mdesc->init_irq ? : (class ? class->init_irq : NULL);
+	system_timer = mdesc->timer ? : (class ? class->timer : NULL);
 	init_machine = mdesc->init_machine;
 
 #ifdef CONFIG_VT
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index f61c21c..2b7c474 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -868,6 +868,7 @@ void __init arm_mm_lmb_reserve(void)
  */
 static void __init devicemaps_init(struct machine_desc *mdesc)
 {
+	struct machine_class *class = mdesc->class;
 	struct map_desc map;
 	unsigned long addr;
 	void *vectors;
@@ -932,6 +933,10 @@ static void __init devicemaps_init(struct machine_desc *mdesc)
 	 */
 	if (mdesc->map_io)
 		mdesc->map_io();
+	else {
+		if (class && class->map_io)
+			class->map_io();
+	}
 
 	/*
 	 * Finally flush the caches and tlb to ensure that we're in a
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 02/13] [ARM] Allow machine to specify it's own IRQ handlers at run-time
  2010-07-13 15:33 [RFC PATCH 0/13] Misc cleanup patches to prepare for unified zImage Eric Miao
  2010-07-13 15:33 ` [PATCH 01/13] [ARM] Introduce 'struct machine_class' for SoC level abstraction Eric Miao
@ 2010-07-13 15:33 ` Eric Miao
  2010-07-13 15:33 ` [PATCH 03/13] [ARM] Define a default minimum NR_IRQS when SPARSE_IRQ is selected Eric Miao
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Eric Miao @ 2010-07-13 15:33 UTC (permalink / raw)
  To: linux-arm-kernel

Normally different ARM platform has different way to decode the IRQ
hardware status and demultiplex to the corresponding IRQ handler.
This is highly optimized by macro irq_handler in entry-armv.S, and
each machine class defines their own macro to decode the IRQ number.
However, this prevents multiple machine classes to be built into a
single kernel.

By allowing each machine to specify thier own handler, and making
function pointer 'handle_arch_irq' to point to it at run time, this
can be solved. And introduce CONFIG_MULTI_IRQ_HANDLER to allow both
solutions to work.

Comparing with the highly optimized macro of irq_handler, the new
function must be written with care not to lose too much performance.
And the IPI stuff on SMP is expected to move to the provided arch
IRQ handler as well.

Signed-off-by: Eric Miao <eric.miao@canonical.com>
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
---
 arch/arm/Kconfig                 |    5 +++++
 arch/arm/include/asm/mach/arch.h |    3 +++
 arch/arm/include/asm/mach/irq.h  |    4 ++++
 arch/arm/kernel/entry-armv.S     |   15 +++++++++++++++
 arch/arm/kernel/setup.c          |    6 ++++++
 5 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 1243099..926e3fa 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -957,6 +957,11 @@ config CPU_HAS_PMU
 	default y
 	bool
 
+config MULTI_IRQ_HANDLER
+	bool
+	help
+	  Allow each machine to specify it's own IRQ handler at run time.
+
 if !MMU
 source "arch/arm/Kconfig-nommu"
 endif
diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h
index d43bdb5..8562ed6 100644
--- a/arch/arm/include/asm/mach/arch.h
+++ b/arch/arm/include/asm/mach/arch.h
@@ -31,6 +31,9 @@ struct machine_class {
 	void			(*map_io)(void);/* IO mapping function */
 	void			(*init_irq)(void);
 	struct sys_timer	*timer;
+#ifdef CONFIG_MULTI_IRQ_HANDLER
+	void			(*handle_irq)(struct pt_regs *);
+#endif
 };
 
 struct machine_desc {
diff --git a/arch/arm/include/asm/mach/irq.h b/arch/arm/include/asm/mach/irq.h
index ce3eee9..6ecdad9 100644
--- a/arch/arm/include/asm/mach/irq.h
+++ b/arch/arm/include/asm/mach/irq.h
@@ -22,6 +22,10 @@ extern void (*init_arch_irq)(void);
 extern void init_FIQ(void);
 extern int show_fiq_list(struct seq_file *, void *);
 
+#ifdef CONFIG_MULTI_IRQ_HANDLER
+extern void (*handle_arch_irq)(struct pt_regs *);
+#endif
+
 /*
  * This is for easy migration, but should be changed in the source
  */
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index 7ee48e7..ecb8492 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -28,6 +28,7 @@
 /*
  * Interrupt handling.  Preserves r7, r8, r9
  */
+#ifndef CONFIG_MULTI_IRQ_HANDLER
 	.macro	irq_handler
 	get_irqnr_preamble r5, lr
 1:	get_irqnr_and_base r0, r6, r5, lr
@@ -59,6 +60,14 @@
 #endif
 
 	.endm
+#else
+	.macro	irq_handler
+	ldr	r4, =handle_arch_irq
+	mov	r0, sp
+	mov	lr, pc
+	ldr	pc, [r4]
+	.endm
+#endif	/* CONFIG_MULTI_IRQ_HANDLER */
 
 #ifdef CONFIG_KPROBES
 	.section	.kprobes.text,"ax",%progbits
@@ -1251,3 +1260,9 @@ cr_alignment:
 	.space	4
 cr_no_alignment:
 	.space	4
+
+#ifdef CONFIG_MULTI_IRQ_HANDLER
+	.globl	handle_arch_irq
+handle_arch_irq:
+	.long	0
+#endif
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index b5233ab..b6a0262 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -741,6 +741,12 @@ void __init setup_arch(char **cmdline_p)
 	system_timer = mdesc->timer ? : (class ? class->timer : NULL);
 	init_machine = mdesc->init_machine;
 
+#ifdef CONFIG_MULTI_IRQ_HANDLER
+	handle_arch_irq = class ? class->handle_irq : NULL;
+	if (!handle_arch_irq)
+		panic("No machine class specific IRQ handler defined\n");
+#endif
+
 #ifdef CONFIG_VT
 #if defined(CONFIG_VGA_CONSOLE)
 	conswitchp = &vga_con;
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 03/13] [ARM] Define a default minimum NR_IRQS when SPARSE_IRQ is selected
  2010-07-13 15:33 [RFC PATCH 0/13] Misc cleanup patches to prepare for unified zImage Eric Miao
  2010-07-13 15:33 ` [PATCH 01/13] [ARM] Introduce 'struct machine_class' for SoC level abstraction Eric Miao
  2010-07-13 15:33 ` [PATCH 02/13] [ARM] Allow machine to specify it's own IRQ handlers at run-time Eric Miao
@ 2010-07-13 15:33 ` Eric Miao
  2010-07-13 15:33 ` [PATCH 04/13] [ARM] Introduce ARCH_USES_DEFAULT_IO_H to use default asm/io.h Eric Miao
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Eric Miao @ 2010-07-13 15:33 UTC (permalink / raw)
  To: linux-arm-kernel

When SPARSE_IRQ is selected, platforms should define their own number of
IRQs. A default minimum NR_IRQS is defined.  And #include <mach/irqs.h>
only when SPARSE_IRQ is not selected.

Signed-off-by: Eric Miao <eric.miao@canonical.com>
---
 arch/arm/include/asm/irq.h |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/arch/arm/include/asm/irq.h b/arch/arm/include/asm/irq.h
index 2721a58..bf1c42e 100644
--- a/arch/arm/include/asm/irq.h
+++ b/arch/arm/include/asm/irq.h
@@ -1,8 +1,6 @@
 #ifndef __ASM_ARM_IRQ_H
 #define __ASM_ARM_IRQ_H
 
-#include <mach/irqs.h>
-
 #ifndef irq_canonicalize
 #define irq_canonicalize(i)	(i)
 #endif
@@ -10,6 +8,16 @@
 #define NR_IRQS_LEGACY	16
 
 /*
+ * A minimum NR_IRQS is defined when CONFIG_SPARSE_IRQ is enabled.
+ * And platforms should define their own number of IRQs.
+ */
+#ifdef CONFIG_SPARSE_IRQ
+#define NR_IRQS		(NR_IRQS_LEGACY)
+#else
+#include <mach/irqs.h>
+#endif
+
+/*
  * Use this value to indicate lack of interrupt
  * capability
  */
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 04/13] [ARM] Introduce ARCH_USES_DEFAULT_IO_H to use default asm/io.h
  2010-07-13 15:33 [RFC PATCH 0/13] Misc cleanup patches to prepare for unified zImage Eric Miao
                   ` (2 preceding siblings ...)
  2010-07-13 15:33 ` [PATCH 03/13] [ARM] Define a default minimum NR_IRQS when SPARSE_IRQ is selected Eric Miao
@ 2010-07-13 15:33 ` Eric Miao
  2010-07-13 15:33 ` [PATCH 05/13] [ARM] Introduce machine specific adjust_zones() Eric Miao
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Eric Miao @ 2010-07-13 15:33 UTC (permalink / raw)
  To: linux-arm-kernel

For those machines that can just use the default definitions in asm/io.h,
there is no need to have a machine specific mach/io.h. Introduce an config
option for them.

Signed-off-by: Eric Miao <eric.miao@canonical.com>
---
 arch/arm/Kconfig          |    3 +++
 arch/arm/include/asm/io.h |    6 ++++++
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 926e3fa..70221ef 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -50,6 +50,9 @@ config ARCH_USES_GETTIMEOFFSET
 	bool
 	default n
 
+config ARCH_USES_DEFAULT_IO_H
+	def_bool n
+
 config GENERIC_CLOCKEVENTS
 	bool
 
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
index c980156..c59bb28 100644
--- a/arch/arm/include/asm/io.h
+++ b/arch/arm/include/asm/io.h
@@ -97,7 +97,13 @@ static inline void __iomem *__typesafe_io(unsigned long addr)
 /*
  * Now, pick up the machine-defined IO definitions
  */
+#ifndef CONFIG_ARCH_USES_DEFAULT_IO_H
 #include <mach/io.h>
+#else
+#define IO_SPACE_LIMIT	0xffffffff
+#define __io(a)		__typesafe_io(a)
+#define __mem_pci(a)	(a)
+#endif
 
 /*
  *  IO port access primitives
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 05/13] [ARM] Introduce machine specific adjust_zones()
  2010-07-13 15:33 [RFC PATCH 0/13] Misc cleanup patches to prepare for unified zImage Eric Miao
                   ` (3 preceding siblings ...)
  2010-07-13 15:33 ` [PATCH 04/13] [ARM] Introduce ARCH_USES_DEFAULT_IO_H to use default asm/io.h Eric Miao
@ 2010-07-13 15:33 ` Eric Miao
  2010-07-13 15:33 ` [PATCH 06/13] [ARM] Allow MAX_DMA_ADDRESS and ISA_DMA_THRESHOLD to be variables Eric Miao
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Eric Miao @ 2010-07-13 15:33 UTC (permalink / raw)
  To: linux-arm-kernel

Add machine specific 'adjust_zones' to 'struct machine_desc', and
fall back to arch_adjust_zones() if it's defined.

Signed-off-by: Eric Miao <eric.miao@canonical.com>
---
 arch/arm/include/asm/mach/arch.h |    2 ++
 arch/arm/mm/init.c               |   12 ++++++++----
 arch/arm/mm/mmu.c                |    2 +-
 3 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h
index 8562ed6..0422d84 100644
--- a/arch/arm/include/asm/mach/arch.h
+++ b/arch/arm/include/asm/mach/arch.h
@@ -66,6 +66,8 @@ struct machine_desc {
 	void			(*init_irq)(void);
 	struct sys_timer	*timer;		/* system tick timer	*/
 	void			(*init_machine)(void);
+	void			(*adjust_zones)(unsigned long *,
+						unsigned long *);
 };
 
 /*
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 2dd5a51..bfa4556 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -191,7 +191,8 @@ static void __init arm_bootmem_init(struct meminfo *mi,
 }
 
 static void __init arm_bootmem_free(struct meminfo *mi, unsigned long min,
-	unsigned long max_low, unsigned long max_high)
+	unsigned long max_low, unsigned long max_high,
+	struct machine_desc *mdesc)
 {
 	unsigned long zone_size[MAX_NR_ZONES], zhole_size[MAX_NR_ZONES];
 	int i;
@@ -229,7 +230,10 @@ static void __init arm_bootmem_free(struct meminfo *mi, unsigned long min,
 	 * Adjust the sizes according to any special requirements for
 	 * this machine type.
 	 */
-	arch_adjust_zones(zone_size, zhole_size);
+	if (mdesc->adjust_zones)
+		mdesc->adjust_zones(zone_size, zhole_size);
+	else
+		arch_adjust_zones(zone_size, zhole_size);
 
 	free_area_init_node(0, zone_size, min, zhole_size);
 }
@@ -301,7 +305,7 @@ void __init arm_lmb_init(struct meminfo *mi, struct machine_desc *mdesc)
 	lmb_dump_all();
 }
 
-void __init bootmem_init(void)
+void __init bootmem_init(struct machine_desc *mdesc)
 {
 	struct meminfo *mi = &meminfo;
 	unsigned long min, max_low, max_high;
@@ -328,7 +332,7 @@ void __init bootmem_init(void)
 	 * the sparse mem_map arrays initialized by sparse_init()
 	 * for memmap_init_zone(), otherwise all PFNs are invalid.
 	 */
-	arm_bootmem_free(mi, min, max_low, max_high);
+	arm_bootmem_free(mi, min, max_low, max_high, mdesc);
 
 	high_memory = __va((max_low << PAGE_SHIFT) - 1) + 1;
 
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 2b7c474..b0a4587 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -1011,7 +1011,7 @@ void __init paging_init(struct machine_desc *mdesc)
 	/* allocate the zero page. */
 	zero_page = early_alloc(PAGE_SIZE);
 
-	bootmem_init();
+	bootmem_init(mdesc);
 
 	empty_zero_page = virt_to_page(zero_page);
 	__flush_dcache_page(NULL, empty_zero_page);
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 06/13] [ARM] Allow MAX_DMA_ADDRESS and ISA_DMA_THRESHOLD to be variables
  2010-07-13 15:33 [RFC PATCH 0/13] Misc cleanup patches to prepare for unified zImage Eric Miao
                   ` (4 preceding siblings ...)
  2010-07-13 15:33 ` [PATCH 05/13] [ARM] Introduce machine specific adjust_zones() Eric Miao
@ 2010-07-13 15:33 ` Eric Miao
  2010-07-13 15:33 ` [PATCH 07/13] [ARM] Make PCIBIOS_* into global variables Eric Miao
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Eric Miao @ 2010-07-13 15:33 UTC (permalink / raw)
  To: linux-arm-kernel

If MAX_DMA_ADDRESS or ISA_DMA_THRESHOLD is not defined, they will be
defined as their variable couterparts, which are calculated from the
'isa_dma_size' field in 'struct machine_desc'.

Signed-off-by: Eric Miao <eric.miao@canonical.com>
---
 arch/arm/include/asm/dma.h       |    3 ++-
 arch/arm/include/asm/mach/arch.h |    1 +
 arch/arm/include/asm/memory.h    |    3 ++-
 arch/arm/kernel/setup.c          |    9 +++++++++
 4 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/arch/arm/include/asm/dma.h b/arch/arm/include/asm/dma.h
index ca51143..daea8ac 100644
--- a/arch/arm/include/asm/dma.h
+++ b/arch/arm/include/asm/dma.h
@@ -7,7 +7,8 @@
  * This is the maximum virtual address which can be DMA'd from.
  */
 #ifndef MAX_DMA_ADDRESS
-#define MAX_DMA_ADDRESS	0xffffffff
+extern unsigned long max_dma_address;
+#define MAX_DMA_ADDRESS	(max_dma_address)
 #endif
 
 #ifdef CONFIG_ISA_DMA_API
diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h
index 0422d84..52bea4c 100644
--- a/arch/arm/include/asm/mach/arch.h
+++ b/arch/arm/include/asm/mach/arch.h
@@ -58,6 +58,7 @@ struct machine_desc {
 	unsigned int		reserve_lp1 :1;	/* never has lp1	*/
 	unsigned int		reserve_lp2 :1;	/* never has lp2	*/
 	unsigned int		soft_reboot :1;	/* soft reboot		*/
+	unsigned long		isa_dma_size;
 	void			(*fixup)(struct machine_desc *,
 					 struct tag *, char **,
 					 struct meminfo *);
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
index 82df0ae..a3ff72a 100644
--- a/arch/arm/include/asm/memory.h
+++ b/arch/arm/include/asm/memory.h
@@ -154,7 +154,8 @@
  * so a successful GFP_DMA allocation will always satisfy this.
  */
 #ifndef ISA_DMA_THRESHOLD
-#define ISA_DMA_THRESHOLD	(0xffffffffULL)
+extern unsigned long isa_dma_threshold;
+#define ISA_DMA_THRESHOLD	(isa_dma_threshold)
 #endif
 
 #ifndef arch_adjust_zones
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index b6a0262..295de99 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -89,6 +89,11 @@ EXPORT_SYMBOL(system_serial_high);
 unsigned int elf_hwcap;
 EXPORT_SYMBOL(elf_hwcap);
 
+unsigned long isa_dma_threshold = 0xffffffffUL;
+EXPORT_SYMBOL(isa_dma_threshold);
+
+unsigned long max_dma_address = 0xffffffffUL;
+EXPORT_SYMBOL(max_dma_address);
 
 #ifdef MULTI_CPU
 struct processor processor;
@@ -383,6 +388,10 @@ static struct machine_desc * __init setup_machine(unsigned int nr)
 
 	printk("Machine: %s\n", list->name);
 
+	if (list->isa_dma_size) {
+		isa_dma_threshold = PHYS_OFFSET + list->isa_dma_size - 1;
+		max_dma_address = PAGE_OFFSET + list->isa_dma_size;
+	}
 	return list;
 }
 
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 07/13] [ARM] Make PCIBIOS_* into global variables
  2010-07-13 15:33 [RFC PATCH 0/13] Misc cleanup patches to prepare for unified zImage Eric Miao
                   ` (5 preceding siblings ...)
  2010-07-13 15:33 ` [PATCH 06/13] [ARM] Allow MAX_DMA_ADDRESS and ISA_DMA_THRESHOLD to be variables Eric Miao
@ 2010-07-13 15:33 ` Eric Miao
  2010-07-13 15:33 ` [PATCH 08/13] [ARM] Make VMALLOC_END into a global variable if not defined Eric Miao
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Eric Miao @ 2010-07-13 15:33 UTC (permalink / raw)
  To: linux-arm-kernel

And initialized with pci_common_init(), so that now <asm/pci.h>
doesn't depend on <mach/hardware.h> any more.

Signed-off-by: Eric Miao <eric.miao@canonical.com>
---
 arch/arm/include/asm/mach/pci.h                  |    2 +-
 arch/arm/include/asm/pci.h                       |   13 ++++++++++++-
 arch/arm/kernel/bios32.c                         |   17 ++++++++++++++++-
 arch/arm/mach-dove/include/mach/hardware.h       |    2 --
 arch/arm/mach-dove/pcie.c                        |    2 +-
 arch/arm/mach-footbridge/cats-pci.c              |    3 ++-
 arch/arm/mach-footbridge/ebsa285-pci.c           |    4 +++-
 arch/arm/mach-footbridge/include/mach/hardware.h |    2 --
 arch/arm/mach-footbridge/netwinder-pci.c         |    4 +++-
 arch/arm/mach-footbridge/personal-pci.c          |    4 +++-
 arch/arm/mach-integrator/include/mach/hardware.h |    2 --
 arch/arm/mach-integrator/pci.c                   |    4 +++-
 arch/arm/mach-iop13xx/include/mach/hardware.h    |    2 --
 arch/arm/mach-iop13xx/iq81340mc.c                |    2 +-
 arch/arm/mach-iop13xx/iq81340sc.c                |    2 +-
 arch/arm/mach-iop32x/em7210.c                    |    2 +-
 arch/arm/mach-iop32x/glantank.c                  |    3 ++-
 arch/arm/mach-iop32x/include/mach/hardware.h     |    1 -
 arch/arm/mach-iop32x/iq31244.c                   |    6 ++++--
 arch/arm/mach-iop32x/iq80321.c                   |    3 ++-
 arch/arm/mach-iop32x/n2100.c                     |    2 +-
 arch/arm/mach-iop33x/include/mach/hardware.h     |    1 -
 arch/arm/mach-iop33x/iq80331.c                   |    3 ++-
 arch/arm/mach-iop33x/iq80332.c                   |    3 ++-
 arch/arm/mach-ixp2000/enp2611.c                  |    3 ++-
 arch/arm/mach-ixp2000/include/mach/hardware.h    |    2 --
 arch/arm/mach-ixp2000/ixdp2400.c                 |    3 ++-
 arch/arm/mach-ixp2000/ixdp2800.c                 |    3 ++-
 arch/arm/mach-ixp2000/ixdp2x01.c                 |    3 ++-
 arch/arm/mach-ixp23xx/include/mach/hardware.h    |    2 --
 arch/arm/mach-ixp23xx/ixdp2351.c                 |    3 ++-
 arch/arm/mach-ixp23xx/roadrunner.c               |    3 ++-
 arch/arm/mach-ixp4xx/avila-pci.c                 |    2 +-
 arch/arm/mach-ixp4xx/coyote-pci.c                |    3 ++-
 arch/arm/mach-ixp4xx/dsmg600-pci.c               |    3 ++-
 arch/arm/mach-ixp4xx/fsg-pci.c                   |    3 ++-
 arch/arm/mach-ixp4xx/gateway7001-pci.c           |    3 ++-
 arch/arm/mach-ixp4xx/goramo_mlr.c                |    3 ++-
 arch/arm/mach-ixp4xx/gtwx5715-pci.c              |    3 ++-
 arch/arm/mach-ixp4xx/include/mach/hardware.h     |    2 --
 arch/arm/mach-ixp4xx/ixdp425-pci.c               |    3 ++-
 arch/arm/mach-ixp4xx/ixdpg425-pci.c              |    3 ++-
 arch/arm/mach-ixp4xx/nas100d-pci.c               |    3 ++-
 arch/arm/mach-ixp4xx/nslu2-pci.c                 |    2 +-
 arch/arm/mach-ixp4xx/wg302v2-pci.c               |    3 ++-
 arch/arm/mach-kirkwood/include/mach/hardware.h   |    2 --
 arch/arm/mach-kirkwood/pcie.c                    |    4 +++-
 arch/arm/mach-ks8695/include/mach/hardware.h     |    2 --
 arch/arm/mach-ks8695/pci.c                       |    2 +-
 arch/arm/mach-orion5x/db88f5281-setup.c          |    4 +++-
 arch/arm/mach-orion5x/dns323-setup.c             |    4 +++-
 arch/arm/mach-orion5x/include/mach/hardware.h    |    2 --
 arch/arm/mach-orion5x/kurobox_pro-setup.c        |    4 +++-
 arch/arm/mach-orion5x/mss2-setup.c               |    3 ++-
 arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c     |    4 +++-
 arch/arm/mach-orion5x/rd88f5181l-ge-setup.c      |    4 +++-
 arch/arm/mach-orion5x/rd88f5182-setup.c          |    4 +++-
 arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c     |    4 +++-
 arch/arm/mach-orion5x/terastation_pro2-setup.c   |    3 ++-
 arch/arm/mach-orion5x/ts209-setup.c              |    4 +++-
 arch/arm/mach-orion5x/ts409-setup.c              |    4 +++-
 arch/arm/mach-orion5x/wnr854t-setup.c            |    4 +++-
 arch/arm/mach-orion5x/wrt350n-v2-setup.c         |    3 ++-
 arch/arm/mach-pxa/cm-x2xx-pci.c                  |    2 +-
 arch/arm/mach-pxa/include/mach/hardware.h        |    1 -
 arch/arm/mach-shark/include/mach/hardware.h      |    2 --
 arch/arm/mach-shark/pci.c                        |    3 ++-
 arch/arm/mach-versatile/include/mach/hardware.h  |    2 --
 arch/arm/mach-versatile/pci.c                    |    2 +-
 69 files changed, 138 insertions(+), 82 deletions(-)

diff --git a/arch/arm/include/asm/mach/pci.h b/arch/arm/include/asm/mach/pci.h
index 52f0da1..4c6b457 100644
--- a/arch/arm/include/asm/mach/pci.h
+++ b/arch/arm/include/asm/mach/pci.h
@@ -56,7 +56,7 @@ struct pci_sys_data {
 /*
  * Call this with your hw_pci struct to initialise the PCI system.
  */
-void pci_common_init(struct hw_pci *);
+void pci_common_init(struct hw_pci *, unsigned long, unsigned long, int);
 
 /*
  * PCI controllers
diff --git a/arch/arm/include/asm/pci.h b/arch/arm/include/asm/pci.h
index 92e2a83..b408c10 100644
--- a/arch/arm/include/asm/pci.h
+++ b/arch/arm/include/asm/pci.h
@@ -5,7 +5,18 @@
 #include <asm-generic/pci-dma-compat.h>
 
 #include <asm/mach/pci.h> /* for pci_sys_data */
-#include <mach/hardware.h> /* for PCIBIOS_MIN_* */
+
+extern unsigned long pcibios_min_io;
+extern unsigned long pcibios_min_mem;
+extern int pcibios_assign_all;
+
+#define PCIBIOS_MIN_IO		(pcibios_min_io)
+#define PCIBIOS_MIN_MEM		(pcibios_min_mem)
+
+static inline int pcibios_assign_all_busses(void)
+{
+	return pcibios_assign_all;
+}
 
 #ifdef CONFIG_PCI_DOMAINS
 static inline int pci_domain_nr(struct pci_bus *bus)
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c
index c6273a3..d239a6a 100644
--- a/arch/arm/kernel/bios32.c
+++ b/arch/arm/kernel/bios32.c
@@ -18,6 +18,14 @@
 static int debug_pci;
 static int use_firmware;
 
+unsigned long pcibios_min_io = 0x1000;
+EXPORT_SYMBOL(pcibios_min_io);
+
+unsigned long pcibios_min_mem = 0xaeedbabe;
+EXPORT_SYMBOL(pcibios_min_mem);
+
+int pcibios_assign_all;
+
 /*
  * We can't use pci_find_device() here since we are
  * called from interrupt context.
@@ -556,12 +564,19 @@ static void __init pcibios_init_hw(struct hw_pci *hw)
 	}
 }
 
-void __init pci_common_init(struct hw_pci *hw)
+void __init pci_common_init(struct hw_pci *hw,
+			    unsigned long min_io,
+			    unsigned long min_mem,
+			    int assign_all)
 {
 	struct pci_sys_data *sys;
 
 	INIT_LIST_HEAD(&hw->buses);
 
+	pcibios_min_io = min_io;
+	pcibios_min_mem = min_mem;
+	pcibios_assign_all = assign_all;
+
 	if (hw->preinit)
 		hw->preinit();
 	pcibios_init_hw(hw);
diff --git a/arch/arm/mach-dove/include/mach/hardware.h b/arch/arm/mach-dove/include/mach/hardware.h
index 32b0826..f619fb9 100644
--- a/arch/arm/mach-dove/include/mach/hardware.h
+++ b/arch/arm/mach-dove/include/mach/hardware.h
@@ -11,8 +11,6 @@
 
 #include "dove.h"
 
-#define pcibios_assign_all_busses()	1
-
 #define PCIBIOS_MIN_IO			0x1000
 #define PCIBIOS_MIN_MEM			0x01000000
 #define PCIMEM_BASE			DOVE_PCIE0_MEM_PHYS_BASE
diff --git a/arch/arm/mach-dove/pcie.c b/arch/arm/mach-dove/pcie.c
index 502d1ca..5a541e7 100644
--- a/arch/arm/mach-dove/pcie.c
+++ b/arch/arm/mach-dove/pcie.c
@@ -234,5 +234,5 @@ void __init dove_pcie_init(int init_port0, int init_port1)
 	if (init_port1)
 		add_pcie_port(1, DOVE_PCIE1_VIRT_BASE);
 
-	pci_common_init(&dove_pci);
+	pci_common_init(&dove_pci, PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 }
diff --git a/arch/arm/mach-footbridge/cats-pci.c b/arch/arm/mach-footbridge/cats-pci.c
index ae3e1c8..9d600ac 100644
--- a/arch/arm/mach-footbridge/cats-pci.c
+++ b/arch/arm/mach-footbridge/cats-pci.c
@@ -12,6 +12,7 @@
 #include <asm/irq.h>
 #include <asm/mach/pci.h>
 #include <asm/mach-types.h>
+#include <mach/hardware.h>
 
 /* cats host-specific stuff */
 static int irqmap_cats[] __initdata = { IRQ_PCI, IRQ_IN0, IRQ_IN1, IRQ_IN3 };
@@ -51,7 +52,7 @@ static struct hw_pci cats_pci __initdata = {
 static int __init cats_pci_init(void)
 {
 	if (machine_is_cats())
-		pci_common_init(&cats_pci);
+		pci_common_init(&cats_pci, PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 	return 0;
 }
 
diff --git a/arch/arm/mach-footbridge/ebsa285-pci.c b/arch/arm/mach-footbridge/ebsa285-pci.c
index 720c0ba..b330ad0 100644
--- a/arch/arm/mach-footbridge/ebsa285-pci.c
+++ b/arch/arm/mach-footbridge/ebsa285-pci.c
@@ -12,6 +12,7 @@
 #include <asm/irq.h>
 #include <asm/mach/pci.h>
 #include <asm/mach-types.h>
+#include <mach/hardware.h>
 
 static int irqmap_ebsa285[] __initdata = { IRQ_IN3, IRQ_IN1, IRQ_IN0, IRQ_PCI };
 
@@ -41,7 +42,8 @@ static struct hw_pci ebsa285_pci __initdata = {
 static int __init ebsa285_init_pci(void)
 {
 	if (machine_is_ebsa285())
-		pci_common_init(&ebsa285_pci);
+		pci_common_init(&ebsa285_pci,
+				PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 	return 0;
 }
 
diff --git a/arch/arm/mach-footbridge/include/mach/hardware.h b/arch/arm/mach-footbridge/include/mach/hardware.h
index 51dd902..541aa70 100644
--- a/arch/arm/mach-footbridge/include/mach/hardware.h
+++ b/arch/arm/mach-footbridge/include/mach/hardware.h
@@ -93,8 +93,6 @@ extern unsigned int nw_gpio_read(void);
 extern void nw_cpld_modify(unsigned int mask, unsigned int set);
 #endif
 
-#define pcibios_assign_all_busses()	1
-
 #define PCIBIOS_MIN_IO		0x1000
 #define PCIBIOS_MIN_MEM 	0x81000000
 
diff --git a/arch/arm/mach-footbridge/netwinder-pci.c b/arch/arm/mach-footbridge/netwinder-pci.c
index e263d6d..fe84879 100644
--- a/arch/arm/mach-footbridge/netwinder-pci.c
+++ b/arch/arm/mach-footbridge/netwinder-pci.c
@@ -12,6 +12,7 @@
 #include <asm/irq.h>
 #include <asm/mach/pci.h>
 #include <asm/mach-types.h>
+#include <mach/hardware.h>
 
 /*
  * We now use the slot ID instead of the device identifiers to select
@@ -55,7 +56,8 @@ static struct hw_pci netwinder_pci __initdata = {
 static int __init netwinder_pci_init(void)
 {
 	if (machine_is_netwinder())
-		pci_common_init(&netwinder_pci);
+		pci_common_init(&netwinder_pci,
+				PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 	return 0;
 }
 
diff --git a/arch/arm/mach-footbridge/personal-pci.c b/arch/arm/mach-footbridge/personal-pci.c
index d5fca95..ec73e03 100644
--- a/arch/arm/mach-footbridge/personal-pci.c
+++ b/arch/arm/mach-footbridge/personal-pci.c
@@ -12,6 +12,7 @@
 #include <asm/irq.h>
 #include <asm/mach/pci.h>
 #include <asm/mach-types.h>
+#include <mach/hardware.h>
 
 static int irqmap_personal_server[] __initdata = {
 	IRQ_IN0, IRQ_IN1, IRQ_IN2, IRQ_IN3, 0, 0, 0,
@@ -49,7 +50,8 @@ static struct hw_pci personal_server_pci __initdata = {
 static int __init personal_pci_init(void)
 {
 	if (machine_is_personal_server())
-		pci_common_init(&personal_server_pci);
+		pci_common_init(&personal_server_pci,
+				PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 	return 0;
 }
 
diff --git a/arch/arm/mach-integrator/include/mach/hardware.h b/arch/arm/mach-integrator/include/mach/hardware.h
index 8e26360..2905966 100644
--- a/arch/arm/mach-integrator/include/mach/hardware.h
+++ b/arch/arm/mach-integrator/include/mach/hardware.h
@@ -35,8 +35,6 @@
 #define PCIO_BASE		PCI_IO_VADDR
 #define PCIMEM_BASE		PCI_MEMORY_VADDR
 
-#define pcibios_assign_all_busses()	1
-
 #define PCIBIOS_MIN_IO		0x6000
 #define PCIBIOS_MIN_MEM 	0x00100000
 
diff --git a/arch/arm/mach-integrator/pci.c b/arch/arm/mach-integrator/pci.c
index 2fdb954..43eab96 100644
--- a/arch/arm/mach-integrator/pci.c
+++ b/arch/arm/mach-integrator/pci.c
@@ -30,6 +30,7 @@
 #include <asm/system.h>
 #include <asm/mach/pci.h>
 #include <asm/mach-types.h>
+#include <mach/hardware.h>
 
 /* 
  * A small note about bridges and interrupts.  The DECchip 21050 (and
@@ -117,7 +118,8 @@ static struct hw_pci integrator_pci __initdata = {
 static int __init integrator_pci_init(void)
 {
 	if (machine_is_integrator())
-		pci_common_init(&integrator_pci);
+		pci_common_init(&integrator_pci,
+				PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 	return 0;
 }
 
diff --git a/arch/arm/mach-iop13xx/include/mach/hardware.h b/arch/arm/mach-iop13xx/include/mach/hardware.h
index 8e1d562..ba81e50 100644
--- a/arch/arm/mach-iop13xx/include/mach/hardware.h
+++ b/arch/arm/mach-iop13xx/include/mach/hardware.h
@@ -2,8 +2,6 @@
 #define __ASM_ARCH_HARDWARE_H
 #include <asm/types.h>
 
-#define pcibios_assign_all_busses() 1
-
 #ifndef __ASSEMBLY__
 extern unsigned long iop13xx_pcibios_min_io;
 extern unsigned long iop13xx_pcibios_min_mem;
diff --git a/arch/arm/mach-iop13xx/iq81340mc.c b/arch/arm/mach-iop13xx/iq81340mc.c
index f91f315..cd90bcc 100644
--- a/arch/arm/mach-iop13xx/iq81340mc.c
+++ b/arch/arm/mach-iop13xx/iq81340mc.c
@@ -65,7 +65,7 @@ static struct hw_pci iq81340mc_pci __initdata = {
 static int __init iq81340mc_pci_init(void)
 {
 	iop13xx_atu_select(&iq81340mc_pci);
-	pci_common_init(&iq81340mc_pci);
+	pci_common_init(&iq81340mc_pci, PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 	iop13xx_map_pci_memory();
 
 	return 0;
diff --git a/arch/arm/mach-iop13xx/iq81340sc.c b/arch/arm/mach-iop13xx/iq81340sc.c
index ddb7a34..f502f5b 100644
--- a/arch/arm/mach-iop13xx/iq81340sc.c
+++ b/arch/arm/mach-iop13xx/iq81340sc.c
@@ -67,7 +67,7 @@ static struct hw_pci iq81340sc_pci __initdata = {
 static int __init iq81340sc_pci_init(void)
 {
 	iop13xx_atu_select(&iq81340sc_pci);
-	pci_common_init(&iq81340sc_pci);
+	pci_common_init(&iq81340sc_pci, PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 	iop13xx_map_pci_memory();
 
 	return 0;
diff --git a/arch/arm/mach-iop32x/em7210.c b/arch/arm/mach-iop32x/em7210.c
index 2bef9b6..49c4eee 100644
--- a/arch/arm/mach-iop32x/em7210.c
+++ b/arch/arm/mach-iop32x/em7210.c
@@ -114,7 +114,7 @@ static struct hw_pci em7210_pci __initdata = {
 static int __init em7210_pci_init(void)
 {
 	if (machine_is_em7210())
-		pci_common_init(&em7210_pci);
+		pci_common_init(&em7210_pci, PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 
 	return 0;
 }
diff --git a/arch/arm/mach-iop32x/glantank.c b/arch/arm/mach-iop32x/glantank.c
index 10384fc..efa3ea4 100644
--- a/arch/arm/mach-iop32x/glantank.c
+++ b/arch/arm/mach-iop32x/glantank.c
@@ -107,7 +107,8 @@ static struct hw_pci glantank_pci __initdata = {
 static int __init glantank_pci_init(void)
 {
 	if (machine_is_glantank())
-		pci_common_init(&glantank_pci);
+		pci_common_init(&glantank_pci,
+				PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 
 	return 0;
 }
diff --git a/arch/arm/mach-iop32x/include/mach/hardware.h b/arch/arm/mach-iop32x/include/mach/hardware.h
index d559c4e..e68bf97 100644
--- a/arch/arm/mach-iop32x/include/mach/hardware.h
+++ b/arch/arm/mach-iop32x/include/mach/hardware.h
@@ -18,7 +18,6 @@
  * but when we read them, we convert them to virtual addresses. See
  * arch/arm/plat-iop/pci.c.
  */
-#define pcibios_assign_all_busses() 1
 #define PCIBIOS_MIN_IO		0x00000000
 #define PCIBIOS_MIN_MEM		0x00000000
 
diff --git a/arch/arm/mach-iop32x/iq31244.c b/arch/arm/mach-iop32x/iq31244.c
index d6ac85f..2b873e7 100644
--- a/arch/arm/mach-iop32x/iq31244.c
+++ b/arch/arm/mach-iop32x/iq31244.c
@@ -177,7 +177,8 @@ static struct hw_pci iq31244_pci __initdata = {
 static int __init iq31244_pci_init(void)
 {
 	if (is_ep80219())
-		pci_common_init(&ep80219_pci);
+		pci_common_init(&ep80219_pci,
+				PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 	else if (machine_is_iq31244()) {
 		if (is_80219()) {
 			printk("note: iq31244 board type has been selected\n");
@@ -187,7 +188,8 @@ static int __init iq31244_pci_init(void)
 			printk("\t2/ update boot loader to pass"
 				" the ep80219 id: %d\n", MACH_TYPE_EP80219);
 		}
-		pci_common_init(&iq31244_pci);
+		pci_common_init(&iq31244_pci,
+				PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 	}
 
 	return 0;
diff --git a/arch/arm/mach-iop32x/iq80321.c b/arch/arm/mach-iop32x/iq80321.c
index c6a0e4e..f30b0af 100644
--- a/arch/arm/mach-iop32x/iq80321.c
+++ b/arch/arm/mach-iop32x/iq80321.c
@@ -113,7 +113,8 @@ static int __init iq80321_pci_init(void)
 {
 	if ((iop3xx_get_init_atu() == IOP3XX_INIT_ATU_ENABLE) &&
 		machine_is_iq80321())
-		pci_common_init(&iq80321_pci);
+		pci_common_init(&iq80321_pci,
+				PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 
 	return 0;
 }
diff --git a/arch/arm/mach-iop32x/n2100.c b/arch/arm/mach-iop32x/n2100.c
index f108a31..a5801ff 100644
--- a/arch/arm/mach-iop32x/n2100.c
+++ b/arch/arm/mach-iop32x/n2100.c
@@ -139,7 +139,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_REALTEK, PCI_ANY_ID, n2100_fixup_r8169);
 static int __init n2100_pci_init(void)
 {
 	if (machine_is_n2100())
-		pci_common_init(&n2100_pci);
+		pci_common_init(&n2100_pci, PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 
 	return 0;
 }
diff --git a/arch/arm/mach-iop33x/include/mach/hardware.h b/arch/arm/mach-iop33x/include/mach/hardware.h
index 8c10e43..215065b 100644
--- a/arch/arm/mach-iop33x/include/mach/hardware.h
+++ b/arch/arm/mach-iop33x/include/mach/hardware.h
@@ -18,7 +18,6 @@
  * but when we read them, we convert them to virtual addresses.  See
  * arch/arm/mach-iop3xx/iop3xx-pci.c
  */
-#define pcibios_assign_all_busses()	1
 #define PCIBIOS_MIN_IO		0x00000000
 #define PCIBIOS_MIN_MEM		0x00000000
 
diff --git a/arch/arm/mach-iop33x/iq80331.c b/arch/arm/mach-iop33x/iq80331.c
index c6ff552..ebfe608 100644
--- a/arch/arm/mach-iop33x/iq80331.c
+++ b/arch/arm/mach-iop33x/iq80331.c
@@ -96,7 +96,8 @@ static int __init iq80331_pci_init(void)
 {
 	if ((iop3xx_get_init_atu() == IOP3XX_INIT_ATU_ENABLE) &&
 		machine_is_iq80331())
-		pci_common_init(&iq80331_pci);
+		pci_common_init(&iq80331_pci,
+				PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 
 	return 0;
 }
diff --git a/arch/arm/mach-iop33x/iq80332.c b/arch/arm/mach-iop33x/iq80332.c
index fbf5514..cdccfd6 100644
--- a/arch/arm/mach-iop33x/iq80332.c
+++ b/arch/arm/mach-iop33x/iq80332.c
@@ -96,7 +96,8 @@ static int __init iq80332_pci_init(void)
 {
 	if ((iop3xx_get_init_atu() == IOP3XX_INIT_ATU_ENABLE) &&
 		machine_is_iq80332())
-		pci_common_init(&iq80332_pci);
+		pci_common_init(&iq80332_pci,
+				PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 
 	return 0;
 }
diff --git a/arch/arm/mach-ixp2000/enp2611.c b/arch/arm/mach-ixp2000/enp2611.c
index 1a557e0..b597a02 100644
--- a/arch/arm/mach-ixp2000/enp2611.c
+++ b/arch/arm/mach-ixp2000/enp2611.c
@@ -188,7 +188,8 @@ struct hw_pci enp2611_pci __initdata = {
 int __init enp2611_pci_init(void)
 {
 	if (machine_is_enp2611())
-		pci_common_init(&enp2611_pci);
+		pci_common_init(&enp2611_pci,
+				PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 0);
 
 	return 0;
 }
diff --git a/arch/arm/mach-ixp2000/include/mach/hardware.h b/arch/arm/mach-ixp2000/include/mach/hardware.h
index f033de4..6c92008 100644
--- a/arch/arm/mach-ixp2000/include/mach/hardware.h
+++ b/arch/arm/mach-ixp2000/include/mach/hardware.h
@@ -27,8 +27,6 @@
 
 #include "ixp2000-regs.h"	/* Chipset Registers */
 
-#define pcibios_assign_all_busses() 0
-
 /*
  * Platform helper functions
  */
diff --git a/arch/arm/mach-ixp2000/ixdp2400.c b/arch/arm/mach-ixp2000/ixdp2400.c
index 55e5c69..5d31208 100644
--- a/arch/arm/mach-ixp2000/ixdp2400.c
+++ b/arch/arm/mach-ixp2000/ixdp2400.c
@@ -156,7 +156,8 @@ static struct hw_pci ixdp2400_pci __initdata = {
 int __init ixdp2400_pci_init(void)
 {
 	if (machine_is_ixdp2400())
-		pci_common_init(&ixdp2400_pci);
+		pci_common_init(&ixdp2400_pci,
+				PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 0);
 
 	return 0;
 }
diff --git a/arch/arm/mach-ixp2000/ixdp2800.c b/arch/arm/mach-ixp2000/ixdp2800.c
index 237b61a..4c84373 100644
--- a/arch/arm/mach-ixp2000/ixdp2800.c
+++ b/arch/arm/mach-ixp2000/ixdp2800.c
@@ -258,7 +258,8 @@ int __init ixdp2800_pci_init(void)
 	if (machine_is_ixdp2800()) {
 		struct pci_dev *dev;
 
-		pci_common_init(&ixdp2800_pci);
+		pci_common_init(&ixdp2800_pci,
+				PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 0);
 		if (ixdp2x00_master_npu()) {
 			dev = pci_get_bus_and_slot(1, IXDP2800_SLAVE_ENET_DEVFN);
 			pci_remove_bus_device(dev);
diff --git a/arch/arm/mach-ixp2000/ixdp2x01.c b/arch/arm/mach-ixp2000/ixdp2x01.c
index 0369ec4..930f4b0 100644
--- a/arch/arm/mach-ixp2000/ixdp2x01.c
+++ b/arch/arm/mach-ixp2000/ixdp2x01.c
@@ -337,7 +337,8 @@ int __init ixdp2x01_pci_init(void)
 {
 	if (machine_is_ixdp2401() || machine_is_ixdp2801() ||\
 		machine_is_ixdp28x5())
-		pci_common_init(&ixdp2x01_pci);
+		pci_common_init(&ixdp2x01_pci,
+				PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 0);
 
 	return 0;
 }
diff --git a/arch/arm/mach-ixp23xx/include/mach/hardware.h b/arch/arm/mach-ixp23xx/include/mach/hardware.h
index c319200..940f802 100644
--- a/arch/arm/mach-ixp23xx/include/mach/hardware.h
+++ b/arch/arm/mach-ixp23xx/include/mach/hardware.h
@@ -21,8 +21,6 @@
 
 #include "ixp23xx.h"
 
-#define pcibios_assign_all_busses()	0
-
 /*
  * Platform helper functions
  */
diff --git a/arch/arm/mach-ixp23xx/ixdp2351.c b/arch/arm/mach-ixp23xx/ixdp2351.c
index f1b124a..756966a 100644
--- a/arch/arm/mach-ixp23xx/ixdp2351.c
+++ b/arch/arm/mach-ixp23xx/ixdp2351.c
@@ -261,7 +261,8 @@ struct hw_pci ixdp2351_pci __initdata = {
 int __init ixdp2351_pci_init(void)
 {
 	if (machine_is_ixdp2351())
-		pci_common_init(&ixdp2351_pci);
+		pci_common_init(&ixdp2351_pci,
+				PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 0);
 
 	return 0;
 }
diff --git a/arch/arm/mach-ixp23xx/roadrunner.c b/arch/arm/mach-ixp23xx/roadrunner.c
index 6d38d76..2c35b5b 100644
--- a/arch/arm/mach-ixp23xx/roadrunner.c
+++ b/arch/arm/mach-ixp23xx/roadrunner.c
@@ -127,7 +127,8 @@ static struct hw_pci roadrunner_pci __initdata = {
 static int __init roadrunner_pci_init(void)
 {
 	if (machine_is_roadrunner())
-		pci_common_init(&roadrunner_pci);
+		pci_common_init(&roadrunner_pci,
+				PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 0);
 
 	return 0;
 };
diff --git a/arch/arm/mach-ixp4xx/avila-pci.c b/arch/arm/mach-ixp4xx/avila-pci.c
index 845e1b5..157aa69 100644
--- a/arch/arm/mach-ixp4xx/avila-pci.c
+++ b/arch/arm/mach-ixp4xx/avila-pci.c
@@ -75,7 +75,7 @@ struct hw_pci avila_pci __initdata = {
 int __init avila_pci_init(void)
 {
 	if (machine_is_avila() || machine_is_loft())
-		pci_common_init(&avila_pci);
+		pci_common_init(&avila_pci, PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 	return 0;
 }
 
diff --git a/arch/arm/mach-ixp4xx/coyote-pci.c b/arch/arm/mach-ixp4xx/coyote-pci.c
index b978ea8..2affd35 100644
--- a/arch/arm/mach-ixp4xx/coyote-pci.c
+++ b/arch/arm/mach-ixp4xx/coyote-pci.c
@@ -58,7 +58,8 @@ struct hw_pci coyote_pci __initdata = {
 int __init coyote_pci_init(void)
 {
 	if (machine_is_adi_coyote())
-		pci_common_init(&coyote_pci);
+		pci_common_init(&coyote_pci,
+				PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 	return 0;
 }
 
diff --git a/arch/arm/mach-ixp4xx/dsmg600-pci.c b/arch/arm/mach-ixp4xx/dsmg600-pci.c
index fa70fed..4ff588a 100644
--- a/arch/arm/mach-ixp4xx/dsmg600-pci.c
+++ b/arch/arm/mach-ixp4xx/dsmg600-pci.c
@@ -72,7 +72,8 @@ struct hw_pci __initdata dsmg600_pci = {
 int __init dsmg600_pci_init(void)
 {
 	if (machine_is_dsmg600())
-		pci_common_init(&dsmg600_pci);
+		pci_common_init(&dsmg600_pci,
+				PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 
 	return 0;
 }
diff --git a/arch/arm/mach-ixp4xx/fsg-pci.c b/arch/arm/mach-ixp4xx/fsg-pci.c
index 5a810c9..4a65c8e 100644
--- a/arch/arm/mach-ixp4xx/fsg-pci.c
+++ b/arch/arm/mach-ixp4xx/fsg-pci.c
@@ -69,7 +69,8 @@ struct hw_pci fsg_pci __initdata = {
 int __init fsg_pci_init(void)
 {
 	if (machine_is_fsg())
-		pci_common_init(&fsg_pci);
+		pci_common_init(&fsg_pci,
+				PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 	return 0;
 }
 
diff --git a/arch/arm/mach-ixp4xx/gateway7001-pci.c b/arch/arm/mach-ixp4xx/gateway7001-pci.c
index 7e93a09..e6b2e45 100644
--- a/arch/arm/mach-ixp4xx/gateway7001-pci.c
+++ b/arch/arm/mach-ixp4xx/gateway7001-pci.c
@@ -56,7 +56,8 @@ struct hw_pci gateway7001_pci __initdata = {
 int __init gateway7001_pci_init(void)
 {
 	if (machine_is_gateway7001())
-		pci_common_init(&gateway7001_pci);
+		pci_common_init(&gateway7001_pci,
+				PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 	return 0;
 }
 
diff --git a/arch/arm/mach-ixp4xx/goramo_mlr.c b/arch/arm/mach-ixp4xx/goramo_mlr.c
index 1c28048..59494c4 100644
--- a/arch/arm/mach-ixp4xx/goramo_mlr.c
+++ b/arch/arm/mach-ixp4xx/goramo_mlr.c
@@ -486,7 +486,8 @@ static int __init gmlr_pci_init(void)
 {
 	if (machine_is_goramo_mlr() &&
 	    (hw_bits & (CFG_HW_USB_PORTS | CFG_HW_HAS_PCI_SLOT)))
-		pci_common_init(&gmlr_hw_pci);
+		pci_common_init(&gmlr_hw_pci,
+				PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 	return 0;
 }
 
diff --git a/arch/arm/mach-ixp4xx/gtwx5715-pci.c b/arch/arm/mach-ixp4xx/gtwx5715-pci.c
index 25d2c33..9daaddc 100644
--- a/arch/arm/mach-ixp4xx/gtwx5715-pci.c
+++ b/arch/arm/mach-ixp4xx/gtwx5715-pci.c
@@ -77,7 +77,8 @@ struct hw_pci gtwx5715_pci __initdata = {
 int __init gtwx5715_pci_init(void)
 {
 	if (machine_is_gtwx5715())
-		pci_common_init(&gtwx5715_pci);
+		pci_common_init(&gtwx5715_pci,
+				PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 
 	return 0;
 }
diff --git a/arch/arm/mach-ixp4xx/include/mach/hardware.h b/arch/arm/mach-ixp4xx/include/mach/hardware.h
index f91ca6d..a0921c6 100644
--- a/arch/arm/mach-ixp4xx/include/mach/hardware.h
+++ b/arch/arm/mach-ixp4xx/include/mach/hardware.h
@@ -26,8 +26,6 @@
 #define PCIBIOS_MAX_MEM		0x4BFFFFFF
 #endif
 
-#define pcibios_assign_all_busses()	1
-
 /* Register locations and bits */
 #include "ixp4xx-regs.h"
 
diff --git a/arch/arm/mach-ixp4xx/ixdp425-pci.c b/arch/arm/mach-ixp4xx/ixdp425-pci.c
index 1ba165a..afcc015 100644
--- a/arch/arm/mach-ixp4xx/ixdp425-pci.c
+++ b/arch/arm/mach-ixp4xx/ixdp425-pci.c
@@ -71,7 +71,8 @@ int __init ixdp425_pci_init(void)
 {
 	if (machine_is_ixdp425() || machine_is_ixcdp1100() ||
 			machine_is_ixdp465() || machine_is_kixrp435())
-		pci_common_init(&ixdp425_pci);
+		pci_common_init(&ixdp425_pci,
+				PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 	return 0;
 }
 
diff --git a/arch/arm/mach-ixp4xx/ixdpg425-pci.c b/arch/arm/mach-ixp4xx/ixdpg425-pci.c
index 4ed7ac6..43f477e 100644
--- a/arch/arm/mach-ixp4xx/ixdpg425-pci.c
+++ b/arch/arm/mach-ixp4xx/ixdpg425-pci.c
@@ -52,7 +52,8 @@ struct hw_pci ixdpg425_pci __initdata = {
 int __init ixdpg425_pci_init(void)
 {
 	if (machine_is_ixdpg425())
-		pci_common_init(&ixdpg425_pci);
+		pci_common_init(&ixdpg425_pci,
+				PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 	return 0;
 }
 
diff --git a/arch/arm/mach-ixp4xx/nas100d-pci.c b/arch/arm/mach-ixp4xx/nas100d-pci.c
index d0cea34..73e077f 100644
--- a/arch/arm/mach-ixp4xx/nas100d-pci.c
+++ b/arch/arm/mach-ixp4xx/nas100d-pci.c
@@ -68,7 +68,8 @@ struct hw_pci __initdata nas100d_pci = {
 int __init nas100d_pci_init(void)
 {
 	if (machine_is_nas100d())
-		pci_common_init(&nas100d_pci);
+		pci_common_init(&nas100d_pci,
+				PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 
 	return 0;
 }
diff --git a/arch/arm/mach-ixp4xx/nslu2-pci.c b/arch/arm/mach-ixp4xx/nslu2-pci.c
index 1eb5a90..e96007b 100644
--- a/arch/arm/mach-ixp4xx/nslu2-pci.c
+++ b/arch/arm/mach-ixp4xx/nslu2-pci.c
@@ -64,7 +64,7 @@ struct hw_pci __initdata nslu2_pci = {
 int __init nslu2_pci_init(void) /* monkey see, monkey do */
 {
 	if (machine_is_nslu2())
-		pci_common_init(&nslu2_pci);
+		pci_common_init(&nslu2_pci, PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 
 	return 0;
 }
diff --git a/arch/arm/mach-ixp4xx/wg302v2-pci.c b/arch/arm/mach-ixp4xx/wg302v2-pci.c
index 9b59ed0..2753725 100644
--- a/arch/arm/mach-ixp4xx/wg302v2-pci.c
+++ b/arch/arm/mach-ixp4xx/wg302v2-pci.c
@@ -56,7 +56,8 @@ struct hw_pci wg302v2_pci __initdata = {
 int __init wg302v2_pci_init(void)
 {
 	if (machine_is_wg302v2())
-		pci_common_init(&wg302v2_pci);
+		pci_common_init(&wg302v2_pci,
+				PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 	return 0;
 }
 
diff --git a/arch/arm/mach-kirkwood/include/mach/hardware.h b/arch/arm/mach-kirkwood/include/mach/hardware.h
index cde8528..79f0641 100644
--- a/arch/arm/mach-kirkwood/include/mach/hardware.h
+++ b/arch/arm/mach-kirkwood/include/mach/hardware.h
@@ -11,8 +11,6 @@
 
 #include "kirkwood.h"
 
-#define pcibios_assign_all_busses()	1
-
 #define PCIBIOS_MIN_IO			0x00001000
 #define PCIBIOS_MIN_MEM			0x01000000
 #define PCIMEM_BASE			KIRKWOOD_PCIE_MEM_PHYS_BASE /* mem base for VGA */
diff --git a/arch/arm/mach-kirkwood/pcie.c b/arch/arm/mach-kirkwood/pcie.c
index dee1eff..227861a 100644
--- a/arch/arm/mach-kirkwood/pcie.c
+++ b/arch/arm/mach-kirkwood/pcie.c
@@ -16,6 +16,7 @@
 #include <asm/mach/pci.h>
 #include <plat/pcie.h>
 #include <mach/bridge-regs.h>
+#include <mach/hardware.h>
 #include "common.h"
 
 
@@ -188,5 +189,6 @@ static struct hw_pci kirkwood_pci __initdata = {
 
 void __init kirkwood_pcie_init(void)
 {
-	pci_common_init(&kirkwood_pci);
+	pci_common_init(&kirkwood_pci,
+			PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 }
diff --git a/arch/arm/mach-ks8695/include/mach/hardware.h b/arch/arm/mach-ks8695/include/mach/hardware.h
index e0f911d..a46be88 100644
--- a/arch/arm/mach-ks8695/include/mach/hardware.h
+++ b/arch/arm/mach-ks8695/include/mach/hardware.h
@@ -46,8 +46,6 @@
 /*
  * PCI support
  */
-#define pcibios_assign_all_busses()	1
-
 #define PCIBIOS_MIN_IO		0
 #define PCIBIOS_MIN_MEM		0
 
diff --git a/arch/arm/mach-ks8695/pci.c b/arch/arm/mach-ks8695/pci.c
index 7849966..1beeec0 100644
--- a/arch/arm/mach-ks8695/pci.c
+++ b/arch/arm/mach-ks8695/pci.c
@@ -325,5 +325,5 @@ void __init ks8695_init_pci(struct ks8695_pci_cfg *cfg)
 
 	ks8695_pci.map_irq = cfg->map_irq;	/* board-specific map_irq method */
 
-	pci_common_init(&ks8695_pci);
+	pci_common_init(&ks8695_pci, PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 }
diff --git a/arch/arm/mach-orion5x/db88f5281-setup.c b/arch/arm/mach-orion5x/db88f5281-setup.c
index d318bea..8926519 100644
--- a/arch/arm/mach-orion5x/db88f5281-setup.c
+++ b/arch/arm/mach-orion5x/db88f5281-setup.c
@@ -25,6 +25,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/pci.h>
 #include <mach/orion5x.h>
+#include <mach/hardware.h>
 #include <plat/orion_nand.h>
 #include "common.h"
 #include "mpp.h"
@@ -274,7 +275,8 @@ static struct hw_pci db88f5281_pci __initdata = {
 static int __init db88f5281_pci_init(void)
 {
 	if (machine_is_db88f5281())
-		pci_common_init(&db88f5281_pci);
+		pci_common_init(&db88f5281_pci,
+				PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 
 	return 0;
 }
diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c
index 685f34a..b433ed1 100644
--- a/arch/arm/mach-orion5x/dns323-setup.c
+++ b/arch/arm/mach-orion5x/dns323-setup.c
@@ -28,6 +28,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/pci.h>
 #include <mach/orion5x.h>
+#include <mach/hardware.h>
 #include "common.h"
 #include "mpp.h"
 
@@ -83,7 +84,8 @@ static int __init dns323_pci_init(void)
 	 * gets in the way of initialising the SATA controller.
 	 */
 	if (machine_is_dns323() && dns323_dev_id() != MV88F5182_DEV_ID)
-		pci_common_init(&dns323_pci);
+		pci_common_init(&dns323_pci,
+				PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 
 	return 0;
 }
diff --git a/arch/arm/mach-orion5x/include/mach/hardware.h b/arch/arm/mach-orion5x/include/mach/hardware.h
index e51aaf4..a42b743 100644
--- a/arch/arm/mach-orion5x/include/mach/hardware.h
+++ b/arch/arm/mach-orion5x/include/mach/hardware.h
@@ -11,8 +11,6 @@
 
 #include "orion5x.h"
 
-#define pcibios_assign_all_busses()	1
-
 #define PCIBIOS_MIN_IO		0x00001000
 #define PCIBIOS_MIN_MEM		0x01000000
 #define PCIMEM_BASE		ORION5X_PCIE_MEM_PHYS_BASE
diff --git a/arch/arm/mach-orion5x/kurobox_pro-setup.c b/arch/arm/mach-orion5x/kurobox_pro-setup.c
index dfbb68d..f27228b 100644
--- a/arch/arm/mach-orion5x/kurobox_pro-setup.c
+++ b/arch/arm/mach-orion5x/kurobox_pro-setup.c
@@ -25,6 +25,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/pci.h>
 #include <mach/orion5x.h>
+#include <mach/hardware.h>
 #include <plat/orion_nand.h>
 #include "common.h"
 #include "mpp.h"
@@ -148,7 +149,8 @@ static int __init kurobox_pro_pci_init(void)
 {
 	if (machine_is_kurobox_pro()) {
 		orion5x_pci_disable();
-		pci_common_init(&kurobox_pro_pci);
+		pci_common_init(&kurobox_pro_pci,
+				PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 	}
 
 	return 0;
diff --git a/arch/arm/mach-orion5x/mss2-setup.c b/arch/arm/mach-orion5x/mss2-setup.c
index 61c086b..b900a92 100644
--- a/arch/arm/mach-orion5x/mss2-setup.c
+++ b/arch/arm/mach-orion5x/mss2-setup.c
@@ -27,6 +27,7 @@
 #include <asm/mach/pci.h>
 #include <mach/orion5x.h>
 #include <mach/bridge-regs.h>
+#include <mach/hardware.h>
 #include "common.h"
 #include "mpp.h"
 
@@ -98,7 +99,7 @@ static struct hw_pci mss2_pci __initdata = {
 static int __init mss2_pci_init(void)
 {
 	if (machine_is_mss2())
-		pci_common_init(&mss2_pci);
+		pci_common_init(&mss2_pci, PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 
 	return 0;
 }
diff --git a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c
index 9c1ca41..e9d35e9 100644
--- a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c
+++ b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c
@@ -23,6 +23,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/pci.h>
 #include <mach/orion5x.h>
+#include <mach/hardware.h>
 #include "common.h"
 #include "mpp.h"
 
@@ -160,7 +161,8 @@ static int __init rd88f5181l_fxo_pci_init(void)
 {
 	if (machine_is_rd88f5181l_fxo()) {
 		orion5x_pci_set_cardbus_mode();
-		pci_common_init(&rd88f5181l_fxo_pci);
+		pci_common_init(&rd88f5181l_fxo_pci,
+				PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 	}
 
 	return 0;
diff --git a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c
index ee1399f..8e02e61 100644
--- a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c
+++ b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c
@@ -24,6 +24,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/pci.h>
 #include <mach/orion5x.h>
+#include <mach/hardware.h>
 #include "common.h"
 #include "mpp.h"
 
@@ -172,7 +173,8 @@ static int __init rd88f5181l_ge_pci_init(void)
 {
 	if (machine_is_rd88f5181l_ge()) {
 		orion5x_pci_set_cardbus_mode();
-		pci_common_init(&rd88f5181l_ge_pci);
+		pci_common_init(&rd88f5181l_ge_pci,
+				PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 	}
 
 	return 0;
diff --git a/arch/arm/mach-orion5x/rd88f5182-setup.c b/arch/arm/mach-orion5x/rd88f5182-setup.c
index a04f9e4..be8f833 100644
--- a/arch/arm/mach-orion5x/rd88f5182-setup.c
+++ b/arch/arm/mach-orion5x/rd88f5182-setup.c
@@ -25,6 +25,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/pci.h>
 #include <mach/orion5x.h>
+#include <mach/hardware.h>
 #include "common.h"
 #include "mpp.h"
 
@@ -209,7 +210,8 @@ static struct hw_pci rd88f5182_pci __initdata = {
 static int __init rd88f5182_pci_init(void)
 {
 	if (machine_is_rd88f5182())
-		pci_common_init(&rd88f5182_pci);
+		pci_common_init(&rd88f5182_pci,
+				PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 
 	return 0;
 }
diff --git a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
index 7737cf9..1cf3ee7 100644
--- a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
+++ b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
@@ -26,6 +26,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/pci.h>
 #include <mach/orion5x.h>
+#include <mach/hardware.h>
 #include "common.h"
 #include "mpp.h"
 
@@ -114,7 +115,8 @@ static int __init rd88f6183ap_ge_pci_init(void)
 {
 	if (machine_is_rd88f6183ap_ge()) {
 		orion5x_pci_disable();
-		pci_common_init(&rd88f6183ap_ge_pci);
+		pci_common_init(&rd88f6183ap_ge_pci,
+				PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 	}
 
 	return 0;
diff --git a/arch/arm/mach-orion5x/terastation_pro2-setup.c b/arch/arm/mach-orion5x/terastation_pro2-setup.c
index 0b101d7..f2f928d 100644
--- a/arch/arm/mach-orion5x/terastation_pro2-setup.c
+++ b/arch/arm/mach-orion5x/terastation_pro2-setup.c
@@ -24,6 +24,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/pci.h>
 #include <mach/orion5x.h>
+#include <mach/hardware.h>
 #include "common.h"
 #include "mpp.h"
 
@@ -132,7 +133,7 @@ static struct hw_pci tsp2_pci __initdata = {
 static int __init tsp2_pci_init(void)
 {
 	if (machine_is_terastation_pro2())
-		pci_common_init(&tsp2_pci);
+		pci_common_init(&tsp2_pci, PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 
 	return 0;
 }
diff --git a/arch/arm/mach-orion5x/ts209-setup.c b/arch/arm/mach-orion5x/ts209-setup.c
index 9d68905..abdd1c8 100644
--- a/arch/arm/mach-orion5x/ts209-setup.c
+++ b/arch/arm/mach-orion5x/ts209-setup.c
@@ -27,6 +27,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/pci.h>
 #include <mach/orion5x.h>
+#include <mach/hardware.h>
 #include "common.h"
 #include "mpp.h"
 #include "tsx09-common.h"
@@ -179,7 +180,8 @@ static struct hw_pci qnap_ts209_pci __initdata = {
 static int __init qnap_ts209_pci_init(void)
 {
 	if (machine_is_ts_x09())
-		pci_common_init(&qnap_ts209_pci);
+		pci_common_init(&qnap_ts209_pci,
+				PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 
 	return 0;
 }
diff --git a/arch/arm/mach-orion5x/ts409-setup.c b/arch/arm/mach-orion5x/ts409-setup.c
index d85588a..b81f4e7 100644
--- a/arch/arm/mach-orion5x/ts409-setup.c
+++ b/arch/arm/mach-orion5x/ts409-setup.c
@@ -29,6 +29,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/pci.h>
 #include <mach/orion5x.h>
+#include <mach/hardware.h>
 #include "common.h"
 #include "mpp.h"
 #include "tsx09-common.h"
@@ -149,7 +150,8 @@ static struct hw_pci qnap_ts409_pci __initdata = {
 static int __init qnap_ts409_pci_init(void)
 {
 	if (machine_is_ts409())
-		pci_common_init(&qnap_ts409_pci);
+		pci_common_init(&qnap_ts409_pci,
+				PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 
 	return 0;
 }
diff --git a/arch/arm/mach-orion5x/wnr854t-setup.c b/arch/arm/mach-orion5x/wnr854t-setup.c
index 6920821..af71cb9 100644
--- a/arch/arm/mach-orion5x/wnr854t-setup.c
+++ b/arch/arm/mach-orion5x/wnr854t-setup.c
@@ -21,6 +21,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/pci.h>
 #include <mach/orion5x.h>
+#include <mach/hardware.h>
 #include "common.h"
 #include "mpp.h"
 
@@ -164,7 +165,8 @@ static struct hw_pci wnr854t_pci __initdata = {
 static int __init wnr854t_pci_init(void)
 {
 	if (machine_is_wnr854t())
-		pci_common_init(&wnr854t_pci);
+		pci_common_init(&wnr854t_pci,
+				PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 
 	return 0;
 }
diff --git a/arch/arm/mach-orion5x/wrt350n-v2-setup.c b/arch/arm/mach-orion5x/wrt350n-v2-setup.c
index f9f222e..2053043 100644
--- a/arch/arm/mach-orion5x/wrt350n-v2-setup.c
+++ b/arch/arm/mach-orion5x/wrt350n-v2-setup.c
@@ -252,7 +252,8 @@ static struct hw_pci wrt350n_v2_pci __initdata = {
 static int __init wrt350n_v2_pci_init(void)
 {
 	if (machine_is_wrt350n_v2())
-		pci_common_init(&wrt350n_v2_pci);
+		pci_common_init(&wrt350n_v2_pci,
+				PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 
 	return 0;
 }
diff --git a/arch/arm/mach-pxa/cm-x2xx-pci.c b/arch/arm/mach-pxa/cm-x2xx-pci.c
index 0f31305..1e803e4 100644
--- a/arch/arm/mach-pxa/cm-x2xx-pci.c
+++ b/arch/arm/mach-pxa/cm-x2xx-pci.c
@@ -215,7 +215,7 @@ static struct hw_pci cmx2xx_pci __initdata = {
 static int __init cmx2xx_init_pci(void)
 {
 	if (machine_is_armcore())
-		pci_common_init(&cmx2xx_pci);
+		pci_common_init(&cmx2xx_pci, PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 
 	return 0;
 }
diff --git a/arch/arm/mach-pxa/include/mach/hardware.h b/arch/arm/mach-pxa/include/mach/hardware.h
index 3d8d8cb..f38a311 100644
--- a/arch/arm/mach-pxa/include/mach/hardware.h
+++ b/arch/arm/mach-pxa/include/mach/hardware.h
@@ -313,7 +313,6 @@ extern unsigned long get_clock_tick_rate(void);
 #if defined(CONFIG_MACH_ARMCORE) && defined(CONFIG_PCI)
 #define PCIBIOS_MIN_IO		0
 #define PCIBIOS_MIN_MEM		0
-#define pcibios_assign_all_busses()	1
 #endif
 
 
diff --git a/arch/arm/mach-shark/include/mach/hardware.h b/arch/arm/mach-shark/include/mach/hardware.h
index 94d84b2..24639ce 100644
--- a/arch/arm/mach-shark/include/mach/hardware.h
+++ b/arch/arm/mach-shark/include/mach/hardware.h
@@ -12,8 +12,6 @@
 
 #define UNCACHEABLE_ADDR        0xdf010000
 
-#define pcibios_assign_all_busses()     1
-
 #define PCIBIOS_MIN_IO          0x6000
 #define PCIBIOS_MIN_MEM         0x50000000
 #define PCIMEM_BASE		0xe8000000
diff --git a/arch/arm/mach-shark/pci.c b/arch/arm/mach-shark/pci.c
index 37a7112..a585e81 100644
--- a/arch/arm/mach-shark/pci.c
+++ b/arch/arm/mach-shark/pci.c
@@ -12,6 +12,7 @@
 #include <asm/irq.h>
 #include <asm/mach/pci.h>
 #include <asm/mach-types.h>
+#include <mach/hardware.h>
 
 static int __init shark_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
 {
@@ -35,7 +36,7 @@ static struct hw_pci shark_pci __initdata = {
 static int __init shark_pci_init(void)
 {
 	if (machine_is_shark())
-		pci_common_init(&shark_pci);
+		pci_common_init(&shark_pci, PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 	return 0;
 }
 
diff --git a/arch/arm/mach-versatile/include/mach/hardware.h b/arch/arm/mach-versatile/include/mach/hardware.h
index 4f8f99a..59fb6e5 100644
--- a/arch/arm/mach-versatile/include/mach/hardware.h
+++ b/arch/arm/mach-versatile/include/mach/hardware.h
@@ -43,8 +43,6 @@
 #define PCIBIOS_MIN_IO			0x44000000
 #define PCIBIOS_MIN_MEM			0x50000000
 
-#define pcibios_assign_all_busses()     1
-
 /* macro to get at IO space when running virtually */
 #define IO_ADDRESS(x)		(((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + 0xf0000000)
 
diff --git a/arch/arm/mach-versatile/pci.c b/arch/arm/mach-versatile/pci.c
index 334f0df..5c400b9 100644
--- a/arch/arm/mach-versatile/pci.c
+++ b/arch/arm/mach-versatile/pci.c
@@ -354,7 +354,7 @@ static struct hw_pci versatile_pci __initdata = {
 
 static int __init versatile_pci_init(void)
 {
-	pci_common_init(&versatile_pci);
+	pci_common_init(&versatile_pci, PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM, 1);
 	return 0;
 }
 
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 08/13] [ARM] Make VMALLOC_END into a global variable if not defined
  2010-07-13 15:33 [RFC PATCH 0/13] Misc cleanup patches to prepare for unified zImage Eric Miao
                   ` (6 preceding siblings ...)
  2010-07-13 15:33 ` [PATCH 07/13] [ARM] Make PCIBIOS_* into global variables Eric Miao
@ 2010-07-13 15:33 ` Eric Miao
  2010-07-14  2:57   ` Kyungmin Park
  2010-07-13 15:33 ` [PATCH 09/13] [ARM] Introduce ARCH_USES_DEFAULT_GPIO_H for default GPIO API definitions Eric Miao
                   ` (4 subsequent siblings)
  12 siblings, 1 reply; 18+ messages in thread
From: Eric Miao @ 2010-07-13 15:33 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Eric Miao <eric.miao@canonical.com>
---
 arch/arm/include/asm/mach/arch.h |    1 +
 arch/arm/include/asm/pgtable.h   |    5 +++++
 arch/arm/kernel/setup.c          |    6 ++++++
 3 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h
index 52bea4c..2191d40 100644
--- a/arch/arm/include/asm/mach/arch.h
+++ b/arch/arm/include/asm/mach/arch.h
@@ -27,6 +27,7 @@ struct machine_class {
 						 * page tabe entry	*/
 	const char		*name;		/* machine class name	*/
 	unsigned long		boot_params;	/* tagged list		*/
+	unsigned long		vmalloc_end;	/* VMALLOC_END		*/
 
 	void			(*map_io)(void);/* IO mapping function */
 	void			(*init_irq)(void);
diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h
index ab68cf1..478249a 100644
--- a/arch/arm/include/asm/pgtable.h
+++ b/arch/arm/include/asm/pgtable.h
@@ -40,6 +40,11 @@
 #define VMALLOC_START		(((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
 #endif
 
+#ifndef VMALLOC_END
+extern unsigned long vmalloc_end;
+#define VMALLOC_END (vmalloc_end)
+#endif
+
 /*
  * Hardware-wise, we have a two level page table structure, where the first
  * level has 4096 entries, and the second level has 256 entries.  Each entry
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 295de99..672a8ec 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -95,6 +95,9 @@ EXPORT_SYMBOL(isa_dma_threshold);
 unsigned long max_dma_address = 0xffffffffUL;
 EXPORT_SYMBOL(max_dma_address);
 
+unsigned long vmalloc_end = 0xffffffffUL;
+EXPORT_SYMBOL(vmalloc_end);
+
 #ifdef MULTI_CPU
 struct processor processor;
 #endif
@@ -684,6 +687,9 @@ void __init setup_arch(char **cmdline_p)
 	class = mdesc->class;
 	machine_name = mdesc->name;
 
+	if (class)
+		vmalloc_end = class->vmalloc_end;
+
 	if (mdesc->soft_reboot)
 		reboot_setup("s");
 
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 09/13] [ARM] Introduce ARCH_USES_DEFAULT_GPIO_H for default GPIO API definitions
  2010-07-13 15:33 [RFC PATCH 0/13] Misc cleanup patches to prepare for unified zImage Eric Miao
                   ` (7 preceding siblings ...)
  2010-07-13 15:33 ` [PATCH 08/13] [ARM] Make VMALLOC_END into a global variable if not defined Eric Miao
@ 2010-07-13 15:33 ` Eric Miao
  2010-07-13 15:33 ` [PATCH 10/13] [ARM] Introduce ARCH_USES_DEFAULT_TIMEX_H for default CLOCK_TICK_RATE Eric Miao
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Eric Miao @ 2010-07-13 15:33 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Eric Miao <eric.miao@canonical.com>
---
 arch/arm/Kconfig            |    3 +++
 arch/arm/include/asm/gpio.h |   10 ++++++++++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 70221ef..44aa8b3 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -53,6 +53,9 @@ config ARCH_USES_GETTIMEOFFSET
 config ARCH_USES_DEFAULT_IO_H
 	def_bool n
 
+config ARCH_USES_DEFAULT_GPIO_H
+	def_bool n
+
 config GENERIC_CLOCKEVENTS
 	bool
 
diff --git a/arch/arm/include/asm/gpio.h b/arch/arm/include/asm/gpio.h
index 166a7a3..aa80d3c 100644
--- a/arch/arm/include/asm/gpio.h
+++ b/arch/arm/include/asm/gpio.h
@@ -1,7 +1,17 @@
 #ifndef _ARCH_ARM_GPIO_H
 #define _ARCH_ARM_GPIO_H
 
+#ifndef CONFIG_ARCH_USES_DEFAULT_GPIO_H
 /* not all ARM platforms necessarily support this API ... */
 #include <mach/gpio.h>
+#else
+
+#include <asm-generic/gpio.h>
+
+#define gpio_get_value	__gpio_get_value
+#define gpio_set_value	__gpio_set_value
+#define gpio_cansleep	__gpio_cansleep
+#define gpio_to_irq	__gpio_to_irq
+#endif
 
 #endif /* _ARCH_ARM_GPIO_H */
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 10/13] [ARM] Introduce ARCH_USES_DEFAULT_TIMEX_H for default CLOCK_TICK_RATE
  2010-07-13 15:33 [RFC PATCH 0/13] Misc cleanup patches to prepare for unified zImage Eric Miao
                   ` (8 preceding siblings ...)
  2010-07-13 15:33 ` [PATCH 09/13] [ARM] Introduce ARCH_USES_DEFAULT_GPIO_H for default GPIO API definitions Eric Miao
@ 2010-07-13 15:33 ` Eric Miao
  2010-07-13 15:33 ` [PATCH 11/13] [ARM] Introduce ARCH_HAS_DISABLE_FIQ and remove most disable_fiq Eric Miao
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Eric Miao @ 2010-07-13 15:33 UTC (permalink / raw)
  To: linux-arm-kernel

CLOCK_TICK_RATE is actually a don't-care value. Make it default to
(100 * HZ) when USE_DEFAULT_TIMEX_H is defined, and so no machine
specific timex.h needs to be included.

Signed-off-by: Eric Miao <eric.miao@canonical.com>
---
 arch/arm/Kconfig             |    3 +++
 arch/arm/include/asm/timex.h |    4 ++++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 44aa8b3..57180ae 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -56,6 +56,9 @@ config ARCH_USES_DEFAULT_IO_H
 config ARCH_USES_DEFAULT_GPIO_H
 	def_bool n
 
+config ARCH_USES_DEFAULT_TIMEX_H
+	def_bool n
+
 config GENERIC_CLOCKEVENTS
 	bool
 
diff --git a/arch/arm/include/asm/timex.h b/arch/arm/include/asm/timex.h
index 3be8de3..8df3b2e 100644
--- a/arch/arm/include/asm/timex.h
+++ b/arch/arm/include/asm/timex.h
@@ -12,7 +12,11 @@
 #ifndef _ASMARM_TIMEX_H
 #define _ASMARM_TIMEX_H
 
+#ifndef CONFIG_ARCH_USES_DEFAULT_TIMEX_H
 #include <mach/timex.h>
+#else
+#define CLOCK_TICK_RATE	(100 * HZ)
+#endif
 
 typedef unsigned long cycles_t;
 
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 11/13] [ARM] Introduce ARCH_HAS_DISABLE_FIQ and remove most disable_fiq
  2010-07-13 15:33 [RFC PATCH 0/13] Misc cleanup patches to prepare for unified zImage Eric Miao
                   ` (9 preceding siblings ...)
  2010-07-13 15:33 ` [PATCH 10/13] [ARM] Introduce ARCH_USES_DEFAULT_TIMEX_H for default CLOCK_TICK_RATE Eric Miao
@ 2010-07-13 15:33 ` Eric Miao
  2010-07-13 15:33 ` [PATCH 12/13] [ARM] Introduce ARCH_HAS_RET_TO_USER and remove most arch_ret_to_user Eric Miao
  2010-07-13 15:33 ` [PATCH 13/13] [ARM] Introduce ARCH_HAS_IDLE_RESET to allow SoC specific idle/reset Eric Miao
  12 siblings, 0 replies; 18+ messages in thread
From: Eric Miao @ 2010-07-13 15:33 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Eric Miao <eric.miao@canonical.com>
---
 arch/arm/Kconfig                                   |    4 ++++
 arch/arm/include/asm/entry-macro-vic2.S            |    3 ---
 arch/arm/kernel/entry-armv.S                       |    2 ++
 arch/arm/mach-aaec2000/include/mach/entry-macro.S  |    3 ---
 arch/arm/mach-at91/include/mach/entry-macro.S      |    3 ---
 arch/arm/mach-bcmring/include/mach/entry-macro.S   |    3 ---
 arch/arm/mach-clps711x/include/mach/entry-macro.S  |    3 ---
 arch/arm/mach-cns3xxx/include/mach/entry-macro.S   |    3 ---
 arch/arm/mach-davinci/include/mach/entry-macro.S   |    3 ---
 arch/arm/mach-dove/include/mach/entry-macro.S      |    3 ---
 arch/arm/mach-ebsa110/include/mach/entry-macro.S   |    3 ---
 arch/arm/mach-ep93xx/include/mach/entry-macro.S    |    3 ---
 .../arm/mach-footbridge/include/mach/entry-macro.S |    3 ---
 arch/arm/mach-gemini/include/mach/entry-macro.S    |    3 ---
 arch/arm/mach-h720x/include/mach/entry-macro.S     |    3 ---
 .../arm/mach-integrator/include/mach/entry-macro.S |    3 ---
 arch/arm/mach-iop13xx/include/mach/entry-macro.S   |    3 ---
 arch/arm/mach-iop32x/include/mach/entry-macro.S    |    3 ---
 arch/arm/mach-iop33x/include/mach/entry-macro.S    |    3 ---
 arch/arm/mach-ixp2000/include/mach/entry-macro.S   |    3 ---
 arch/arm/mach-ixp23xx/include/mach/entry-macro.S   |    3 ---
 arch/arm/mach-ixp4xx/include/mach/entry-macro.S    |    3 ---
 arch/arm/mach-kirkwood/include/mach/entry-macro.S  |    3 ---
 arch/arm/mach-ks8695/include/mach/entry-macro.S    |    3 ---
 arch/arm/mach-l7200/include/mach/entry-macro.S     |    3 ---
 arch/arm/mach-lh7a40x/include/mach/entry-macro.S   |    9 ---------
 arch/arm/mach-loki/include/mach/entry-macro.S      |    3 ---
 arch/arm/mach-mmp/include/mach/entry-macro.S       |    3 ---
 arch/arm/mach-msm/include/mach/entry-macro.S       |    3 ---
 arch/arm/mach-mv78xx0/include/mach/entry-macro.S   |    3 ---
 arch/arm/mach-netx/include/mach/entry-macro.S      |    3 ---
 arch/arm/mach-nomadik/include/mach/entry-macro.S   |    3 ---
 arch/arm/mach-ns9xxx/include/mach/entry-macro.S    |    2 --
 arch/arm/mach-nuc93x/include/mach/entry-macro.S    |    5 -----
 arch/arm/mach-omap1/include/mach/entry-macro.S     |    3 ---
 arch/arm/mach-omap2/include/mach/entry-macro.S     |    3 ---
 arch/arm/mach-orion5x/include/mach/entry-macro.S   |    3 ---
 arch/arm/mach-pnx4008/include/mach/entry-macro.S   |    3 ---
 arch/arm/mach-pxa/include/mach/entry-macro.S       |    3 ---
 arch/arm/mach-realview/include/mach/entry-macro.S  |    3 ---
 arch/arm/mach-s3c2410/include/mach/entry-macro.S   |    5 -----
 arch/arm/mach-s5p6442/include/mach/entry-macro.S   |    3 ---
 arch/arm/mach-s5pc100/include/mach/entry-macro.S   |    3 ---
 arch/arm/mach-s5pv210/include/mach/entry-macro.S   |    3 ---
 arch/arm/mach-sa1100/include/mach/entry-macro.S    |    3 ---
 arch/arm/mach-shark/include/mach/entry-macro.S     |    3 ---
 arch/arm/mach-shmobile/include/mach/entry-macro.S  |    3 ---
 arch/arm/mach-spear3xx/include/mach/entry-macro.S  |    3 ---
 arch/arm/mach-spear6xx/include/mach/entry-macro.S  |    3 ---
 arch/arm/mach-stmp378x/include/mach/entry-macro.S  |    3 ---
 arch/arm/mach-stmp37xx/include/mach/entry-macro.S  |    3 ---
 arch/arm/mach-u300/include/mach/entry-macro.S      |    3 ---
 arch/arm/mach-ux500/include/mach/entry-macro.S     |    3 ---
 arch/arm/mach-versatile/include/mach/entry-macro.S |    3 ---
 arch/arm/mach-vexpress/include/mach/entry-macro.S  |    3 ---
 arch/arm/mach-w90x900/include/mach/entry-macro.S   |    5 -----
 arch/arm/plat-mxc/include/mach/entry-macro.S       |    3 ---
 57 files changed, 6 insertions(+), 176 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 57180ae..7da1979 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -157,6 +157,9 @@ config ARCH_HAS_CPUFREQ
 	  and that the relevant menu configurations are displayed for
 	  it.
 
+config ARCH_HAS_DISABLE_FIQ
+	def_bool n
+
 config GENERIC_HWEIGHT
 	bool
 	default y
@@ -619,6 +622,7 @@ config ARCH_RPC
 	select NO_IOPORT
 	select ARCH_SPARSEMEM_ENABLE
 	select ARCH_USES_GETTIMEOFFSET
+	select ARCH_HAS_DISABLE_FIQ
 	help
 	  On the Acorn Risc-PC, Linux can support the internal IDE disk and
 	  CD-ROM interface, serial and parallel port, and the floppy drive.
diff --git a/arch/arm/include/asm/entry-macro-vic2.S b/arch/arm/include/asm/entry-macro-vic2.S
index 3ceb85e..2077314 100644
--- a/arch/arm/include/asm/entry-macro-vic2.S
+++ b/arch/arm/include/asm/entry-macro-vic2.S
@@ -29,9 +29,6 @@
 
 #include <asm/hardware/vic.h>
 
-	.macro	disable_fiq
-	.endm
-
 	.macro	get_irqnr_preamble, base, tmp
 	ldr	\base, =VA_VIC0
 	.endm
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index ecb8492..5c45fb4 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -1209,7 +1209,9 @@ __stubs_start:
  * get out of that mode without clobbering one register.
  */
 vector_fiq:
+#ifdef CONFIG_ARCH_HAS_DISABLE_FIQ
 	disable_fiq
+#endif
 	subs	pc, lr, #4
 
 /*=============================================================================
diff --git a/arch/arm/mach-aaec2000/include/mach/entry-macro.S b/arch/arm/mach-aaec2000/include/mach/entry-macro.S
index c8fb344..1cdbab4 100644
--- a/arch/arm/mach-aaec2000/include/mach/entry-macro.S
+++ b/arch/arm/mach-aaec2000/include/mach/entry-macro.S
@@ -12,9 +12,6 @@
  */
 #include <mach/irqs.h>
 
-		.macro	disable_fiq
-		.endm
-
 		.macro  get_irqnr_preamble, base, tmp
 		.endm
 
diff --git a/arch/arm/mach-at91/include/mach/entry-macro.S b/arch/arm/mach-at91/include/mach/entry-macro.S
index 7ab68f9..c39f889 100644
--- a/arch/arm/mach-at91/include/mach/entry-macro.S
+++ b/arch/arm/mach-at91/include/mach/entry-macro.S
@@ -13,9 +13,6 @@
 #include <mach/hardware.h>
 #include <mach/at91_aic.h>
 
-	.macro	disable_fiq
-	.endm
-
 	.macro  get_irqnr_preamble, base, tmp
 	ldr	\base, =(AT91_VA_BASE_SYS + AT91_AIC)		@ base virtual address of AIC peripheral
 	.endm
diff --git a/arch/arm/mach-bcmring/include/mach/entry-macro.S b/arch/arm/mach-bcmring/include/mach/entry-macro.S
index 7d393ca..7dac106 100644
--- a/arch/arm/mach-bcmring/include/mach/entry-macro.S
+++ b/arch/arm/mach-bcmring/include/mach/entry-macro.S
@@ -21,9 +21,6 @@
 #include <mach/hardware.h>
 #include <mach/csp/mm_io.h>
 
-		.macro	disable_fiq
-		.endm
-
 		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
 		ldr	\base, =(MM_IO_BASE_INTC0)
 		ldr	\irqstat, [\base, #0]		@ get status
diff --git a/arch/arm/mach-clps711x/include/mach/entry-macro.S b/arch/arm/mach-clps711x/include/mach/entry-macro.S
index 90fa2f7..a04c12e 100644
--- a/arch/arm/mach-clps711x/include/mach/entry-macro.S
+++ b/arch/arm/mach-clps711x/include/mach/entry-macro.S
@@ -10,9 +10,6 @@
 #include <mach/hardware.h>
 #include <asm/hardware/clps7111.h>
 
-		.macro	disable_fiq
-		.endm
-
 		.macro	get_irqnr_preamble, base, tmp
 		.endm
 
diff --git a/arch/arm/mach-cns3xxx/include/mach/entry-macro.S b/arch/arm/mach-cns3xxx/include/mach/entry-macro.S
index 5e1c554..a7601d0 100644
--- a/arch/arm/mach-cns3xxx/include/mach/entry-macro.S
+++ b/arch/arm/mach-cns3xxx/include/mach/entry-macro.S
@@ -11,9 +11,6 @@
 #include <mach/hardware.h>
 #include <asm/hardware/gic.h>
 
-		.macro	disable_fiq
-		.endm
-
 		.macro  get_irqnr_preamble, base, tmp
 		ldr	\base, =gic_cpu_base_addr
 		ldr	\base, [\base]
diff --git a/arch/arm/mach-davinci/include/mach/entry-macro.S b/arch/arm/mach-davinci/include/mach/entry-macro.S
index fbdebc7..9119790 100644
--- a/arch/arm/mach-davinci/include/mach/entry-macro.S
+++ b/arch/arm/mach-davinci/include/mach/entry-macro.S
@@ -11,9 +11,6 @@
 #include <mach/io.h>
 #include <mach/irqs.h>
 
-		.macro	disable_fiq
-		.endm
-
 		.macro  get_irqnr_preamble, base, tmp
 		ldr \base, =davinci_intc_base
 		ldr \base, [\base]
diff --git a/arch/arm/mach-dove/include/mach/entry-macro.S b/arch/arm/mach-dove/include/mach/entry-macro.S
index e84c78c..ec55a83 100644
--- a/arch/arm/mach-dove/include/mach/entry-macro.S
+++ b/arch/arm/mach-dove/include/mach/entry-macro.S
@@ -10,9 +10,6 @@
 
 #include <mach/bridge-regs.h>
 
-	.macro  disable_fiq
-	.endm
-
 	.macro  arch_ret_to_user, tmp1, tmp2
 	.endm
 
diff --git a/arch/arm/mach-ebsa110/include/mach/entry-macro.S b/arch/arm/mach-ebsa110/include/mach/entry-macro.S
index cc3e599..6d32f8b 100644
--- a/arch/arm/mach-ebsa110/include/mach/entry-macro.S
+++ b/arch/arm/mach-ebsa110/include/mach/entry-macro.S
@@ -12,9 +12,6 @@
 
 #define IRQ_STAT		0xff000000	/* read */
 
-	.macro	disable_fiq
-	.endm
-
 	.macro  get_irqnr_preamble, base, tmp
 	mov	\base, #IRQ_STAT
 	.endm
diff --git a/arch/arm/mach-ep93xx/include/mach/entry-macro.S b/arch/arm/mach-ep93xx/include/mach/entry-macro.S
index 96b85e2..1b535d6 100644
--- a/arch/arm/mach-ep93xx/include/mach/entry-macro.S
+++ b/arch/arm/mach-ep93xx/include/mach/entry-macro.S
@@ -11,9 +11,6 @@
  */
 #include <mach/ep93xx-regs.h>
 
-		.macro	disable_fiq
-		.endm
-
 		.macro  get_irqnr_preamble, base, tmp
 		.endm
 
diff --git a/arch/arm/mach-footbridge/include/mach/entry-macro.S b/arch/arm/mach-footbridge/include/mach/entry-macro.S
index d3847be..77c709e 100644
--- a/arch/arm/mach-footbridge/include/mach/entry-macro.S
+++ b/arch/arm/mach-footbridge/include/mach/entry-macro.S
@@ -14,9 +14,6 @@
 		.equ	dc21285_high, ARMCSR_BASE & 0xff000000
 		.equ	dc21285_low, ARMCSR_BASE & 0x00ffffff
 
-		.macro	disable_fiq
-		.endm
-
 		.macro  get_irqnr_preamble, base, tmp
 		mov	\base, #dc21285_high
 		.if	dc21285_low
diff --git a/arch/arm/mach-gemini/include/mach/entry-macro.S b/arch/arm/mach-gemini/include/mach/entry-macro.S
index 1624f91..b24bde7 100644
--- a/arch/arm/mach-gemini/include/mach/entry-macro.S
+++ b/arch/arm/mach-gemini/include/mach/entry-macro.S
@@ -12,9 +12,6 @@
 
 #define IRQ_STATUS	0x14
 
-	.macro  disable_fiq
-	.endm
-
 	.macro  get_irqnr_preamble, base, tmp
 	.endm
 
diff --git a/arch/arm/mach-h720x/include/mach/entry-macro.S b/arch/arm/mach-h720x/include/mach/entry-macro.S
index 6d3b917..d928619 100644
--- a/arch/arm/mach-h720x/include/mach/entry-macro.S
+++ b/arch/arm/mach-h720x/include/mach/entry-macro.S
@@ -8,9 +8,6 @@
  * warranty of any kind, whether express or implied.
  */
 
-		.macro  disable_fiq
-		.endm
-
 		.macro  get_irqnr_preamble, base, tmp
 		.endm
 
diff --git a/arch/arm/mach-integrator/include/mach/entry-macro.S b/arch/arm/mach-integrator/include/mach/entry-macro.S
index 3d029c9..f0c4de4 100644
--- a/arch/arm/mach-integrator/include/mach/entry-macro.S
+++ b/arch/arm/mach-integrator/include/mach/entry-macro.S
@@ -11,9 +11,6 @@
 #include <mach/platform.h>
 #include <mach/irqs.h>
 
- 		.macro	disable_fiq
-		.endm
-
 		.macro  get_irqnr_preamble, base, tmp
 		.endm
 
diff --git a/arch/arm/mach-iop13xx/include/mach/entry-macro.S b/arch/arm/mach-iop13xx/include/mach/entry-macro.S
index a624a78..1a2d603 100644
--- a/arch/arm/mach-iop13xx/include/mach/entry-macro.S
+++ b/arch/arm/mach-iop13xx/include/mach/entry-macro.S
@@ -16,9 +16,6 @@
  * Place - Suite 330, Boston, MA 02111-1307 USA.
  *
  */
-	.macro  disable_fiq
-	.endm
-
 	.macro get_irqnr_preamble, base, tmp
 	mrc	p15, 0, \tmp, c15, c1, 0
 	orr	\tmp, \tmp, #(1 << 6)
diff --git a/arch/arm/mach-iop32x/include/mach/entry-macro.S b/arch/arm/mach-iop32x/include/mach/entry-macro.S
index b02fb56..ea13ae0 100644
--- a/arch/arm/mach-iop32x/include/mach/entry-macro.S
+++ b/arch/arm/mach-iop32x/include/mach/entry-macro.S
@@ -9,9 +9,6 @@
  */
 #include <mach/iop32x.h>
 
-	.macro	disable_fiq
-	.endm
-
 	.macro get_irqnr_preamble, base, tmp
 	mrc	p15, 0, \tmp, c15, c1, 0
 	orr	\tmp, \tmp, #(1 << 6)
diff --git a/arch/arm/mach-iop33x/include/mach/entry-macro.S b/arch/arm/mach-iop33x/include/mach/entry-macro.S
index 4e1f728..0a398fe 100644
--- a/arch/arm/mach-iop33x/include/mach/entry-macro.S
+++ b/arch/arm/mach-iop33x/include/mach/entry-macro.S
@@ -9,9 +9,6 @@
  */
 #include <mach/iop33x.h>
 
-	.macro	disable_fiq
-	.endm
-
 	.macro get_irqnr_preamble, base, tmp
 	mrc	p15, 0, \tmp, c15, c1, 0
 	orr	\tmp, \tmp, #(1 << 6)
diff --git a/arch/arm/mach-ixp2000/include/mach/entry-macro.S b/arch/arm/mach-ixp2000/include/mach/entry-macro.S
index 5850ffc..6d27838 100644
--- a/arch/arm/mach-ixp2000/include/mach/entry-macro.S
+++ b/arch/arm/mach-ixp2000/include/mach/entry-macro.S
@@ -9,9 +9,6 @@
  */
 #include <mach/irqs.h>
 
-		.macro  disable_fiq
-		.endm
-
 		.macro  get_irqnr_preamble, base, tmp
 		.endm
 
diff --git a/arch/arm/mach-ixp23xx/include/mach/entry-macro.S b/arch/arm/mach-ixp23xx/include/mach/entry-macro.S
index 3f5338a..c22f772 100644
--- a/arch/arm/mach-ixp23xx/include/mach/entry-macro.S
+++ b/arch/arm/mach-ixp23xx/include/mach/entry-macro.S
@@ -2,9 +2,6 @@
  * arch/arm/mach-ixp23xx/include/mach/entry-macro.S
  */
 
-		.macro	disable_fiq
-		.endm
-
 		.macro  get_irqnr_preamble, base, tmp
 		.endm
 
diff --git a/arch/arm/mach-ixp4xx/include/mach/entry-macro.S b/arch/arm/mach-ixp4xx/include/mach/entry-macro.S
index f2e14e9..c53de19 100644
--- a/arch/arm/mach-ixp4xx/include/mach/entry-macro.S
+++ b/arch/arm/mach-ixp4xx/include/mach/entry-macro.S
@@ -9,9 +9,6 @@
  */
 #include <mach/hardware.h>
 
-		.macro	disable_fiq
-		.endm
-
 		.macro  get_irqnr_preamble, base, tmp
 		.endm
 
diff --git a/arch/arm/mach-kirkwood/include/mach/entry-macro.S b/arch/arm/mach-kirkwood/include/mach/entry-macro.S
index 8939d36..5d072cb 100644
--- a/arch/arm/mach-kirkwood/include/mach/entry-macro.S
+++ b/arch/arm/mach-kirkwood/include/mach/entry-macro.S
@@ -10,9 +10,6 @@
 
 #include <mach/bridge-regs.h>
 
-	.macro  disable_fiq
-	.endm
-
 	.macro  arch_ret_to_user, tmp1, tmp2
 	.endm
 
diff --git a/arch/arm/mach-ks8695/include/mach/entry-macro.S b/arch/arm/mach-ks8695/include/mach/entry-macro.S
index b4fe0c1..1bc1c4c 100644
--- a/arch/arm/mach-ks8695/include/mach/entry-macro.S
+++ b/arch/arm/mach-ks8695/include/mach/entry-macro.S
@@ -14,9 +14,6 @@
 #include <mach/hardware.h>
 #include <mach/regs-irq.h>
 
-	.macro	disable_fiq
-	.endm
-
 	.macro  get_irqnr_preamble, base, tmp
 		ldr	\base, =KS8695_IRQ_VA			@ Base address of interrupt controller
 	.endm
diff --git a/arch/arm/mach-l7200/include/mach/entry-macro.S b/arch/arm/mach-l7200/include/mach/entry-macro.S
index 1726d91..570e71a 100644
--- a/arch/arm/mach-l7200/include/mach/entry-macro.S
+++ b/arch/arm/mach-l7200/include/mach/entry-macro.S
@@ -11,9 +11,6 @@
 
 		.equ	irq_base_addr,	IO_BASE_2
 
-		.macro  disable_fiq
-		.endm
-
 		.macro  get_irqnr_preamble, base, tmp
 		.endm
 
diff --git a/arch/arm/mach-lh7a40x/include/mach/entry-macro.S b/arch/arm/mach-lh7a40x/include/mach/entry-macro.S
index 069bb4c..8e99a99 100644
--- a/arch/arm/mach-lh7a40x/include/mach/entry-macro.S
+++ b/arch/arm/mach-lh7a40x/include/mach/entry-macro.S
@@ -23,9 +23,6 @@
 
 #if defined (CONFIG_ARCH_LH7A400) && defined (CONFIG_ARCH_LH7A404)
 
-		.macro	disable_fiq
-		.endm
-
 		.macro  get_irqnr_preamble, base, tmp
 		.endm
 
@@ -83,9 +80,6 @@ branch_irq_lh7a400: b 1000f
 
 
 #elif defined (CONFIG_ARCH_LH7A400)
-		.macro	disable_fiq
-		.endm
-
 		.macro  get_irqnr_preamble, base, tmp
 		.endm
 
@@ -108,9 +102,6 @@ branch_irq_lh7a400: b 1000f
 
 #elif defined(CONFIG_ARCH_LH7A404)
 
-		.macro	disable_fiq
-		.endm
-
 		.macro  get_irqnr_preamble, base, tmp
 		.endm
 
diff --git a/arch/arm/mach-loki/include/mach/entry-macro.S b/arch/arm/mach-loki/include/mach/entry-macro.S
index bc917ed..a569fcb 100644
--- a/arch/arm/mach-loki/include/mach/entry-macro.S
+++ b/arch/arm/mach-loki/include/mach/entry-macro.S
@@ -10,9 +10,6 @@
 
 #include <mach/bridge-regs.h>
 
-	.macro  disable_fiq
-	.endm
-
 	.macro  arch_ret_to_user, tmp1, tmp2
 	.endm
 
diff --git a/arch/arm/mach-mmp/include/mach/entry-macro.S b/arch/arm/mach-mmp/include/mach/entry-macro.S
index c42d9d4..9e93544 100644
--- a/arch/arm/mach-mmp/include/mach/entry-macro.S
+++ b/arch/arm/mach-mmp/include/mach/entry-macro.S
@@ -8,9 +8,6 @@
 
 #include <mach/regs-icu.h>
 
-	.macro	disable_fiq
-	.endm
-
 	.macro	arch_ret_to_user, tmp1, tmp2
 	.endm
 
diff --git a/arch/arm/mach-msm/include/mach/entry-macro.S b/arch/arm/mach-msm/include/mach/entry-macro.S
index d225948..d4a5503 100644
--- a/arch/arm/mach-msm/include/mach/entry-macro.S
+++ b/arch/arm/mach-msm/include/mach/entry-macro.S
@@ -16,9 +16,6 @@
 
 #include <mach/msm_iomap.h>
 
- 	.macro	disable_fiq
-	.endm
-
 	.macro	get_irqnr_preamble, base, tmp
 	@ enable imprecise aborts
 	cpsie	a
diff --git a/arch/arm/mach-mv78xx0/include/mach/entry-macro.S b/arch/arm/mach-mv78xx0/include/mach/entry-macro.S
index 66ae2d2..ad7fd77 100644
--- a/arch/arm/mach-mv78xx0/include/mach/entry-macro.S
+++ b/arch/arm/mach-mv78xx0/include/mach/entry-macro.S
@@ -10,9 +10,6 @@
 
 #include <mach/bridge-regs.h>
 
-	.macro  disable_fiq
-	.endm
-
 	.macro  arch_ret_to_user, tmp1, tmp2
 	.endm
 
diff --git a/arch/arm/mach-netx/include/mach/entry-macro.S b/arch/arm/mach-netx/include/mach/entry-macro.S
index 844f1f9..3eea16a 100644
--- a/arch/arm/mach-netx/include/mach/entry-macro.S
+++ b/arch/arm/mach-netx/include/mach/entry-macro.S
@@ -20,9 +20,6 @@
  */
 #include <mach/hardware.h>
 
-		.macro  disable_fiq
-		.endm
-
 		.macro  get_irqnr_preamble, base, tmp
 		ldr	\base, =io_p2v(0x001ff000)
 		.endm
diff --git a/arch/arm/mach-nomadik/include/mach/entry-macro.S b/arch/arm/mach-nomadik/include/mach/entry-macro.S
index 49f1aa3..6028da6 100644
--- a/arch/arm/mach-nomadik/include/mach/entry-macro.S
+++ b/arch/arm/mach-nomadik/include/mach/entry-macro.S
@@ -9,9 +9,6 @@
 #include <mach/hardware.h>
 #include <mach/irqs.h>
 
-	.macro	disable_fiq
-	.endm
-
 	.macro	get_irqnr_preamble, base, tmp
 	ldr	\base, =IO_ADDRESS(NOMADIK_IC_BASE)
 	.endm
diff --git a/arch/arm/mach-ns9xxx/include/mach/entry-macro.S b/arch/arm/mach-ns9xxx/include/mach/entry-macro.S
index 71ca031..5e49cd4 100644
--- a/arch/arm/mach-ns9xxx/include/mach/entry-macro.S
+++ b/arch/arm/mach-ns9xxx/include/mach/entry-macro.S
@@ -24,5 +24,3 @@
 		ldrne	\irqnr, [\base]
 		.endm
 
-		.macro	disable_fiq
-		.endm
diff --git a/arch/arm/mach-nuc93x/include/mach/entry-macro.S b/arch/arm/mach-nuc93x/include/mach/entry-macro.S
index 1352cbd..e3cd5df 100644
--- a/arch/arm/mach-nuc93x/include/mach/entry-macro.S
+++ b/arch/arm/mach-nuc93x/include/mach/entry-macro.S
@@ -25,8 +25,3 @@
 		cmp	\irqnr, #0
 
 	.endm
-
-	/* currently don't need an disable_fiq macro */
-
-	.macro	disable_fiq
-	.endm
diff --git a/arch/arm/mach-omap1/include/mach/entry-macro.S b/arch/arm/mach-omap1/include/mach/entry-macro.S
index df9060e..1751955 100644
--- a/arch/arm/mach-omap1/include/mach/entry-macro.S
+++ b/arch/arm/mach-omap1/include/mach/entry-macro.S
@@ -28,9 +28,6 @@
 #define INT_IH2_IRQ		INT_1510_IH2_IRQ
 #endif
 
- 		.macro	disable_fiq
-		.endm
-
 		.macro  get_irqnr_preamble, base, tmp
 		.endm
 
diff --git a/arch/arm/mach-omap2/include/mach/entry-macro.S b/arch/arm/mach-omap2/include/mach/entry-macro.S
index 50fd749..e28b256 100644
--- a/arch/arm/mach-omap2/include/mach/entry-macro.S
+++ b/arch/arm/mach-omap2/include/mach/entry-macro.S
@@ -27,9 +27,6 @@
 #define INTCPS_SIR_IRQ_OFFSET	0x0040	/* omap2/3 active interrupt offset */
 #define	ACTIVEIRQ_MASK		0x7f	/* omap2/3 active interrupt bits */
 
-		.macro	disable_fiq
-		.endm
-
 		.macro  arch_ret_to_user, tmp1, tmp2
 		.endm
 
diff --git a/arch/arm/mach-orion5x/include/mach/entry-macro.S b/arch/arm/mach-orion5x/include/mach/entry-macro.S
index d658992..92409c3 100644
--- a/arch/arm/mach-orion5x/include/mach/entry-macro.S
+++ b/arch/arm/mach-orion5x/include/mach/entry-macro.S
@@ -10,9 +10,6 @@
 
 #include <mach/bridge-regs.h>
 
-	.macro  disable_fiq
-	.endm
-
 	.macro  arch_ret_to_user, tmp1, tmp2
 	.endm
 
diff --git a/arch/arm/mach-pnx4008/include/mach/entry-macro.S b/arch/arm/mach-pnx4008/include/mach/entry-macro.S
index 8003037..908c3d6 100644
--- a/arch/arm/mach-pnx4008/include/mach/entry-macro.S
+++ b/arch/arm/mach-pnx4008/include/mach/entry-macro.S
@@ -25,9 +25,6 @@
 #define SIC1_BASE_INT   32
 #define SIC2_BASE_INT   64
 
-		.macro	disable_fiq
-		.endm
-
 		.macro  get_irqnr_preamble, base, tmp
 		.endm
 
diff --git a/arch/arm/mach-pxa/include/mach/entry-macro.S b/arch/arm/mach-pxa/include/mach/entry-macro.S
index a73bc86..5f646d6 100644
--- a/arch/arm/mach-pxa/include/mach/entry-macro.S
+++ b/arch/arm/mach-pxa/include/mach/entry-macro.S
@@ -10,9 +10,6 @@
 #include <mach/hardware.h>
 #include <mach/irqs.h>
 
-		.macro	disable_fiq
-		.endm
-
 		.macro  get_irqnr_preamble, base, tmp
 		.endm
 
diff --git a/arch/arm/mach-realview/include/mach/entry-macro.S b/arch/arm/mach-realview/include/mach/entry-macro.S
index 340a5c2..f3ec9d4 100644
--- a/arch/arm/mach-realview/include/mach/entry-macro.S
+++ b/arch/arm/mach-realview/include/mach/entry-macro.S
@@ -10,9 +10,6 @@
 #include <mach/hardware.h>
 #include <asm/hardware/gic.h>
 
-		.macro	disable_fiq
-		.endm
-
 		.macro  get_irqnr_preamble, base, tmp
 		ldr	\base, =gic_cpu_base_addr
 		ldr	\base, [\base]
diff --git a/arch/arm/mach-s3c2410/include/mach/entry-macro.S b/arch/arm/mach-s3c2410/include/mach/entry-macro.S
index 473b3cd..04791d2 100644
--- a/arch/arm/mach-s3c2410/include/mach/entry-macro.S
+++ b/arch/arm/mach-s3c2410/include/mach/entry-macro.S
@@ -71,8 +71,3 @@
 		@@ exit here, Z flag unset if IRQ
 
 	.endm
-
-		/* currently don't need an disable_fiq macro */
-
-		.macro	disable_fiq
-		.endm
diff --git a/arch/arm/mach-s5p6442/include/mach/entry-macro.S b/arch/arm/mach-s5p6442/include/mach/entry-macro.S
index 6d574ed..c56a1d6 100644
--- a/arch/arm/mach-s5p6442/include/mach/entry-macro.S
+++ b/arch/arm/mach-s5p6442/include/mach/entry-macro.S
@@ -14,9 +14,6 @@
 #include <mach/map.h>
 #include <plat/irqs.h>
 
-	.macro	disable_fiq
-	.endm
-
 	.macro	get_irqnr_preamble, base, tmp
 	ldr	\base, =VA_VIC0
 	.endm
diff --git a/arch/arm/mach-s5pc100/include/mach/entry-macro.S b/arch/arm/mach-s5pc100/include/mach/entry-macro.S
index 6713193..ffb41e9 100644
--- a/arch/arm/mach-s5pc100/include/mach/entry-macro.S
+++ b/arch/arm/mach-s5pc100/include/mach/entry-macro.S
@@ -16,9 +16,6 @@
 #include <mach/map.h>
 #include <plat/irqs.h>
 
-	.macro	disable_fiq
-	.endm
-
 	.macro	get_irqnr_preamble, base, tmp
 	ldr	\base, =S3C_VA_VIC0
 	.endm
diff --git a/arch/arm/mach-s5pv210/include/mach/entry-macro.S b/arch/arm/mach-s5pv210/include/mach/entry-macro.S
index 3aa41ac..35c7a7c 100644
--- a/arch/arm/mach-s5pv210/include/mach/entry-macro.S
+++ b/arch/arm/mach-s5pv210/include/mach/entry-macro.S
@@ -14,9 +14,6 @@
 #include <mach/map.h>
 #include <plat/irqs.h>
 
-	.macro	disable_fiq
-	.endm
-
 	.macro	get_irqnr_preamble, base, tmp
 	ldr	\base, =VA_VIC0
 	.endm
diff --git a/arch/arm/mach-sa1100/include/mach/entry-macro.S b/arch/arm/mach-sa1100/include/mach/entry-macro.S
index 6aa13c4..4151c7f 100644
--- a/arch/arm/mach-sa1100/include/mach/entry-macro.S
+++ b/arch/arm/mach-sa1100/include/mach/entry-macro.S
@@ -8,9 +8,6 @@
  * warranty of any kind, whether express or implied.
  */
 
- 		.macro	disable_fiq
-		.endm
-
 		.macro  get_irqnr_preamble, base, tmp
 		mov	\base, #0xfa000000		@ ICIP = 0xfa050000
 		add	\base, \base, #0x00050000
diff --git a/arch/arm/mach-shark/include/mach/entry-macro.S b/arch/arm/mach-shark/include/mach/entry-macro.S
index e2853c0..c7bfeaa 100644
--- a/arch/arm/mach-shark/include/mach/entry-macro.S
+++ b/arch/arm/mach-shark/include/mach/entry-macro.S
@@ -7,9 +7,6 @@
  * License version 2. This program is licensed "as is" without any
  * warranty of any kind, whether express or implied.
  */
-		.macro	disable_fiq
-		.endm
-
 		.macro  get_irqnr_preamble, base, tmp
 		.endm
 
diff --git a/arch/arm/mach-shmobile/include/mach/entry-macro.S b/arch/arm/mach-shmobile/include/mach/entry-macro.S
index a285d13..dbc6545 100644
--- a/arch/arm/mach-shmobile/include/mach/entry-macro.S
+++ b/arch/arm/mach-shmobile/include/mach/entry-macro.S
@@ -17,9 +17,6 @@
 #include <mach/hardware.h>
 #include <mach/irqs.h>
 
-	.macro  disable_fiq
-	.endm
-
 	.macro  get_irqnr_preamble, base, tmp
 	ldr     \base, =INTFLGA
 	.endm
diff --git a/arch/arm/mach-spear3xx/include/mach/entry-macro.S b/arch/arm/mach-spear3xx/include/mach/entry-macro.S
index 947625d..dfef683 100644
--- a/arch/arm/mach-spear3xx/include/mach/entry-macro.S
+++ b/arch/arm/mach-spear3xx/include/mach/entry-macro.S
@@ -15,9 +15,6 @@
 #include <mach/spear.h>
 #include <asm/hardware/vic.h>
 
-		.macro	disable_fiq
-		.endm
-
 		.macro	get_irqnr_preamble, base, tmp
 		.endm
 
diff --git a/arch/arm/mach-spear6xx/include/mach/entry-macro.S b/arch/arm/mach-spear6xx/include/mach/entry-macro.S
index 9eaecae..76a6ace 100644
--- a/arch/arm/mach-spear6xx/include/mach/entry-macro.S
+++ b/arch/arm/mach-spear6xx/include/mach/entry-macro.S
@@ -15,9 +15,6 @@
 #include <mach/spear.h>
 #include <asm/hardware/vic.h>
 
-		.macro	disable_fiq
-		.endm
-
 		.macro	get_irqnr_preamble, base, tmp
 		.endm
 
diff --git a/arch/arm/mach-stmp378x/include/mach/entry-macro.S b/arch/arm/mach-stmp378x/include/mach/entry-macro.S
index 731a922..9be8e1f 100644
--- a/arch/arm/mach-stmp378x/include/mach/entry-macro.S
+++ b/arch/arm/mach-stmp378x/include/mach/entry-macro.S
@@ -16,9 +16,6 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
 
-		.macro	disable_fiq
-		.endm
-
 		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
 
 	        mov	\base, #0xf0000000	@ vm address of IRQ controller
diff --git a/arch/arm/mach-stmp37xx/include/mach/entry-macro.S b/arch/arm/mach-stmp37xx/include/mach/entry-macro.S
index fed2787..04d9c76 100644
--- a/arch/arm/mach-stmp37xx/include/mach/entry-macro.S
+++ b/arch/arm/mach-stmp37xx/include/mach/entry-macro.S
@@ -16,9 +16,6 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
 
-		.macro	disable_fiq
-		.endm
-
 		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
 
 	        mov	\base, #0xf0000000	@ vm address of IRQ controller
diff --git a/arch/arm/mach-u300/include/mach/entry-macro.S b/arch/arm/mach-u300/include/mach/entry-macro.S
index 20731ae..171f2e1 100644
--- a/arch/arm/mach-u300/include/mach/entry-macro.S
+++ b/arch/arm/mach-u300/include/mach/entry-macro.S
@@ -11,9 +11,6 @@
 #include <mach/hardware.h>
 #include <asm/hardware/vic.h>
 
-	.macro	disable_fiq
-	.endm
-
 	.macro  get_irqnr_preamble, base, tmp
 	.endm
 
diff --git a/arch/arm/mach-ux500/include/mach/entry-macro.S b/arch/arm/mach-ux500/include/mach/entry-macro.S
index 60ea88d..1f5bb0b 100644
--- a/arch/arm/mach-ux500/include/mach/entry-macro.S
+++ b/arch/arm/mach-ux500/include/mach/entry-macro.S
@@ -13,9 +13,6 @@
 #include <mach/hardware.h>
 #include <asm/hardware/gic.h>
 
-		.macro	disable_fiq
-		.endm
-
 		.macro  get_irqnr_preamble, base, tmp
 		ldr     \base, =IO_ADDRESS(UX500_GIC_CPU_BASE)
 		.endm
diff --git a/arch/arm/mach-versatile/include/mach/entry-macro.S b/arch/arm/mach-versatile/include/mach/entry-macro.S
index e6f7c16..ea5e33d 100644
--- a/arch/arm/mach-versatile/include/mach/entry-macro.S
+++ b/arch/arm/mach-versatile/include/mach/entry-macro.S
@@ -11,9 +11,6 @@
 #include <mach/platform.h>
 #include <asm/hardware/vic.h>
 
-		.macro	disable_fiq
-		.endm
-
 		.macro  get_irqnr_preamble, base, tmp
 		ldr	\base, =IO_ADDRESS(VERSATILE_VIC_BASE)
 		.endm
diff --git a/arch/arm/mach-vexpress/include/mach/entry-macro.S b/arch/arm/mach-vexpress/include/mach/entry-macro.S
index 20e9fb5..15c70e8 100644
--- a/arch/arm/mach-vexpress/include/mach/entry-macro.S
+++ b/arch/arm/mach-vexpress/include/mach/entry-macro.S
@@ -1,8 +1,5 @@
 #include <asm/hardware/gic.h>
 
-	.macro	disable_fiq
-	.endm
-
 	.macro	get_irqnr_preamble, base, tmp
 	ldr	\base, =gic_cpu_base_addr
 	ldr	\base, [\base]
diff --git a/arch/arm/mach-w90x900/include/mach/entry-macro.S b/arch/arm/mach-w90x900/include/mach/entry-macro.S
index d39aca5..b747c2b 100644
--- a/arch/arm/mach-w90x900/include/mach/entry-macro.S
+++ b/arch/arm/mach-w90x900/include/mach/entry-macro.S
@@ -27,8 +27,3 @@
 		cmp	\irqnr, #0
 
 	.endm
-
-	/* currently don't need an disable_fiq macro */
-
-	.macro	disable_fiq
-	.endm
diff --git a/arch/arm/plat-mxc/include/mach/entry-macro.S b/arch/arm/plat-mxc/include/mach/entry-macro.S
index aeb0869..4afbf58 100644
--- a/arch/arm/plat-mxc/include/mach/entry-macro.S
+++ b/arch/arm/plat-mxc/include/mach/entry-macro.S
@@ -14,9 +14,6 @@
 #define AVIC_NIMASK	0x04
 
 	@ this macro disables fast irq (not implemented)
-	.macro	disable_fiq
-	.endm
-
 	.macro  get_irqnr_preamble, base, tmp
 #ifndef CONFIG_MXC_TZIC
 	ldr	\base, =avic_base
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 12/13] [ARM] Introduce ARCH_HAS_RET_TO_USER and remove most arch_ret_to_user
  2010-07-13 15:33 [RFC PATCH 0/13] Misc cleanup patches to prepare for unified zImage Eric Miao
                   ` (10 preceding siblings ...)
  2010-07-13 15:33 ` [PATCH 11/13] [ARM] Introduce ARCH_HAS_DISABLE_FIQ and remove most disable_fiq Eric Miao
@ 2010-07-13 15:33 ` Eric Miao
  2010-07-13 15:33 ` [PATCH 13/13] [ARM] Introduce ARCH_HAS_IDLE_RESET to allow SoC specific idle/reset Eric Miao
  12 siblings, 0 replies; 18+ messages in thread
From: Eric Miao @ 2010-07-13 15:33 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Eric Miao <eric.miao@canonical.com>
---
 arch/arm/Kconfig                                   |    6 ++++++
 arch/arm/include/asm/entry-macro-vic2.S            |    3 ---
 arch/arm/kernel/entry-common.S                     |    4 ++++
 arch/arm/mach-aaec2000/include/mach/entry-macro.S  |    3 ---
 arch/arm/mach-at91/include/mach/entry-macro.S      |    3 ---
 arch/arm/mach-bcmring/include/mach/entry-macro.S   |    3 ---
 arch/arm/mach-clps711x/include/mach/entry-macro.S  |    3 ---
 arch/arm/mach-cns3xxx/include/mach/entry-macro.S   |    3 ---
 arch/arm/mach-davinci/include/mach/entry-macro.S   |    3 ---
 arch/arm/mach-dove/include/mach/entry-macro.S      |    3 ---
 arch/arm/mach-ebsa110/include/mach/entry-macro.S   |    3 ---
 arch/arm/mach-ep93xx/include/mach/entry-macro.S    |    3 ---
 .../arm/mach-footbridge/include/mach/entry-macro.S |    3 ---
 arch/arm/mach-gemini/include/mach/entry-macro.S    |    3 ---
 arch/arm/mach-h720x/include/mach/entry-macro.S     |    3 ---
 .../arm/mach-integrator/include/mach/entry-macro.S |    3 ---
 arch/arm/mach-ixp2000/include/mach/entry-macro.S   |    3 ---
 arch/arm/mach-ixp23xx/include/mach/entry-macro.S   |    3 ---
 arch/arm/mach-ixp4xx/include/mach/entry-macro.S    |    3 ---
 arch/arm/mach-kirkwood/include/mach/entry-macro.S  |    3 ---
 arch/arm/mach-ks8695/include/mach/entry-macro.S    |    3 ---
 arch/arm/mach-l7200/include/mach/entry-macro.S     |    3 ---
 arch/arm/mach-lh7a40x/include/mach/entry-macro.S   |    9 ---------
 arch/arm/mach-loki/include/mach/entry-macro.S      |    3 ---
 arch/arm/mach-mmp/include/mach/entry-macro.S       |    3 ---
 arch/arm/mach-msm/include/mach/entry-macro.S       |    3 ---
 arch/arm/mach-mv78xx0/include/mach/entry-macro.S   |    3 ---
 arch/arm/mach-netx/include/mach/entry-macro.S      |    3 ---
 arch/arm/mach-nomadik/include/mach/entry-macro.S   |    3 ---
 arch/arm/mach-ns9xxx/include/mach/entry-macro.S    |    3 ---
 arch/arm/mach-nuc93x/include/mach/entry-macro.S    |    3 ---
 arch/arm/mach-omap1/include/mach/entry-macro.S     |    3 ---
 arch/arm/mach-omap2/include/mach/entry-macro.S     |    3 ---
 arch/arm/mach-orion5x/include/mach/entry-macro.S   |    3 ---
 arch/arm/mach-pnx4008/include/mach/entry-macro.S   |    3 ---
 arch/arm/mach-pxa/include/mach/entry-macro.S       |    3 ---
 arch/arm/mach-realview/include/mach/entry-macro.S  |    3 ---
 arch/arm/mach-rpc/include/mach/entry-macro.S       |    3 ---
 arch/arm/mach-s3c2410/include/mach/entry-macro.S   |    3 ---
 arch/arm/mach-s5p6442/include/mach/entry-macro.S   |    3 ---
 arch/arm/mach-s5pc100/include/mach/entry-macro.S   |    3 ---
 arch/arm/mach-s5pv210/include/mach/entry-macro.S   |    3 ---
 arch/arm/mach-sa1100/include/mach/entry-macro.S    |    3 ---
 arch/arm/mach-shark/include/mach/entry-macro.S     |    3 ---
 arch/arm/mach-shmobile/include/mach/entry-macro.S  |    3 ---
 arch/arm/mach-spear3xx/include/mach/entry-macro.S  |    3 ---
 arch/arm/mach-spear6xx/include/mach/entry-macro.S  |    3 ---
 arch/arm/mach-stmp378x/include/mach/entry-macro.S  |    2 --
 arch/arm/mach-stmp37xx/include/mach/entry-macro.S  |    2 --
 arch/arm/mach-u300/include/mach/entry-macro.S      |    3 ---
 arch/arm/mach-ux500/include/mach/entry-macro.S     |    3 ---
 arch/arm/mach-versatile/include/mach/entry-macro.S |    3 ---
 arch/arm/mach-vexpress/include/mach/entry-macro.S  |    3 ---
 arch/arm/mach-w90x900/include/mach/entry-macro.S   |    3 ---
 arch/arm/plat-mxc/include/mach/entry-macro.S       |    3 ---
 55 files changed, 10 insertions(+), 163 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 7da1979..708a1e1 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -59,6 +59,9 @@ config ARCH_USES_DEFAULT_GPIO_H
 config ARCH_USES_DEFAULT_TIMEX_H
 	def_bool n
 
+config ARCH_HAS_RET_TO_USER
+	def_bool n
+
 config GENERIC_CLOCKEVENTS
 	bool
 
@@ -399,6 +402,7 @@ config ARCH_IOP13XX
 	select PLAT_IOP
 	select PCI
 	select ARCH_SUPPORTS_MSI
+	select ARCH_HAS_RET_TO_USER
 	select VMSPLIT_1G
 	help
 	  Support for Intel's IOP13XX (XScale) family of processors.
@@ -410,6 +414,7 @@ config ARCH_IOP32X
 	select PLAT_IOP
 	select PCI
 	select ARCH_REQUIRE_GPIOLIB
+	select ARCH_HAS_RET_TO_USER
 	help
 	  Support for Intel's 80219 and IOP32X (XScale) family of
 	  processors.
@@ -421,6 +426,7 @@ config ARCH_IOP33X
 	select PLAT_IOP
 	select PCI
 	select ARCH_REQUIRE_GPIOLIB
+	select ARCH_HAS_RET_TO_USER
 	help
 	  Support for Intel's IOP33X (XScale) family of processors.
 
diff --git a/arch/arm/include/asm/entry-macro-vic2.S b/arch/arm/include/asm/entry-macro-vic2.S
index 2077314..2148196 100644
--- a/arch/arm/include/asm/entry-macro-vic2.S
+++ b/arch/arm/include/asm/entry-macro-vic2.S
@@ -33,9 +33,6 @@
 	ldr	\base, =VA_VIC0
 	.endm
 
-	.macro	arch_ret_to_user, tmp1, tmp2
-	.endm
-
 	.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
 
 	@ check the vic0
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index 2c1db77..5fa7a4f 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -30,8 +30,10 @@ ret_fast_syscall:
 	tst	r1, #_TIF_WORK_MASK
 	bne	fast_work_pending
 
+#ifdef CONFIG_ARCH_HAS_RET_TO_USER
 	/* perform architecture specific actions before user return */
 	arch_ret_to_user r1, lr
+#endif
 
 	restore_user_regs fast = 1, offset = S_OFF
  UNWIND(.fnend		)
@@ -63,8 +65,10 @@ ret_slow_syscall:
 	tst	r1, #_TIF_WORK_MASK
 	bne	work_pending
 no_work_pending:
+#ifdef CONFIG_ARCH_HAS_RET_TO_USER
 	/* perform architecture specific actions before user return */
 	arch_ret_to_user r1, lr
+#endif
 
 	restore_user_regs fast = 0, offset = 0
 ENDPROC(ret_to_user)
diff --git a/arch/arm/mach-aaec2000/include/mach/entry-macro.S b/arch/arm/mach-aaec2000/include/mach/entry-macro.S
index 1cdbab4..9ffc1c4 100644
--- a/arch/arm/mach-aaec2000/include/mach/entry-macro.S
+++ b/arch/arm/mach-aaec2000/include/mach/entry-macro.S
@@ -15,9 +15,6 @@
 		.macro  get_irqnr_preamble, base, tmp
 		.endm
 
-		.macro  arch_ret_to_user, tmp1, tmp2
-		.endm
-
 		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
 		mov	r4, #0xf8000000
 		add	r4, r4, #0x00000500
diff --git a/arch/arm/mach-at91/include/mach/entry-macro.S b/arch/arm/mach-at91/include/mach/entry-macro.S
index c39f889..85a84d4 100644
--- a/arch/arm/mach-at91/include/mach/entry-macro.S
+++ b/arch/arm/mach-at91/include/mach/entry-macro.S
@@ -17,9 +17,6 @@
 	ldr	\base, =(AT91_VA_BASE_SYS + AT91_AIC)		@ base virtual address of AIC peripheral
 	.endm
 
-	.macro  arch_ret_to_user, tmp1, tmp2
-	.endm
-
 	.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
 	ldr	\irqnr, [\base, #(AT91_AIC_IVR - AT91_AIC)]	@ read IRQ vector register: de-asserts nIRQ to processor (and clears interrupt)
 	ldr	\irqstat, [\base, #(AT91_AIC_ISR - AT91_AIC)]	@ read interrupt source number
diff --git a/arch/arm/mach-bcmring/include/mach/entry-macro.S b/arch/arm/mach-bcmring/include/mach/entry-macro.S
index 7dac106..af0d3cc 100644
--- a/arch/arm/mach-bcmring/include/mach/entry-macro.S
+++ b/arch/arm/mach-bcmring/include/mach/entry-macro.S
@@ -75,9 +75,6 @@
 		.macro  get_irqnr_preamble, base, tmp
 		.endm
 
-		.macro  arch_ret_to_user, tmp1, tmp2
-		.endm
-
 		.macro	irq_prio_table
 		.endm
 
diff --git a/arch/arm/mach-clps711x/include/mach/entry-macro.S b/arch/arm/mach-clps711x/include/mach/entry-macro.S
index a04c12e..125af59 100644
--- a/arch/arm/mach-clps711x/include/mach/entry-macro.S
+++ b/arch/arm/mach-clps711x/include/mach/entry-macro.S
@@ -13,9 +13,6 @@
 		.macro	get_irqnr_preamble, base, tmp
 		.endm
 
-		.macro	arch_ret_to_user, tmp1, tmp2
-		.endm
-
 #if (INTSR2 - INTSR1) != (INTMR2 - INTMR1)
 #error INTSR stride != INTMR stride
 #endif
diff --git a/arch/arm/mach-cns3xxx/include/mach/entry-macro.S b/arch/arm/mach-cns3xxx/include/mach/entry-macro.S
index a7601d0..25c1de8 100644
--- a/arch/arm/mach-cns3xxx/include/mach/entry-macro.S
+++ b/arch/arm/mach-cns3xxx/include/mach/entry-macro.S
@@ -16,9 +16,6 @@
 		ldr	\base, [\base]
 		.endm
 
-		.macro  arch_ret_to_user, tmp1, tmp2
-		.endm
-
 		/*
 		 * The interrupt numbering scheme is defined in the
 		 * interrupt controller spec.  To wit:
diff --git a/arch/arm/mach-davinci/include/mach/entry-macro.S b/arch/arm/mach-davinci/include/mach/entry-macro.S
index 9119790..694c18f 100644
--- a/arch/arm/mach-davinci/include/mach/entry-macro.S
+++ b/arch/arm/mach-davinci/include/mach/entry-macro.S
@@ -16,9 +16,6 @@
 		ldr \base, [\base]
 		.endm
 
-		.macro  arch_ret_to_user, tmp1, tmp2
-		.endm
-
 		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
 #if defined(CONFIG_AINTC) && defined(CONFIG_CP_INTC)
 		ldr \tmp, =davinci_intc_type
diff --git a/arch/arm/mach-dove/include/mach/entry-macro.S b/arch/arm/mach-dove/include/mach/entry-macro.S
index ec55a83..72d622b 100644
--- a/arch/arm/mach-dove/include/mach/entry-macro.S
+++ b/arch/arm/mach-dove/include/mach/entry-macro.S
@@ -10,9 +10,6 @@
 
 #include <mach/bridge-regs.h>
 
-	.macro  arch_ret_to_user, tmp1, tmp2
-	.endm
-
 	.macro  get_irqnr_preamble, base, tmp
 	ldr	\base, =IRQ_VIRT_BASE
 	.endm
diff --git a/arch/arm/mach-ebsa110/include/mach/entry-macro.S b/arch/arm/mach-ebsa110/include/mach/entry-macro.S
index 6d32f8b..14b110d 100644
--- a/arch/arm/mach-ebsa110/include/mach/entry-macro.S
+++ b/arch/arm/mach-ebsa110/include/mach/entry-macro.S
@@ -16,9 +16,6 @@
 	mov	\base, #IRQ_STAT
 	.endm
 
-	.macro  arch_ret_to_user, tmp1, tmp2
-	.endm
-
 	.macro	get_irqnr_and_base, irqnr, stat, base, tmp
 	ldrb	\stat, [\base]			@ get interrupts
 	mov	\irqnr, #0
diff --git a/arch/arm/mach-ep93xx/include/mach/entry-macro.S b/arch/arm/mach-ep93xx/include/mach/entry-macro.S
index 1b535d6..4891ad7 100644
--- a/arch/arm/mach-ep93xx/include/mach/entry-macro.S
+++ b/arch/arm/mach-ep93xx/include/mach/entry-macro.S
@@ -14,9 +14,6 @@
 		.macro  get_irqnr_preamble, base, tmp
 		.endm
 
-		.macro  arch_ret_to_user, tmp1, tmp2
-		.endm
-
 		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
 		ldr	\base, =(EP93XX_AHB_VIRT_BASE)
 		orr	\base, \base, #0x000b0000
diff --git a/arch/arm/mach-footbridge/include/mach/entry-macro.S b/arch/arm/mach-footbridge/include/mach/entry-macro.S
index 77c709e..dabbd5c 100644
--- a/arch/arm/mach-footbridge/include/mach/entry-macro.S
+++ b/arch/arm/mach-footbridge/include/mach/entry-macro.S
@@ -21,9 +21,6 @@
 		.endif
 		.endm
 
-		.macro  arch_ret_to_user, tmp1, tmp2
-		.endm
-
 		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
 		ldr	\irqstat, [\base, #0x180]	@ get interrupts
 
diff --git a/arch/arm/mach-gemini/include/mach/entry-macro.S b/arch/arm/mach-gemini/include/mach/entry-macro.S
index b24bde7..f044e43 100644
--- a/arch/arm/mach-gemini/include/mach/entry-macro.S
+++ b/arch/arm/mach-gemini/include/mach/entry-macro.S
@@ -15,9 +15,6 @@
 	.macro  get_irqnr_preamble, base, tmp
 	.endm
 
-	.macro  arch_ret_to_user, tmp1, tmp2
-	.endm
-
 	.macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
 	ldr     \irqstat, =IO_ADDRESS(GEMINI_INTERRUPT_BASE + IRQ_STATUS)
 	ldr     \irqnr, [\irqstat]
diff --git a/arch/arm/mach-h720x/include/mach/entry-macro.S b/arch/arm/mach-h720x/include/mach/entry-macro.S
index d928619..96f2e11 100644
--- a/arch/arm/mach-h720x/include/mach/entry-macro.S
+++ b/arch/arm/mach-h720x/include/mach/entry-macro.S
@@ -11,9 +11,6 @@
 		.macro  get_irqnr_preamble, base, tmp
 		.endm
 
-		.macro  arch_ret_to_user, tmp1, tmp2
-		.endm
-
 		.macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
 #if defined (CONFIG_CPU_H7201) || defined (CONFIG_CPU_H7202)
 		@ we could use the id register on H7202, but this is not
diff --git a/arch/arm/mach-integrator/include/mach/entry-macro.S b/arch/arm/mach-integrator/include/mach/entry-macro.S
index f0c4de4..5cc7b85 100644
--- a/arch/arm/mach-integrator/include/mach/entry-macro.S
+++ b/arch/arm/mach-integrator/include/mach/entry-macro.S
@@ -14,9 +14,6 @@
 		.macro  get_irqnr_preamble, base, tmp
 		.endm
 
-		.macro  arch_ret_to_user, tmp1, tmp2
-		.endm
-
 		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
 /* FIXME: should not be using soo many LDRs here */
 		ldr	\base, =IO_ADDRESS(INTEGRATOR_IC_BASE)
diff --git a/arch/arm/mach-ixp2000/include/mach/entry-macro.S b/arch/arm/mach-ixp2000/include/mach/entry-macro.S
index 6d27838..c4444df 100644
--- a/arch/arm/mach-ixp2000/include/mach/entry-macro.S
+++ b/arch/arm/mach-ixp2000/include/mach/entry-macro.S
@@ -12,9 +12,6 @@
 		.macro  get_irqnr_preamble, base, tmp
 		.endm
 
-		.macro  arch_ret_to_user, tmp1, tmp2
-		.endm
-
 		.macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
 
 		mov	\irqnr, #0x0              @clear out irqnr as default
diff --git a/arch/arm/mach-ixp23xx/include/mach/entry-macro.S b/arch/arm/mach-ixp23xx/include/mach/entry-macro.S
index c22f772..3fd2cb9 100644
--- a/arch/arm/mach-ixp23xx/include/mach/entry-macro.S
+++ b/arch/arm/mach-ixp23xx/include/mach/entry-macro.S
@@ -5,9 +5,6 @@
 		.macro  get_irqnr_preamble, base, tmp
 		.endm
 
-		.macro  arch_ret_to_user, tmp1, tmp2
-		.endm
-
 		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
 		ldr	\irqnr, =(IXP23XX_INTC_VIRT + IXP23XX_INTR_IRQ_ENC_ST_OFFSET)
 		ldr	\irqnr, [\irqnr]	@ get interrupt number
diff --git a/arch/arm/mach-ixp4xx/include/mach/entry-macro.S b/arch/arm/mach-ixp4xx/include/mach/entry-macro.S
index c53de19..79adf83 100644
--- a/arch/arm/mach-ixp4xx/include/mach/entry-macro.S
+++ b/arch/arm/mach-ixp4xx/include/mach/entry-macro.S
@@ -12,9 +12,6 @@
 		.macro  get_irqnr_preamble, base, tmp
 		.endm
 
-		.macro  arch_ret_to_user, tmp1, tmp2
-		.endm
-
 		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
 		ldr	\irqstat, =(IXP4XX_INTC_BASE_VIRT+IXP4XX_ICIP_OFFSET)
 		ldr	\irqstat, [\irqstat]		@ get interrupts
diff --git a/arch/arm/mach-kirkwood/include/mach/entry-macro.S b/arch/arm/mach-kirkwood/include/mach/entry-macro.S
index 5d072cb..82db29f 100644
--- a/arch/arm/mach-kirkwood/include/mach/entry-macro.S
+++ b/arch/arm/mach-kirkwood/include/mach/entry-macro.S
@@ -10,9 +10,6 @@
 
 #include <mach/bridge-regs.h>
 
-	.macro  arch_ret_to_user, tmp1, tmp2
-	.endm
-
 	.macro  get_irqnr_preamble, base, tmp
 	ldr	\base, =IRQ_VIRT_BASE
 	.endm
diff --git a/arch/arm/mach-ks8695/include/mach/entry-macro.S b/arch/arm/mach-ks8695/include/mach/entry-macro.S
index 1bc1c4c..8315b34 100644
--- a/arch/arm/mach-ks8695/include/mach/entry-macro.S
+++ b/arch/arm/mach-ks8695/include/mach/entry-macro.S
@@ -18,9 +18,6 @@
 		ldr	\base, =KS8695_IRQ_VA			@ Base address of interrupt controller
 	.endm
 
-	.macro  arch_ret_to_user, tmp1, tmp2
-	.endm
-
 	.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
 		ldr	\irqstat, [\base, #KS8695_INTMS]	@ Mask Status register
 
diff --git a/arch/arm/mach-l7200/include/mach/entry-macro.S b/arch/arm/mach-l7200/include/mach/entry-macro.S
index 570e71a..1564b9e 100644
--- a/arch/arm/mach-l7200/include/mach/entry-macro.S
+++ b/arch/arm/mach-l7200/include/mach/entry-macro.S
@@ -14,9 +14,6 @@
 		.macro  get_irqnr_preamble, base, tmp
 		.endm
 
-		.macro  arch_ret_to_user, tmp1, tmp2
-		.endm
-
 		.macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
 		mov     \irqstat, #irq_base_addr		@ Virt addr IRQ regs
 		add	\irqstat, \irqstat, #0x00001000		@ Status reg
diff --git a/arch/arm/mach-lh7a40x/include/mach/entry-macro.S b/arch/arm/mach-lh7a40x/include/mach/entry-macro.S
index 8e99a99..e74ba53 100644
--- a/arch/arm/mach-lh7a40x/include/mach/entry-macro.S
+++ b/arch/arm/mach-lh7a40x/include/mach/entry-macro.S
@@ -26,9 +26,6 @@
 		.macro  get_irqnr_preamble, base, tmp
 		.endm
 
-		.macro  arch_ret_to_user, tmp1, tmp2
-		.endm
-
 		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
 
 branch_irq_lh7a400: b 1000f
@@ -83,9 +80,6 @@ branch_irq_lh7a400: b 1000f
 		.macro  get_irqnr_preamble, base, tmp
 		.endm
 
-		.macro  arch_ret_to_user, tmp1, tmp2
-		.endm
-
 		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
 		mov	\irqnr, #0
 		mov	\base, #io_p2v(0x80000000)	@ APB registers
@@ -105,9 +99,6 @@ branch_irq_lh7a400: b 1000f
 		.macro  get_irqnr_preamble, base, tmp
 		.endm
 
-		.macro  arch_ret_to_user, tmp1, tmp2
-		.endm
-
 		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
 		mov	\irqnr, #0			@ VIC1 irq base
 		mov	\base, #io_p2v(0x80000000)	@ APB registers
diff --git a/arch/arm/mach-loki/include/mach/entry-macro.S b/arch/arm/mach-loki/include/mach/entry-macro.S
index a569fcb..fb5b942 100644
--- a/arch/arm/mach-loki/include/mach/entry-macro.S
+++ b/arch/arm/mach-loki/include/mach/entry-macro.S
@@ -10,9 +10,6 @@
 
 #include <mach/bridge-regs.h>
 
-	.macro  arch_ret_to_user, tmp1, tmp2
-	.endm
-
 	.macro  get_irqnr_preamble, base, tmp
 	ldr	\base, =IRQ_VIRT_BASE
 	.endm
diff --git a/arch/arm/mach-mmp/include/mach/entry-macro.S b/arch/arm/mach-mmp/include/mach/entry-macro.S
index 9e93544..9cff9e7 100644
--- a/arch/arm/mach-mmp/include/mach/entry-macro.S
+++ b/arch/arm/mach-mmp/include/mach/entry-macro.S
@@ -8,9 +8,6 @@
 
 #include <mach/regs-icu.h>
 
-	.macro	arch_ret_to_user, tmp1, tmp2
-	.endm
-
 	.macro	get_irqnr_preamble, base, tmp
 	mrc	p15, 0, \tmp, c0, c0, 0		@ CPUID
 	and	\tmp, \tmp, #0xff00
diff --git a/arch/arm/mach-msm/include/mach/entry-macro.S b/arch/arm/mach-msm/include/mach/entry-macro.S
index d4a5503..3381956 100644
--- a/arch/arm/mach-msm/include/mach/entry-macro.S
+++ b/arch/arm/mach-msm/include/mach/entry-macro.S
@@ -22,9 +22,6 @@
 	mov	\base, #MSM_VIC_BASE
 	.endm
 
-	.macro	arch_ret_to_user, tmp1, tmp2
-	.endm
-
 	.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
 	@ 0xD0 has irq# or old irq# if the irq has been handled
 	@ 0xD4 has irq# or -1 if none pending *but* if you just
diff --git a/arch/arm/mach-mv78xx0/include/mach/entry-macro.S b/arch/arm/mach-mv78xx0/include/mach/entry-macro.S
index ad7fd77..6b1f088 100644
--- a/arch/arm/mach-mv78xx0/include/mach/entry-macro.S
+++ b/arch/arm/mach-mv78xx0/include/mach/entry-macro.S
@@ -10,9 +10,6 @@
 
 #include <mach/bridge-regs.h>
 
-	.macro  arch_ret_to_user, tmp1, tmp2
-	.endm
-
 	.macro  get_irqnr_preamble, base, tmp
 	ldr	\base, =IRQ_VIRT_BASE
 	.endm
diff --git a/arch/arm/mach-netx/include/mach/entry-macro.S b/arch/arm/mach-netx/include/mach/entry-macro.S
index 3eea16a..d198559 100644
--- a/arch/arm/mach-netx/include/mach/entry-macro.S
+++ b/arch/arm/mach-netx/include/mach/entry-macro.S
@@ -24,9 +24,6 @@
 		ldr	\base, =io_p2v(0x001ff000)
 		.endm
 
-		.macro  arch_ret_to_user, tmp1, tmp2
-		.endm
-
 		.macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
 		ldr	\irqstat, [\base, #0]
 		clz	\irqnr, \irqstat
diff --git a/arch/arm/mach-nomadik/include/mach/entry-macro.S b/arch/arm/mach-nomadik/include/mach/entry-macro.S
index 6028da6..5c72dba 100644
--- a/arch/arm/mach-nomadik/include/mach/entry-macro.S
+++ b/arch/arm/mach-nomadik/include/mach/entry-macro.S
@@ -13,9 +13,6 @@
 	ldr	\base, =IO_ADDRESS(NOMADIK_IC_BASE)
 	.endm
 
-	.macro	arch_ret_to_user, tmp1, tmp2
-	.endm
-
 	.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
 
 	/* This stanza gets the irq mask from one of two status registers */
diff --git a/arch/arm/mach-ns9xxx/include/mach/entry-macro.S b/arch/arm/mach-ns9xxx/include/mach/entry-macro.S
index 5e49cd4..cbdbdc3 100644
--- a/arch/arm/mach-ns9xxx/include/mach/entry-macro.S
+++ b/arch/arm/mach-ns9xxx/include/mach/entry-macro.S
@@ -15,9 +15,6 @@
 		ldr	\base, =SYS_ISRADDR
 		.endm
 
-		.macro	arch_ret_to_user, tmp1, tmp2
-		.endm
-
 		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
 		ldr	\irqstat, [\base, #(SYS_ISA - SYS_ISRADDR)]
 		cmp	\irqstat, #0
diff --git a/arch/arm/mach-nuc93x/include/mach/entry-macro.S b/arch/arm/mach-nuc93x/include/mach/entry-macro.S
index e3cd5df..3ed2c17 100644
--- a/arch/arm/mach-nuc93x/include/mach/entry-macro.S
+++ b/arch/arm/mach-nuc93x/include/mach/entry-macro.S
@@ -13,9 +13,6 @@
 	.macro  get_irqnr_preamble, base, tmp
 	.endm
 
-	.macro  arch_ret_to_user, tmp1, tmp2
-	.endm
-
 	.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
 
 		mov	\base, #AIC_BA
diff --git a/arch/arm/mach-omap1/include/mach/entry-macro.S b/arch/arm/mach-omap1/include/mach/entry-macro.S
index 1751955..a620265 100644
--- a/arch/arm/mach-omap1/include/mach/entry-macro.S
+++ b/arch/arm/mach-omap1/include/mach/entry-macro.S
@@ -31,9 +31,6 @@
 		.macro  get_irqnr_preamble, base, tmp
 		.endm
 
-		.macro  arch_ret_to_user, tmp1, tmp2
-		.endm
-
 		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
 		ldr	\base, =OMAP1_IO_ADDRESS(OMAP_IH1_BASE)
 		ldr	\irqnr, [\base, #IRQ_ITR_REG_OFFSET]
diff --git a/arch/arm/mach-omap2/include/mach/entry-macro.S b/arch/arm/mach-omap2/include/mach/entry-macro.S
index e28b256..0b271f7 100644
--- a/arch/arm/mach-omap2/include/mach/entry-macro.S
+++ b/arch/arm/mach-omap2/include/mach/entry-macro.S
@@ -27,9 +27,6 @@
 #define INTCPS_SIR_IRQ_OFFSET	0x0040	/* omap2/3 active interrupt offset */
 #define	ACTIVEIRQ_MASK		0x7f	/* omap2/3 active interrupt bits */
 
-		.macro  arch_ret_to_user, tmp1, tmp2
-		.endm
-
 /*
  * Unoptimized irq functions for multi-omap2, 3 and 4
  */
diff --git a/arch/arm/mach-orion5x/include/mach/entry-macro.S b/arch/arm/mach-orion5x/include/mach/entry-macro.S
index 92409c3..79eb502 100644
--- a/arch/arm/mach-orion5x/include/mach/entry-macro.S
+++ b/arch/arm/mach-orion5x/include/mach/entry-macro.S
@@ -10,9 +10,6 @@
 
 #include <mach/bridge-regs.h>
 
-	.macro  arch_ret_to_user, tmp1, tmp2
-	.endm
-
 	.macro  get_irqnr_preamble, base, tmp
 	ldr	\base, =MAIN_IRQ_CAUSE
 	.endm
diff --git a/arch/arm/mach-pnx4008/include/mach/entry-macro.S b/arch/arm/mach-pnx4008/include/mach/entry-macro.S
index 908c3d6..4ccd4c5 100644
--- a/arch/arm/mach-pnx4008/include/mach/entry-macro.S
+++ b/arch/arm/mach-pnx4008/include/mach/entry-macro.S
@@ -28,9 +28,6 @@
 		.macro  get_irqnr_preamble, base, tmp
 		.endm
 
-		.macro  arch_ret_to_user, tmp1, tmp2
-		.endm
-
 		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
 /* decode the MIC interrupt numbers */
 		ldr	\base, =IO_ADDRESS(PNX4008_INTCTRLMIC_BASE)
diff --git a/arch/arm/mach-pxa/include/mach/entry-macro.S b/arch/arm/mach-pxa/include/mach/entry-macro.S
index 5f646d6..8c64ce9 100644
--- a/arch/arm/mach-pxa/include/mach/entry-macro.S
+++ b/arch/arm/mach-pxa/include/mach/entry-macro.S
@@ -13,9 +13,6 @@
 		.macro  get_irqnr_preamble, base, tmp
 		.endm
 
-		.macro  arch_ret_to_user, tmp1, tmp2
-		.endm
-
 		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
 		mrc	p15, 0, \tmp, c0, c0, 0		@ CPUID
 		mov	\tmp, \tmp, lsr #13
diff --git a/arch/arm/mach-realview/include/mach/entry-macro.S b/arch/arm/mach-realview/include/mach/entry-macro.S
index f3ec9d4..5621337 100644
--- a/arch/arm/mach-realview/include/mach/entry-macro.S
+++ b/arch/arm/mach-realview/include/mach/entry-macro.S
@@ -15,9 +15,6 @@
 		ldr	\base, [\base]
 		.endm
 
-		.macro  arch_ret_to_user, tmp1, tmp2
-		.endm
-
 		/*
 		 * The interrupt numbering scheme is defined in the
 		 * interrupt controller spec.  To wit:
diff --git a/arch/arm/mach-rpc/include/mach/entry-macro.S b/arch/arm/mach-rpc/include/mach/entry-macro.S
index 4e7e541..02c246d 100644
--- a/arch/arm/mach-rpc/include/mach/entry-macro.S
+++ b/arch/arm/mach-rpc/include/mach/entry-macro.S
@@ -11,6 +11,3 @@
 	.endif
 	.endm
 
-	.macro  arch_ret_to_user, tmp1, tmp2
-	.endm
-
diff --git a/arch/arm/mach-s3c2410/include/mach/entry-macro.S b/arch/arm/mach-s3c2410/include/mach/entry-macro.S
index 04791d2..7615a14 100644
--- a/arch/arm/mach-s3c2410/include/mach/entry-macro.S
+++ b/arch/arm/mach-s3c2410/include/mach/entry-macro.S
@@ -25,9 +25,6 @@
 	.macro  get_irqnr_preamble, base, tmp
 	.endm
 
-	.macro  arch_ret_to_user, tmp1, tmp2
-	.endm
-
 	.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
 
 		mov	\base, #S3C24XX_VA_IRQ
diff --git a/arch/arm/mach-s5p6442/include/mach/entry-macro.S b/arch/arm/mach-s5p6442/include/mach/entry-macro.S
index c56a1d6..fad4037 100644
--- a/arch/arm/mach-s5p6442/include/mach/entry-macro.S
+++ b/arch/arm/mach-s5p6442/include/mach/entry-macro.S
@@ -18,9 +18,6 @@
 	ldr	\base, =VA_VIC0
 	.endm
 
-	.macro	arch_ret_to_user, tmp1, tmp2
-	.endm
-
 	.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
 
 	@ check the vic0
diff --git a/arch/arm/mach-s5pc100/include/mach/entry-macro.S b/arch/arm/mach-s5pc100/include/mach/entry-macro.S
index ffb41e9..ac55802 100644
--- a/arch/arm/mach-s5pc100/include/mach/entry-macro.S
+++ b/arch/arm/mach-s5pc100/include/mach/entry-macro.S
@@ -20,9 +20,6 @@
 	ldr	\base, =S3C_VA_VIC0
 	.endm
 
-	.macro	arch_ret_to_user, tmp1, tmp2
-	.endm
-
 	.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
 
 	@ check the vic0
diff --git a/arch/arm/mach-s5pv210/include/mach/entry-macro.S b/arch/arm/mach-s5pv210/include/mach/entry-macro.S
index 35c7a7c..42ab65e 100644
--- a/arch/arm/mach-s5pv210/include/mach/entry-macro.S
+++ b/arch/arm/mach-s5pv210/include/mach/entry-macro.S
@@ -18,9 +18,6 @@
 	ldr	\base, =VA_VIC0
 	.endm
 
-	.macro	arch_ret_to_user, tmp1, tmp2
-	.endm
-
 	.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
 
 	@ check the vic0
diff --git a/arch/arm/mach-sa1100/include/mach/entry-macro.S b/arch/arm/mach-sa1100/include/mach/entry-macro.S
index 4151c7f..8cf7630 100644
--- a/arch/arm/mach-sa1100/include/mach/entry-macro.S
+++ b/arch/arm/mach-sa1100/include/mach/entry-macro.S
@@ -13,9 +13,6 @@
 		add	\base, \base, #0x00050000
 		.endm
 
-		.macro  arch_ret_to_user, tmp1, tmp2
-		.endm
-
 		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
 		ldr	\irqstat, [\base]		@ get irqs
 		ldr	\irqnr, [\base, #4]		@ ICMR = 0xfa050004
diff --git a/arch/arm/mach-shark/include/mach/entry-macro.S b/arch/arm/mach-shark/include/mach/entry-macro.S
index c7bfeaa..84f6fa4 100644
--- a/arch/arm/mach-shark/include/mach/entry-macro.S
+++ b/arch/arm/mach-shark/include/mach/entry-macro.S
@@ -10,9 +10,6 @@
 		.macro  get_irqnr_preamble, base, tmp
 		.endm
 
-		.macro  arch_ret_to_user, tmp1, tmp2
-		.endm
-
 		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
 		mov	r4, #0xe0000000
 
diff --git a/arch/arm/mach-shmobile/include/mach/entry-macro.S b/arch/arm/mach-shmobile/include/mach/entry-macro.S
index dbc6545..ac5310e 100644
--- a/arch/arm/mach-shmobile/include/mach/entry-macro.S
+++ b/arch/arm/mach-shmobile/include/mach/entry-macro.S
@@ -21,9 +21,6 @@
 	ldr     \base, =INTFLGA
 	.endm
 
-	.macro  arch_ret_to_user, tmp1, tmp2
-	.endm
-
 	.macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
 	ldr     \irqnr, [\base]
 	cmp	\irqnr, #0
diff --git a/arch/arm/mach-spear3xx/include/mach/entry-macro.S b/arch/arm/mach-spear3xx/include/mach/entry-macro.S
index dfef683..589b441 100644
--- a/arch/arm/mach-spear3xx/include/mach/entry-macro.S
+++ b/arch/arm/mach-spear3xx/include/mach/entry-macro.S
@@ -18,9 +18,6 @@
 		.macro	get_irqnr_preamble, base, tmp
 		.endm
 
-		.macro	arch_ret_to_user, tmp1, tmp2
-		.endm
-
 		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
 		ldr	\base, =VA_SPEAR3XX_ML1_VIC_BASE
 		ldr	\irqstat, [\base, #VIC_IRQ_STATUS]	@ get status
diff --git a/arch/arm/mach-spear6xx/include/mach/entry-macro.S b/arch/arm/mach-spear6xx/include/mach/entry-macro.S
index 76a6ace..accef45 100644
--- a/arch/arm/mach-spear6xx/include/mach/entry-macro.S
+++ b/arch/arm/mach-spear6xx/include/mach/entry-macro.S
@@ -18,9 +18,6 @@
 		.macro	get_irqnr_preamble, base, tmp
 		.endm
 
-		.macro	arch_ret_to_user, tmp1, tmp2
-		.endm
-
 		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
 		ldr	\base, =VA_SPEAR6XX_CPU_VIC_PRI_BASE
 		ldr	\irqstat, [\base, #VIC_IRQ_STATUS]	@ get status
diff --git a/arch/arm/mach-stmp378x/include/mach/entry-macro.S b/arch/arm/mach-stmp378x/include/mach/entry-macro.S
index 9be8e1f..4169390 100644
--- a/arch/arm/mach-stmp378x/include/mach/entry-macro.S
+++ b/arch/arm/mach-stmp378x/include/mach/entry-macro.S
@@ -28,5 +28,3 @@
                 .macro  get_irqnr_preamble, base, tmp
                 .endm
 
-                .macro  arch_ret_to_user, tmp1, tmp2
-                .endm
diff --git a/arch/arm/mach-stmp37xx/include/mach/entry-macro.S b/arch/arm/mach-stmp37xx/include/mach/entry-macro.S
index 04d9c76..dc017c9 100644
--- a/arch/arm/mach-stmp37xx/include/mach/entry-macro.S
+++ b/arch/arm/mach-stmp37xx/include/mach/entry-macro.S
@@ -30,5 +30,3 @@
                 .macro  get_irqnr_preamble, base, tmp
                 .endm
 
-                .macro  arch_ret_to_user, tmp1, tmp2
-                .endm
diff --git a/arch/arm/mach-u300/include/mach/entry-macro.S b/arch/arm/mach-u300/include/mach/entry-macro.S
index 171f2e1..3647a9a 100644
--- a/arch/arm/mach-u300/include/mach/entry-macro.S
+++ b/arch/arm/mach-u300/include/mach/entry-macro.S
@@ -14,9 +14,6 @@
 	.macro  get_irqnr_preamble, base, tmp
 	.endm
 
-	.macro  arch_ret_to_user, tmp1, tmp2
-	.endm
-
 	.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
 	ldr	\base, = U300_AHB_PER_VIRT_BASE-U300_AHB_PER_PHYS_BASE+U300_INTCON0_BASE
 	ldr	\irqstat, [\base, #VIC_IRQ_STATUS] @ get masked status
diff --git a/arch/arm/mach-ux500/include/mach/entry-macro.S b/arch/arm/mach-ux500/include/mach/entry-macro.S
index 1f5bb0b..88f115e 100644
--- a/arch/arm/mach-ux500/include/mach/entry-macro.S
+++ b/arch/arm/mach-ux500/include/mach/entry-macro.S
@@ -17,9 +17,6 @@
 		ldr     \base, =IO_ADDRESS(UX500_GIC_CPU_BASE)
 		.endm
 
-		.macro  arch_ret_to_user, tmp1, tmp2
-		.endm
-
 		/*
 		 * The interrupt numbering scheme is defined in the
 		 * interrupt controller spec.  To wit:
diff --git a/arch/arm/mach-versatile/include/mach/entry-macro.S b/arch/arm/mach-versatile/include/mach/entry-macro.S
index ea5e33d..b7ce3c2 100644
--- a/arch/arm/mach-versatile/include/mach/entry-macro.S
+++ b/arch/arm/mach-versatile/include/mach/entry-macro.S
@@ -15,9 +15,6 @@
 		ldr	\base, =IO_ADDRESS(VERSATILE_VIC_BASE)
 		.endm
 
-		.macro  arch_ret_to_user, tmp1, tmp2
-		.endm
-
 		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
 		ldr	\irqstat, [\base, #VIC_IRQ_STATUS]	@ get masked status
 		mov	\irqnr, #0
diff --git a/arch/arm/mach-vexpress/include/mach/entry-macro.S b/arch/arm/mach-vexpress/include/mach/entry-macro.S
index 15c70e8..7362d7f 100644
--- a/arch/arm/mach-vexpress/include/mach/entry-macro.S
+++ b/arch/arm/mach-vexpress/include/mach/entry-macro.S
@@ -5,9 +5,6 @@
 	ldr	\base, [\base]
 	.endm
 
-	.macro	arch_ret_to_user, tmp1, tmp2
-	.endm
-
 	/*
 	 * The interrupt numbering scheme is defined in the
 	 * interrupt controller spec.  To wit:
diff --git a/arch/arm/mach-w90x900/include/mach/entry-macro.S b/arch/arm/mach-w90x900/include/mach/entry-macro.S
index b747c2b..e286dac 100644
--- a/arch/arm/mach-w90x900/include/mach/entry-macro.S
+++ b/arch/arm/mach-w90x900/include/mach/entry-macro.S
@@ -15,9 +15,6 @@
 	.macro  get_irqnr_preamble, base, tmp
 	.endm
 
-	.macro  arch_ret_to_user, tmp1, tmp2
-	.endm
-
 	.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
 
 		mov	\base, #AIC_BA
diff --git a/arch/arm/plat-mxc/include/mach/entry-macro.S b/arch/arm/plat-mxc/include/mach/entry-macro.S
index 4afbf58..f233072 100644
--- a/arch/arm/plat-mxc/include/mach/entry-macro.S
+++ b/arch/arm/plat-mxc/include/mach/entry-macro.S
@@ -27,9 +27,6 @@
 #endif /* CONFIG_MXC_TZIC */
 	.endm
 
-	.macro  arch_ret_to_user, tmp1, tmp2
-	.endm
-
 	@ this macro checks which interrupt occured
 	@ and returns its number in irqnr
 	@ and returns if an interrupt occured in irqstat
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 13/13] [ARM] Introduce ARCH_HAS_IDLE_RESET to allow SoC specific idle/reset
  2010-07-13 15:33 [RFC PATCH 0/13] Misc cleanup patches to prepare for unified zImage Eric Miao
                   ` (11 preceding siblings ...)
  2010-07-13 15:33 ` [PATCH 12/13] [ARM] Introduce ARCH_HAS_RET_TO_USER and remove most arch_ret_to_user Eric Miao
@ 2010-07-13 15:33 ` Eric Miao
  12 siblings, 0 replies; 18+ messages in thread
From: Eric Miao @ 2010-07-13 15:33 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Eric Miao <eric.miao@canonical.com>
---
 arch/arm/Kconfig                 |    3 +++
 arch/arm/include/asm/mach/arch.h |    2 ++
 arch/arm/include/asm/system.h    |    2 ++
 arch/arm/kernel/process.c        |   19 +++++++++++++++++++
 arch/arm/kernel/setup.c          |    7 +++++--
 5 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 708a1e1..a14f066 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -62,6 +62,9 @@ config ARCH_USES_DEFAULT_TIMEX_H
 config ARCH_HAS_RET_TO_USER
 	def_bool n
 
+config ARCH_HAS_IDLE_RESET
+	def_bool n
+
 config GENERIC_CLOCKEVENTS
 	bool
 
diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h
index 2191d40..b57998e 100644
--- a/arch/arm/include/asm/mach/arch.h
+++ b/arch/arm/include/asm/mach/arch.h
@@ -35,6 +35,8 @@ struct machine_class {
 #ifdef CONFIG_MULTI_IRQ_HANDLER
 	void			(*handle_irq)(struct pt_regs *);
 #endif
+	void			(*idle)(void);
+	void			(*reset)(char, const char *);
 };
 
 struct machine_desc {
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
index 5f4f480..448b966 100644
--- a/arch/arm/include/asm/system.h
+++ b/arch/arm/include/asm/system.h
@@ -513,6 +513,8 @@ static inline unsigned long long __cmpxchg64_mb(volatile void *ptr,
 
 #endif	/* __LINUX_ARM_ARCH__ >= 6 */
 
+extern void (*__arch_idle)(void);
+extern void (*__arch_reset)(char, const char *);
 #endif /* __ASSEMBLY__ */
 
 #define arch_align_stack(x) (x)
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index acf5e6f..a19ed5c 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -51,7 +51,26 @@ extern void setup_mm_for_reboot(char mode);
 
 static volatile int hlt_counter;
 
+#ifndef CONFIG_ARCH_HAS_IDLE_RESET
 #include <mach/system.h>
+#else
+void (*__arch_idle)(void);
+void (*__arch_reset)(void);
+
+static void arch_idle(void)
+{
+	if (__arch_idle)
+		__arch_idle();
+	else
+		cpu_do_idle();
+}
+
+static void arch_reset(char mode, const char *cmd)
+{
+	if (__arch_reset)
+		__arch_reset(mode, cmd);
+}
+#endif
 
 void disable_hlt(void)
 {
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 672a8ec..7fa0c7a 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -38,7 +38,7 @@
 #include <asm/cacheflush.h>
 #include <asm/cachetype.h>
 #include <asm/tlbflush.h>
-
+#include <asm/system.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/irq.h>
 #include <asm/mach/time.h>
@@ -687,8 +687,11 @@ void __init setup_arch(char **cmdline_p)
 	class = mdesc->class;
 	machine_name = mdesc->name;
 
-	if (class)
+	if (class) {
 		vmalloc_end = class->vmalloc_end;
+		__arch_idle = class->idle;
+		__arch_reset = class->reset;
+	}
 
 	if (mdesc->soft_reboot)
 		reboot_setup("s");
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 08/13] [ARM] Make VMALLOC_END into a global variable if not defined
  2010-07-13 15:33 ` [PATCH 08/13] [ARM] Make VMALLOC_END into a global variable if not defined Eric Miao
@ 2010-07-14  2:57   ` Kyungmin Park
  2010-07-14  4:11     ` Eric Miao
  0 siblings, 1 reply; 18+ messages in thread
From: Kyungmin Park @ 2010-07-14  2:57 UTC (permalink / raw)
  To: linux-arm-kernel

Good idea!
Each board can use each own vmalloc_end. no need to bound chip global
vmalloc_end.

On Wed, Jul 14, 2010 at 12:33 AM, Eric Miao <eric.miao@canonical.com> wrote:
> Signed-off-by: Eric Miao <eric.miao@canonical.com>
> ---
> ?arch/arm/include/asm/mach/arch.h | ? ?1 +
> ?arch/arm/include/asm/pgtable.h ? | ? ?5 +++++
> ?arch/arm/kernel/setup.c ? ? ? ? ?| ? ?6 ++++++
> ?3 files changed, 12 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h
> index 52bea4c..2191d40 100644
> --- a/arch/arm/include/asm/mach/arch.h
> +++ b/arch/arm/include/asm/mach/arch.h
> @@ -27,6 +27,7 @@ struct machine_class {
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? * page tabe entry ? ? ?*/
> ? ? ? ?const char ? ? ? ? ? ? ?*name; ? ? ? ? ?/* machine class name ? */
> ? ? ? ?unsigned long ? ? ? ? ? boot_params; ? ?/* tagged list ? ? ? ? ?*/
> + ? ? ? unsigned long ? ? ? ? ? vmalloc_end; ? ?/* VMALLOC_END ? ? ? ? ?*/
>
> ? ? ? ?void ? ? ? ? ? ? ? ? ? ?(*map_io)(void);/* IO mapping function */
> ? ? ? ?void ? ? ? ? ? ? ? ? ? ?(*init_irq)(void);
> diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h
> index ab68cf1..478249a 100644
> --- a/arch/arm/include/asm/pgtable.h
> +++ b/arch/arm/include/asm/pgtable.h
> @@ -40,6 +40,11 @@
> ?#define VMALLOC_START ? ? ? ? ?(((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
> ?#endif
>
> +#ifndef VMALLOC_END
> +extern unsigned long vmalloc_end;
> +#define VMALLOC_END (vmalloc_end)
> +#endif
> +
> ?/*
> ?* Hardware-wise, we have a two level page table structure, where the first
> ?* level has 4096 entries, and the second level has 256 entries. ?Each entry
> diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
> index 295de99..672a8ec 100644
> --- a/arch/arm/kernel/setup.c
> +++ b/arch/arm/kernel/setup.c
> @@ -95,6 +95,9 @@ EXPORT_SYMBOL(isa_dma_threshold);
> ?unsigned long max_dma_address = 0xffffffffUL;
> ?EXPORT_SYMBOL(max_dma_address);
>
> +unsigned long vmalloc_end = 0xffffffffUL;
> +EXPORT_SYMBOL(vmalloc_end);

At current code, 0xfe800000UL is the largest number. If we set end
vmalloc_end to 0xffffffffUL and use it. maybe system can't boot.
arch/arm/mach-loki/include/mach/vmalloc.h:#define VMALLOC_END   0xfe800000UL

> +
> ?#ifdef MULTI_CPU
> ?struct processor processor;
> ?#endif
> @@ -684,6 +687,9 @@ void __init setup_arch(char **cmdline_p)
> ? ? ? ?class = mdesc->class;
> ? ? ? ?machine_name = mdesc->name;
>
> + ? ? ? if (class)
> + ? ? ? ? ? ? ? vmalloc_end = class->vmalloc_end;

Don't check 'if (class->vmalloc_end)'?

Thank you,
Kyungmin Park
> +
> ? ? ? ?if (mdesc->soft_reboot)
> ? ? ? ? ? ? ? ?reboot_setup("s");
>
> --
> 1.7.1
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 08/13] [ARM] Make VMALLOC_END into a global variable if not defined
  2010-07-14  2:57   ` Kyungmin Park
@ 2010-07-14  4:11     ` Eric Miao
  2010-07-14  4:24       ` Kyungmin Park
  0 siblings, 1 reply; 18+ messages in thread
From: Eric Miao @ 2010-07-14  4:11 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jul 14, 2010 at 10:57 AM, Kyungmin Park <kmpark@infradead.org> wrote:
> Good idea!
> Each board can use each own vmalloc_end. no need to bound chip global
> vmalloc_end.
>
> On Wed, Jul 14, 2010 at 12:33 AM, Eric Miao <eric.miao@canonical.com> wrote:
>> Signed-off-by: Eric Miao <eric.miao@canonical.com>
>> ---
>> ?arch/arm/include/asm/mach/arch.h | ? ?1 +
>> ?arch/arm/include/asm/pgtable.h ? | ? ?5 +++++
>> ?arch/arm/kernel/setup.c ? ? ? ? ?| ? ?6 ++++++
>> ?3 files changed, 12 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h
>> index 52bea4c..2191d40 100644
>> --- a/arch/arm/include/asm/mach/arch.h
>> +++ b/arch/arm/include/asm/mach/arch.h
>> @@ -27,6 +27,7 @@ struct machine_class {
>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? * page tabe entry ? ? ?*/
>> ? ? ? ?const char ? ? ? ? ? ? ?*name; ? ? ? ? ?/* machine class name ? */
>> ? ? ? ?unsigned long ? ? ? ? ? boot_params; ? ?/* tagged list ? ? ? ? ?*/
>> + ? ? ? unsigned long ? ? ? ? ? vmalloc_end; ? ?/* VMALLOC_END ? ? ? ? ?*/
>>
>> ? ? ? ?void ? ? ? ? ? ? ? ? ? ?(*map_io)(void);/* IO mapping function */
>> ? ? ? ?void ? ? ? ? ? ? ? ? ? ?(*init_irq)(void);
>> diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h
>> index ab68cf1..478249a 100644
>> --- a/arch/arm/include/asm/pgtable.h
>> +++ b/arch/arm/include/asm/pgtable.h
>> @@ -40,6 +40,11 @@
>> ?#define VMALLOC_START ? ? ? ? ?(((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
>> ?#endif
>>
>> +#ifndef VMALLOC_END
>> +extern unsigned long vmalloc_end;
>> +#define VMALLOC_END (vmalloc_end)
>> +#endif
>> +
>> ?/*
>> ?* Hardware-wise, we have a two level page table structure, where the first
>> ?* level has 4096 entries, and the second level has 256 entries. ?Each entry
>> diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
>> index 295de99..672a8ec 100644
>> --- a/arch/arm/kernel/setup.c
>> +++ b/arch/arm/kernel/setup.c
>> @@ -95,6 +95,9 @@ EXPORT_SYMBOL(isa_dma_threshold);
>> ?unsigned long max_dma_address = 0xffffffffUL;
>> ?EXPORT_SYMBOL(max_dma_address);
>>
>> +unsigned long vmalloc_end = 0xffffffffUL;
>> +EXPORT_SYMBOL(vmalloc_end);
>
> At current code, 0xfe800000UL is the largest number. If we set end
> vmalloc_end to 0xffffffffUL and use it. maybe system can't boot.
> arch/arm/mach-loki/include/mach/vmalloc.h:#define VMALLOC_END ? 0xfe800000UL
>

So the platform has to setup vmalloc correct :-)

>> +
>> ?#ifdef MULTI_CPU
>> ?struct processor processor;
>> ?#endif
>> @@ -684,6 +687,9 @@ void __init setup_arch(char **cmdline_p)
>> ? ? ? ?class = mdesc->class;
>> ? ? ? ?machine_name = mdesc->name;
>>
>> + ? ? ? if (class)
>> + ? ? ? ? ? ? ? vmalloc_end = class->vmalloc_end;
>
> Don't check 'if (class->vmalloc_end)'?
>

Better to check that, but not sure if that's necessary. I'd expect
every machine_class to get this correct, instead of leaving it
uninitialized (i.e. == 0).

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 08/13] [ARM] Make VMALLOC_END into a global variable if not defined
  2010-07-14  4:11     ` Eric Miao
@ 2010-07-14  4:24       ` Kyungmin Park
  2010-07-14  4:32         ` Eric Miao
  0 siblings, 1 reply; 18+ messages in thread
From: Kyungmin Park @ 2010-07-14  4:24 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jul 14, 2010 at 1:11 PM, Eric Miao <eric.miao@canonical.com> wrote:
> On Wed, Jul 14, 2010 at 10:57 AM, Kyungmin Park <kmpark@infradead.org> wrote:
>> Good idea!
>> Each board can use each own vmalloc_end. no need to bound chip global
>> vmalloc_end.
>>
>> On Wed, Jul 14, 2010 at 12:33 AM, Eric Miao <eric.miao@canonical.com> wrote:
>>> Signed-off-by: Eric Miao <eric.miao@canonical.com>
>>> ---
>>> ?arch/arm/include/asm/mach/arch.h | ? ?1 +
>>> ?arch/arm/include/asm/pgtable.h ? | ? ?5 +++++
>>> ?arch/arm/kernel/setup.c ? ? ? ? ?| ? ?6 ++++++
>>> ?3 files changed, 12 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h
>>> index 52bea4c..2191d40 100644
>>> --- a/arch/arm/include/asm/mach/arch.h
>>> +++ b/arch/arm/include/asm/mach/arch.h
>>> @@ -27,6 +27,7 @@ struct machine_class {
>>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? * page tabe entry ? ? ?*/
>>> ? ? ? ?const char ? ? ? ? ? ? ?*name; ? ? ? ? ?/* machine class name ? */
>>> ? ? ? ?unsigned long ? ? ? ? ? boot_params; ? ?/* tagged list ? ? ? ? ?*/
>>> + ? ? ? unsigned long ? ? ? ? ? vmalloc_end; ? ?/* VMALLOC_END ? ? ? ? ?*/
>>>
>>> ? ? ? ?void ? ? ? ? ? ? ? ? ? ?(*map_io)(void);/* IO mapping function */
>>> ? ? ? ?void ? ? ? ? ? ? ? ? ? ?(*init_irq)(void);
>>> diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h
>>> index ab68cf1..478249a 100644
>>> --- a/arch/arm/include/asm/pgtable.h
>>> +++ b/arch/arm/include/asm/pgtable.h
>>> @@ -40,6 +40,11 @@
>>> ?#define VMALLOC_START ? ? ? ? ?(((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
>>> ?#endif
>>>
>>> +#ifndef VMALLOC_END
>>> +extern unsigned long vmalloc_end;
>>> +#define VMALLOC_END (vmalloc_end)
>>> +#endif
>>> +
>>> ?/*
>>> ?* Hardware-wise, we have a two level page table structure, where the first
>>> ?* level has 4096 entries, and the second level has 256 entries. ?Each entry
>>> diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
>>> index 295de99..672a8ec 100644
>>> --- a/arch/arm/kernel/setup.c
>>> +++ b/arch/arm/kernel/setup.c
>>> @@ -95,6 +95,9 @@ EXPORT_SYMBOL(isa_dma_threshold);
>>> ?unsigned long max_dma_address = 0xffffffffUL;
>>> ?EXPORT_SYMBOL(max_dma_address);
>>>
>>> +unsigned long vmalloc_end = 0xffffffffUL;
>>> +EXPORT_SYMBOL(vmalloc_end);
>>
>> At current code, 0xfe800000UL is the largest number. If we set end
>> vmalloc_end to 0xffffffffUL and use it. maybe system can't boot.
>> arch/arm/mach-loki/include/mach/vmalloc.h:#define VMALLOC_END ? 0xfe800000UL
>>
>
> So the platform has to setup vmalloc correct :-)
>
>>> +
>>> ?#ifdef MULTI_CPU
>>> ?struct processor processor;
>>> ?#endif
>>> @@ -684,6 +687,9 @@ void __init setup_arch(char **cmdline_p)
>>> ? ? ? ?class = mdesc->class;
>>> ? ? ? ?machine_name = mdesc->name;
>>>
>>> + ? ? ? if (class)
>>> + ? ? ? ? ? ? ? vmalloc_end = class->vmalloc_end;
>>
>> Don't check 'if (class->vmalloc_end)'?
>>
>
> Better to check that, but not sure if that's necessary. I'd expect
> every machine_class to get this correct, instead of leaving it
> uninitialized (i.e. == 0).
>
Then this patch is intermediate patch and VMALLOC_END will be removed finally?
At first I understand there's global VMALLOC_END on each chip and each
board can override it.

Thank you,
Kyungmin park

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 08/13] [ARM] Make VMALLOC_END into a global variable if not defined
  2010-07-14  4:24       ` Kyungmin Park
@ 2010-07-14  4:32         ` Eric Miao
  0 siblings, 0 replies; 18+ messages in thread
From: Eric Miao @ 2010-07-14  4:32 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jul 14, 2010 at 12:24 PM, Kyungmin Park <kmpark@infradead.org> wrote:
> On Wed, Jul 14, 2010 at 1:11 PM, Eric Miao <eric.miao@canonical.com> wrote:
>> On Wed, Jul 14, 2010 at 10:57 AM, Kyungmin Park <kmpark@infradead.org> wrote:
>>> Good idea!
>>> Each board can use each own vmalloc_end. no need to bound chip global
>>> vmalloc_end.
>>>
>>> On Wed, Jul 14, 2010 at 12:33 AM, Eric Miao <eric.miao@canonical.com> wrote:
>>>> Signed-off-by: Eric Miao <eric.miao@canonical.com>
>>>> ---
>>>> ?arch/arm/include/asm/mach/arch.h | ? ?1 +
>>>> ?arch/arm/include/asm/pgtable.h ? | ? ?5 +++++
>>>> ?arch/arm/kernel/setup.c ? ? ? ? ?| ? ?6 ++++++
>>>> ?3 files changed, 12 insertions(+), 0 deletions(-)
>>>>
>>>> diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h
>>>> index 52bea4c..2191d40 100644
>>>> --- a/arch/arm/include/asm/mach/arch.h
>>>> +++ b/arch/arm/include/asm/mach/arch.h
>>>> @@ -27,6 +27,7 @@ struct machine_class {
>>>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? * page tabe entry ? ? ?*/
>>>> ? ? ? ?const char ? ? ? ? ? ? ?*name; ? ? ? ? ?/* machine class name ? */
>>>> ? ? ? ?unsigned long ? ? ? ? ? boot_params; ? ?/* tagged list ? ? ? ? ?*/
>>>> + ? ? ? unsigned long ? ? ? ? ? vmalloc_end; ? ?/* VMALLOC_END ? ? ? ? ?*/
>>>>
>>>> ? ? ? ?void ? ? ? ? ? ? ? ? ? ?(*map_io)(void);/* IO mapping function */
>>>> ? ? ? ?void ? ? ? ? ? ? ? ? ? ?(*init_irq)(void);
>>>> diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h
>>>> index ab68cf1..478249a 100644
>>>> --- a/arch/arm/include/asm/pgtable.h
>>>> +++ b/arch/arm/include/asm/pgtable.h
>>>> @@ -40,6 +40,11 @@
>>>> ?#define VMALLOC_START ? ? ? ? ?(((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
>>>> ?#endif
>>>>
>>>> +#ifndef VMALLOC_END
>>>> +extern unsigned long vmalloc_end;
>>>> +#define VMALLOC_END (vmalloc_end)
>>>> +#endif
>>>> +
>>>> ?/*
>>>> ?* Hardware-wise, we have a two level page table structure, where the first
>>>> ?* level has 4096 entries, and the second level has 256 entries. ?Each entry
>>>> diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
>>>> index 295de99..672a8ec 100644
>>>> --- a/arch/arm/kernel/setup.c
>>>> +++ b/arch/arm/kernel/setup.c
>>>> @@ -95,6 +95,9 @@ EXPORT_SYMBOL(isa_dma_threshold);
>>>> ?unsigned long max_dma_address = 0xffffffffUL;
>>>> ?EXPORT_SYMBOL(max_dma_address);
>>>>
>>>> +unsigned long vmalloc_end = 0xffffffffUL;
>>>> +EXPORT_SYMBOL(vmalloc_end);
>>>
>>> At current code, 0xfe800000UL is the largest number. If we set end
>>> vmalloc_end to 0xffffffffUL and use it. maybe system can't boot.
>>> arch/arm/mach-loki/include/mach/vmalloc.h:#define VMALLOC_END ? 0xfe800000UL
>>>
>>
>> So the platform has to setup vmalloc correct :-)
>>
>>>> +
>>>> ?#ifdef MULTI_CPU
>>>> ?struct processor processor;
>>>> ?#endif
>>>> @@ -684,6 +687,9 @@ void __init setup_arch(char **cmdline_p)
>>>> ? ? ? ?class = mdesc->class;
>>>> ? ? ? ?machine_name = mdesc->name;
>>>>
>>>> + ? ? ? if (class)
>>>> + ? ? ? ? ? ? ? vmalloc_end = class->vmalloc_end;
>>>
>>> Don't check 'if (class->vmalloc_end)'?
>>>
>>
>> Better to check that, but not sure if that's necessary. I'd expect
>> every machine_class to get this correct, instead of leaving it
>> uninitialized (i.e. == 0).
>>
> Then this patch is intermediate patch and VMALLOC_END will be removed finally?
> At first I understand there's global VMALLOC_END on each chip and each
> board can override it.
>

Yes. Currently, each sub-arch defines their own VMALLOC_END in
arch/arm/mach-*/include/mach/vmalloc.h. To move all to use a variable
version of VMALLOC_END would be tedious work and also requires
every sub-arch to have their own 'struct machine_class' ready. So the
idea here is for each sub-arch to:

1) have their 'struct machine_class' ready
2) encode the correct VMALLOC_END value into that
3) remove the definition from vmalloc.h
4) and the variable version will be used

Each sub-arch can do this without affecting others.

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2010-07-14  4:32 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-13 15:33 [RFC PATCH 0/13] Misc cleanup patches to prepare for unified zImage Eric Miao
2010-07-13 15:33 ` [PATCH 01/13] [ARM] Introduce 'struct machine_class' for SoC level abstraction Eric Miao
2010-07-13 15:33 ` [PATCH 02/13] [ARM] Allow machine to specify it's own IRQ handlers at run-time Eric Miao
2010-07-13 15:33 ` [PATCH 03/13] [ARM] Define a default minimum NR_IRQS when SPARSE_IRQ is selected Eric Miao
2010-07-13 15:33 ` [PATCH 04/13] [ARM] Introduce ARCH_USES_DEFAULT_IO_H to use default asm/io.h Eric Miao
2010-07-13 15:33 ` [PATCH 05/13] [ARM] Introduce machine specific adjust_zones() Eric Miao
2010-07-13 15:33 ` [PATCH 06/13] [ARM] Allow MAX_DMA_ADDRESS and ISA_DMA_THRESHOLD to be variables Eric Miao
2010-07-13 15:33 ` [PATCH 07/13] [ARM] Make PCIBIOS_* into global variables Eric Miao
2010-07-13 15:33 ` [PATCH 08/13] [ARM] Make VMALLOC_END into a global variable if not defined Eric Miao
2010-07-14  2:57   ` Kyungmin Park
2010-07-14  4:11     ` Eric Miao
2010-07-14  4:24       ` Kyungmin Park
2010-07-14  4:32         ` Eric Miao
2010-07-13 15:33 ` [PATCH 09/13] [ARM] Introduce ARCH_USES_DEFAULT_GPIO_H for default GPIO API definitions Eric Miao
2010-07-13 15:33 ` [PATCH 10/13] [ARM] Introduce ARCH_USES_DEFAULT_TIMEX_H for default CLOCK_TICK_RATE Eric Miao
2010-07-13 15:33 ` [PATCH 11/13] [ARM] Introduce ARCH_HAS_DISABLE_FIQ and remove most disable_fiq Eric Miao
2010-07-13 15:33 ` [PATCH 12/13] [ARM] Introduce ARCH_HAS_RET_TO_USER and remove most arch_ret_to_user Eric Miao
2010-07-13 15:33 ` [PATCH 13/13] [ARM] Introduce ARCH_HAS_IDLE_RESET to allow SoC specific idle/reset Eric Miao

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.