From 3591276d16f8e568449e4b6c719165ad2decf222 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Tue, 3 Mar 2015 11:33:15 -0500 Subject: c6x: kernel: setup: Include "linux/console.h" Or c6x will cause building break for allmodconfig, the related error: CC arch/c6x/kernel/setup.o arch/c6x/kernel/setup.c: In function 'setup_arch': arch/c6x/kernel/setup.c:433:2: error: 'conswitchp' undeclared (first use in this function) conswitchp = &dummy_con; ^ arch/c6x/kernel/setup.c:433:2: note: each undeclared identifier is reported only once for each function it appears in arch/c6x/kernel/setup.c:433:16: error: 'dummy_con' undeclared (first use in this function) conswitchp = &dummy_con; ^ Signed-off-by: Chen Gang [removed unnecessary #ifdef around include] Signed-off-by: Mark Salter --- arch/c6x/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/c6x/kernel') diff --git a/arch/c6x/kernel/setup.c b/arch/c6x/kernel/setup.c index 757128868d43..f016128ece13 100644 --- a/arch/c6x/kernel/setup.c +++ b/arch/c6x/kernel/setup.c @@ -26,7 +26,7 @@ #include #include #include - +#include #include #include -- cgit From f4831605f2dacd12730fe73961c77253cc2ea425 Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Sat, 7 Mar 2015 03:39:05 -0600 Subject: C6x: time: Ensure consistency in __init time_init invokes timer64_init (which is __init annotation) since all of these are invoked at init time, lets maintain consistency by ensuring time_init is marked appropriately as well. This fixes the following warning with CONFIG_DEBUG_SECTION_MISMATCH=y WARNING: vmlinux.o(.text+0x3bfc): Section mismatch in reference from the function time_init() to the function .init.text:timer64_init() The function time_init() references the function __init timer64_init(). This is often because time_init lacks a __init annotation or the annotation of timer64_init is wrong. Fixes: 546a39546c64 ("C6X: time management") Signed-off-by: Nishanth Menon Signed-off-by: Mark Salter --- arch/c6x/kernel/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/c6x/kernel') diff --git a/arch/c6x/kernel/time.c b/arch/c6x/kernel/time.c index 356ee84cad95..04845aaf5985 100644 --- a/arch/c6x/kernel/time.c +++ b/arch/c6x/kernel/time.c @@ -49,7 +49,7 @@ u64 sched_clock(void) return (tsc * sched_clock_multiplier) >> SCHED_CLOCK_SHIFT; } -void time_init(void) +void __init time_init(void) { u64 tmp = (u64)NSEC_PER_SEC << SCHED_CLOCK_SHIFT; -- cgit From 1a394e1a36aa9f47b411a8e4cb53dfca6f134401 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Wed, 4 Mar 2015 04:55:06 +0800 Subject: c6x: kernel: setup: Remove 'const' for local variables in machine_init early_init_dt_scan() accepts "void *", the related warning: CC arch/c6x/kernel/setup.o arch/c6x/kernel/setup.c: In function 'machine_init': arch/c6x/kernel/setup.c:290:21: warning: passing argument 1 of 'early_init_dt_scan' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] early_init_dt_scan(fdt); ^ In file included from arch/c6x/kernel/setup.c:19:0: include/linux/of_fdt.h:75:13: note: expected 'void *' but argument is of type 'const void *' extern bool early_init_dt_scan(void *params); ^ Signed-off-by: Chen Gang Signed-off-by: Mark Salter --- arch/c6x/kernel/setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/c6x/kernel') diff --git a/arch/c6x/kernel/setup.c b/arch/c6x/kernel/setup.c index f016128ece13..1d9f39920a67 100644 --- a/arch/c6x/kernel/setup.c +++ b/arch/c6x/kernel/setup.c @@ -265,8 +265,8 @@ int __init c6x_add_memory(phys_addr_t start, unsigned long size) */ notrace void __init machine_init(unsigned long dt_ptr) { - const void *dtb = __va(dt_ptr); - const void *fdt = _fdt_start; + void *dtb = __va(dt_ptr); + void *fdt = _fdt_start; /* interrupts must be masked */ set_creg(IER, 2); -- cgit From d0f73520b3782a5447e9602f181daba6671e5cc7 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Wed, 4 Mar 2015 14:12:52 +0800 Subject: c6x: kernel: setup: Add screen_info global variable Or can not pass building with allmodconfig: LD init/built-in.o drivers/built-in.o: In function `vgacon_switch': vgacon.c:(.text+0x47f8): undefined reference to `screen_info' vgacon.c:(.text+0x4810): undefined reference to `screen_info' drivers/built-in.o: In function `vgacon_resize': vgacon.c:(.text+0x4ac8): undefined reference to `screen_info' vgacon.c:(.text+0x4acc): undefined reference to `screen_info' drivers/built-in.o: In function `vgacon_save_screen': vgacon.c:(.text+0x4cc8): undefined reference to `screen_info' drivers/built-in.o:vgacon.c:(.text+0x4cd0): more undefined references to `screen_info' follow Signed-off-by: Chen Gang Signed-off-by: Mark Salter --- arch/c6x/kernel/setup.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch/c6x/kernel') diff --git a/arch/c6x/kernel/setup.c b/arch/c6x/kernel/setup.c index 1d9f39920a67..165bbd9ef006 100644 --- a/arch/c6x/kernel/setup.c +++ b/arch/c6x/kernel/setup.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -38,6 +39,8 @@ static const char *c6x_soc_name; +struct screen_info screen_info; + int c6x_num_cores; EXPORT_SYMBOL_GPL(c6x_num_cores); -- cgit From 2135115c938dcaba689a3780c0bffb6db1d05601 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Wed, 4 Mar 2015 14:44:54 +0800 Subject: c6x: kernel: setup: Export symbol memory_end It is needed by several modules, the related error with allmodconfig: MODPOST 3327 modules ERROR: "memory_end" [net/wireless/lib80211_crypt_tkip.ko] undefined! ERROR: "memory_end" [net/sunrpc/sunrpc.ko] undefined! ERROR: "memory_end" [net/sunrpc/auth_gss/rpcsec_gss_krb5.ko] undefined! ERROR: "memory_end" [net/rxrpc/rxkad.ko] undefined! ERROR: "memory_end" [net/mac802154/mac802154.ko] undefined! ERROR: "memory_end" [net/mac80211/mac80211.ko] undefined! ERROR: "memory_end" [net/ipv6/esp6.ko] undefined! ERROR: "memory_end" [net/ipv6/ah6.ko] undefined! ERROR: "memory_end" [net/ipv4/esp4.ko] undefined! ERROR: "memory_end" [net/ipv4/ah4.ko] undefined! ERROR: "memory_end" [net/ceph/libceph.ko] undefined! ERROR: "memory_end" [net/9p/9pnet_virtio.ko] undefined! ERROR: "memory_end" [drivers/usb/wusbcore/wusbcore.ko] undefined! ERROR: "memory_end" [drivers/usb/misc/usbtest.ko] undefined! ERROR: "memory_end" [drivers/usb/core/usbcore.ko] undefined! ERROR: "memory_end" [drivers/target/target_core_file.ko] undefined! ERROR: "memory_end" [drivers/net/wireless/brcm80211/brcmfmac/brcmfmac.ko] undefined! ERROR: "memory_end" [drivers/net/wireless/ath/ath6kl/ath6kl_sdio.ko] undefined! ERROR: "memory_end" [drivers/net/virtio_net.ko] undefined! ERROR: "memory_end" [drivers/net/usb/usbnet.ko] undefined! ERROR: "memory_end" [drivers/net/ppp/ppp_mppe.ko] undefined! ERROR: "memory_end" [drivers/mtd/nand/nand.ko] undefined! ERROR: "memory_end" [drivers/mmc/card/mmc_block.ko] undefined! ERROR: "memory_end" [drivers/crypto/qce/qcrypto.ko] undefined! ERROR: "memory_end" [drivers/block/drbd/drbd.ko] undefined! ERROR: "memory_end" [drivers/block/aoe/aoe.ko] undefined! ERROR: "memory_end" [crypto/tcrypt.ko] undefined! ERROR: "memory_end" [crypto/gcm.ko] undefined! ERROR: "memory_end" [crypto/cts.ko] undefined! ERROR: "memory_end" [crypto/ccm.ko] undefined! ERROR: "memory_end" [crypto/authencesn.ko] undefined! ERROR: "memory_end" [crypto/authenc.ko] undefined! Signed-off-by: Chen Gang Signed-off-by: Mark Salter --- arch/c6x/kernel/setup.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/c6x/kernel') diff --git a/arch/c6x/kernel/setup.c b/arch/c6x/kernel/setup.c index 165bbd9ef006..72e17f7ebd6f 100644 --- a/arch/c6x/kernel/setup.c +++ b/arch/c6x/kernel/setup.c @@ -63,6 +63,7 @@ unsigned char c6x_fuse_mac[6]; unsigned long memory_start; unsigned long memory_end; +EXPORT_SYMBOL(memory_end); unsigned long ram_start; unsigned long ram_end; -- cgit