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') 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 v1.2.3 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') 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 v1.2.3 From 1d2a64bd2da6034036fff9ad9b41682516f79fa3 Mon Sep 17 00:00:00 2001 From: Chen Gang <762976180@qq.com> Date: Tue, 3 Mar 2015 06:33:42 +0800 Subject: c6x: Makefile: Add -D__linux__ For gcc5 c6x raw compiler, at present, it may not define __linux__, so c6x kernel still needs to define __linux__ just like another archs have done. The related error: CC [M] fs/coda/psdev.o In file included from include/linux/coda.h:64:0, from fs/coda/psdev.c:45: include/uapi/linux/coda.h:221:2: error: unknown type name 'u_quad_t' u_quad_t va_size; /* file size in bytes */ ^ include/uapi/linux/coda.h:229:2: error: unknown type name 'u_quad_t' u_quad_t va_bytes; /* bytes of disk space held by file */ ^ include/uapi/linux/coda.h:230:2: error: unknown type name 'u_quad_t' u_quad_t va_filerev; /* file modification number */ ^ Signed-off-by: Chen Gang Signed-off-by: Mark Salter --- arch/c6x/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/c6x') diff --git a/arch/c6x/Makefile b/arch/c6x/Makefile index e72eb3417239..6b0be670ddfa 100644 --- a/arch/c6x/Makefile +++ b/arch/c6x/Makefile @@ -8,7 +8,7 @@ KBUILD_DEFCONFIG := dsk6455_defconfig -cflags-y += -mno-dsbt -msdata=none +cflags-y += -mno-dsbt -msdata=none -D__linux__ cflags-$(CONFIG_C6X_BIG_KERNEL) += -mlong-calls -- cgit v1.2.3 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') 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 v1.2.3 From 06745d74e46a8dffa768e43b54835aa94903550a Mon Sep 17 00:00:00 2001 From: Chen Gang <762976180@qq.com> Date: Tue, 3 Mar 2015 07:24:26 +0800 Subject: c6x: asm: Add default flat.h according to xtensa architecture For supporting uClinux flat-format executables, c6x needs to define the fewest features to support it, at present, xtensa architecture has the fewest feature for it, so just copy xtensa flat.h. The related error: CC fs/binfmt_flat.o In file included from fs/binfmt_flat.c:36:0: include/linux/flat.h:12:22: fatal error: asm/flat.h: No such file or directory Signed-off-by: Chen Gang Signed-off-by: Mark Salter --- arch/c6x/include/asm/flat.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 arch/c6x/include/asm/flat.h (limited to 'arch/c6x') diff --git a/arch/c6x/include/asm/flat.h b/arch/c6x/include/asm/flat.h new file mode 100644 index 000000000000..a1858bd5f6c8 --- /dev/null +++ b/arch/c6x/include/asm/flat.h @@ -0,0 +1,12 @@ +#ifndef __ASM_C6X_FLAT_H +#define __ASM_C6X_FLAT_H + +#define flat_argvp_envp_on_stack() 0 +#define flat_old_ram_flag(flags) (flags) +#define flat_reloc_valid(reloc, size) ((reloc) <= (size)) +#define flat_get_addr_from_rp(rp, relval, flags, p) get_unaligned(rp) +#define flat_put_addr_at_rp(rp, val, relval) put_unaligned(val, rp) +#define flat_get_relocate_addr(rel) (rel) +#define flat_set_persistent(relval, p) 0 + +#endif /* __ASM_C6X_FLAT_H */ -- cgit v1.2.3 From 9bd54f64afa4da93d8f5751d80466ab3d660b51c Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Wed, 4 Mar 2015 06:06:26 +0800 Subject: c6x: include: asm: setup: Include "linux/types.h" Some modules may assume "asm/setup.h" already include all headers which needed by itself. So need let "asm/setup.h" include "linux/types.h", the related error: C [M] drivers/input/joydev.o In file included from include/asm-generic/page.h:23:0, from ./arch/c6x/include/asm/page.h:9, from include/asm-generic/io.h:14, from arch/c6x/include/generated/asm/io.h:1, from drivers/input/joydev.c:15: ./arch/c6x/include/asm/setup.h:17:27: error: unknown type name 'phys_addr_t' extern int c6x_add_memory(phys_addr_t start, unsigned long size); ^ Signed-off-by: Chen Gang Signed-off-by: Mark Salter --- arch/c6x/include/asm/setup.h | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/c6x') diff --git a/arch/c6x/include/asm/setup.h b/arch/c6x/include/asm/setup.h index 696804475f55..852afb209afb 100644 --- a/arch/c6x/include/asm/setup.h +++ b/arch/c6x/include/asm/setup.h @@ -12,6 +12,7 @@ #define _ASM_C6X_SETUP_H #include +#include #ifndef __ASSEMBLY__ extern int c6x_add_memory(phys_addr_t start, unsigned long size); -- cgit v1.2.3 From 76e018925406b2fd619babc1a9a9e25456017109 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Wed, 4 Mar 2015 11:09:35 +0800 Subject: c6x: include: asm: dma-mapping: Add dummy dma_sync_single_range_for_device c6x does not implement get_dma_ops() for dma-mapping-common.h. And in dma-mapping-common.h, dma_sync_single_range_for_device() may be dummy. So c6x can just define a dummy function for allmodconfig building. CC [M] drivers/net/ethernet/micrel/ks8851.o drivers/net/ethernet/micrel/ks8842.c: In function 'ks8842_tx_frame_dma': drivers/net/ethernet/micrel/ks8842.c:453:2: error: implicit declaration of function 'dma_sync_single_range_for_device' [-Werror=implicit-function-declaration] dma_sync_single_range_for_device(adapter->dev, ^ Signed-off-by: Chen Gang Signed-off-by: Mark Salter --- arch/c6x/include/asm/dma-mapping.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'arch/c6x') diff --git a/arch/c6x/include/asm/dma-mapping.h b/arch/c6x/include/asm/dma-mapping.h index 88bd0d899bdb..bbd7774e4d4e 100644 --- a/arch/c6x/include/asm/dma-mapping.h +++ b/arch/c6x/include/asm/dma-mapping.h @@ -17,6 +17,14 @@ #define dma_supported(d, m) 1 +static inline void dma_sync_single_range_for_device(struct device *dev, + dma_addr_t addr, + unsigned long offset, + size_t size, + enum dma_data_direction dir) +{ +} + static inline int dma_set_mask(struct device *dev, u64 dma_mask) { if (!dev->dma_mask || !dma_supported(dev, dma_mask)) -- cgit v1.2.3 From df93ab7552daf664ffa048704729e25f2aeb55ac Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Wed, 4 Mar 2015 11:12:10 +0800 Subject: c6x: include: asm: Kbuild: Add generic serial.h Or it will cause building break with allmodconfig: CC [M] drivers/tty/serial/8250/8250_core.o drivers/tty/serial/8250/8250_core.c:102:24: fatal error: asm/serial.h: No such file or directory Signed-off-by: Chen Gang Signed-off-by: Mark Salter --- arch/c6x/include/asm/Kbuild | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/c6x') diff --git a/arch/c6x/include/asm/Kbuild b/arch/c6x/include/asm/Kbuild index 2de73391b81e..ae0a51f5376c 100644 --- a/arch/c6x/include/asm/Kbuild +++ b/arch/c6x/include/asm/Kbuild @@ -41,6 +41,7 @@ generic-y += resource.h generic-y += scatterlist.h generic-y += segment.h generic-y += sembuf.h +generic-y += serial.h generic-y += shmbuf.h generic-y += shmparam.h generic-y += siginfo.h -- cgit v1.2.3 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') 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 v1.2.3 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') 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 v1.2.3 From 3083ca2376a76072dc0071fb211de80b0ac44bd1 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Wed, 4 Mar 2015 15:05:25 +0800 Subject: c6x: platforms: cache: Export symbol L1P_cache_block_invalidate and L1D_cache_block_writeback They are needed by other modules, the related error with allmodconfig: MODPOST 3327 modules ERROR: "L1P_cache_block_invalidate" [drivers/misc/lkdtm.ko] undefined! ERROR: "L1D_cache_block_writeback" [drivers/misc/lkdtm.ko] undefined! Signed-off-by: Chen Gang Signed-off-by: Mark Salter --- arch/c6x/platforms/cache.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/c6x') diff --git a/arch/c6x/platforms/cache.c b/arch/c6x/platforms/cache.c index 86318a16a252..46fd2d530271 100644 --- a/arch/c6x/platforms/cache.c +++ b/arch/c6x/platforms/cache.c @@ -350,6 +350,7 @@ void L1P_cache_block_invalidate(unsigned int start, unsigned int end) (unsigned int *) end, IMCR_L1PIBAR, IMCR_L1PIWC); } +EXPORT_SYMBOL(L1P_cache_block_invalidate); void L1D_cache_block_invalidate(unsigned int start, unsigned int end) { @@ -371,6 +372,7 @@ void L1D_cache_block_writeback(unsigned int start, unsigned int end) (unsigned int *) end, IMCR_L1DWBAR, IMCR_L1DWWC); } +EXPORT_SYMBOL(L1D_cache_block_writeback); /* * L2 block operations -- cgit v1.2.3