aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorNicolas Pitre <nicolas.pitre@linaro.org>2011-04-28 17:00:17 -0400
committerNicolas Pitre <nico@fluxnic.net>2011-05-07 00:08:02 -0400
commit8ea0de4b8831513924e3ec6a17bb721fabf97055 (patch)
treecbadb6678cf3bfe2a6293355e1e136b9f5ac5a2f /arch/arm
parentccc1c7c6c25661f0071a7ebe997abcbf529df3e9 (diff)
ARM: zImage: remove the static qualifier from global data variables
To be able to relocate the .bss section at run time independently from the rest of the code, we must make sure that no GOTOFF relocations are used with .bss symbols. This usually means that no global variables can be marked static unless they're also const. Let's remove the static qualifier from current offenders, or turn them into const variables when possible. Next commit will ensure the build fails if one of those is reintroduced due to otherwise enforced coding standards for the kernel. Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org> Tested-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-davinci/include/mach/uncompress.h5
-rw-r--r--arch/arm/mach-gemini/include/mach/uncompress.h2
-rw-r--r--arch/arm/mach-iop32x/include/mach/uncompress.h2
-rw-r--r--arch/arm/mach-iop33x/include/mach/uncompress.h2
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/uncompress.h2
-rw-r--r--arch/arm/mach-mmp/include/mach/uncompress.h2
-rw-r--r--arch/arm/mach-mxs/include/mach/uncompress.h2
-rw-r--r--arch/arm/mach-ns9xxx/include/mach/uncompress.h2
-rw-r--r--arch/arm/mach-nuc93x/include/mach/uncompress.h2
-rw-r--r--arch/arm/mach-pxa/include/mach/uncompress.h6
-rw-r--r--arch/arm/mach-rpc/include/mach/uncompress.h12
-rw-r--r--arch/arm/mach-s5p64x0/include/mach/uncompress.h6
-rw-r--r--arch/arm/mach-ux500/include/mach/uncompress.h2
-rw-r--r--arch/arm/mach-w90x900/include/mach/uncompress.h2
-rw-r--r--arch/arm/plat-mxc/include/mach/uncompress.h2
-rw-r--r--arch/arm/plat-omap/include/plat/uncompress.h4
-rw-r--r--arch/arm/plat-samsung/include/plat/uncompress.h4
17 files changed, 30 insertions, 29 deletions
diff --git a/arch/arm/mach-davinci/include/mach/uncompress.h b/arch/arm/mach-davinci/include/mach/uncompress.h
index 47723e8d75a4..78d80683cdc2 100644
--- a/arch/arm/mach-davinci/include/mach/uncompress.h
+++ b/arch/arm/mach-davinci/include/mach/uncompress.h
@@ -25,8 +25,7 @@
25 25
26#include <mach/serial.h> 26#include <mach/serial.h>
27 27
28static u32 *uart; 28u32 *uart;
29static u32 *uart_info = (u32 *)(DAVINCI_UART_INFO);
30 29
31/* PORT_16C550A, in polled non-fifo mode */ 30/* PORT_16C550A, in polled non-fifo mode */
32static void putc(char c) 31static void putc(char c)
@@ -44,6 +43,8 @@ static inline void flush(void)
44 43
45static inline void set_uart_info(u32 phys, void * __iomem virt) 44static inline void set_uart_info(u32 phys, void * __iomem virt)
46{ 45{
46 u32 *uart_info = (u32 *)(DAVINCI_UART_INFO);
47
47 uart = (u32 *)phys; 48 uart = (u32 *)phys;
48 uart_info[0] = phys; 49 uart_info[0] = phys;
49 uart_info[1] = (u32)virt; 50 uart_info[1] = (u32)virt;
diff --git a/arch/arm/mach-gemini/include/mach/uncompress.h b/arch/arm/mach-gemini/include/mach/uncompress.h
index 5483f61a8061..0efa26247235 100644
--- a/arch/arm/mach-gemini/include/mach/uncompress.h
+++ b/arch/arm/mach-gemini/include/mach/uncompress.h
@@ -16,7 +16,7 @@
16#include <linux/serial_reg.h> 16#include <linux/serial_reg.h>
17#include <mach/hardware.h> 17#include <mach/hardware.h>
18 18
19static volatile unsigned long *UART = (unsigned long *)GEMINI_UART_BASE; 19static volatile unsigned long * const UART = (unsigned long *)GEMINI_UART_BASE;
20 20
21/* 21/*
22 * The following code assumes the serial port has already been 22 * The following code assumes the serial port has already been
diff --git a/arch/arm/mach-iop32x/include/mach/uncompress.h b/arch/arm/mach-iop32x/include/mach/uncompress.h
index b247551b6f5a..4fd715496f45 100644
--- a/arch/arm/mach-iop32x/include/mach/uncompress.h
+++ b/arch/arm/mach-iop32x/include/mach/uncompress.h
@@ -7,7 +7,7 @@
7#include <linux/serial_reg.h> 7#include <linux/serial_reg.h>
8#include <mach/hardware.h> 8#include <mach/hardware.h>
9 9
10static volatile u8 *uart_base; 10volatile u8 *uart_base;
11 11
12#define TX_DONE (UART_LSR_TEMT | UART_LSR_THRE) 12#define TX_DONE (UART_LSR_TEMT | UART_LSR_THRE)
13 13
diff --git a/arch/arm/mach-iop33x/include/mach/uncompress.h b/arch/arm/mach-iop33x/include/mach/uncompress.h
index b42423f63302..f99bb848c5a1 100644
--- a/arch/arm/mach-iop33x/include/mach/uncompress.h
+++ b/arch/arm/mach-iop33x/include/mach/uncompress.h
@@ -7,7 +7,7 @@
7#include <linux/serial_reg.h> 7#include <linux/serial_reg.h>
8#include <mach/hardware.h> 8#include <mach/hardware.h>
9 9
10static volatile u32 *uart_base; 10volatile u32 *uart_base;
11 11
12#define TX_DONE (UART_LSR_TEMT | UART_LSR_THRE) 12#define TX_DONE (UART_LSR_TEMT | UART_LSR_THRE)
13 13
diff --git a/arch/arm/mach-ixp4xx/include/mach/uncompress.h b/arch/arm/mach-ixp4xx/include/mach/uncompress.h
index 2db0078a8cf2..219d7c1dcdba 100644
--- a/arch/arm/mach-ixp4xx/include/mach/uncompress.h
+++ b/arch/arm/mach-ixp4xx/include/mach/uncompress.h
@@ -19,7 +19,7 @@
19 19
20#define TX_DONE (UART_LSR_TEMT|UART_LSR_THRE) 20#define TX_DONE (UART_LSR_TEMT|UART_LSR_THRE)
21 21
22static volatile u32* uart_base; 22volatile u32* uart_base;
23 23
24static inline void putc(int c) 24static inline void putc(int c)
25{ 25{
diff --git a/arch/arm/mach-mmp/include/mach/uncompress.h b/arch/arm/mach-mmp/include/mach/uncompress.h
index 85bd8a2d84b5..d6daeb7e4ef1 100644
--- a/arch/arm/mach-mmp/include/mach/uncompress.h
+++ b/arch/arm/mach-mmp/include/mach/uncompress.h
@@ -14,7 +14,7 @@
14#define UART2_BASE (APB_PHYS_BASE + 0x17000) 14#define UART2_BASE (APB_PHYS_BASE + 0x17000)
15#define UART3_BASE (APB_PHYS_BASE + 0x18000) 15#define UART3_BASE (APB_PHYS_BASE + 0x18000)
16 16
17static volatile unsigned long *UART; 17volatile unsigned long *UART;
18 18
19static inline void putc(char c) 19static inline void putc(char c)
20{ 20{
diff --git a/arch/arm/mach-mxs/include/mach/uncompress.h b/arch/arm/mach-mxs/include/mach/uncompress.h
index f12a1732d8b8..7f8bf6539646 100644
--- a/arch/arm/mach-mxs/include/mach/uncompress.h
+++ b/arch/arm/mach-mxs/include/mach/uncompress.h
@@ -20,7 +20,7 @@
20 20
21#include <asm/mach-types.h> 21#include <asm/mach-types.h>
22 22
23static unsigned long mxs_duart_base; 23unsigned long mxs_duart_base;
24 24
25#define MXS_DUART(x) (*(volatile unsigned long *)(mxs_duart_base + (x))) 25#define MXS_DUART(x) (*(volatile unsigned long *)(mxs_duart_base + (x)))
26 26
diff --git a/arch/arm/mach-ns9xxx/include/mach/uncompress.h b/arch/arm/mach-ns9xxx/include/mach/uncompress.h
index 770a68c46e81..00ef4a6d7cb4 100644
--- a/arch/arm/mach-ns9xxx/include/mach/uncompress.h
+++ b/arch/arm/mach-ns9xxx/include/mach/uncompress.h
@@ -20,7 +20,7 @@ static void putc_dummy(char c, void __iomem *base)
20 /* nothing */ 20 /* nothing */
21} 21}
22 22
23static int timeout; 23int timeout;
24 24
25static void putc_ns9360(char c, void __iomem *base) 25static void putc_ns9360(char c, void __iomem *base)
26{ 26{
diff --git a/arch/arm/mach-nuc93x/include/mach/uncompress.h b/arch/arm/mach-nuc93x/include/mach/uncompress.h
index 73082cd61e84..381cb9baadd5 100644
--- a/arch/arm/mach-nuc93x/include/mach/uncompress.h
+++ b/arch/arm/mach-nuc93x/include/mach/uncompress.h
@@ -27,7 +27,7 @@
27#define arch_decomp_wdog() 27#define arch_decomp_wdog()
28 28
29#define TX_DONE (UART_LSR_TEMT | UART_LSR_THRE) 29#define TX_DONE (UART_LSR_TEMT | UART_LSR_THRE)
30static u32 * uart_base = (u32 *)UART0_PA; 30static u32 * const uart_base = (u32 *)UART0_PA;
31 31
32static void putc(int ch) 32static void putc(int ch)
33{ 33{
diff --git a/arch/arm/mach-pxa/include/mach/uncompress.h b/arch/arm/mach-pxa/include/mach/uncompress.h
index 759b851ec985..5519a34b667f 100644
--- a/arch/arm/mach-pxa/include/mach/uncompress.h
+++ b/arch/arm/mach-pxa/include/mach/uncompress.h
@@ -16,9 +16,9 @@
16#define BTUART_BASE (0x40200000) 16#define BTUART_BASE (0x40200000)
17#define STUART_BASE (0x40700000) 17#define STUART_BASE (0x40700000)
18 18
19static unsigned long uart_base; 19unsigned long uart_base;
20static unsigned int uart_shift; 20unsigned int uart_shift;
21static unsigned int uart_is_pxa; 21unsigned int uart_is_pxa;
22 22
23static inline unsigned char uart_read(int offset) 23static inline unsigned char uart_read(int offset)
24{ 24{
diff --git a/arch/arm/mach-rpc/include/mach/uncompress.h b/arch/arm/mach-rpc/include/mach/uncompress.h
index 8c9e2c7161c6..9cd9bcdad6cc 100644
--- a/arch/arm/mach-rpc/include/mach/uncompress.h
+++ b/arch/arm/mach-rpc/include/mach/uncompress.h
@@ -66,12 +66,12 @@ extern __attribute__((pure)) struct param_struct *params(void);
66#define params (params()) 66#define params (params())
67 67
68#ifndef STANDALONE_DEBUG 68#ifndef STANDALONE_DEBUG
69static unsigned long video_num_cols; 69unsigned long video_num_cols;
70static unsigned long video_num_rows; 70unsigned long video_num_rows;
71static unsigned long video_x; 71unsigned long video_x;
72static unsigned long video_y; 72unsigned long video_y;
73static unsigned char bytes_per_char_v; 73unsigned char bytes_per_char_v;
74static int white; 74int white;
75 75
76/* 76/*
77 * This does not append a newline 77 * This does not append a newline
diff --git a/arch/arm/mach-s5p64x0/include/mach/uncompress.h b/arch/arm/mach-s5p64x0/include/mach/uncompress.h
index c65b229aab23..1608faf870ff 100644
--- a/arch/arm/mach-s5p64x0/include/mach/uncompress.h
+++ b/arch/arm/mach-s5p64x0/include/mach/uncompress.h
@@ -24,8 +24,8 @@ typedef unsigned int upf_t; /* cannot include linux/serial_core.h */
24 24
25/* uart setup */ 25/* uart setup */
26 26
27static unsigned int fifo_mask; 27unsigned int fifo_mask;
28static unsigned int fifo_max; 28unsigned int fifo_max;
29 29
30/* forward declerations */ 30/* forward declerations */
31 31
@@ -43,7 +43,7 @@ static void arch_detect_cpu(void);
43/* how many bytes we allow into the FIFO at a time in FIFO mode */ 43/* how many bytes we allow into the FIFO at a time in FIFO mode */
44#define FIFO_MAX (14) 44#define FIFO_MAX (14)
45 45
46static unsigned long uart_base; 46unsigned long uart_base;
47 47
48static __inline__ void get_uart_base(void) 48static __inline__ void get_uart_base(void)
49{ 49{
diff --git a/arch/arm/mach-ux500/include/mach/uncompress.h b/arch/arm/mach-ux500/include/mach/uncompress.h
index ab0fe1432fae..088b550c40df 100644
--- a/arch/arm/mach-ux500/include/mach/uncompress.h
+++ b/arch/arm/mach-ux500/include/mach/uncompress.h
@@ -24,7 +24,7 @@
24#include <linux/amba/serial.h> 24#include <linux/amba/serial.h>
25#include <mach/hardware.h> 25#include <mach/hardware.h>
26 26
27static u32 ux500_uart_base; 27u32 ux500_uart_base;
28 28
29static void putc(const char c) 29static void putc(const char c)
30{ 30{
diff --git a/arch/arm/mach-w90x900/include/mach/uncompress.h b/arch/arm/mach-w90x900/include/mach/uncompress.h
index 56f1a74d7016..03130212ace2 100644
--- a/arch/arm/mach-w90x900/include/mach/uncompress.h
+++ b/arch/arm/mach-w90x900/include/mach/uncompress.h
@@ -27,7 +27,7 @@
27#define arch_decomp_wdog() 27#define arch_decomp_wdog()
28 28
29#define TX_DONE (UART_LSR_TEMT | UART_LSR_THRE) 29#define TX_DONE (UART_LSR_TEMT | UART_LSR_THRE)
30static volatile u32 * uart_base = (u32 *)UART0_PA; 30static volatile u32 * const uart_base = (u32 *)UART0_PA;
31 31
32static void putc(int ch) 32static void putc(int ch)
33{ 33{
diff --git a/arch/arm/plat-mxc/include/mach/uncompress.h b/arch/arm/plat-mxc/include/mach/uncompress.h
index 4864b0afd440..d85e2d1c0324 100644
--- a/arch/arm/plat-mxc/include/mach/uncompress.h
+++ b/arch/arm/plat-mxc/include/mach/uncompress.h
@@ -21,7 +21,7 @@
21 21
22#include <asm/mach-types.h> 22#include <asm/mach-types.h>
23 23
24static unsigned long uart_base; 24unsigned long uart_base;
25 25
26#define UART(x) (*(volatile unsigned long *)(uart_base + (x))) 26#define UART(x) (*(volatile unsigned long *)(uart_base + (x)))
27 27
diff --git a/arch/arm/plat-omap/include/plat/uncompress.h b/arch/arm/plat-omap/include/plat/uncompress.h
index 30b891c4a93f..565d2664f5a7 100644
--- a/arch/arm/plat-omap/include/plat/uncompress.h
+++ b/arch/arm/plat-omap/include/plat/uncompress.h
@@ -27,8 +27,8 @@
27 27
28#define MDR1_MODE_MASK 0x07 28#define MDR1_MODE_MASK 0x07
29 29
30static volatile u8 *uart_base; 30volatile u8 *uart_base;
31static int uart_shift; 31int uart_shift;
32 32
33/* 33/*
34 * Store the DEBUG_LL uart number into memory. 34 * Store the DEBUG_LL uart number into memory.
diff --git a/arch/arm/plat-samsung/include/plat/uncompress.h b/arch/arm/plat-samsung/include/plat/uncompress.h
index 7d6ed7263d57..ee48e12a1e72 100644
--- a/arch/arm/plat-samsung/include/plat/uncompress.h
+++ b/arch/arm/plat-samsung/include/plat/uncompress.h
@@ -18,8 +18,8 @@ typedef unsigned int upf_t; /* cannot include linux/serial_core.h */
18 18
19/* uart setup */ 19/* uart setup */
20 20
21static unsigned int fifo_mask; 21unsigned int fifo_mask;
22static unsigned int fifo_max; 22unsigned int fifo_max;
23 23
24/* forward declerations */ 24/* forward declerations */
25 25