Skip to contentSkip to conversation

WTF is include/asm-arm/arch-s3c2410/system.h ?

PATCH In review Adrian Bunk 2 participants 5 messages Nov 3, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Can anyone please explain the contents of
include/asm-arm/arch-s3c2410/system.h ?

This file looks like a C file accidentially named .h ...

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#1 lore raw
Quoted 4 lines · Adrian Bunk

Can anyone please explain the contents of
include/asm-arm/arch-s3c2410/system.h ?

This file looks like a C file accidentially named .h ...

It's the machine specific bits for arch/arm/kernel/process.c, part of the structure left over from 1996ish time.

The functions in there are supposed to be inlined.

Signature · 3 lines
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core
#2 lore raw

PATCH 1/1 cleanup include/asm-arm/arch-s3c2410/system.h

Quoted 10 lines · Russell King
Quoted 4 lines · Adrian Bunk

Can anyone please explain the contents of
include/asm-arm/arch-s3c2410/system.h ?

This file looks like a C file accidentially named .h ...

It's the machine specific bits for arch/arm/kernel/process.c, part of the structure left over from 1996ish time.

The functions in there are supposed to be inlined.

IOW, the (untested) patch below changes them to what was intended?

Quoted 1 line

Russell King

cu
Adrian

<-- snip -->

This patch makes the functions in include/asm-arm/arch-s3c2410/system.h static inline as they should be.

---

 arch/arm/mach-s3c2410/mach-smdk2440.c |    2 -
 include/asm-arm/arch-s3c2410/idle.h   |   28 --------------------------
 include/asm-arm/arch-s3c2410/system.h |   10 +++------
 3 files changed, 5 insertions(+), 35 deletions(-)
include/asm-arm/arch-s3c2410/system.h renamed from include/asm-arm/arch-s3c2410/system.h.old +4 -6
@@ -21,14 +21,13 @@
 #include <asm/io.h>
 
 #include <asm/arch/map.h>
-#include <asm/arch/idle.h>
 
 #include <asm/arch/regs-watchdog.h>
 #include <asm/arch/regs-clock.h>
 
-void (*s3c24xx_idle)(void);
+static void (*s3c24xx_idle)(void);
 
-void s3c24xx_default_idle(void)
+static inline void s3c24xx_default_idle(void)
 {
 	void __iomem *reg = S3C2410_CLKCON;
 	unsigned long tmp;
@@ -52,7 +51,7 @@
 	__raw_writel(__raw_readl(reg) & ~(1<<2), reg);
 }
 
-static void arch_idle(void)
+static inline void arch_idle(void)
 {
 	if (s3c24xx_idle != NULL)
 		(s3c24xx_idle)();
@@ -61,8 +60,7 @@
 }
 
 
-static void
-arch_reset(char mode)
+static inline void arch_reset(char mode)
 {
 	if (mode == 's') {
 		cpu_reset(0);
arch/arm/mach-s3c2410/mach-smdk2440.c renamed from arch/arm/mach-s3c2410/mach-smdk2440.c.old +1 -1
@@ -41,7 +41,7 @@
 //#include <asm/debug-ll.h>
 #include <asm/arch/regs-serial.h>
 #include <asm/arch/regs-gpio.h>
-#include <asm/arch/idle.h>
+#include <asm/arch/system.h>
 
 #include "s3c2410.h"
 #include "s3c2440.h"
include/asm-arm/arch-s3c2410/idle.h deleted +0 -28
@@ -1,28 +0,0 @@
-/* linux/include/asm-arm/arch-s3c2410/idle.h
- *
- * Copyright (c) 2004 Simtec Electronics <[email protected]>
- *		http://www.simtec.co.uk/products/SWLINUX/
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * S3C2410 CPU Idle controls
- *
- *  Changelog:
- *	28-Oct-2004  BJD  Initial version
- *
-*/
-
-#ifndef __ASM_ARCH_IDLE_H
-#define __ASM_ARCH_IDLE_H __FILE__
-
-/* This allows the over-ride of the default idle code, in case there
- * is any other things to be done over idle (like DVS)
-*/
-
-extern void (*s3c24xx_idle)(void);
-
-extern void s3c24xx_default_idle(void);
-
-#endif /* __ASM_ARCH_IDLE_H */
#3 lore raw

Re: [2.6 patch] cleanup include/asm-arm/arch-s3c2410/system.h

Quoted 5 lines · Adrian Bunk
Quoted 4 lines · Russell King
Quoted 3 lines · Adrian Bunk

Can anyone please explain the contents of
include/asm-arm/arch-s3c2410/system.h ?

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

This file looks like a C file accidentially named .h ...

It's the machine specific bits for arch/arm/kernel/process.c, part of the structure left over from 1996ish time.

The functions in there are supposed to be inlined.

IOW, the (untested) patch below changes them to what was intended?

Yes. Ben's away for a bit - can we wait for his ack please?

Signature · 3 lines
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core
#4 lore raw

Re: [2.6 patch] cleanup include/asm-arm/arch-s3c2410/system.h

Quoted 8 lines · Russell King
Quoted 7 lines · Adrian Bunk
Quoted 6 lines · Russell King
Quoted 4 lines · Adrian Bunk

Can anyone please explain the contents of
include/asm-arm/arch-s3c2410/system.h ?

This file looks like a C file accidentially named .h ...

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

It's the machine specific bits for arch/arm/kernel/process.c, part of the structure left over from 1996ish time.

The functions in there are supposed to be inlined.

IOW, the (untested) patch below changes them to what was intended?

Yes. Ben's away for a bit - can we wait for his ack please?

OK, this is not urgent.

Quoted 1 line

Russell King

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed