summaryrefslogtreecommitdiffstats
path: root/target/linux/realtek/files/kernel
diff options
context:
space:
mode:
authorRoman Yeryomin <roman@advem.lv>2013-05-17 20:40:24 +0300
committerRoman Yeryomin <roman@advem.lv>2013-05-17 20:40:24 +0300
commite6d87036412b952cb083eff2dc716aee97a771f2 (patch)
tree273dd3daaa85553832d3cc6d48276229dc7fbe09 /target/linux/realtek/files/kernel
parenta18fec42221baa52fff4c5ffd45ec8f32e3add36 (diff)
Move to rsdk 3.2.4. Compiles cleanly.
Signed-off-by: Roman Yeryomin <roman@advem.lv>
Diffstat (limited to 'target/linux/realtek/files/kernel')
-rw-r--r--target/linux/realtek/files/kernel/bounds.s57
-rw-r--r--target/linux/realtek/files/kernel/printk_log.c49
-rw-r--r--target/linux/realtek/files/kernel/timeconst.h35
3 files changed, 128 insertions, 13 deletions
diff --git a/target/linux/realtek/files/kernel/bounds.s b/target/linux/realtek/files/kernel/bounds.s
new file mode 100644
index 000000000..42c6411e6
--- /dev/null
+++ b/target/linux/realtek/files/kernel/bounds.s
@@ -0,0 +1,57 @@
+ .file 1 "bounds.c"
+ .section .mdebug.abi32
+ .previous
+
+ # -G value = 0, Arch = 4181, ISA = 1
+ # GNU C version 3.4.6-1.3.6 (mips-linux)
+ # compiled by GNU C version 3.4.6.
+ # GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
+ # options passed: -nostdinc -Iinclude
+ # -I/home/roman/dev/rsdk/rtl819x/linux-2.6.30/arch/rlx/include
+ # -Iinclude/asm-rlx -Iarch/rlx/bsp/
+ # -I/home/roman/dev/rsdk/rtl819x/linux-2.6.30/arch/rlx/include/asm/mach-generic
+ # -iprefix -U__PIC__ -U__pic__ -D__KERNEL__ -UMIPSEB -U_MIPSEB -U__MIPSEB
+ # -U__MIPSEB__ -UMIPSEL -U_MIPSEL -U__MIPSEL -U__MIPSEL__ -DMIPSEB
+ # -D_MIPSEB -D__MIPSEB -D__MIPSEB__ -DVMLINUX_LOAD_ADDRESS=0x80000000
+ # -DKBUILD_STR(s)=#s -DKBUILD_BASENAME=KBUILD_STR(bounds)
+ # -DKBUILD_MODNAME=KBUILD_STR(bounds) -isystem -include -MD -G -meb
+ # -march=4181 -mno-check-zero-division -mabi=32 -mno-abicalls -msoft-float
+ # -auxbase-strip -Os -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs
+ # -Werror-implicit-function-declaration -Wdeclaration-after-statement
+ # -fno-strict-aliasing -fno-common -fno-delete-null-pointer-checks
+ # -ffunction-sections -fno-pic -ffreestanding -fomit-frame-pointer
+ # -fverbose-asm
+ # options enabled: -feliminate-unused-debug-types -fdefer-pop
+ # -fomit-frame-pointer -foptimize-sibling-calls -funit-at-a-time
+ # -fcse-follow-jumps -fcse-skip-blocks -fexpensive-optimizations
+ # -fthread-jumps -fstrength-reduce -fpeephole -fforce-mem -ffunction-cse
+ # -fkeep-static-consts -fcaller-saves -fpcc-struct-return -fgcse -fgcse-lm
+ # -fgcse-sm -fgcse-las -floop-optimize -fcrossjumping -fif-conversion
+ # -fif-conversion2 -frerun-cse-after-loop -frerun-loop-opt
+ # -fschedule-insns -fschedule-insns2 -fsched-interblock -fsched-spec
+ # -fsched-stalled-insns -fsched-stalled-insns-dep -fbranch-count-reg
+ # -freorder-functions -fcprop-registers -ffunction-sections -fverbose-asm
+ # -fregmove -foptimize-register-move -fargument-alias -fident -fpeephole2
+ # -fguess-branch-probability -fmath-errno -ftrapping-math -mgas
+ # -msoft-float -meb -mno-check-zero-division -mexplicit-relocs -march=4181
+ # -mabi=32 -mno-flush-func_flush_cache -mflush-func=_flush_cache
+
+ .section .text.foo,"ax",@progbits
+ .align 2
+ .globl foo
+ .ent foo
+ .type foo, @function
+foo:
+ .set nomips16
+ .frame $sp,0,$31 # vars= 0, regs= 0/0, args= 0, gp= 0
+ .mask 0x00000000,0
+ .fmask 0x00000000,0
+#APP
+
+->NR_PAGEFLAGS 23 __NR_PAGEFLAGS #
+
+->MAX_NR_ZONES 2 __MAX_NR_ZONES #
+#NO_APP
+ j $31
+ .end foo
+ .ident "GCC: (GNU) 3.4.6-1.3.6"
diff --git a/target/linux/realtek/files/kernel/printk_log.c b/target/linux/realtek/files/kernel/printk_log.c
index c53e16bc5..7eaa16f7a 100644
--- a/target/linux/realtek/files/kernel/printk_log.c
+++ b/target/linux/realtek/files/kernel/printk_log.c
@@ -137,8 +137,7 @@ EXPORT_SYMBOL(console_set_on_cmdline);
/* Flag: console code may call schedule() */
static int console_may_schedule;
-#ifdef CONFIG_PRINTK_FUNC
-
+//#ifdef CONFIG_PRINTK_FUNC
static char __log_buf[__LOG_BUF_LEN];
static char *log_buf = __log_buf;
static int log_buf_len = __LOG_BUF_LEN;
@@ -648,11 +647,25 @@ static int have_callable_console(void)
#if defined (CONFIG_PRINTK)
asmlinkage int printk(const char *fmt, ...)
-#elif defined(CONFIG_PANIC_PRINTK)
-asmlinkage int panic_printk(const char *fmt, ...)
-#else
-# error "CONFIG_PRINTK or CONFIG_PANIC_PRINTK must be defined"
+//#elif defined(CONFIG_PANIC_PRINTK)
+//asmlinkage int panic_printk(const char *fmt, ...)
+//#else
+//# error "CONFIG_PRINTK or CONFIG_PANIC_PRINTK must be defined"
+//#endif
+{
+ va_list args;
+ int r;
+
+ va_start(args, fmt);
+ r = vprintk(fmt, args);
+ va_end(args);
+
+ return r;
+}
#endif
+
+#if defined(CONFIG_PANIC_PRINTK)
+asmlinkage int panic_printk(const char *fmt, ...)
{
va_list args;
int r;
@@ -663,6 +676,7 @@ asmlinkage int panic_printk(const char *fmt, ...)
return r;
}
+#endif
/* cpu currently holding logbuf_lock */
static volatile unsigned int printk_cpu = UINT_MAX;
@@ -714,7 +728,7 @@ static int acquire_console_semaphore_for_printk(unsigned int cpu)
return retval;
}
-#if defined (CONFIG_PRINTK_FUNC)
+//#if defined (CONFIG_PRINTK_FUNC)
static const char recursion_bug_msg [] =
KERN_CRIT "BUG: recent printk recursion!\n";
static int recursion_bug;
@@ -836,7 +850,11 @@ out_restore_irqs:
preempt_enable();
return printed_len;
}
+
+#if defined(CONFIG_PRINTK)
EXPORT_SYMBOL(printk);
+#endif
+
EXPORT_SYMBOL(vprintk);
#if defined(CONFIG_PANIC_PRINTK)
EXPORT_SYMBOL(panic_printk);
@@ -844,6 +862,7 @@ EXPORT_SYMBOL(panic_printk);
#endif /*endof CONFIG_PRINTK*/
+#if defined (CONFIG_PRINTK_FUNC)
asmlinkage int scrlog_vprintk(const char *fmt, va_list args)
{
int printed_len = 0;
@@ -973,18 +992,21 @@ asmlinkage int scrlog_printk(const char *fmt, ...)
}
EXPORT_SYMBOL(scrlog_vprintk);
-EXPORT_SYMBOL(scrlog_printk);
-#endif /*end CONFIG_PRINTK_FUNC*/
+//#endif /*end CONFIG_PRINTK_FUNC*/
#else
-
-static void call_console_drivers(unsigned start, unsigned end)
+asmlinkage int scrlog_printk(const char *fmt, ...)
{
+ return 0;
}
-
+//static void call_console_drivers(unsigned start, unsigned end)
+//{
+//}
#endif
+EXPORT_SYMBOL(scrlog_printk);
+
static int __add_preferred_console(char *name, int idx, char *options,
char *brl_options)
{
@@ -1510,7 +1532,8 @@ static int __init disable_boot_consoles(void)
}
late_initcall(disable_boot_consoles);
-#if defined(CONFIG_PRINTK) && !defined(CONFIG_PANIC_PRINTK)
+//#if defined(CONFIG_PRINTK) && !defined(CONFIG_PANIC_PRINTK)
+#if defined(CONFIG_PRINTK)
/*
* printk rate limiting, lifted from the networking subsystem.
diff --git a/target/linux/realtek/files/kernel/timeconst.h b/target/linux/realtek/files/kernel/timeconst.h
new file mode 100644
index 000000000..80d378f4f
--- /dev/null
+++ b/target/linux/realtek/files/kernel/timeconst.h
@@ -0,0 +1,35 @@
+/* Automatically generated by kernel/timeconst.pl */
+/* Conversion constants for HZ == 100 */
+
+#ifndef KERNEL_TIMECONST_H
+#define KERNEL_TIMECONST_H
+
+#include <linux/param.h>
+#include <linux/types.h>
+
+#if HZ != 100
+#error "kernel/timeconst.h has the wrong HZ value!"
+#endif
+
+#define HZ_TO_MSEC_MUL32 U64_C(0xa0000000)
+#define HZ_TO_MSEC_ADJ32 U64_C(0x0)
+#define HZ_TO_MSEC_SHR32 28
+#define HZ_TO_MSEC_NUM U64_C(10)
+#define HZ_TO_MSEC_DEN U64_C(1)
+#define MSEC_TO_HZ_MUL32 U64_C(0xcccccccd)
+#define MSEC_TO_HZ_ADJ32 U64_C(0x733333333)
+#define MSEC_TO_HZ_SHR32 35
+#define MSEC_TO_HZ_NUM U64_C(1)
+#define MSEC_TO_HZ_DEN U64_C(10)
+#define HZ_TO_USEC_MUL32 U64_C(0x9c400000)
+#define HZ_TO_USEC_ADJ32 U64_C(0x0)
+#define HZ_TO_USEC_SHR32 18
+#define HZ_TO_USEC_NUM U64_C(10000)
+#define HZ_TO_USEC_DEN U64_C(1)
+#define USEC_TO_HZ_MUL32 U64_C(0xd1b71759)
+#define USEC_TO_HZ_ADJ32 U64_C(0x1fff2e48e8a7)
+#define USEC_TO_HZ_SHR32 45
+#define USEC_TO_HZ_NUM U64_C(1)
+#define USEC_TO_HZ_DEN U64_C(10000)
+
+#endif /* KERNEL_TIMECONST_H */