aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/kernel')
-rw-r--r--arch/blackfin/kernel/bfin_dma_5xx.c6
-rw-r--r--arch/blackfin/kernel/bfin_gpio.c14
-rw-r--r--arch/blackfin/kernel/entry.S5
-rw-r--r--arch/blackfin/kernel/irqchip.c2
-rw-r--r--arch/blackfin/kernel/setup.c248
-rw-r--r--arch/blackfin/kernel/traps.c2
-rw-r--r--arch/blackfin/kernel/vmlinux.lds.S166
7 files changed, 205 insertions, 238 deletions
diff --git a/arch/blackfin/kernel/bfin_dma_5xx.c b/arch/blackfin/kernel/bfin_dma_5xx.c
index 0ccb0dc3f833..069a896a8f26 100644
--- a/arch/blackfin/kernel/bfin_dma_5xx.c
+++ b/arch/blackfin/kernel/bfin_dma_5xx.c
@@ -595,7 +595,7 @@ unsigned short get_dma_curr_ycount(unsigned int channel)
595} 595}
596EXPORT_SYMBOL(get_dma_curr_ycount); 596EXPORT_SYMBOL(get_dma_curr_ycount);
597 597
598void *_dma_memcpy(void *dest, const void *src, size_t size) 598static void *__dma_memcpy(void *dest, const void *src, size_t size)
599{ 599{
600 int direction; /* 1 - address decrease, 0 - address increase */ 600 int direction; /* 1 - address decrease, 0 - address increase */
601 int flag_align; /* 1 - address aligned, 0 - address unaligned */ 601 int flag_align; /* 1 - address aligned, 0 - address unaligned */
@@ -744,8 +744,8 @@ void *dma_memcpy(void *dest, const void *src, size_t size)
744 bulk = (size >> 16) << 16; 744 bulk = (size >> 16) << 16;
745 rest = size - bulk; 745 rest = size - bulk;
746 if (bulk) 746 if (bulk)
747 _dma_memcpy(dest, src, bulk); 747 __dma_memcpy(dest, src, bulk);
748 addr = _dma_memcpy(dest+bulk, src+bulk, rest); 748 addr = __dma_memcpy(dest+bulk, src+bulk, rest);
749 return addr; 749 return addr;
750} 750}
751 751
diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c
index 3f49fae1cb1f..bb1f4fb2467c 100644
--- a/arch/blackfin/kernel/bfin_gpio.c
+++ b/arch/blackfin/kernel/bfin_gpio.c
@@ -138,7 +138,7 @@ static unsigned int sic_iwr_irqs[gpio_bank(MAX_BLACKFIN_GPIOS)] = {IRQ_PROG0_INT
138 138
139inline int check_gpio(unsigned short gpio) 139inline int check_gpio(unsigned short gpio)
140{ 140{
141 if (gpio > MAX_BLACKFIN_GPIOS) 141 if (gpio >= MAX_BLACKFIN_GPIOS)
142 return -EINVAL; 142 return -EINVAL;
143 return 0; 143 return 0;
144} 144}
@@ -494,19 +494,24 @@ u32 gpio_pm_setup(void)
494 gpio_bank_saved[bank].dir = gpio_bankb[bank]->dir; 494 gpio_bank_saved[bank].dir = gpio_bankb[bank]->dir;
495 gpio_bank_saved[bank].edge = gpio_bankb[bank]->edge; 495 gpio_bank_saved[bank].edge = gpio_bankb[bank]->edge;
496 gpio_bank_saved[bank].both = gpio_bankb[bank]->both; 496 gpio_bank_saved[bank].both = gpio_bankb[bank]->both;
497 gpio_bank_saved[bank].reserved = reserved_map[bank];
497 498
498 gpio = i; 499 gpio = i;
499 500
500 while (mask) { 501 while (mask) {
501 if (mask & 1) { 502 if (mask & 1) {
502 bfin_gpio_wakeup_type(gpio, wakeup_flags_map[gpio]); 503 reserved_map[gpio_bank(gpio)] |=
504 gpio_bit(gpio);
505 bfin_gpio_wakeup_type(gpio,
506 wakeup_flags_map[gpio]);
503 set_gpio_data(gpio, 0); /*Clear*/ 507 set_gpio_data(gpio, 0); /*Clear*/
504 } 508 }
505 gpio++; 509 gpio++;
506 mask >>= 1; 510 mask >>= 1;
507 } 511 }
508 512
509 sic_iwr |= 1 << (sic_iwr_irqs[bank] - (IRQ_CORETMR + 1)); 513 sic_iwr |= 1 <<
514 (sic_iwr_irqs[bank] - (IRQ_CORETMR + 1));
510 gpio_bankb[bank]->maskb_set = wakeup_map[gpio_bank(i)]; 515 gpio_bankb[bank]->maskb_set = wakeup_map[gpio_bank(i)];
511 } 516 }
512 } 517 }
@@ -535,6 +540,9 @@ void gpio_pm_restore(void)
535 gpio_bankb[bank]->polar = gpio_bank_saved[bank].polar; 540 gpio_bankb[bank]->polar = gpio_bank_saved[bank].polar;
536 gpio_bankb[bank]->edge = gpio_bank_saved[bank].edge; 541 gpio_bankb[bank]->edge = gpio_bank_saved[bank].edge;
537 gpio_bankb[bank]->both = gpio_bank_saved[bank].both; 542 gpio_bankb[bank]->both = gpio_bank_saved[bank].both;
543
544 reserved_map[bank] = gpio_bank_saved[bank].reserved;
545
538 } 546 }
539 547
540 gpio_bankb[bank]->maskb = gpio_bank_saved[bank].maskb; 548 gpio_bankb[bank]->maskb = gpio_bank_saved[bank].maskb;
diff --git a/arch/blackfin/kernel/entry.S b/arch/blackfin/kernel/entry.S
index 5880b270bd50..65c5ba4260b0 100644
--- a/arch/blackfin/kernel/entry.S
+++ b/arch/blackfin/kernel/entry.S
@@ -58,10 +58,12 @@ ENTRY(_ret_from_fork)
58 RESTORE_ALL_SYS 58 RESTORE_ALL_SYS
59 p0 = reti; 59 p0 = reti;
60 jump (p0); 60 jump (p0);
61ENDPROC(_ret_from_fork)
61 62
62ENTRY(_sys_fork) 63ENTRY(_sys_fork)
63 r0 = -EINVAL; 64 r0 = -EINVAL;
64 rts; 65 rts;
66ENDPROC(_sys_fork)
65 67
66ENTRY(_sys_vfork) 68ENTRY(_sys_vfork)
67 r0 = sp; 69 r0 = sp;
@@ -72,6 +74,7 @@ ENTRY(_sys_vfork)
72 SP += 12; 74 SP += 12;
73 rets = [sp++]; 75 rets = [sp++];
74 rts; 76 rts;
77ENDPROC(_sys_vfork)
75 78
76ENTRY(_sys_clone) 79ENTRY(_sys_clone)
77 r0 = sp; 80 r0 = sp;
@@ -82,6 +85,7 @@ ENTRY(_sys_clone)
82 SP += 12; 85 SP += 12;
83 rets = [sp++]; 86 rets = [sp++];
84 rts; 87 rts;
88ENDPROC(_sys_clone)
85 89
86ENTRY(_sys_rt_sigreturn) 90ENTRY(_sys_rt_sigreturn)
87 r0 = sp; 91 r0 = sp;
@@ -92,3 +96,4 @@ ENTRY(_sys_rt_sigreturn)
92 SP += 12; 96 SP += 12;
93 rets = [sp++]; 97 rets = [sp++];
94 rts; 98 rts;
99ENDPROC(_sys_rt_sigreturn)
diff --git a/arch/blackfin/kernel/irqchip.c b/arch/blackfin/kernel/irqchip.c
index df5bf022cf79..80996a1a94ca 100644
--- a/arch/blackfin/kernel/irqchip.c
+++ b/arch/blackfin/kernel/irqchip.c
@@ -91,7 +91,7 @@ int show_interrupts(struct seq_file *p, void *v)
91} 91}
92 92
93/* 93/*
94 * do_IRQ handles all hardware IRQ's. Decoded IRQs should not 94 * do_IRQ handles all hardware IRQs. Decoded IRQs should not
95 * come via this function. Instead, they should provide their 95 * come via this function. Instead, they should provide their
96 * own 'handler' 96 * own 'handler'
97 */ 97 */
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c
index 02dc74301920..a24fa1ab802b 100644
--- a/arch/blackfin/kernel/setup.c
+++ b/arch/blackfin/kernel/setup.c
@@ -61,7 +61,7 @@ EXPORT_SYMBOL(memory_mtd_start);
61EXPORT_SYMBOL(mtd_size); 61EXPORT_SYMBOL(mtd_size);
62#endif 62#endif
63 63
64char command_line[COMMAND_LINE_SIZE]; 64char __initdata command_line[COMMAND_LINE_SIZE];
65 65
66#if defined(CONFIG_BLKFIN_DCACHE) || defined(CONFIG_BLKFIN_CACHE) 66#if defined(CONFIG_BLKFIN_DCACHE) || defined(CONFIG_BLKFIN_CACHE)
67static void generate_cpl_tables(void); 67static void generate_cpl_tables(void);
@@ -90,7 +90,7 @@ void __init bf53x_cache_init(void)
90#endif 90#endif
91} 91}
92 92
93void bf53x_relocate_l1_mem(void) 93void __init bf53x_relocate_l1_mem(void)
94{ 94{
95 unsigned long l1_code_length; 95 unsigned long l1_code_length;
96 unsigned long l1_data_a_length; 96 unsigned long l1_data_a_length;
@@ -205,7 +205,6 @@ void __init setup_arch(char **cmdline_p)
205#endif 205#endif
206 206
207#if defined(CONFIG_CMDLINE_BOOL) 207#if defined(CONFIG_CMDLINE_BOOL)
208 memset(command_line, 0, sizeof(command_line));
209 strncpy(&command_line[0], CONFIG_CMDLINE, sizeof(command_line)); 208 strncpy(&command_line[0], CONFIG_CMDLINE, sizeof(command_line));
210 command_line[sizeof(command_line) - 1] = 0; 209 command_line[sizeof(command_line) - 1] = 0;
211#endif 210#endif
@@ -213,7 +212,7 @@ void __init setup_arch(char **cmdline_p)
213 /* Keep a copy of command line */ 212 /* Keep a copy of command line */
214 *cmdline_p = &command_line[0]; 213 *cmdline_p = &command_line[0];
215 memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE); 214 memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE);
216 boot_command_line[COMMAND_LINE_SIZE - 1] = 0; 215 boot_command_line[COMMAND_LINE_SIZE - 1] = '\0';
217 216
218 /* setup memory defaults from the user config */ 217 /* setup memory defaults from the user config */
219 physical_mem_end = 0; 218 physical_mem_end = 0;
@@ -411,7 +410,7 @@ static int __init topology_init(void)
411subsys_initcall(topology_init); 410subsys_initcall(topology_init);
412 411
413#if defined(CONFIG_BLKFIN_DCACHE) || defined(CONFIG_BLKFIN_CACHE) 412#if defined(CONFIG_BLKFIN_DCACHE) || defined(CONFIG_BLKFIN_CACHE)
414u16 lock_kernel_check(u32 start, u32 end) 413static u16 __init lock_kernel_check(u32 start, u32 end)
415{ 414{
416 if ((start <= (u32) _stext && end >= (u32) _end) 415 if ((start <= (u32) _stext && end >= (u32) _end)
417 || (start >= (u32) _stext && end <= (u32) _end)) 416 || (start >= (u32) _stext && end <= (u32) _end))
@@ -471,6 +470,67 @@ close_cplbtab(struct cplb_tab *table)
471 return 0; 470 return 0;
472} 471}
473 472
473/* helper function */
474static void __fill_code_cplbtab(struct cplb_tab *t, int i,
475 u32 a_start, u32 a_end)
476{
477 if (cplb_data[i].psize) {
478 fill_cplbtab(t,
479 cplb_data[i].start,
480 cplb_data[i].end,
481 cplb_data[i].psize,
482 cplb_data[i].i_conf);
483 } else {
484#if (defined(CONFIG_BLKFIN_CACHE) && defined(ANOMALY_05000263))
485 if (i == SDRAM_KERN) {
486 fill_cplbtab(t,
487 cplb_data[i].start,
488 cplb_data[i].end,
489 SIZE_4M,
490 cplb_data[i].i_conf);
491 } else {
492#endif
493 fill_cplbtab(t,
494 cplb_data[i].start,
495 a_start,
496 SIZE_1M,
497 cplb_data[i].i_conf);
498 fill_cplbtab(t,
499 a_start,
500 a_end,
501 SIZE_4M,
502 cplb_data[i].i_conf);
503 fill_cplbtab(t, a_end,
504 cplb_data[i].end,
505 SIZE_1M,
506 cplb_data[i].i_conf);
507 }
508 }
509}
510
511static void __fill_data_cplbtab(struct cplb_tab *t, int i,
512 u32 a_start, u32 a_end)
513{
514 if (cplb_data[i].psize) {
515 fill_cplbtab(t,
516 cplb_data[i].start,
517 cplb_data[i].end,
518 cplb_data[i].psize,
519 cplb_data[i].d_conf);
520 } else {
521 fill_cplbtab(t,
522 cplb_data[i].start,
523 a_start, SIZE_1M,
524 cplb_data[i].d_conf);
525 fill_cplbtab(t, a_start,
526 a_end, SIZE_4M,
527 cplb_data[i].d_conf);
528 fill_cplbtab(t, a_end,
529 cplb_data[i].end,
530 SIZE_1M,
531 cplb_data[i].d_conf);
532 }
533}
474static void __init generate_cpl_tables(void) 534static void __init generate_cpl_tables(void)
475{ 535{
476 536
@@ -540,130 +600,78 @@ static void __init generate_cpl_tables(void)
540 cplb_data[RES_MEM].i_conf = SDRAM_INON_CHBL; 600 cplb_data[RES_MEM].i_conf = SDRAM_INON_CHBL;
541 601
542 for (i = ZERO_P; i <= L2_MEM; i++) { 602 for (i = ZERO_P; i <= L2_MEM; i++) {
603 if (!cplb_data[i].valid)
604 continue;
543 605
544 if (cplb_data[i].valid) { 606 as_1m = cplb_data[i].start % SIZE_1M;
545 607
546 as_1m = cplb_data[i].start % SIZE_1M; 608 /*
609 * We need to make sure all sections are properly 1M aligned
610 * However between Kernel Memory and the Kernel mtd section,
611 * depending on the rootfs size, there can be overlapping
612 * memory areas.
613 */
547 614
548 /* We need to make sure all sections are properly 1M aligned 615 if (as_1m && i != L1I_MEM && i != L1D_MEM) {
549 * However between Kernel Memory and the Kernel mtd section, depending on the
550 * rootfs size, there can be overlapping memory areas.
551 */
552
553 if (as_1m && i!=L1I_MEM && i!=L1D_MEM) {
554#ifdef CONFIG_MTD_UCLINUX 616#ifdef CONFIG_MTD_UCLINUX
555 if (i == SDRAM_RAM_MTD) { 617 if (i == SDRAM_RAM_MTD) {
556 if ((cplb_data[SDRAM_KERN].end + 1) > cplb_data[SDRAM_RAM_MTD].start) 618 if ((cplb_data[SDRAM_KERN].end + 1) >
557 cplb_data[SDRAM_RAM_MTD].start = (cplb_data[i].start & (-2*SIZE_1M)) + SIZE_1M; 619 cplb_data[SDRAM_RAM_MTD].start)
558 else 620 cplb_data[SDRAM_RAM_MTD].start =
559 cplb_data[SDRAM_RAM_MTD].start = (cplb_data[i].start & (-2*SIZE_1M)); 621 (cplb_data[i].start &
560 } else 622 (-2*SIZE_1M)) + SIZE_1M;
623 else
624 cplb_data[SDRAM_RAM_MTD].start =
625 (cplb_data[i].start &
626 (-2*SIZE_1M));
627 } else
561#endif 628#endif
562 printk(KERN_WARNING "Unaligned Start of %s at 0x%X\n", 629 printk(KERN_WARNING
563 cplb_data[i].name, cplb_data[i].start); 630 "Unaligned Start of %s at 0x%X\n",
564 } 631 cplb_data[i].name, cplb_data[i].start);
632 }
565 633
566 as = cplb_data[i].start % SIZE_4M; 634 as = cplb_data[i].start % SIZE_4M;
567 ae = cplb_data[i].end % SIZE_4M; 635 ae = cplb_data[i].end % SIZE_4M;
568
569 if (as)
570 a_start = cplb_data[i].start + (SIZE_4M - (as));
571 else
572 a_start = cplb_data[i].start;
573
574 a_end = cplb_data[i].end - ae;
575
576 for (j = INITIAL_T; j <= SWITCH_T; j++) {
577
578 switch (j) {
579 case INITIAL_T:
580 if (cplb_data[i].attr & INITIAL_T) {
581 t_i = &cplb.init_i;
582 t_d = &cplb.init_d;
583 process = 1;
584 } else
585 process = 0;
586 break;
587 case SWITCH_T:
588 if (cplb_data[i].attr & SWITCH_T) {
589 t_i = &cplb.switch_i;
590 t_d = &cplb.switch_d;
591 process = 1;
592 } else
593 process = 0;
594 break;
595 default:
596 process = 0;
597 break;
598 }
599 636
600 if (process) { 637 if (as)
601 if (cplb_data[i].attr & I_CPLB) { 638 a_start = cplb_data[i].start + (SIZE_4M - (as));
602 639 else
603 if (cplb_data[i].psize) { 640 a_start = cplb_data[i].start;
604 fill_cplbtab(t_i,
605 cplb_data[i].start,
606 cplb_data[i].end,
607 cplb_data[i].psize,
608 cplb_data[i].i_conf);
609 } else {
610 /*icplb_table */
611#if (defined(CONFIG_BLKFIN_CACHE) && defined(ANOMALY_05000263))
612 if (i == SDRAM_KERN) {
613 fill_cplbtab(t_i,
614 cplb_data[i].start,
615 cplb_data[i].end,
616 SIZE_4M,
617 cplb_data[i].i_conf);
618 } else
619#endif
620 {
621 fill_cplbtab(t_i,
622 cplb_data[i].start,
623 a_start,
624 SIZE_1M,
625 cplb_data[i].i_conf);
626 fill_cplbtab(t_i,
627 a_start,
628 a_end,
629 SIZE_4M,
630 cplb_data[i].i_conf);
631 fill_cplbtab(t_i, a_end,
632 cplb_data[i].end,
633 SIZE_1M,
634 cplb_data[i].i_conf);
635 }
636 }
637 641
638 } 642 a_end = cplb_data[i].end - ae;
639 if (cplb_data[i].attr & D_CPLB) {
640
641 if (cplb_data[i].psize) {
642 fill_cplbtab(t_d,
643 cplb_data[i].start,
644 cplb_data[i].end,
645 cplb_data[i].psize,
646 cplb_data[i].d_conf);
647 } else {
648/*dcplb_table*/
649 fill_cplbtab(t_d,
650 cplb_data[i].start,
651 a_start, SIZE_1M,
652 cplb_data[i].d_conf);
653 fill_cplbtab(t_d, a_start,
654 a_end, SIZE_4M,
655 cplb_data[i].d_conf);
656 fill_cplbtab(t_d, a_end,
657 cplb_data[i].end,
658 SIZE_1M,
659 cplb_data[i].d_conf);
660 643
661 } 644 for (j = INITIAL_T; j <= SWITCH_T; j++) {
662 645
663 } 646 switch (j) {
664 } 647 case INITIAL_T:
648 if (cplb_data[i].attr & INITIAL_T) {
649 t_i = &cplb.init_i;
650 t_d = &cplb.init_d;
651 process = 1;
652 } else
653 process = 0;
654 break;
655 case SWITCH_T:
656 if (cplb_data[i].attr & SWITCH_T) {
657 t_i = &cplb.switch_i;
658 t_d = &cplb.switch_d;
659 process = 1;
660 } else
661 process = 0;
662 break;
663 default:
664 process = 0;
665 break;
665 } 666 }
666 667
668 if (!process)
669 continue;
670 if (cplb_data[i].attr & I_CPLB)
671 __fill_code_cplbtab(t_i, i, a_start, a_end);
672
673 if (cplb_data[i].attr & D_CPLB)
674 __fill_data_cplbtab(t_d, i, a_start, a_end);
667 } 675 }
668 } 676 }
669 677
@@ -681,7 +689,7 @@ static void __init generate_cpl_tables(void)
681 689
682#endif 690#endif
683 691
684static inline u_long get_vco(void) 692static u_long get_vco(void)
685{ 693{
686 u_long msel; 694 u_long msel;
687 u_long vco; 695 u_long vco;
@@ -889,8 +897,8 @@ struct seq_operations cpuinfo_op = {
889 .show = show_cpuinfo, 897 .show = show_cpuinfo,
890}; 898};
891 899
892void cmdline_init(unsigned long r0) 900void __init cmdline_init(const char *r0)
893{ 901{
894 if (r0) 902 if (r0)
895 strncpy(command_line, (char *)r0, COMMAND_LINE_SIZE); 903 strncpy(command_line, r0, COMMAND_LINE_SIZE);
896} 904}
diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c
index 9932edee8cb4..5ab87b0b92dd 100644
--- a/arch/blackfin/kernel/traps.c
+++ b/arch/blackfin/kernel/traps.c
@@ -557,7 +557,7 @@ void dump_bfin_regs(struct pt_regs *fp, void *retaddr)
557 break; 557 break;
558#ifndef CONFIG_DEBUG_HWERR 558#ifndef CONFIG_DEBUG_HWERR
559 /* If one of the last few instructions was a STI 559 /* If one of the last few instructions was a STI
560 * it is likily that the error occured awhile ago 560 * it is likely that the error occured awhile ago
561 * and we just noticed 561 * and we just noticed
562 */ 562 */
563 if (x >= 0x0040 && x <= 0x0047 && i <= 0) 563 if (x >= 0x0040 && x <= 0x0047 && i <= 0)
diff --git a/arch/blackfin/kernel/vmlinux.lds.S b/arch/blackfin/kernel/vmlinux.lds.S
index 86fe67995802..1ef1e36b3957 100644
--- a/arch/blackfin/kernel/vmlinux.lds.S
+++ b/arch/blackfin/kernel/vmlinux.lds.S
@@ -7,7 +7,7 @@
7 * Description: Master linker script for blackfin architecture 7 * Description: Master linker script for blackfin architecture
8 * 8 *
9 * Modified: 9 * Modified:
10 * Copyright 2004-2006 Analog Devices Inc. 10 * Copyright 2004-2007 Analog Devices Inc.
11 * 11 *
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/ 12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
13 * 13 *
@@ -32,97 +32,54 @@
32#include <asm-generic/vmlinux.lds.h> 32#include <asm-generic/vmlinux.lds.h>
33#include <asm/mem_map.h> 33#include <asm/mem_map.h>
34 34
35
36OUTPUT_FORMAT("elf32-bfin") 35OUTPUT_FORMAT("elf32-bfin")
37ENTRY(__start) 36ENTRY(__start)
38_jiffies = _jiffies_64; 37_jiffies = _jiffies_64;
39 38
40MEMORY
41{
42 ram : ORIGIN = CONFIG_BOOT_LOAD, LENGTH = (CONFIG_MEM_SIZE * 1024 * 1024) - (CONFIG_BOOT_LOAD)
43 l1_data_a : ORIGIN = L1_DATA_A_START, LENGTH = L1_DATA_A_LENGTH
44 l1_data_b : ORIGIN = L1_DATA_B_START, LENGTH = L1_DATA_B_LENGTH
45 l1_code : ORIGIN = L1_CODE_START, LENGTH = L1_CODE_LENGTH
46 l1_scratch : ORIGIN = L1_SCRATCH_START, LENGTH = L1_SCRATCH_LENGTH
47}
48
49SECTIONS 39SECTIONS
50{ 40{
51 . = CONFIG_BOOT_LOAD; 41 . = CONFIG_BOOT_LOAD;
52
53 .text : 42 .text :
54 { 43 {
55 _text = .; 44 __text = .;
56 __stext = .; 45 _text = .;
46 __stext = .;
57 TEXT_TEXT 47 TEXT_TEXT
58 SCHED_TEXT 48 SCHED_TEXT
49 LOCK_TEXT
59 *(.text.lock) 50 *(.text.lock)
51 *(.fixup)
52
60 . = ALIGN(16); 53 . = ALIGN(16);
61 ___start___ex_table = .; 54 ___start___ex_table = .;
62 *(__ex_table) 55 *(__ex_table)
63 ___stop___ex_table = .; 56 ___stop___ex_table = .;
64
65 *($code)
66 *(.rodata)
67 *(.rodata.*)
68 *(__vermagic) /* Kernel version magic */
69 *(.rodata1)
70 *(.fixup)
71 *(.spinlock.text)
72 57
73 /* Kernel symbol table: Normal symbols */
74 . = ALIGN(4); 58 . = ALIGN(4);
75 ___start___ksymtab = .;
76 *(__ksymtab)
77 ___stop___ksymtab = .;
78
79 /* Kernel symbol table: GPL-only symbols */
80 ___start___ksymtab_gpl = .;
81 *(__ksymtab_gpl)
82 ___stop___ksymtab_gpl = .;
83
84 /* Kernel symbol table: Normal unused symbols */ \
85 ___start___ksymtab_unused = .;
86 *(__ksymtab_unused)
87 ___stop___ksymtab_unused = .;
88
89 /* Kernel symbol table: GPL-only unused symbols */
90 ___start___ksymtab_unused_gpl = .;
91 *(__ksymtab_unused_gpl)
92 ___stop___ksymtab_unused_gpl = .;
93
94
95 /* Kernel symbol table: GPL-future symbols */
96 ___start___ksymtab_gpl_future = .;
97 *(__ksymtab_gpl_future)
98 ___stop___ksymtab_gpl_future = .;
99
100 /* Kernel symbol table: Normal symbols */
101 ___start___kcrctab = .;
102 *(__kcrctab)
103 ___stop___kcrctab = .;
104
105 /* Kernel symbol table: GPL-only symbols */
106 ___start___kcrctab_gpl = .;
107 *(__kcrctab_gpl)
108 ___stop___kcrctab_gpl = .;
109
110 /* Kernel symbol table: GPL-future symbols */
111 ___start___kcrctab_gpl_future = .;
112 *(__kcrctab_gpl_future)
113 ___stop___kcrctab_gpl_future = .;
114
115 /* Kernel symbol table: strings */
116 *(__ksymtab_strings)
117
118 . = ALIGN(4);
119 __etext = .; 59 __etext = .;
120 } > ram 60 }
61
62 RODATA
63
64 .data :
65 {
66 __sdata = .;
67 . = ALIGN(0x2000);
68 *(.data.init_task)
69 DATA_DATA
70 CONSTRUCTORS
71
72 . = ALIGN(32);
73 *(.data.cacheline_aligned)
74
75 . = ALIGN(0x2000);
76 __edata = .;
77 }
121 78
79 ___init_begin = .;
122 .init : 80 .init :
123 { 81 {
124 . = ALIGN(4096); 82 . = ALIGN(4096);
125 ___init_begin = .;
126 __sinittext = .; 83 __sinittext = .;
127 *(.init.text) 84 *(.init.text)
128 __einittext = .; 85 __einittext = .;
@@ -148,39 +105,39 @@ SECTIONS
148 *(.init.ramfs) 105 *(.init.ramfs)
149 ___initramfs_end = .; 106 ___initramfs_end = .;
150 . = ALIGN(4); 107 . = ALIGN(4);
151 ___init_end = .; 108 }
152 } > ram
153 109
154 __l1_lma_start = .; 110 __l1_lma_start = .;
155 111
156 .text_l1 : 112 .text_l1 L1_CODE_START : AT(LOADADDR(.init) + SIZEOF(.init))
157 { 113 {
158 . = ALIGN(4); 114 . = ALIGN(4);
159 __stext_l1 = .; 115 __stext_l1 = .;
160 *(.l1.text) 116 *(.l1.text)
161 117
162 . = ALIGN(4); 118 . = ALIGN(4);
163 __etext_l1 = .; 119 __etext_l1 = .;
164 } > l1_code AT > ram 120 }
165 121
166 .data_l1 : 122 .data_l1 L1_DATA_A_START : AT(LOADADDR(.text_l1) + SIZEOF(.text_l1))
167 { 123 {
168 . = ALIGN(4); 124 . = ALIGN(4);
169 __sdata_l1 = .; 125 __sdata_l1 = .;
170 *(.l1.data) 126 *(.l1.data)
171 __edata_l1 = .; 127 __edata_l1 = .;
172 128
173 . = ALIGN(4); 129 . = ALIGN(4);
174 __sbss_l1 = .; 130 __sbss_l1 = .;
175 *(.l1.bss) 131 *(.l1.bss)
176 132
177 . = ALIGN(32); 133 . = ALIGN(32);
178 *(.data_l1.cacheline_aligned) 134 *(.data_l1.cacheline_aligned)
179 135
180 . = ALIGN(4); 136 . = ALIGN(4);
181 __ebss_l1 = .; 137 __ebss_l1 = .;
182 } > l1_data_a AT > ram 138 }
183 .data_b_l1 : 139
140 .data_b_l1 L1_DATA_B_START : AT(LOADADDR(.data_l1) + SIZEOF(.data_l1))
184 { 141 {
185 . = ALIGN(4); 142 . = ALIGN(4);
186 __sdata_b_l1 = .; 143 __sdata_b_l1 = .;
@@ -193,36 +150,25 @@ SECTIONS
193 150
194 . = ALIGN(4); 151 . = ALIGN(4);
195 __ebss_b_l1 = .; 152 __ebss_b_l1 = .;
196 } > l1_data_b AT > ram 153 }
197 154
198 .data : 155 ___init_end = LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1);
199 {
200 __sdata = .;
201 . = ALIGN(0x2000);
202 *(.data.init_task)
203 DATA_DATA
204 156
205 . = ALIGN(32); 157 .bss LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1) :
206 *(.data.cacheline_aligned)
207
208 . = ALIGN(0x2000);
209 __edata = .;
210 } > ram
211
212 /DISCARD/ : { /* Exit code and data*/
213 *(.exit.text)
214 *(.exit.data)
215 *(.exitcall.exit)
216 } > ram
217
218 .bss :
219 { 158 {
220 . = ALIGN(4); 159 . = ALIGN(4);
221 ___bss_start = .; 160 ___bss_start = .;
222 *(.bss) 161 *(.bss)
223 *(COMMON) 162 *(COMMON)
224 . = ALIGN(4); 163 . = ALIGN(4);
225 ___bss_stop = .; 164 ___bss_stop = .;
226 __end = . ; 165 __end = .;
227 } > ram 166 }
167
168 /DISCARD/ :
169 {
170 *(.exit.text)
171 *(.exit.data)
172 *(.exitcall.exit)
173 }
228} 174}