diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-15 12:51:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-15 12:51:09 -0400 |
commit | 723e9db7a46e328527cc3da2b478b831184fe828 (patch) | |
tree | cdeda255633057dcb4c84097bed27b2bbf76970f | |
parent | ada3fa15057205b7d3f727bba5cd26b5912e350f (diff) | |
parent | d331d8305cba713605854aab63a000fb892353a7 (diff) |
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (134 commits)
powerpc/nvram: Enable use Generic NVRAM driver for different size chips
powerpc/iseries: Fix oops reading from /proc/iSeries/mf/*/cmdline
powerpc/ps3: Workaround for flash memory I/O error
powerpc/booke: Don't set DABR on 64-bit BookE, use DAC1 instead
powerpc/perf_counters: Reduce stack usage of power_check_constraints
powerpc: Fix bug where perf_counters breaks oprofile
powerpc/85xx: Fix SMP compile error and allow NULL for smp_ops
powerpc/irq: Improve nanodoc
powerpc: Fix some late PowerMac G5 with PCIe ATI graphics
powerpc/fsl-booke: Use HW PTE format if CONFIG_PTE_64BIT
powerpc/book3e: Add missing page sizes
powerpc/pseries: Fix to handle slb resize across migration
powerpc/powermac: Thermal control turns system off too eagerly
powerpc/pci: Merge ppc32 and ppc64 versions of phb_scan()
powerpc/405ex: support cuImage via included dtb
powerpc/405ex: provide necessary fixup function to support cuImage
powerpc/40x: Add support for the ESTeem 195E (PPC405EP) SBC
powerpc/44x: Add Eiger AMCC (AppliedMicro) PPC460SX evaluation board support.
powerpc/44x: Update Arches defconfig
powerpc/44x: Update Arches dts
...
Fix up conflicts in drivers/char/agp/uninorth-agp.c
220 files changed, 11256 insertions, 2461 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 2c42e1526d03..8250902265c6 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -123,7 +123,8 @@ config PPC | |||
123 | select HAVE_KRETPROBES | 123 | select HAVE_KRETPROBES |
124 | select HAVE_ARCH_TRACEHOOK | 124 | select HAVE_ARCH_TRACEHOOK |
125 | select HAVE_LMB | 125 | select HAVE_LMB |
126 | select HAVE_DMA_ATTRS if PPC64 | 126 | select HAVE_DMA_ATTRS |
127 | select HAVE_DMA_API_DEBUG | ||
127 | select USE_GENERIC_SMP_HELPERS if SMP | 128 | select USE_GENERIC_SMP_HELPERS if SMP |
128 | select HAVE_OPROFILE | 129 | select HAVE_OPROFILE |
129 | select HAVE_SYSCALL_WRAPPERS if PPC64 | 130 | select HAVE_SYSCALL_WRAPPERS if PPC64 |
@@ -310,10 +311,6 @@ config SWIOTLB | |||
310 | platforms where the size of a physical address is larger | 311 | platforms where the size of a physical address is larger |
311 | than the bus address. Not all platforms support this. | 312 | than the bus address. Not all platforms support this. |
312 | 313 | ||
313 | config PPC_NEED_DMA_SYNC_OPS | ||
314 | def_bool y | ||
315 | depends on (NOT_COHERENT_CACHE || SWIOTLB) | ||
316 | |||
317 | config HOTPLUG_CPU | 314 | config HOTPLUG_CPU |
318 | bool "Support for enabling/disabling CPUs" | 315 | bool "Support for enabling/disabling CPUs" |
319 | depends on SMP && HOTPLUG && EXPERIMENTAL && (PPC_PSERIES || PPC_PMAC) | 316 | depends on SMP && HOTPLUG && EXPERIMENTAL && (PPC_PSERIES || PPC_PMAC) |
@@ -475,7 +472,7 @@ config PPC_16K_PAGES | |||
475 | bool "16k page size" if 44x | 472 | bool "16k page size" if 44x |
476 | 473 | ||
477 | config PPC_64K_PAGES | 474 | config PPC_64K_PAGES |
478 | bool "64k page size" if 44x || PPC_STD_MMU_64 | 475 | bool "64k page size" if 44x || PPC_STD_MMU_64 || PPC_BOOK3E_64 |
479 | select PPC_HAS_HASH_64K if PPC_STD_MMU_64 | 476 | select PPC_HAS_HASH_64K if PPC_STD_MMU_64 |
480 | 477 | ||
481 | config PPC_256K_PAGES | 478 | config PPC_256K_PAGES |
@@ -495,16 +492,16 @@ endchoice | |||
495 | 492 | ||
496 | config FORCE_MAX_ZONEORDER | 493 | config FORCE_MAX_ZONEORDER |
497 | int "Maximum zone order" | 494 | int "Maximum zone order" |
498 | range 9 64 if PPC_STD_MMU_64 && PPC_64K_PAGES | 495 | range 9 64 if PPC64 && PPC_64K_PAGES |
499 | default "9" if PPC_STD_MMU_64 && PPC_64K_PAGES | 496 | default "9" if PPC64 && PPC_64K_PAGES |
500 | range 13 64 if PPC_STD_MMU_64 && !PPC_64K_PAGES | 497 | range 13 64 if PPC64 && !PPC_64K_PAGES |
501 | default "13" if PPC_STD_MMU_64 && !PPC_64K_PAGES | 498 | default "13" if PPC64 && !PPC_64K_PAGES |
502 | range 9 64 if PPC_STD_MMU_32 && PPC_16K_PAGES | 499 | range 9 64 if PPC32 && PPC_16K_PAGES |
503 | default "9" if PPC_STD_MMU_32 && PPC_16K_PAGES | 500 | default "9" if PPC32 && PPC_16K_PAGES |
504 | range 7 64 if PPC_STD_MMU_32 && PPC_64K_PAGES | 501 | range 7 64 if PPC32 && PPC_64K_PAGES |
505 | default "7" if PPC_STD_MMU_32 && PPC_64K_PAGES | 502 | default "7" if PPC32 && PPC_64K_PAGES |
506 | range 5 64 if PPC_STD_MMU_32 && PPC_256K_PAGES | 503 | range 5 64 if PPC32 && PPC_256K_PAGES |
507 | default "5" if PPC_STD_MMU_32 && PPC_256K_PAGES | 504 | default "5" if PPC32 && PPC_256K_PAGES |
508 | range 11 64 | 505 | range 11 64 |
509 | default "11" | 506 | default "11" |
510 | help | 507 | help |
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index bc35f4e2b81c..952a3963e9e8 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile | |||
@@ -77,7 +77,7 @@ CPP = $(CC) -E $(KBUILD_CFLAGS) | |||
77 | CHECKFLAGS += -m$(CONFIG_WORD_SIZE) -D__powerpc__ -D__powerpc$(CONFIG_WORD_SIZE)__ | 77 | CHECKFLAGS += -m$(CONFIG_WORD_SIZE) -D__powerpc__ -D__powerpc$(CONFIG_WORD_SIZE)__ |
78 | 78 | ||
79 | ifeq ($(CONFIG_PPC64),y) | 79 | ifeq ($(CONFIG_PPC64),y) |
80 | GCC_BROKEN_VEC := $(shell if [ $(call cc-version) -lt 0400 ] ; then echo "y"; fi) | 80 | GCC_BROKEN_VEC := $(call cc-ifversion, -lt, 0400, y) |
81 | 81 | ||
82 | ifeq ($(CONFIG_POWER4_ONLY),y) | 82 | ifeq ($(CONFIG_POWER4_ONLY),y) |
83 | ifeq ($(CONFIG_ALTIVEC),y) | 83 | ifeq ($(CONFIG_ALTIVEC),y) |
diff --git a/arch/powerpc/boot/4xx.c b/arch/powerpc/boot/4xx.c index 325b310573b9..27db8938827a 100644 --- a/arch/powerpc/boot/4xx.c +++ b/arch/powerpc/boot/4xx.c | |||
@@ -8,6 +8,10 @@ | |||
8 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> | 8 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> |
9 | * Copyright (c) 2003, 2004 Zultys Technologies | 9 | * Copyright (c) 2003, 2004 Zultys Technologies |
10 | * | 10 | * |
11 | * Copyright (C) 2009 Wind River Systems, Inc. | ||
12 | * Updated for supporting PPC405EX on Kilauea. | ||
13 | * Tiejun Chen <tiejun.chen@windriver.com> | ||
14 | * | ||
11 | * This program is free software; you can redistribute it and/or | 15 | * This program is free software; you can redistribute it and/or |
12 | * modify it under the terms of the GNU General Public License | 16 | * modify it under the terms of the GNU General Public License |
13 | * as published by the Free Software Foundation; either version | 17 | * as published by the Free Software Foundation; either version |
@@ -659,3 +663,141 @@ void ibm405ep_fixup_clocks(unsigned int sys_clk) | |||
659 | dt_fixup_clock("/plb/opb/serial@ef600300", uart0); | 663 | dt_fixup_clock("/plb/opb/serial@ef600300", uart0); |
660 | dt_fixup_clock("/plb/opb/serial@ef600400", uart1); | 664 | dt_fixup_clock("/plb/opb/serial@ef600400", uart1); |
661 | } | 665 | } |
666 | |||
667 | static u8 ibm405ex_fwdv_multi_bits[] = { | ||
668 | /* values for: 1 - 16 */ | ||
669 | 0x01, 0x02, 0x0e, 0x09, 0x04, 0x0b, 0x10, 0x0d, 0x0c, 0x05, | ||
670 | 0x06, 0x0f, 0x0a, 0x07, 0x08, 0x03 | ||
671 | }; | ||
672 | |||
673 | u32 ibm405ex_get_fwdva(unsigned long cpr_fwdv) | ||
674 | { | ||
675 | u32 index; | ||
676 | |||
677 | for (index = 0; index < ARRAY_SIZE(ibm405ex_fwdv_multi_bits); index++) | ||
678 | if (cpr_fwdv == (u32)ibm405ex_fwdv_multi_bits[index]) | ||
679 | return index + 1; | ||
680 | |||
681 | return 0; | ||
682 | } | ||
683 | |||
684 | static u8 ibm405ex_fbdv_multi_bits[] = { | ||
685 | /* values for: 1 - 100 */ | ||
686 | 0x00, 0xff, 0x7e, 0xfd, 0x7a, 0xf5, 0x6a, 0xd5, 0x2a, 0xd4, | ||
687 | 0x29, 0xd3, 0x26, 0xcc, 0x19, 0xb3, 0x67, 0xce, 0x1d, 0xbb, | ||
688 | 0x77, 0xee, 0x5d, 0xba, 0x74, 0xe9, 0x52, 0xa5, 0x4b, 0x96, | ||
689 | 0x2c, 0xd8, 0x31, 0xe3, 0x46, 0x8d, 0x1b, 0xb7, 0x6f, 0xde, | ||
690 | 0x3d, 0xfb, 0x76, 0xed, 0x5a, 0xb5, 0x6b, 0xd6, 0x2d, 0xdb, | ||
691 | 0x36, 0xec, 0x59, 0xb2, 0x64, 0xc9, 0x12, 0xa4, 0x48, 0x91, | ||
692 | 0x23, 0xc7, 0x0e, 0x9c, 0x38, 0xf0, 0x61, 0xc2, 0x05, 0x8b, | ||
693 | 0x17, 0xaf, 0x5f, 0xbe, 0x7c, 0xf9, 0x72, 0xe5, 0x4a, 0x95, | ||
694 | 0x2b, 0xd7, 0x2e, 0xdc, 0x39, 0xf3, 0x66, 0xcd, 0x1a, 0xb4, | ||
695 | 0x68, 0xd1, 0x22, 0xc4, 0x09, 0x93, 0x27, 0xcf, 0x1e, 0xbc, | ||
696 | /* values for: 101 - 200 */ | ||
697 | 0x78, 0xf1, 0x62, 0xc5, 0x0a, 0x94, 0x28, 0xd0, 0x21, 0xc3, | ||
698 | 0x06, 0x8c, 0x18, 0xb0, 0x60, 0xc1, 0x02, 0x84, 0x08, 0x90, | ||
699 | 0x20, 0xc0, 0x01, 0x83, 0x07, 0x8f, 0x1f, 0xbf, 0x7f, 0xfe, | ||
700 | 0x7d, 0xfa, 0x75, 0xea, 0x55, 0xaa, 0x54, 0xa9, 0x53, 0xa6, | ||
701 | 0x4c, 0x99, 0x33, 0xe7, 0x4e, 0x9d, 0x3b, 0xf7, 0x6e, 0xdd, | ||
702 | 0x3a, 0xf4, 0x69, 0xd2, 0x25, 0xcb, 0x16, 0xac, 0x58, 0xb1, | ||
703 | 0x63, 0xc6, 0x0d, 0x9b, 0x37, 0xef, 0x5e, 0xbd, 0x7b, 0xf6, | ||
704 | 0x6d, 0xda, 0x35, 0xeb, 0x56, 0xad, 0x5b, 0xb6, 0x6c, 0xd9, | ||
705 | 0x32, 0xe4, 0x49, 0x92, 0x24, 0xc8, 0x11, 0xa3, 0x47, 0x8e, | ||
706 | 0x1c, 0xb8, 0x70, 0xe1, 0x42, 0x85, 0x0b, 0x97, 0x2f, 0xdf, | ||
707 | /* values for: 201 - 255 */ | ||
708 | 0x3e, 0xfc, 0x79, 0xf2, 0x65, 0xca, 0x15, 0xab, 0x57, 0xae, | ||
709 | 0x5c, 0xb9, 0x73, 0xe6, 0x4d, 0x9a, 0x34, 0xe8, 0x51, 0xa2, | ||
710 | 0x44, 0x89, 0x13, 0xa7, 0x4f, 0x9e, 0x3c, 0xf8, 0x71, 0xe2, | ||
711 | 0x45, 0x8a, 0x14, 0xa8, 0x50, 0xa1, 0x43, 0x86, 0x0c, 0x98, | ||
712 | 0x30, 0xe0, 0x41, 0x82, 0x04, 0x88, 0x10, 0xa0, 0x40, 0x81, | ||
713 | 0x03, 0x87, 0x0f, 0x9f, 0x3f /* END */ | ||
714 | }; | ||
715 | |||
716 | u32 ibm405ex_get_fbdv(unsigned long cpr_fbdv) | ||
717 | { | ||
718 | u32 index; | ||
719 | |||
720 | for (index = 0; index < ARRAY_SIZE(ibm405ex_fbdv_multi_bits); index++) | ||
721 | if (cpr_fbdv == (u32)ibm405ex_fbdv_multi_bits[index]) | ||
722 | return index + 1; | ||
723 | |||
724 | return 0; | ||
725 | } | ||
726 | |||
727 | void ibm405ex_fixup_clocks(unsigned int sys_clk, unsigned int uart_clk) | ||
728 | { | ||
729 | /* PLL config */ | ||
730 | u32 pllc = CPR0_READ(DCRN_CPR0_PLLC); | ||
731 | u32 plld = CPR0_READ(DCRN_CPR0_PLLD); | ||
732 | u32 cpud = CPR0_READ(DCRN_CPR0_PRIMAD); | ||
733 | u32 plbd = CPR0_READ(DCRN_CPR0_PRIMBD); | ||
734 | u32 opbd = CPR0_READ(DCRN_CPR0_OPBD); | ||
735 | u32 perd = CPR0_READ(DCRN_CPR0_PERD); | ||
736 | |||
737 | /* Dividers */ | ||
738 | u32 fbdv = ibm405ex_get_fbdv(__fix_zero((plld >> 24) & 0xff, 1)); | ||
739 | |||
740 | u32 fwdva = ibm405ex_get_fwdva(__fix_zero((plld >> 16) & 0x0f, 1)); | ||
741 | |||
742 | u32 cpudv0 = __fix_zero((cpud >> 24) & 7, 8); | ||
743 | |||
744 | /* PLBDV0 is hardwared to 010. */ | ||
745 | u32 plbdv0 = 2; | ||
746 | u32 plb2xdv0 = __fix_zero((plbd >> 16) & 7, 8); | ||
747 | |||
748 | u32 opbdv0 = __fix_zero((opbd >> 24) & 3, 4); | ||
749 | |||
750 | u32 perdv0 = __fix_zero((perd >> 24) & 3, 4); | ||
751 | |||
752 | /* Resulting clocks */ | ||
753 | u32 cpu, plb, opb, ebc, vco, tb, uart0, uart1; | ||
754 | |||
755 | /* PLL's VCO is the source for primary forward ? */ | ||
756 | if (pllc & 0x40000000) { | ||
757 | u32 m; | ||
758 | |||
759 | /* Feedback path */ | ||
760 | switch ((pllc >> 24) & 7) { | ||
761 | case 0: | ||
762 | /* PLLOUTx */ | ||
763 | m = fbdv; | ||
764 | break; | ||
765 | case 1: | ||
766 | /* CPU */ | ||
767 | m = fbdv * fwdva * cpudv0; | ||
768 | break; | ||
769 | case 5: | ||
770 | /* PERClk */ | ||
771 | m = fbdv * fwdva * plb2xdv0 * plbdv0 * opbdv0 * perdv0; | ||
772 | break; | ||
773 | default: | ||
774 | printf("WARNING ! Invalid PLL feedback source !\n"); | ||
775 | goto bypass; | ||
776 | } | ||
777 | |||
778 | vco = (unsigned int)(sys_clk * m); | ||
779 | } else { | ||
780 | bypass: | ||
781 | /* Bypass system PLL */ | ||
782 | vco = 0; | ||
783 | } | ||
784 | |||
785 | /* CPU = VCO / ( FWDVA x CPUDV0) */ | ||
786 | cpu = vco / (fwdva * cpudv0); | ||
787 | /* PLB = VCO / ( FWDVA x PLB2XDV0 x PLBDV0) */ | ||
788 | plb = vco / (fwdva * plb2xdv0 * plbdv0); | ||
789 | /* OPB = PLB / OPBDV0 */ | ||
790 | opb = plb / opbdv0; | ||
791 | /* EBC = OPB / PERDV0 */ | ||
792 | ebc = opb / perdv0; | ||
793 | |||
794 | tb = cpu; | ||
795 | uart0 = uart1 = uart_clk; | ||
796 | |||
797 | dt_fixup_cpu_clocks(cpu, tb, 0); | ||
798 | dt_fixup_clock("/plb", plb); | ||
799 | dt_fixup_clock("/plb/opb", opb); | ||
800 | dt_fixup_clock("/plb/opb/ebc", ebc); | ||
801 | dt_fixup_clock("/plb/opb/serial@ef600200", uart0); | ||
802 | dt_fixup_clock("/plb/opb/serial@ef600300", uart1); | ||
803 | } | ||
diff --git a/arch/powerpc/boot/4xx.h b/arch/powerpc/boot/4xx.h index 2606e64f0c4b..7dc5d45361bc 100644 --- a/arch/powerpc/boot/4xx.h +++ b/arch/powerpc/boot/4xx.h | |||
@@ -21,6 +21,7 @@ void ibm4xx_fixup_ebc_ranges(const char *ebc); | |||
21 | 21 | ||
22 | void ibm405gp_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk); | 22 | void ibm405gp_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk); |
23 | void ibm405ep_fixup_clocks(unsigned int sys_clk); | 23 | void ibm405ep_fixup_clocks(unsigned int sys_clk); |
24 | void ibm405ex_fixup_clocks(unsigned int sys_clk, unsigned int uart_clk); | ||
24 | void ibm440gp_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk); | 25 | void ibm440gp_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk); |
25 | void ibm440ep_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk, | 26 | void ibm440ep_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk, |
26 | unsigned int tmr_clk); | 27 | unsigned int tmr_clk); |
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 9ae7b7e2ba71..7bfc8ad87798 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile | |||
@@ -39,6 +39,7 @@ DTS_FLAGS ?= -p 1024 | |||
39 | 39 | ||
40 | $(obj)/4xx.o: BOOTCFLAGS += -mcpu=405 | 40 | $(obj)/4xx.o: BOOTCFLAGS += -mcpu=405 |
41 | $(obj)/ebony.o: BOOTCFLAGS += -mcpu=405 | 41 | $(obj)/ebony.o: BOOTCFLAGS += -mcpu=405 |
42 | $(obj)/cuboot-hotfoot.o: BOOTCFLAGS += -mcpu=405 | ||
42 | $(obj)/cuboot-taishan.o: BOOTCFLAGS += -mcpu=405 | 43 | $(obj)/cuboot-taishan.o: BOOTCFLAGS += -mcpu=405 |
43 | $(obj)/cuboot-katmai.o: BOOTCFLAGS += -mcpu=405 | 44 | $(obj)/cuboot-katmai.o: BOOTCFLAGS += -mcpu=405 |
44 | $(obj)/cuboot-acadia.o: BOOTCFLAGS += -mcpu=405 | 45 | $(obj)/cuboot-acadia.o: BOOTCFLAGS += -mcpu=405 |
@@ -67,7 +68,7 @@ src-wlib := string.S crt0.S crtsavres.S stdio.c main.c \ | |||
67 | cpm-serial.c stdlib.c mpc52xx-psc.c planetcore.c uartlite.c \ | 68 | cpm-serial.c stdlib.c mpc52xx-psc.c planetcore.c uartlite.c \ |
68 | fsl-soc.c mpc8xx.c pq2.c | 69 | fsl-soc.c mpc8xx.c pq2.c |
69 | src-plat := of.c cuboot-52xx.c cuboot-824x.c cuboot-83xx.c cuboot-85xx.c holly.c \ | 70 | src-plat := of.c cuboot-52xx.c cuboot-824x.c cuboot-83xx.c cuboot-85xx.c holly.c \ |
70 | cuboot-ebony.c treeboot-ebony.c prpmc2800.c \ | 71 | cuboot-ebony.c cuboot-hotfoot.c treeboot-ebony.c prpmc2800.c \ |
71 | ps3-head.S ps3-hvcall.S ps3.c treeboot-bamboo.c cuboot-8xx.c \ | 72 | ps3-head.S ps3-hvcall.S ps3.c treeboot-bamboo.c cuboot-8xx.c \ |
72 | cuboot-pq2.c cuboot-sequoia.c treeboot-walnut.c \ | 73 | cuboot-pq2.c cuboot-sequoia.c treeboot-walnut.c \ |
73 | cuboot-bamboo.c cuboot-mpc7448hpc2.c cuboot-taishan.c \ | 74 | cuboot-bamboo.c cuboot-mpc7448hpc2.c cuboot-taishan.c \ |
@@ -75,7 +76,7 @@ src-plat := of.c cuboot-52xx.c cuboot-824x.c cuboot-83xx.c cuboot-85xx.c holly.c | |||
75 | cuboot-katmai.c cuboot-rainier.c redboot-8xx.c ep8248e.c \ | 76 | cuboot-katmai.c cuboot-rainier.c redboot-8xx.c ep8248e.c \ |
76 | cuboot-warp.c cuboot-85xx-cpm2.c cuboot-yosemite.c simpleboot.c \ | 77 | cuboot-warp.c cuboot-85xx-cpm2.c cuboot-yosemite.c simpleboot.c \ |
77 | virtex405-head.S virtex.c redboot-83xx.c cuboot-sam440ep.c \ | 78 | virtex405-head.S virtex.c redboot-83xx.c cuboot-sam440ep.c \ |
78 | cuboot-acadia.c cuboot-amigaone.c | 79 | cuboot-acadia.c cuboot-amigaone.c cuboot-kilauea.c |
79 | src-boot := $(src-wlib) $(src-plat) empty.c | 80 | src-boot := $(src-wlib) $(src-plat) empty.c |
80 | 81 | ||
81 | src-boot := $(addprefix $(obj)/, $(src-boot)) | 82 | src-boot := $(addprefix $(obj)/, $(src-boot)) |
@@ -190,6 +191,7 @@ image-$(CONFIG_DEFAULT_UIMAGE) += uImage | |||
190 | 191 | ||
191 | # Board ports in arch/powerpc/platform/40x/Kconfig | 192 | # Board ports in arch/powerpc/platform/40x/Kconfig |
192 | image-$(CONFIG_EP405) += dtbImage.ep405 | 193 | image-$(CONFIG_EP405) += dtbImage.ep405 |
194 | image-$(CONFIG_HOTFOOT) += cuImage.hotfoot | ||
193 | image-$(CONFIG_WALNUT) += treeImage.walnut | 195 | image-$(CONFIG_WALNUT) += treeImage.walnut |
194 | image-$(CONFIG_ACADIA) += cuImage.acadia | 196 | image-$(CONFIG_ACADIA) += cuImage.acadia |
195 | 197 | ||
diff --git a/arch/powerpc/boot/cuboot-hotfoot.c b/arch/powerpc/boot/cuboot-hotfoot.c new file mode 100644 index 000000000000..8f697b958e45 --- /dev/null +++ b/arch/powerpc/boot/cuboot-hotfoot.c | |||
@@ -0,0 +1,142 @@ | |||
1 | /* | ||
2 | * Old U-boot compatibility for Esteem 195E Hotfoot CPU Board | ||
3 | * | ||
4 | * Author: Solomon Peachy <solomon@linux-wlan.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License version 2 as published | ||
8 | * by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #include "ops.h" | ||
12 | #include "stdio.h" | ||
13 | #include "reg.h" | ||
14 | #include "dcr.h" | ||
15 | #include "4xx.h" | ||
16 | #include "cuboot.h" | ||
17 | |||
18 | #define TARGET_4xx | ||
19 | #define TARGET_HOTFOOT | ||
20 | |||
21 | #include "ppcboot-hotfoot.h" | ||
22 | |||
23 | static bd_t bd; | ||
24 | |||
25 | #define NUM_REGS 3 | ||
26 | |||
27 | static void hotfoot_fixups(void) | ||
28 | { | ||
29 | u32 uart = mfdcr(DCRN_CPC0_UCR) & 0x7f; | ||
30 | |||
31 | dt_fixup_memory(bd.bi_memstart, bd.bi_memsize); | ||
32 | |||
33 | dt_fixup_cpu_clocks(bd.bi_procfreq, bd.bi_procfreq, 0); | ||
34 | dt_fixup_clock("/plb", bd.bi_plb_busfreq); | ||
35 | dt_fixup_clock("/plb/opb", bd.bi_opbfreq); | ||
36 | dt_fixup_clock("/plb/ebc", bd.bi_pci_busfreq); | ||
37 | dt_fixup_clock("/plb/opb/serial@ef600300", bd.bi_procfreq / uart); | ||
38 | dt_fixup_clock("/plb/opb/serial@ef600400", bd.bi_procfreq / uart); | ||
39 | |||
40 | dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr); | ||
41 | dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr); | ||
42 | |||
43 | /* Is this a single eth/serial board? */ | ||
44 | if ((bd.bi_enet1addr[0] == 0) && | ||
45 | (bd.bi_enet1addr[1] == 0) && | ||
46 | (bd.bi_enet1addr[2] == 0) && | ||
47 | (bd.bi_enet1addr[3] == 0) && | ||
48 | (bd.bi_enet1addr[4] == 0) && | ||
49 | (bd.bi_enet1addr[5] == 0)) { | ||
50 | void *devp; | ||
51 | |||
52 | printf("Trimming devtree for single serial/eth board\n"); | ||
53 | |||
54 | devp = finddevice("/plb/opb/serial@ef600300"); | ||
55 | if (!devp) | ||
56 | fatal("Can't find node for /plb/opb/serial@ef600300"); | ||
57 | del_node(devp); | ||
58 | |||
59 | devp = finddevice("/plb/opb/ethernet@ef600900"); | ||
60 | if (!devp) | ||
61 | fatal("Can't find node for /plb/opb/ethernet@ef600900"); | ||
62 | del_node(devp); | ||
63 | } | ||
64 | |||
65 | ibm4xx_quiesce_eth((u32 *)0xef600800, (u32 *)0xef600900); | ||
66 | |||
67 | /* Fix up flash size in fdt for 4M boards. */ | ||
68 | if (bd.bi_flashsize < 0x800000) { | ||
69 | u32 regs[NUM_REGS]; | ||
70 | void *devp = finddevice("/plb/ebc/nor_flash@0"); | ||
71 | if (!devp) | ||
72 | fatal("Can't find FDT node for nor_flash!??"); | ||
73 | |||
74 | printf("Fixing devtree for 4M Flash\n"); | ||
75 | |||
76 | /* First fix up the base addresse */ | ||
77 | getprop(devp, "reg", regs, sizeof(regs)); | ||
78 | regs[0] = 0; | ||
79 | regs[1] = 0xffc00000; | ||
80 | regs[2] = 0x00400000; | ||
81 | setprop(devp, "reg", regs, sizeof(regs)); | ||
82 | |||
83 | /* Then the offsets */ | ||
84 | devp = finddevice("/plb/ebc/nor_flash@0/partition@0"); | ||
85 | if (!devp) | ||
86 | fatal("Can't find FDT node for partition@0"); | ||
87 | getprop(devp, "reg", regs, 2*sizeof(u32)); | ||
88 | regs[0] -= 0x400000; | ||
89 | setprop(devp, "reg", regs, 2*sizeof(u32)); | ||
90 | |||
91 | devp = finddevice("/plb/ebc/nor_flash@0/partition@1"); | ||
92 | if (!devp) | ||
93 | fatal("Can't find FDT node for partition@1"); | ||
94 | getprop(devp, "reg", regs, 2*sizeof(u32)); | ||
95 | regs[0] -= 0x400000; | ||
96 | setprop(devp, "reg", regs, 2*sizeof(u32)); | ||
97 | |||
98 | devp = finddevice("/plb/ebc/nor_flash@0/partition@2"); | ||
99 | if (!devp) | ||
100 | fatal("Can't find FDT node for partition@2"); | ||
101 | getprop(devp, "reg", regs, 2*sizeof(u32)); | ||
102 | regs[0] -= 0x400000; | ||
103 | setprop(devp, "reg", regs, 2*sizeof(u32)); | ||
104 | |||
105 | devp = finddevice("/plb/ebc/nor_flash@0/partition@3"); | ||
106 | if (!devp) | ||
107 | fatal("Can't find FDT node for partition@3"); | ||
108 | getprop(devp, "reg", regs, 2*sizeof(u32)); | ||
109 | regs[0] -= 0x400000; | ||
110 | setprop(devp, "reg", regs, 2*sizeof(u32)); | ||
111 | |||
112 | devp = finddevice("/plb/ebc/nor_flash@0/partition@4"); | ||
113 | if (!devp) | ||
114 | fatal("Can't find FDT node for partition@4"); | ||
115 | getprop(devp, "reg", regs, 2*sizeof(u32)); | ||
116 | regs[0] -= 0x400000; | ||
117 | setprop(devp, "reg", regs, 2*sizeof(u32)); | ||
118 | |||
119 | devp = finddevice("/plb/ebc/nor_flash@0/partition@6"); | ||
120 | if (!devp) | ||
121 | fatal("Can't find FDT node for partition@6"); | ||
122 | getprop(devp, "reg", regs, 2*sizeof(u32)); | ||
123 | regs[0] -= 0x400000; | ||
124 | setprop(devp, "reg", regs, 2*sizeof(u32)); | ||
125 | |||
126 | /* Delete the FeatFS node */ | ||
127 | devp = finddevice("/plb/ebc/nor_flash@0/partition@5"); | ||
128 | if (!devp) | ||
129 | fatal("Can't find FDT node for partition@5"); | ||
130 | del_node(devp); | ||
131 | } | ||
132 | } | ||
133 | |||
134 | void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | ||
135 | unsigned long r6, unsigned long r7) | ||
136 | { | ||
137 | CUBOOT_INIT(); | ||
138 | platform_ops.fixups = hotfoot_fixups; | ||
139 | platform_ops.exit = ibm40x_dbcr_reset; | ||
140 | fdt_init(_dtb_start); | ||
141 | serial_console_init(); | ||
142 | } | ||
diff --git a/arch/powerpc/boot/cuboot-kilauea.c b/arch/powerpc/boot/cuboot-kilauea.c new file mode 100644 index 000000000000..80cdad6bbc3f --- /dev/null +++ b/arch/powerpc/boot/cuboot-kilauea.c | |||
@@ -0,0 +1,49 @@ | |||
1 | /* | ||
2 | * Old U-boot compatibility for PPC405EX. This image is already included | ||
3 | * a dtb. | ||
4 | * | ||
5 | * Author: Tiejun Chen <tiejun.chen@windriver.com> | ||
6 | * | ||
7 | * Copyright (C) 2009 Wind River Systems, Inc. | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License version 2 as published | ||
11 | * by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #include "ops.h" | ||
15 | #include "io.h" | ||
16 | #include "dcr.h" | ||
17 | #include "stdio.h" | ||
18 | #include "4xx.h" | ||
19 | #include "44x.h" | ||
20 | #include "cuboot.h" | ||
21 | |||
22 | #define TARGET_4xx | ||
23 | #define TARGET_44x | ||
24 | #include "ppcboot.h" | ||
25 | |||
26 | #define KILAUEA_SYS_EXT_SERIAL_CLOCK 11059200 /* ext. 11.059MHz clk */ | ||
27 | |||
28 | static bd_t bd; | ||
29 | |||
30 | static void kilauea_fixups(void) | ||
31 | { | ||
32 | unsigned long sysclk = 33333333; | ||
33 | |||
34 | ibm405ex_fixup_clocks(sysclk, KILAUEA_SYS_EXT_SERIAL_CLOCK); | ||
35 | dt_fixup_memory(bd.bi_memstart, bd.bi_memsize); | ||
36 | ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); | ||
37 | dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr); | ||
38 | dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr); | ||
39 | } | ||
40 | |||
41 | void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | ||
42 | unsigned long r6, unsigned long r7) | ||
43 | { | ||
44 | CUBOOT_INIT(); | ||
45 | platform_ops.fixups = kilauea_fixups; | ||
46 | platform_ops.exit = ibm40x_dbcr_reset; | ||
47 | fdt_init(_dtb_start); | ||
48 | serial_console_init(); | ||
49 | } | ||
diff --git a/arch/powerpc/boot/dcr.h b/arch/powerpc/boot/dcr.h index 95b9f5344016..645a7c964e5f 100644 --- a/arch/powerpc/boot/dcr.h +++ b/arch/powerpc/boot/dcr.h | |||
@@ -153,9 +153,7 @@ static const unsigned long sdram_bxcr[] = { SDRAM0_B0CR, SDRAM0_B1CR, | |||
153 | #define DCRN_CPC0_PLLMR1 0xf4 | 153 | #define DCRN_CPC0_PLLMR1 0xf4 |
154 | #define DCRN_CPC0_UCR 0xf5 | 154 | #define DCRN_CPC0_UCR 0xf5 |
155 | 155 | ||
156 | /* 440GX Clock control etc */ | 156 | /* 440GX/405EX Clock Control reg */ |
157 | |||
158 | |||
159 | #define DCRN_CPR0_CLKUPD 0x020 | 157 | #define DCRN_CPR0_CLKUPD 0x020 |
160 | #define DCRN_CPR0_PLLC 0x040 | 158 | #define DCRN_CPR0_PLLC 0x040 |
161 | #define DCRN_CPR0_PLLD 0x060 | 159 | #define DCRN_CPR0_PLLD 0x060 |
diff --git a/arch/powerpc/boot/dts/arches.dts b/arch/powerpc/boot/dts/arches.dts index d9113b1e8c1d..414ef8b7e575 100644 --- a/arch/powerpc/boot/dts/arches.dts +++ b/arch/powerpc/boot/dts/arches.dts | |||
@@ -124,6 +124,16 @@ | |||
124 | dcr-reg = <0x00c 0x002>; | 124 | dcr-reg = <0x00c 0x002>; |
125 | }; | 125 | }; |
126 | 126 | ||
127 | L2C0: l2c { | ||
128 | compatible = "ibm,l2-cache-460gt", "ibm,l2-cache"; | ||
129 | dcr-reg = <0x020 0x008 /* Internal SRAM DCR's */ | ||
130 | 0x030 0x008>; /* L2 cache DCR's */ | ||
131 | cache-line-size = <32>; /* 32 bytes */ | ||
132 | cache-size = <262144>; /* L2, 256K */ | ||
133 | interrupt-parent = <&UIC1>; | ||
134 | interrupts = <11 1>; | ||
135 | }; | ||
136 | |||
127 | plb { | 137 | plb { |
128 | compatible = "ibm,plb-460gt", "ibm,plb4"; | 138 | compatible = "ibm,plb-460gt", "ibm,plb4"; |
129 | #address-cells = <2>; | 139 | #address-cells = <2>; |
@@ -168,6 +178,38 @@ | |||
168 | /* ranges property is supplied by U-Boot */ | 178 | /* ranges property is supplied by U-Boot */ |
169 | interrupts = <0x6 0x4>; | 179 | interrupts = <0x6 0x4>; |
170 | interrupt-parent = <&UIC1>; | 180 | interrupt-parent = <&UIC1>; |
181 | |||
182 | nor_flash@0,0 { | ||
183 | compatible = "amd,s29gl256n", "cfi-flash"; | ||
184 | bank-width = <2>; | ||
185 | reg = <0x00000000 0x00000000 0x02000000>; | ||
186 | #address-cells = <1>; | ||
187 | #size-cells = <1>; | ||
188 | partition@0 { | ||
189 | label = "kernel"; | ||
190 | reg = <0x00000000 0x001e0000>; | ||
191 | }; | ||
192 | partition@1e0000 { | ||
193 | label = "dtb"; | ||
194 | reg = <0x001e0000 0x00020000>; | ||
195 | }; | ||
196 | partition@200000 { | ||
197 | label = "root"; | ||
198 | reg = <0x00200000 0x00200000>; | ||
199 | }; | ||
200 | partition@400000 { | ||
201 | label = "user"; | ||
202 | reg = <0x00400000 0x01b60000>; | ||
203 | }; | ||
204 | partition@1f60000 { | ||
205 | label = "env"; | ||
206 | reg = <0x01f60000 0x00040000>; | ||
207 | }; | ||
208 | partition@1fa0000 { | ||
209 | label = "u-boot"; | ||
210 | reg = <0x01fa0000 0x00060000>; | ||
211 | }; | ||
212 | }; | ||
171 | }; | 213 | }; |
172 | 214 | ||
173 | UART0: serial@ef600300 { | 215 | UART0: serial@ef600300 { |
@@ -186,6 +228,14 @@ | |||
186 | reg = <0xef600700 0x00000014>; | 228 | reg = <0xef600700 0x00000014>; |
187 | interrupt-parent = <&UIC0>; | 229 | interrupt-parent = <&UIC0>; |
188 | interrupts = <0x2 0x4>; | 230 | interrupts = <0x2 0x4>; |
231 | #address-cells = <1>; | ||
232 | #size-cells = <0>; | ||
233 | sttm@4a { | ||
234 | compatible = "ad,ad7414"; | ||
235 | reg = <0x4a>; | ||
236 | interrupt-parent = <&UIC1>; | ||
237 | interrupts = <0x0 0x8>; | ||
238 | }; | ||
189 | }; | 239 | }; |
190 | 240 | ||
191 | IIC1: i2c@ef600800 { | 241 | IIC1: i2c@ef600800 { |
diff --git a/arch/powerpc/boot/dts/canyonlands.dts b/arch/powerpc/boot/dts/canyonlands.dts index 5fd1ad09bdf2..c920170b7dfe 100644 --- a/arch/powerpc/boot/dts/canyonlands.dts +++ b/arch/powerpc/boot/dts/canyonlands.dts | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Device Tree Source for AMCC Canyonlands (460EX) | 2 | * Device Tree Source for AMCC Canyonlands (460EX) |
3 | * | 3 | * |
4 | * Copyright 2008 DENX Software Engineering, Stefan Roese <sr@denx.de> | 4 | * Copyright 2008-2009 DENX Software Engineering, Stefan Roese <sr@denx.de> |
5 | * | 5 | * |
6 | * This file is licensed under the terms of the GNU General Public | 6 | * This file is licensed under the terms of the GNU General Public |
7 | * License version 2. This program is licensed "as is" without | 7 | * License version 2. This program is licensed "as is" without |
@@ -149,19 +149,19 @@ | |||
149 | /*RXDE*/ 0x5 0x4>; | 149 | /*RXDE*/ 0x5 0x4>; |
150 | }; | 150 | }; |
151 | 151 | ||
152 | USB0: ehci@bffd0400 { | 152 | USB0: ehci@bffd0400 { |
153 | compatible = "ibm,usb-ehci-460ex", "usb-ehci"; | 153 | compatible = "ibm,usb-ehci-460ex", "usb-ehci"; |
154 | interrupt-parent = <&UIC2>; | 154 | interrupt-parent = <&UIC2>; |
155 | interrupts = <0x1d 4>; | 155 | interrupts = <0x1d 4>; |
156 | reg = <4 0xbffd0400 0x90 4 0xbffd0490 0x70>; | 156 | reg = <4 0xbffd0400 0x90 4 0xbffd0490 0x70>; |
157 | }; | 157 | }; |
158 | 158 | ||
159 | USB1: usb@bffd0000 { | 159 | USB1: usb@bffd0000 { |
160 | compatible = "ohci-le"; | 160 | compatible = "ohci-le"; |
161 | reg = <4 0xbffd0000 0x60>; | 161 | reg = <4 0xbffd0000 0x60>; |
162 | interrupt-parent = <&UIC2>; | 162 | interrupt-parent = <&UIC2>; |
163 | interrupts = <0x1e 4>; | 163 | interrupts = <0x1e 4>; |
164 | }; | 164 | }; |
165 | 165 | ||
166 | POB0: opb { | 166 | POB0: opb { |
167 | compatible = "ibm,opb-460ex", "ibm,opb"; | 167 | compatible = "ibm,opb-460ex", "ibm,opb"; |
@@ -215,6 +215,29 @@ | |||
215 | reg = <0x03fa0000 0x00060000>; | 215 | reg = <0x03fa0000 0x00060000>; |
216 | }; | 216 | }; |
217 | }; | 217 | }; |
218 | |||
219 | ndfc@3,0 { | ||
220 | compatible = "ibm,ndfc"; | ||
221 | reg = <0x00000003 0x00000000 0x00002000>; | ||
222 | ccr = <0x00001000>; | ||
223 | bank-settings = <0x80002222>; | ||
224 | #address-cells = <1>; | ||
225 | #size-cells = <1>; | ||
226 | |||
227 | nand { | ||
228 | #address-cells = <1>; | ||
229 | #size-cells = <1>; | ||
230 | |||
231 | partition@0 { | ||
232 | label = "u-boot"; | ||
233 | reg = <0x00000000 0x00100000>; | ||
234 | }; | ||
235 | partition@100000 { | ||
236 | label = "user"; | ||
237 | reg = <0x00000000 0x03f00000>; | ||
238 | }; | ||
239 | }; | ||
240 | }; | ||
218 | }; | 241 | }; |
219 | 242 | ||
220 | UART0: serial@ef600300 { | 243 | UART0: serial@ef600300 { |
diff --git a/arch/powerpc/boot/dts/eiger.dts b/arch/powerpc/boot/dts/eiger.dts new file mode 100644 index 000000000000..c4a934f2e886 --- /dev/null +++ b/arch/powerpc/boot/dts/eiger.dts | |||
@@ -0,0 +1,421 @@ | |||
1 | /* | ||
2 | * Device Tree Source for AMCC (AppliedMicro) Eiger(460SX) | ||
3 | * | ||
4 | * Copyright 2009 AMCC (AppliedMicro) <ttnguyen@amcc.com> | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without | ||
8 | * any warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | /dts-v1/; | ||
12 | |||
13 | / { | ||
14 | #address-cells = <2>; | ||
15 | #size-cells = <1>; | ||
16 | model = "amcc,eiger"; | ||
17 | compatible = "amcc,eiger"; | ||
18 | dcr-parent = <&{/cpus/cpu@0}>; | ||
19 | |||
20 | aliases { | ||
21 | ethernet0 = &EMAC0; | ||
22 | ethernet1 = &EMAC1; | ||
23 | ethernet2 = &EMAC2; | ||
24 | ethernet3 = &EMAC3; | ||
25 | serial0 = &UART0; | ||
26 | serial1 = &UART1; | ||
27 | }; | ||
28 | |||
29 | cpus { | ||
30 | #address-cells = <1>; | ||
31 | #size-cells = <0>; | ||
32 | |||
33 | cpu@0 { | ||
34 | device_type = "cpu"; | ||
35 | model = "PowerPC,460SX"; | ||
36 | reg = <0x00000000>; | ||
37 | clock-frequency = <0>; /* Filled in by U-Boot */ | ||
38 | timebase-frequency = <0>; /* Filled in by U-Boot */ | ||
39 | i-cache-line-size = <32>; | ||
40 | d-cache-line-size = <32>; | ||
41 | i-cache-size = <32768>; | ||
42 | d-cache-size = <32768>; | ||
43 | dcr-controller; | ||
44 | dcr-access-method = "native"; | ||
45 | }; | ||
46 | }; | ||
47 | |||
48 | memory { | ||
49 | device_type = "memory"; | ||
50 | reg = <0x00000000 0x00000000 0x00000000>; /* Filled in by U-Boot */ | ||
51 | }; | ||
52 | |||
53 | UIC0: interrupt-controller0 { | ||
54 | compatible = "ibm,uic-460sx","ibm,uic"; | ||
55 | interrupt-controller; | ||
56 | cell-index = <0>; | ||
57 | dcr-reg = <0x0c0 0x009>; | ||
58 | #address-cells = <0>; | ||
59 | #size-cells = <0>; | ||
60 | #interrupt-cells = <2>; | ||
61 | }; | ||
62 | |||
63 | UIC1: interrupt-controller1 { | ||
64 | compatible = "ibm,uic-460sx","ibm,uic"; | ||
65 | interrupt-controller; | ||
66 | cell-index = <1>; | ||
67 | dcr-reg = <0x0d0 0x009>; | ||
68 | #address-cells = <0>; | ||
69 | #size-cells = <0>; | ||
70 | #interrupt-cells = <2>; | ||
71 | interrupts = <0x1e 0x4 0x1f 0x4>; /* cascade */ | ||
72 | interrupt-parent = <&UIC0>; | ||
73 | }; | ||
74 | |||
75 | UIC2: interrupt-controller2 { | ||
76 | compatible = "ibm,uic-460sx","ibm,uic"; | ||
77 | interrupt-controller; | ||
78 | cell-index = <2>; | ||
79 | dcr-reg = <0x0e0 0x009>; | ||
80 | #address-cells = <0>; | ||
81 | #size-cells = <0>; | ||
82 | #interrupt-cells = <2>; | ||
83 | interrupts = <0xa 0x4 0xb 0x4>; /* cascade */ | ||
84 | interrupt-parent = <&UIC0>; | ||
85 | }; | ||
86 | |||
87 | UIC3: interrupt-controller3 { | ||
88 | compatible = "ibm,uic-460sx","ibm,uic"; | ||
89 | interrupt-controller; | ||
90 | cell-index = <3>; | ||
91 | dcr-reg = <0x0f0 0x009>; | ||
92 | #address-cells = <0>; | ||
93 | #size-cells = <0>; | ||
94 | #interrupt-cells = <2>; | ||
95 | interrupts = <0x10 0x4 0x11 0x4>; /* cascade */ | ||
96 | interrupt-parent = <&UIC0>; | ||
97 | }; | ||
98 | |||
99 | SDR0: sdr { | ||
100 | compatible = "ibm,sdr-460sx"; | ||
101 | dcr-reg = <0x00e 0x002>; | ||
102 | }; | ||
103 | |||
104 | CPR0: cpr { | ||
105 | compatible = "ibm,cpr-460sx"; | ||
106 | dcr-reg = <0x00c 0x002>; | ||
107 | }; | ||
108 | |||
109 | plb { | ||
110 | compatible = "ibm,plb-460sx", "ibm,plb4"; | ||
111 | #address-cells = <2>; | ||
112 | #size-cells = <1>; | ||
113 | ranges; | ||
114 | clock-frequency = <0>; /* Filled in by U-Boot */ | ||
115 | |||
116 | SDRAM0: sdram { | ||
117 | compatible = "ibm,sdram-460sx", "ibm,sdram-405gp"; | ||
118 | dcr-reg = <0x010 0x002>; | ||
119 | }; | ||
120 | |||
121 | MAL0: mcmal { | ||
122 | compatible = "ibm,mcmal-460sx", "ibm,mcmal2"; | ||
123 | dcr-reg = <0x180 0x62>; | ||
124 | num-tx-chans = <4>; | ||
125 | num-rx-chans = <32>; | ||
126 | #address-cells = <1>; | ||
127 | #size-cells = <1>; | ||
128 | interrupt-parent = <&UIC1>; | ||
129 | interrupts = < /*TXEOB*/ 0x6 0x4 | ||
130 | /*RXEOB*/ 0x7 0x4 | ||
131 | /*SERR*/ 0x1 0x4 | ||
132 | /*TXDE*/ 0x2 0x4 | ||
133 | /*RXDE*/ 0x3 0x4 | ||
134 | /*COAL TX0*/ 0x18 0x2 | ||
135 | /*COAL TX1*/ 0x19 0x2 | ||
136 | /*COAL TX2*/ 0x1a 0x2 | ||
137 | /*COAL TX3*/ 0x1b 0x2 | ||
138 | /*COAL RX0*/ 0x1c 0x2 | ||
139 | /*COAL RX1*/ 0x1d 0x2 | ||
140 | /*COAL RX2*/ 0x1e 0x2 | ||
141 | /*COAL RX3*/ 0x1f 0x2>; | ||
142 | }; | ||
143 | |||
144 | POB0: opb { | ||
145 | compatible = "ibm,opb-460sx", "ibm,opb"; | ||
146 | #address-cells = <1>; | ||
147 | #size-cells = <1>; | ||
148 | ranges = <0xb0000000 0x00000004 0xb0000000 0x50000000>; | ||
149 | clock-frequency = <0>; /* Filled in by U-Boot */ | ||
150 | |||
151 | EBC0: ebc { | ||
152 | compatible = "ibm,ebc-460sx", "ibm,ebc"; | ||
153 | dcr-reg = <0x012 0x002>; | ||
154 | #address-cells = <2>; | ||
155 | #size-cells = <1>; | ||
156 | clock-frequency = <0>; /* Filled in by U-Boot */ | ||
157 | /* ranges property is supplied by U-Boot */ | ||
158 | interrupts = <0x6 0x4>; | ||
159 | interrupt-parent = <&UIC1>; | ||
160 | |||
161 | nor_flash@0,0 { | ||
162 | compatible = "amd,s29gl512n", "cfi-flash"; | ||
163 | bank-width = <2>; | ||
164 | /* reg property is supplied in by U-Boot */ | ||
165 | #address-cells = <1>; | ||
166 | #size-cells = <1>; | ||
167 | partition@0 { | ||
168 | label = "kernel"; | ||
169 | reg = <0x00000000 0x001e0000>; | ||
170 | }; | ||
171 | partition@1e0000 { | ||
172 | label = "dtb"; | ||
173 | reg = <0x001e0000 0x00020000>; | ||
174 | }; | ||
175 | partition@200000 { | ||
176 | label = "ramdisk"; | ||
177 | reg = <0x00200000 0x01400000>; | ||
178 | }; | ||
179 | partition@1600000 { | ||
180 | label = "jffs2"; | ||
181 | reg = <0x01600000 0x00400000>; | ||
182 | }; | ||
183 | partition@1a00000 { | ||
184 | label = "user"; | ||
185 | reg = <0x01a00000 0x02560000>; | ||
186 | }; | ||
187 | partition@3f60000 { | ||
188 | label = "env"; | ||
189 | reg = <0x03f60000 0x00040000>; | ||
190 | }; | ||
191 | partition@3fa0000 { | ||
192 | label = "u-boot"; | ||
193 | reg = <0x03fa0000 0x00060000>; | ||
194 | }; | ||
195 | }; | ||
196 | |||
197 | ndfc@1,0 { | ||
198 | compatible = "ibm,ndfc"; | ||
199 | /* reg property is supplied by U-boot */ | ||
200 | ccr = <0x00003000>; | ||
201 | bank-settings = <0x80002222>; | ||
202 | #address-cells = <1>; | ||
203 | #size-cells = <1>; | ||
204 | |||
205 | nand { | ||
206 | #address-cells = <1>; | ||
207 | #size-cells = <1>; | ||
208 | partition@0 { | ||
209 | label = "uboot"; | ||
210 | reg = <0x00000000 0x00200000>; | ||
211 | }; | ||
212 | partition@200000 { | ||
213 | label = "uboot-environment"; | ||
214 | reg = <0x00200000 0x00100000>; | ||
215 | }; | ||
216 | partition@300000 { | ||
217 | label = "linux"; | ||
218 | reg = <0x00300000 0x00300000>; | ||
219 | }; | ||
220 | partition@600000 { | ||
221 | label = "root-file-system"; | ||
222 | reg = <0x00600000 0x01900000>; | ||
223 | }; | ||
224 | partition@1f00000 { | ||
225 | label = "device-tree"; | ||
226 | reg = <0x01f00000 0x00020000>; | ||
227 | }; | ||
228 | partition@1f20000 { | ||
229 | label = "data"; | ||
230 | reg = <0x01f20000 0x060E0000>; | ||
231 | }; | ||
232 | }; | ||
233 | }; | ||
234 | }; | ||
235 | |||
236 | UART0: serial@ef600200 { | ||
237 | device_type = "serial"; | ||
238 | compatible = "ns16550"; | ||
239 | reg = <0xef600200 0x00000008>; | ||
240 | virtual-reg = <0xef600200>; | ||
241 | clock-frequency = <0>; /* Filled in by U-Boot */ | ||
242 | current-speed = <0>; /* Filled in by U-Boot */ | ||
243 | interrupt-parent = <&UIC0>; | ||
244 | interrupts = <0x0 0x4>; | ||
245 | }; | ||
246 | |||
247 | UART1: serial@ef600300 { | ||
248 | device_type = "serial"; | ||
249 | compatible = "ns16550"; | ||
250 | reg = <0xef600300 0x00000008>; | ||
251 | virtual-reg = <0xef600300>; | ||
252 | clock-frequency = <0>; /* Filled in by U-Boot */ | ||
253 | current-speed = <0>; /* Filled in by U-Boot */ | ||
254 | interrupt-parent = <&UIC0>; | ||
255 | interrupts = <0x1 0x4>; | ||
256 | }; | ||
257 | |||
258 | IIC0: i2c@ef600400 { | ||
259 | compatible = "ibm,iic-460sx", "ibm,iic"; | ||
260 | reg = <0xef600400 0x00000014>; | ||
261 | interrupt-parent = <&UIC0>; | ||
262 | interrupts = <0x2 0x4>; | ||
263 | #address-cells = <1>; | ||
264 | #size-cells = <0>; | ||
265 | index = <0>; | ||
266 | }; | ||
267 | |||
268 | IIC1: i2c@ef600500 { | ||
269 | compatible = "ibm,iic-460sx", "ibm,iic"; | ||
270 | reg = <0xef600500 0x00000014>; | ||
271 | interrupt-parent = <&UIC0>; | ||
272 | interrupts = <0x3 0x4>; | ||
273 | #address-cells = <1>; | ||
274 | #size-cells = <0>; | ||
275 | index = <1>; | ||
276 | }; | ||
277 | |||
278 | RGMII0: emac-rgmii@ef600900 { | ||
279 | compatible = "ibm,rgmii-460sx", "ibm,rgmii"; | ||
280 | reg = <0xef600900 0x00000008>; | ||
281 | has-mdio; | ||
282 | }; | ||
283 | |||
284 | RGMII1: emac-rgmii@ef600920 { | ||
285 | compatible = "ibm,rgmii-460sx", "ibm,rgmii"; | ||
286 | reg = <0xef600920 0x00000008>; | ||
287 | has-mdio; | ||
288 | }; | ||
289 | |||
290 | TAH0: emac-tah@ef600e50 { | ||
291 | compatible = "ibm,tah-460sx", "ibm,tah"; | ||
292 | reg = <0xef600e50 0x00000030>; | ||
293 | }; | ||
294 | |||
295 | TAH1: emac-tah@ef600f50 { | ||
296 | compatible = "ibm,tah-460sx", "ibm,tah"; | ||
297 | reg = <0xef600f50 0x00000030>; | ||
298 | }; | ||
299 | |||
300 | EMAC0: ethernet@ef600a00 { | ||
301 | device_type = "network"; | ||
302 | compatible = "ibm,emac-460sx", "ibm,emac4"; | ||
303 | interrupt-parent = <&EMAC0>; | ||
304 | interrupts = <0x0 0x1>; | ||
305 | #interrupt-cells = <1>; | ||
306 | #address-cells = <0>; | ||
307 | #size-cells = <0>; | ||
308 | interrupt-map = </*Status*/ 0x0 &UIC0 0x13 0x4 | ||
309 | /*Wake*/ 0x1 &UIC2 0x1d 0x4>; | ||
310 | reg = <0xef600a00 0x00000070>; | ||
311 | local-mac-address = [000000000000]; /* Filled in by U-Boot */ | ||
312 | mal-device = <&MAL0>; | ||
313 | mal-tx-channel = <0>; | ||
314 | mal-rx-channel = <0>; | ||
315 | cell-index = <0>; | ||
316 | max-frame-size = <9000>; | ||
317 | rx-fifo-size = <4096>; | ||
318 | tx-fifo-size = <2048>; | ||
319 | phy-mode = "rgmii"; | ||
320 | phy-map = <0x00000000>; | ||
321 | rgmii-device = <&RGMII0>; | ||
322 | rgmii-channel = <0>; | ||
323 | tah-device = <&TAH0>; | ||
324 | tah-channel = <0>; | ||
325 | has-inverted-stacr-oc; | ||
326 | has-new-stacr-staopc; | ||
327 | }; | ||
328 | |||
329 | EMAC1: ethernet@ef600b00 { | ||
330 | device_type = "network"; | ||
331 | compatible = "ibm,emac-460sx", "ibm,emac4"; | ||
332 | interrupt-parent = <&EMAC1>; | ||
333 | interrupts = <0x0 0x1>; | ||
334 | #interrupt-cells = <1>; | ||
335 | #address-cells = <0>; | ||
336 | #size-cells = <0>; | ||
337 | interrupt-map = </*Status*/ 0x0 &UIC0 0x14 0x4 | ||
338 | /*Wake*/ 0x1 &UIC2 0x1d 0x4>; | ||
339 | reg = <0xef600b00 0x00000070>; | ||
340 | local-mac-address = [000000000000]; /* Filled in by U-Boot */ | ||
341 | mal-device = <&MAL0>; | ||
342 | mal-tx-channel = <1>; | ||
343 | mal-rx-channel = <8>; | ||
344 | cell-index = <1>; | ||
345 | max-frame-size = <9000>; | ||
346 | rx-fifo-size = <4096>; | ||
347 | tx-fifo-size = <2048>; | ||
348 | phy-mode = "rgmii"; | ||
349 | phy-map = <0x00000000>; | ||
350 | rgmii-device = <&RGMII0>; | ||
351 | rgmii-channel = <1>; | ||
352 | tah-device = <&TAH1>; | ||
353 | tah-channel = <1>; | ||
354 | has-inverted-stacr-oc; | ||
355 | has-new-stacr-staopc; | ||
356 | mdio-device = <&EMAC0>; | ||
357 | }; | ||
358 | |||
359 | EMAC2: ethernet@ef600c00 { | ||
360 | device_type = "network"; | ||
361 | compatible = "ibm,emac-460sx", "ibm,emac4"; | ||
362 | interrupt-parent = <&EMAC2>; | ||
363 | interrupts = <0x0 0x1>; | ||
364 | #interrupt-cells = <1>; | ||
365 | #address-cells = <0>; | ||
366 | #size-cells = <0>; | ||
367 | interrupt-map = </*Status*/ 0x0 &UIC0 0x15 0x4 | ||
368 | /*Wake*/ 0x1 &UIC2 0x1d 0x4>; | ||
369 | reg = <0xef600c00 0x00000070>; | ||
370 | local-mac-address = [000000000000]; /* Filled in by U-Boot */ | ||
371 | mal-device = <&MAL0>; | ||
372 | mal-tx-channel = <2>; | ||
373 | mal-rx-channel = <16>; | ||
374 | cell-index = <2>; | ||
375 | max-frame-size = <9000>; | ||
376 | rx-fifo-size = <4096>; | ||
377 | tx-fifo-size = <2048>; | ||
378 | phy-mode = "rgmii"; | ||
379 | phy-map = <0x00000000>; | ||
380 | rgmii-device = <&RGMII1>; | ||
381 | rgmii-channel = <0>; | ||
382 | has-inverted-stacr-oc; | ||
383 | has-new-stacr-staopc; | ||
384 | mdio-device = <&EMAC0>; | ||
385 | }; | ||
386 | |||
387 | EMAC3: ethernet@ef600d00 { | ||
388 | device_type = "network"; | ||
389 | compatible = "ibm,emac-460sx", "ibm,emac4"; | ||
390 | interrupt-parent = <&EMAC3>; | ||
391 | interrupts = <0x0 0x1>; | ||
392 | #interrupt-cells = <1>; | ||
393 | #address-cells = <0>; | ||
394 | #size-cells = <0>; | ||
395 | interrupt-map = </*Status*/ 0x0 &UIC0 0x16 0x4 | ||
396 | /*Wake*/ 0x1 &UIC2 0x1d 0x4>; | ||
397 | reg = <0xef600d00 0x00000070>; | ||
398 | local-mac-address = [000000000000]; /* Filled in by U-Boot */ | ||
399 | mal-device = <&MAL0>; | ||
400 | mal-tx-channel = <3>; | ||
401 | mal-rx-channel = <24>; | ||
402 | cell-index = <3>; | ||
403 | max-frame-size = <9000>; | ||
404 | rx-fifo-size = <4096>; | ||
405 | tx-fifo-size = <2048>; | ||
406 | phy-mode = "rgmii"; | ||
407 | phy-map = <0x00000000>; | ||
408 | rgmii-device = <&RGMII1>; | ||
409 | rgmii-channel = <1>; | ||
410 | has-inverted-stacr-oc; | ||
411 | has-new-stacr-staopc; | ||
412 | mdio-device = <&EMAC0>; | ||
413 | }; | ||
414 | }; | ||
415 | |||
416 | }; | ||
417 | chosen { | ||
418 | linux,stdout-path = "/plb/opb/serial@ef600200"; | ||
419 | }; | ||
420 | |||
421 | }; | ||
diff --git a/arch/powerpc/boot/dts/gef_sbc310.dts b/arch/powerpc/boot/dts/gef_sbc310.dts index 0f4c9ec2c3a6..2107d3c7cfe1 100644 --- a/arch/powerpc/boot/dts/gef_sbc310.dts +++ b/arch/powerpc/boot/dts/gef_sbc310.dts | |||
@@ -83,34 +83,34 @@ | |||
83 | 83 | ||
84 | /* flash@0,0 is a mirror of part of the memory in flash@1,0 | 84 | /* flash@0,0 is a mirror of part of the memory in flash@1,0 |
85 | flash@0,0 { | 85 | flash@0,0 { |
86 | compatible = "cfi-flash"; | 86 | compatible = "gef,sbc310-firmware-mirror", "cfi-flash"; |
87 | reg = <0 0 0x01000000>; | 87 | reg = <0x0 0x0 0x01000000>; |
88 | bank-width = <2>; | 88 | bank-width = <2>; |
89 | device-width = <2>; | 89 | device-width = <2>; |
90 | #address-cells = <1>; | 90 | #address-cells = <1>; |
91 | #size-cells = <1>; | 91 | #size-cells = <1>; |
92 | partition@0 { | 92 | partition@0 { |
93 | label = "firmware"; | 93 | label = "firmware"; |
94 | reg = <0x00000000 0x01000000>; | 94 | reg = <0x0 0x01000000>; |
95 | read-only; | 95 | read-only; |
96 | }; | 96 | }; |
97 | }; | 97 | }; |
98 | */ | 98 | */ |
99 | 99 | ||
100 | flash@1,0 { | 100 | flash@1,0 { |
101 | compatible = "cfi-flash"; | 101 | compatible = "gef,sbc310-paged-flash", "cfi-flash"; |
102 | reg = <1 0 0x8000000>; | 102 | reg = <0x1 0x0 0x8000000>; |
103 | bank-width = <2>; | 103 | bank-width = <2>; |
104 | device-width = <2>; | 104 | device-width = <2>; |
105 | #address-cells = <1>; | 105 | #address-cells = <1>; |
106 | #size-cells = <1>; | 106 | #size-cells = <1>; |
107 | partition@0 { | 107 | partition@0 { |
108 | label = "user"; | 108 | label = "user"; |
109 | reg = <0x00000000 0x07800000>; | 109 | reg = <0x0 0x7800000>; |
110 | }; | 110 | }; |
111 | partition@7800000 { | 111 | partition@7800000 { |
112 | label = "firmware"; | 112 | label = "firmware"; |
113 | reg = <0x07800000 0x00800000>; | 113 | reg = <0x7800000 0x800000>; |
114 | read-only; | 114 | read-only; |
115 | }; | 115 | }; |
116 | }; | 116 | }; |
@@ -121,18 +121,16 @@ | |||
121 | }; | 121 | }; |
122 | 122 | ||
123 | wdt@4,2000 { | 123 | wdt@4,2000 { |
124 | #interrupt-cells = <2>; | 124 | compatible = "gef,sbc310-fpga-wdt", "gef,fpga-wdt-1.00", |
125 | device_type = "watchdog"; | 125 | "gef,fpga-wdt"; |
126 | compatible = "gef,fpga-wdt"; | ||
127 | reg = <0x4 0x2000 0x8>; | 126 | reg = <0x4 0x2000 0x8>; |
128 | interrupts = <0x1a 0x4>; | 127 | interrupts = <0x1a 0x4>; |
129 | interrupt-parent = <&gef_pic>; | 128 | interrupt-parent = <&gef_pic>; |
130 | }; | 129 | }; |
131 | /* | 130 | /* |
132 | wdt@4,2010 { | 131 | wdt@4,2010 { |
133 | #interrupt-cells = <2>; | 132 | compatible = "gef,sbc310-fpga-wdt", "gef,fpga-wdt-1.00", |
134 | device_type = "watchdog"; | 133 | "gef,fpga-wdt"; |
135 | compatible = "gef,fpga-wdt"; | ||
136 | reg = <0x4 0x2010 0x8>; | 134 | reg = <0x4 0x2010 0x8>; |
137 | interrupts = <0x1b 0x4>; | 135 | interrupts = <0x1b 0x4>; |
138 | interrupt-parent = <&gef_pic>; | 136 | interrupt-parent = <&gef_pic>; |
@@ -141,7 +139,7 @@ | |||
141 | gef_pic: pic@4,4000 { | 139 | gef_pic: pic@4,4000 { |
142 | #interrupt-cells = <1>; | 140 | #interrupt-cells = <1>; |
143 | interrupt-controller; | 141 | interrupt-controller; |
144 | compatible = "gef,fpga-pic"; | 142 | compatible = "gef,sbc310-fpga-pic", "gef,fpga-pic"; |
145 | reg = <0x4 0x4000 0x20>; | 143 | reg = <0x4 0x4000 0x20>; |
146 | interrupts = <0x8 | 144 | interrupts = <0x8 |
147 | 0x9>; | 145 | 0x9>; |
@@ -161,7 +159,7 @@ | |||
161 | #size-cells = <1>; | 159 | #size-cells = <1>; |
162 | #interrupt-cells = <2>; | 160 | #interrupt-cells = <2>; |
163 | device_type = "soc"; | 161 | device_type = "soc"; |
164 | compatible = "simple-bus"; | 162 | compatible = "fsl,mpc8641-soc", "simple-bus"; |
165 | ranges = <0x0 0xfef00000 0x00100000>; | 163 | ranges = <0x0 0xfef00000 0x00100000>; |
166 | bus-frequency = <33333333>; | 164 | bus-frequency = <33333333>; |
167 | 165 | ||
@@ -376,4 +374,40 @@ | |||
376 | 0x0 0x00400000>; | 374 | 0x0 0x00400000>; |
377 | }; | 375 | }; |
378 | }; | 376 | }; |
377 | |||
378 | pci1: pcie@fef09000 { | ||
379 | compatible = "fsl,mpc8641-pcie"; | ||
380 | device_type = "pci"; | ||
381 | #interrupt-cells = <1>; | ||
382 | #size-cells = <2>; | ||
383 | #address-cells = <3>; | ||
384 | reg = <0xfef09000 0x1000>; | ||
385 | bus-range = <0x0 0xff>; | ||
386 | ranges = <0x02000000 0x0 0xc0000000 0xc0000000 0x0 0x20000000 | ||
387 | 0x01000000 0x0 0x00000000 0xfe400000 0x0 0x00400000>; | ||
388 | clock-frequency = <33333333>; | ||
389 | interrupt-parent = <&mpic>; | ||
390 | interrupts = <0x19 0x2>; | ||
391 | interrupt-map-mask = <0xf800 0x0 0x0 0x7>; | ||
392 | interrupt-map = < | ||
393 | 0x0000 0x0 0x0 0x1 &mpic 0x4 0x2 | ||
394 | 0x0000 0x0 0x0 0x2 &mpic 0x5 0x2 | ||
395 | 0x0000 0x0 0x0 0x3 &mpic 0x6 0x2 | ||
396 | 0x0000 0x0 0x0 0x4 &mpic 0x7 0x2 | ||
397 | >; | ||
398 | |||
399 | pcie@0 { | ||
400 | reg = <0 0 0 0 0>; | ||
401 | #size-cells = <2>; | ||
402 | #address-cells = <3>; | ||
403 | device_type = "pci"; | ||
404 | ranges = <0x02000000 0x0 0xc0000000 | ||
405 | 0x02000000 0x0 0xc0000000 | ||
406 | 0x0 0x20000000 | ||
407 | |||
408 | 0x01000000 0x0 0x00000000 | ||
409 | 0x01000000 0x0 0x00000000 | ||
410 | 0x0 0x00400000>; | ||
411 | }; | ||
412 | }; | ||
379 | }; | 413 | }; |
diff --git a/arch/powerpc/boot/dts/hotfoot.dts b/arch/powerpc/boot/dts/hotfoot.dts new file mode 100644 index 000000000000..cad9c3840afc --- /dev/null +++ b/arch/powerpc/boot/dts/hotfoot.dts | |||
@@ -0,0 +1,294 @@ | |||
1 | /* | ||
2 | * Device Tree Source for ESTeem 195E Hotfoot | ||
3 | * | ||
4 | * Copyright 2009 AbsoluteValue Systems <solomon@linux-wlan.com> | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without | ||
8 | * any warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | /dts-v1/; | ||
12 | |||
13 | / { | ||
14 | #address-cells = <1>; | ||
15 | #size-cells = <1>; | ||
16 | model = "est,hotfoot"; | ||
17 | compatible = "est,hotfoot"; | ||
18 | dcr-parent = <&{/cpus/cpu@0}>; | ||
19 | |||
20 | aliases { | ||
21 | ethernet0 = &EMAC0; | ||
22 | ethernet1 = &EMAC1; | ||
23 | serial0 = &UART0; | ||
24 | serial1 = &UART1; | ||
25 | }; | ||
26 | |||
27 | cpus { | ||
28 | #address-cells = <1>; | ||
29 | #size-cells = <0>; | ||
30 | |||
31 | cpu@0 { | ||
32 | device_type = "cpu"; | ||
33 | model = "PowerPC,405EP"; | ||
34 | reg = <0x00000000>; | ||
35 | clock-frequency = <0>; /* Filled in by zImage */ | ||
36 | timebase-frequency = <0>; /* Filled in by zImage */ | ||
37 | i-cache-line-size = <0x20>; | ||
38 | d-cache-line-size = <0x20>; | ||
39 | i-cache-size = <0x4000>; | ||
40 | d-cache-size = <0x4000>; | ||
41 | dcr-controller; | ||
42 | dcr-access-method = "native"; | ||
43 | }; | ||
44 | }; | ||
45 | |||
46 | memory { | ||
47 | device_type = "memory"; | ||
48 | reg = <0x00000000 0x00000000>; /* Filled in by zImage */ | ||
49 | }; | ||
50 | |||
51 | UIC0: interrupt-controller { | ||
52 | compatible = "ibm,uic"; | ||
53 | interrupt-controller; | ||
54 | cell-index = <0>; | ||
55 | dcr-reg = <0x0c0 0x009>; | ||
56 | #address-cells = <0>; | ||
57 | #size-cells = <0>; | ||
58 | #interrupt-cells = <2>; | ||
59 | }; | ||
60 | |||
61 | plb { | ||
62 | compatible = "ibm,plb3"; | ||
63 | #address-cells = <1>; | ||
64 | #size-cells = <1>; | ||
65 | ranges; | ||
66 | clock-frequency = <0>; /* Filled in by zImage */ | ||
67 | |||
68 | SDRAM0: memory-controller { | ||
69 | compatible = "ibm,sdram-405ep"; | ||
70 | dcr-reg = <0x010 0x002>; | ||
71 | }; | ||
72 | |||
73 | MAL: mcmal { | ||
74 | compatible = "ibm,mcmal-405ep", "ibm,mcmal"; | ||
75 | dcr-reg = <0x180 0x062>; | ||
76 | num-tx-chans = <4>; | ||
77 | num-rx-chans = <2>; | ||
78 | interrupt-parent = <&UIC0>; | ||
79 | interrupts = < | ||
80 | 0xb 0x4 /* TXEOB */ | ||
81 | 0xc 0x4 /* RXEOB */ | ||
82 | 0xa 0x4 /* SERR */ | ||
83 | 0xd 0x4 /* TXDE */ | ||
84 | 0xe 0x4 /* RXDE */>; | ||
85 | }; | ||
86 | |||
87 | POB0: opb { | ||
88 | compatible = "ibm,opb-405ep", "ibm,opb"; | ||
89 | #address-cells = <1>; | ||
90 | #size-cells = <1>; | ||
91 | ranges = <0xef600000 0xef600000 0x00a00000>; | ||
92 | dcr-reg = <0x0a0 0x005>; | ||
93 | clock-frequency = <0>; /* Filled in by zImage */ | ||
94 | |||
95 | /* Hotfoot has UART0/UART1 swapped */ | ||
96 | |||
97 | UART0: serial@ef600400 { | ||
98 | device_type = "serial"; | ||
99 | compatible = "ns16550"; | ||
100 | reg = <0xef600400 0x00000008>; | ||
101 | virtual-reg = <0xef600400>; | ||
102 | clock-frequency = <0>; /* Filled in by zImage */ | ||
103 | current-speed = <0x9600>; | ||
104 | interrupt-parent = <&UIC0>; | ||
105 | interrupts = <0x1 0x4>; | ||
106 | }; | ||
107 | |||
108 | UART1: serial@ef600300 { | ||
109 | device_type = "serial"; | ||
110 | compatible = "ns16550"; | ||
111 | reg = <0xef600300 0x00000008>; | ||
112 | virtual-reg = <0xef600300>; | ||
113 | clock-frequency = <0>; /* Filled in by zImage */ | ||
114 | current-speed = <0x9600>; | ||
115 | interrupt-parent = <&UIC0>; | ||
116 | interrupts = <0x0 0x4>; | ||
117 | }; | ||
118 | |||
119 | IIC: i2c@ef600500 { | ||
120 | compatible = "ibm,iic-405ep", "ibm,iic"; | ||
121 | reg = <0xef600500 0x00000011>; | ||
122 | interrupt-parent = <&UIC0>; | ||
123 | interrupts = <0x2 0x4>; | ||
124 | |||
125 | rtc@68 { | ||
126 | /* Actually a DS1339 */ | ||
127 | compatible = "dallas,ds1307"; | ||
128 | reg = <0x68>; | ||
129 | }; | ||
130 | |||
131 | temp@4a { | ||
132 | /* Not present on all boards */ | ||
133 | compatible = "national,lm75"; | ||
134 | reg = <0x4a>; | ||
135 | }; | ||
136 | }; | ||
137 | |||
138 | GPIO: gpio@ef600700 { | ||
139 | #gpio-cells = <2>; | ||
140 | compatible = "ibm,ppc4xx-gpio"; | ||
141 | reg = <0xef600700 0x00000020>; | ||
142 | gpio-controller; | ||
143 | }; | ||
144 | |||
145 | gpio-leds { | ||
146 | compatible = "gpio-leds"; | ||
147 | status { | ||
148 | label = "Status"; | ||
149 | gpios = <&GPIO 1 0>; | ||
150 | }; | ||
151 | radiorx { | ||
152 | label = "Rx"; | ||
153 | gpios = <&GPIO 0xe 0>; | ||
154 | }; | ||
155 | }; | ||
156 | |||
157 | EMAC0: ethernet@ef600800 { | ||
158 | linux,network-index = <0x0>; | ||
159 | device_type = "network"; | ||
160 | compatible = "ibm,emac-405ep", "ibm,emac"; | ||
161 | interrupt-parent = <&UIC0>; | ||
162 | interrupts = < | ||
163 | 0xf 0x4 /* Ethernet */ | ||
164 | 0x9 0x4 /* Ethernet Wake Up */>; | ||
165 | local-mac-address = [000000000000]; /* Filled in by zImage */ | ||
166 | reg = <0xef600800 0x00000070>; | ||
167 | mal-device = <&MAL>; | ||
168 | mal-tx-channel = <0>; | ||
169 | mal-rx-channel = <0>; | ||
170 | cell-index = <0>; | ||
171 | max-frame-size = <0x5dc>; | ||
172 | rx-fifo-size = <0x1000>; | ||
173 | tx-fifo-size = <0x800>; | ||
174 | phy-mode = "mii"; | ||
175 | phy-map = <0x00000000>; | ||
176 | }; | ||
177 | |||
178 | EMAC1: ethernet@ef600900 { | ||
179 | linux,network-index = <0x1>; | ||
180 | device_type = "network"; | ||
181 | compatible = "ibm,emac-405ep", "ibm,emac"; | ||
182 | interrupt-parent = <&UIC0>; | ||
183 | interrupts = < | ||
184 | 0x11 0x4 /* Ethernet */ | ||
185 | 0x9 0x4 /* Ethernet Wake Up */>; | ||
186 | local-mac-address = [000000000000]; /* Filled in by zImage */ | ||
187 | reg = <0xef600900 0x00000070>; | ||
188 | mal-device = <&MAL>; | ||
189 | mal-tx-channel = <2>; | ||
190 | mal-rx-channel = <1>; | ||
191 | cell-index = <1>; | ||
192 | max-frame-size = <0x5dc>; | ||
193 | rx-fifo-size = <0x1000>; | ||
194 | tx-fifo-size = <0x800>; | ||
195 | mdio-device = <&EMAC0>; | ||
196 | phy-mode = "mii"; | ||
197 | phy-map = <0x0000001>; | ||
198 | }; | ||
199 | }; | ||
200 | |||
201 | EBC0: ebc { | ||
202 | compatible = "ibm,ebc-405ep", "ibm,ebc"; | ||
203 | dcr-reg = <0x012 0x002>; | ||
204 | #address-cells = <2>; | ||
205 | #size-cells = <1>; | ||
206 | |||
207 | /* The ranges property is supplied by the bootwrapper | ||
208 | * and is based on the firmware's configuration of the | ||
209 | * EBC bridge | ||
210 | */ | ||
211 | clock-frequency = <0>; /* Filled in by zImage */ | ||
212 | |||
213 | nor_flash@0 { | ||
214 | compatible = "cfi-flash"; | ||
215 | bank-width = <2>; | ||
216 | reg = <0x0 0xff800000 0x00800000>; | ||
217 | #address-cells = <1>; | ||
218 | #size-cells = <1>; | ||
219 | |||
220 | /* This mapping is for the 8M flash | ||
221 | 4M flash has all ofssets -= 4M, | ||
222 | and FeatFS partition is not present */ | ||
223 | partition@0 { | ||
224 | label = "Bootloader"; | ||
225 | reg = <0x7c0000 0x40000>; | ||
226 | /* read-only; */ | ||
227 | }; | ||
228 | partition@1 { | ||
229 | label = "Env_and_Config_Primary"; | ||
230 | reg = <0x400000 0x10000>; | ||
231 | }; | ||
232 | partition@2 { | ||
233 | label = "Kernel"; | ||
234 | reg = <0x420000 0x100000>; | ||
235 | }; | ||
236 | partition@3 { | ||
237 | label = "Filesystem"; | ||
238 | reg = <0x520000 0x2a0000>; | ||
239 | }; | ||
240 | partition@4 { | ||
241 | label = "Env_and_Config_Secondary"; | ||
242 | reg = <0x410000 0x10000>; | ||
243 | }; | ||
244 | partition@5 { | ||
245 | label = "FeatFS"; | ||
246 | reg = <0x000000 0x400000>; | ||
247 | }; | ||
248 | partition@6 { | ||
249 | label = "Bootloader_Env"; | ||
250 | reg = <0x7d0000 0x10000>; | ||
251 | }; | ||
252 | }; | ||
253 | }; | ||
254 | |||
255 | PCI0: pci@ec000000 { | ||
256 | device_type = "pci"; | ||
257 | #interrupt-cells = <1>; | ||
258 | #size-cells = <2>; | ||
259 | #address-cells = <3>; | ||
260 | compatible = "ibm,plb405ep-pci", "ibm,plb-pci"; | ||
261 | primary; | ||
262 | reg = <0xeec00000 0x00000008 /* Config space access */ | ||
263 | 0xeed80000 0x00000004 /* IACK */ | ||
264 | 0xeed80000 0x00000004 /* Special cycle */ | ||
265 | 0xef480000 0x00000040>; /* Internal registers */ | ||
266 | |||
267 | /* Outbound ranges, one memory and one IO, | ||
268 | * later cannot be changed. Chip supports a second | ||
269 | * IO range but we don't use it for now | ||
270 | */ | ||
271 | ranges = <0x02000000 0x00000000 0x80000000 0x80000000 0x00000000 0x20000000 | ||
272 | 0x01000000 0x00000000 0x00000000 0xe8000000 0x00000000 0x00010000>; | ||
273 | |||
274 | /* Inbound 2GB range starting at 0 */ | ||
275 | dma-ranges = <0x42000000 0x0 0x0 0x0 0x0 0x80000000>; | ||
276 | |||
277 | interrupt-parent = <&UIC0>; | ||
278 | interrupt-map-mask = <0xf800 0x0 0x0 0x7>; | ||
279 | interrupt-map = < | ||
280 | /* IDSEL 3 -- slot1 (optional) 27/29 A/B IRQ2/4 */ | ||
281 | 0x1800 0x0 0x0 0x1 &UIC0 0x1b 0x8 | ||
282 | 0x1800 0x0 0x0 0x2 &UIC0 0x1d 0x8 | ||
283 | |||
284 | /* IDSEL 4 -- slot0, 26/28 A/B IRQ1/3 */ | ||
285 | 0x2000 0x0 0x0 0x1 &UIC0 0x1a 0x8 | ||
286 | 0x2000 0x0 0x0 0x2 &UIC0 0x1c 0x8 | ||
287 | >; | ||
288 | }; | ||
289 | }; | ||
290 | |||
291 | chosen { | ||
292 | linux,stdout-path = &UART0; | ||
293 | }; | ||
294 | }; | ||
diff --git a/arch/powerpc/boot/dts/kilauea.dts b/arch/powerpc/boot/dts/kilauea.dts index 5e6b08ff6f67..c46561456ede 100644 --- a/arch/powerpc/boot/dts/kilauea.dts +++ b/arch/powerpc/boot/dts/kilauea.dts | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Device Tree Source for AMCC Kilauea (405EX) | 2 | * Device Tree Source for AMCC Kilauea (405EX) |
3 | * | 3 | * |
4 | * Copyright 2007 DENX Software Engineering, Stefan Roese <sr@denx.de> | 4 | * Copyright 2007-2009 DENX Software Engineering, Stefan Roese <sr@denx.de> |
5 | * | 5 | * |
6 | * This file is licensed under the terms of the GNU General Public | 6 | * This file is licensed under the terms of the GNU General Public |
7 | * License version 2. This program is licensed "as is" without | 7 | * License version 2. This program is licensed "as is" without |
@@ -150,7 +150,11 @@ | |||
150 | #size-cells = <1>; | 150 | #size-cells = <1>; |
151 | partition@0 { | 151 | partition@0 { |
152 | label = "kernel"; | 152 | label = "kernel"; |
153 | reg = <0x00000000 0x00200000>; | 153 | reg = <0x00000000 0x001e0000>; |
154 | }; | ||
155 | partition@1e0000 { | ||
156 | label = "dtb"; | ||
157 | reg = <0x001e0000 0x00020000>; | ||
154 | }; | 158 | }; |
155 | partition@200000 { | 159 | partition@200000 { |
156 | label = "root"; | 160 | label = "root"; |
@@ -169,6 +173,29 @@ | |||
169 | reg = <0x03fa0000 0x00060000>; | 173 | reg = <0x03fa0000 0x00060000>; |
170 | }; | 174 | }; |
171 | }; | 175 | }; |
176 | |||
177 | ndfc@1,0 { | ||
178 | compatible = "ibm,ndfc"; | ||
179 | reg = <0x00000001 0x00000000 0x00002000>; | ||
180 | ccr = <0x00001000>; | ||
181 | bank-settings = <0x80002222>; | ||
182 | #address-cells = <1>; | ||
183 | #size-cells = <1>; | ||
184 | |||
185 | nand { | ||
186 | #address-cells = <1>; | ||
187 | #size-cells = <1>; | ||
188 | |||
189 | partition@0 { | ||
190 | label = "u-boot"; | ||
191 | reg = <0x00000000 0x00100000>; | ||
192 | }; | ||
193 | partition@100000 { | ||
194 | label = "user"; | ||
195 | reg = <0x00000000 0x03f00000>; | ||
196 | }; | ||
197 | }; | ||
198 | }; | ||
172 | }; | 199 | }; |
173 | 200 | ||
174 | UART0: serial@ef600200 { | 201 | UART0: serial@ef600200 { |
@@ -198,6 +225,18 @@ | |||
198 | reg = <0xef600400 0x00000014>; | 225 | reg = <0xef600400 0x00000014>; |
199 | interrupt-parent = <&UIC0>; | 226 | interrupt-parent = <&UIC0>; |
200 | interrupts = <0x2 0x4>; | 227 | interrupts = <0x2 0x4>; |
228 | #address-cells = <1>; | ||
229 | #size-cells = <0>; | ||
230 | |||
231 | rtc@68 { | ||
232 | compatible = "dallas,ds1338"; | ||
233 | reg = <0x68>; | ||
234 | }; | ||
235 | |||
236 | dtt@48 { | ||
237 | compatible = "dallas,ds1775"; | ||
238 | reg = <0x48>; | ||
239 | }; | ||
201 | }; | 240 | }; |
202 | 241 | ||
203 | IIC1: i2c@ef600500 { | 242 | IIC1: i2c@ef600500 { |
@@ -207,7 +246,6 @@ | |||
207 | interrupts = <0x7 0x4>; | 246 | interrupts = <0x7 0x4>; |
208 | }; | 247 | }; |
209 | 248 | ||
210 | |||
211 | RGMII0: emac-rgmii@ef600b00 { | 249 | RGMII0: emac-rgmii@ef600b00 { |
212 | compatible = "ibm,rgmii-405ex", "ibm,rgmii"; | 250 | compatible = "ibm,rgmii-405ex", "ibm,rgmii"; |
213 | reg = <0xef600b00 0x00000104>; | 251 | reg = <0xef600b00 0x00000104>; |
diff --git a/arch/powerpc/boot/dts/mgcoge.dts b/arch/powerpc/boot/dts/mgcoge.dts index 633255a97557..0ce96644176d 100644 --- a/arch/powerpc/boot/dts/mgcoge.dts +++ b/arch/powerpc/boot/dts/mgcoge.dts | |||
@@ -162,6 +162,59 @@ | |||
162 | fixed-link = <0 0 10 0 0>; | 162 | fixed-link = <0 0 10 0 0>; |
163 | }; | 163 | }; |
164 | 164 | ||
165 | i2c@11860 { | ||
166 | compatible = "fsl,mpc8272-i2c", | ||
167 | "fsl,cpm2-i2c"; | ||
168 | reg = <0x11860 0x20 0x8afc 0x2>; | ||
169 | interrupts = <1 8>; | ||
170 | interrupt-parent = <&PIC>; | ||
171 | fsl,cpm-command = <0x29600000>; | ||
172 | #address-cells = <1>; | ||
173 | #size-cells = <0>; | ||
174 | }; | ||
175 | |||
176 | mdio@10d40 { | ||
177 | compatible = "fsl,cpm2-mdio-bitbang"; | ||
178 | reg = <0x10d00 0x14>; | ||
179 | #address-cells = <1>; | ||
180 | #size-cells = <0>; | ||
181 | fsl,mdio-pin = <12>; | ||
182 | fsl,mdc-pin = <13>; | ||
183 | |||
184 | phy0: ethernet-phy@0 { | ||
185 | reg = <0x0>; | ||
186 | }; | ||
187 | |||
188 | phy1: ethernet-phy@1 { | ||
189 | reg = <0x1>; | ||
190 | }; | ||
191 | }; | ||
192 | |||
193 | /* FCC1 management to switch */ | ||
194 | ethernet@11300 { | ||
195 | device_type = "network"; | ||
196 | compatible = "fsl,cpm2-fcc-enet"; | ||
197 | reg = <0x11300 0x20 0x8400 0x100 0x11390 0x1>; | ||
198 | local-mac-address = [ 00 01 02 03 04 07 ]; | ||
199 | interrupts = <32 8>; | ||
200 | interrupt-parent = <&PIC>; | ||
201 | phy-handle = <&phy0>; | ||
202 | linux,network-index = <1>; | ||
203 | fsl,cpm-command = <0x12000300>; | ||
204 | }; | ||
205 | |||
206 | /* FCC2 to redundant core unit over backplane */ | ||
207 | ethernet@11320 { | ||
208 | device_type = "network"; | ||
209 | compatible = "fsl,cpm2-fcc-enet"; | ||
210 | reg = <0x11320 0x20 0x8500 0x100 0x113b0 0x1>; | ||
211 | local-mac-address = [ 00 01 02 03 04 08 ]; | ||
212 | interrupts = <33 8>; | ||
213 | interrupt-parent = <&PIC>; | ||
214 | phy-handle = <&phy1>; | ||
215 | linux,network-index = <2>; | ||
216 | fsl,cpm-command = <0x16200300>; | ||
217 | }; | ||
165 | }; | 218 | }; |
166 | 219 | ||
167 | PIC: interrupt-controller@10c00 { | 220 | PIC: interrupt-controller@10c00 { |
diff --git a/arch/powerpc/boot/dts/mpc8272ads.dts b/arch/powerpc/boot/dts/mpc8272ads.dts index 60f332778e41..e802ebd88cb1 100644 --- a/arch/powerpc/boot/dts/mpc8272ads.dts +++ b/arch/powerpc/boot/dts/mpc8272ads.dts | |||
@@ -173,6 +173,14 @@ | |||
173 | fsl,cpm-command = <0xce00000>; | 173 | fsl,cpm-command = <0xce00000>; |
174 | }; | 174 | }; |
175 | 175 | ||
176 | usb@11b60 { | ||
177 | compatible = "fsl,mpc8272-cpm-usb"; | ||
178 | reg = <0x11b60 0x40 0x8b00 0x100>; | ||
179 | interrupts = <11 8>; | ||
180 | interrupt-parent = <&PIC>; | ||
181 | mode = "peripheral"; | ||
182 | }; | ||
183 | |||
176 | mdio@10d40 { | 184 | mdio@10d40 { |
177 | device_type = "mdio"; | 185 | device_type = "mdio"; |
178 | compatible = "fsl,mpc8272ads-mdio-bitbang", | 186 | compatible = "fsl,mpc8272ads-mdio-bitbang", |
diff --git a/arch/powerpc/boot/dts/mpc8377_rdb.dts b/arch/powerpc/boot/dts/mpc8377_rdb.dts index 4f06dbc0d27e..28e022ac4179 100644 --- a/arch/powerpc/boot/dts/mpc8377_rdb.dts +++ b/arch/powerpc/boot/dts/mpc8377_rdb.dts | |||
@@ -174,7 +174,7 @@ | |||
174 | interrupts = <42 0x8>; | 174 | interrupts = <42 0x8>; |
175 | interrupt-parent = <&ipic>; | 175 | interrupt-parent = <&ipic>; |
176 | /* Filled in by U-Boot */ | 176 | /* Filled in by U-Boot */ |
177 | clock-frequency = <0>; | 177 | clock-frequency = <111111111>; |
178 | }; | 178 | }; |
179 | }; | 179 | }; |
180 | 180 | ||
diff --git a/arch/powerpc/boot/dts/mpc8377_wlan.dts b/arch/powerpc/boot/dts/mpc8377_wlan.dts new file mode 100644 index 000000000000..3febc4e91b10 --- /dev/null +++ b/arch/powerpc/boot/dts/mpc8377_wlan.dts | |||
@@ -0,0 +1,464 @@ | |||
1 | /* | ||
2 | * MPC8377E WLAN Device Tree Source | ||
3 | * | ||
4 | * Copyright 2007-2009 Freescale Semiconductor Inc. | ||
5 | * Copyright 2009 MontaVista Software, Inc. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License as published by the | ||
9 | * Free Software Foundation; either version 2 of the License, or (at your | ||
10 | * option) any later version. | ||
11 | */ | ||
12 | |||
13 | /dts-v1/; | ||
14 | |||
15 | / { | ||
16 | compatible = "fsl,mpc8377wlan"; | ||
17 | #address-cells = <1>; | ||
18 | #size-cells = <1>; | ||
19 | |||
20 | aliases { | ||
21 | ethernet0 = &enet0; | ||
22 | ethernet1 = &enet1; | ||
23 | serial0 = &serial0; | ||
24 | serial1 = &serial1; | ||
25 | pci0 = &pci0; | ||
26 | pci1 = &pci1; | ||
27 | pci2 = &pci2; | ||
28 | }; | ||
29 | |||
30 | cpus { | ||
31 | #address-cells = <1>; | ||
32 | #size-cells = <0>; | ||
33 | |||
34 | PowerPC,8377@0 { | ||
35 | device_type = "cpu"; | ||
36 | reg = <0x0>; | ||
37 | d-cache-line-size = <32>; | ||
38 | i-cache-line-size = <32>; | ||
39 | d-cache-size = <32768>; | ||
40 | i-cache-size = <32768>; | ||
41 | timebase-frequency = <0>; | ||
42 | bus-frequency = <0>; | ||
43 | clock-frequency = <0>; | ||
44 | }; | ||
45 | }; | ||
46 | |||
47 | memory { | ||
48 | device_type = "memory"; | ||
49 | reg = <0x00000000 0x20000000>; // 512MB at 0 | ||
50 | }; | ||
51 | |||
52 | localbus@e0005000 { | ||
53 | #address-cells = <2>; | ||
54 | #size-cells = <1>; | ||
55 | compatible = "fsl,mpc8377-elbc", "fsl,elbc", "simple-bus"; | ||
56 | reg = <0xe0005000 0x1000>; | ||
57 | interrupts = <77 0x8>; | ||
58 | interrupt-parent = <&ipic>; | ||
59 | ranges = <0x0 0x0 0xfc000000 0x04000000>; | ||
60 | |||
61 | flash@0,0 { | ||
62 | #address-cells = <1>; | ||
63 | #size-cells = <1>; | ||
64 | compatible = "cfi-flash"; | ||
65 | reg = <0x0 0x0 0x4000000>; | ||
66 | bank-width = <2>; | ||
67 | device-width = <1>; | ||
68 | |||
69 | partition@0 { | ||
70 | reg = <0 0x8000>; | ||
71 | label = "u-boot"; | ||
72 | read-only; | ||
73 | }; | ||
74 | |||
75 | partition@a0000 { | ||
76 | reg = <0xa0000 0x300000>; | ||
77 | label = "kernel"; | ||
78 | }; | ||
79 | |||
80 | partition@3a0000 { | ||
81 | reg = <0x3a0000 0x3c60000>; | ||
82 | label = "rootfs"; | ||
83 | }; | ||
84 | }; | ||
85 | }; | ||
86 | |||
87 | immr@e0000000 { | ||
88 | #address-cells = <1>; | ||
89 | #size-cells = <1>; | ||
90 | device_type = "soc"; | ||
91 | compatible = "simple-bus"; | ||
92 | ranges = <0x0 0xe0000000 0x00100000>; | ||
93 | reg = <0xe0000000 0x00000200>; | ||
94 | bus-frequency = <0>; | ||
95 | |||
96 | wdt@200 { | ||
97 | device_type = "watchdog"; | ||
98 | compatible = "mpc83xx_wdt"; | ||
99 | reg = <0x200 0x100>; | ||
100 | }; | ||
101 | |||
102 | gpio1: gpio-controller@c00 { | ||
103 | #gpio-cells = <2>; | ||
104 | compatible = "fsl,mpc8377-gpio", "fsl,mpc8349-gpio"; | ||
105 | reg = <0xc00 0x100>; | ||
106 | interrupts = <74 0x8>; | ||
107 | interrupt-parent = <&ipic>; | ||
108 | gpio-controller; | ||
109 | }; | ||
110 | |||
111 | gpio2: gpio-controller@d00 { | ||
112 | #gpio-cells = <2>; | ||
113 | compatible = "fsl,mpc8377-gpio", "fsl,mpc8349-gpio"; | ||
114 | reg = <0xd00 0x100>; | ||
115 | interrupts = <75 0x8>; | ||
116 | interrupt-parent = <&ipic>; | ||
117 | gpio-controller; | ||
118 | }; | ||
119 | |||
120 | sleep-nexus { | ||
121 | #address-cells = <1>; | ||
122 | #size-cells = <1>; | ||
123 | compatible = "simple-bus"; | ||
124 | sleep = <&pmc 0x0c000000>; | ||
125 | ranges; | ||
126 | |||
127 | i2c@3000 { | ||
128 | #address-cells = <1>; | ||
129 | #size-cells = <0>; | ||
130 | cell-index = <0>; | ||
131 | compatible = "fsl-i2c"; | ||
132 | reg = <0x3000 0x100>; | ||
133 | interrupts = <14 0x8>; | ||
134 | interrupt-parent = <&ipic>; | ||
135 | dfsrr; | ||
136 | |||
137 | at24@50 { | ||
138 | compatible = "at24,24c256"; | ||
139 | reg = <0x50>; | ||
140 | }; | ||
141 | |||
142 | rtc@68 { | ||
143 | compatible = "dallas,ds1339"; | ||
144 | reg = <0x68>; | ||
145 | }; | ||
146 | }; | ||
147 | |||
148 | sdhci@2e000 { | ||
149 | compatible = "fsl,mpc8377-esdhc", "fsl,esdhc"; | ||
150 | reg = <0x2e000 0x1000>; | ||
151 | interrupts = <42 0x8>; | ||
152 | interrupt-parent = <&ipic>; | ||
153 | clock-frequency = <133333333>; | ||
154 | }; | ||
155 | }; | ||
156 | |||
157 | i2c@3100 { | ||
158 | #address-cells = <1>; | ||
159 | #size-cells = <0>; | ||
160 | cell-index = <1>; | ||
161 | compatible = "fsl-i2c"; | ||
162 | reg = <0x3100 0x100>; | ||
163 | interrupts = <15 0x8>; | ||
164 | interrupt-parent = <&ipic>; | ||
165 | dfsrr; | ||
166 | }; | ||
167 | |||
168 | spi@7000 { | ||
169 | cell-index = <0>; | ||
170 | compatible = "fsl,spi"; | ||
171 | reg = <0x7000 0x1000>; | ||
172 | interrupts = <16 0x8>; | ||
173 | interrupt-parent = <&ipic>; | ||
174 | mode = "cpu"; | ||
175 | }; | ||
176 | |||
177 | dma@82a8 { | ||
178 | #address-cells = <1>; | ||
179 | #size-cells = <1>; | ||
180 | compatible = "fsl,mpc8377-dma", "fsl,elo-dma"; | ||
181 | reg = <0x82a8 4>; | ||
182 | ranges = <0 0x8100 0x1a8>; | ||
183 | interrupt-parent = <&ipic>; | ||
184 | interrupts = <71 8>; | ||
185 | cell-index = <0>; | ||
186 | dma-channel@0 { | ||
187 | compatible = "fsl,mpc8377-dma-channel", "fsl,elo-dma-channel"; | ||
188 | reg = <0 0x80>; | ||
189 | cell-index = <0>; | ||
190 | interrupt-parent = <&ipic>; | ||
191 | interrupts = <71 8>; | ||
192 | }; | ||
193 | dma-channel@80 { | ||
194 | compatible = "fsl,mpc8377-dma-channel", "fsl,elo-dma-channel"; | ||
195 | reg = <0x80 0x80>; | ||
196 | cell-index = <1>; | ||
197 | interrupt-parent = <&ipic>; | ||
198 | interrupts = <71 8>; | ||
199 | }; | ||
200 | dma-channel@100 { | ||
201 | compatible = "fsl,mpc8377-dma-channel", "fsl,elo-dma-channel"; | ||
202 | reg = <0x100 0x80>; | ||
203 | cell-index = <2>; | ||
204 | interrupt-parent = <&ipic>; | ||
205 | interrupts = <71 8>; | ||
206 | }; | ||
207 | dma-channel@180 { | ||
208 | compatible = "fsl,mpc8377-dma-channel", "fsl,elo-dma-channel"; | ||
209 | reg = <0x180 0x28>; | ||
210 | cell-index = <3>; | ||
211 | interrupt-parent = <&ipic>; | ||
212 | interrupts = <71 8>; | ||
213 | }; | ||
214 | }; | ||
215 | |||
216 | usb@23000 { | ||
217 | compatible = "fsl-usb2-dr"; | ||
218 | reg = <0x23000 0x1000>; | ||
219 | #address-cells = <1>; | ||
220 | #size-cells = <0>; | ||
221 | interrupt-parent = <&ipic>; | ||
222 | interrupts = <38 0x8>; | ||
223 | phy_type = "ulpi"; | ||
224 | sleep = <&pmc 0x00c00000>; | ||
225 | }; | ||
226 | |||
227 | enet0: ethernet@24000 { | ||
228 | #address-cells = <1>; | ||
229 | #size-cells = <1>; | ||
230 | cell-index = <0>; | ||
231 | device_type = "network"; | ||
232 | model = "eTSEC"; | ||
233 | compatible = "gianfar"; | ||
234 | reg = <0x24000 0x1000>; | ||
235 | ranges = <0x0 0x24000 0x1000>; | ||
236 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
237 | interrupts = <32 0x8 33 0x8 34 0x8>; | ||
238 | phy-connection-type = "mii"; | ||
239 | interrupt-parent = <&ipic>; | ||
240 | tbi-handle = <&tbi0>; | ||
241 | phy-handle = <&phy2>; | ||
242 | sleep = <&pmc 0xc0000000>; | ||
243 | fsl,magic-packet; | ||
244 | |||
245 | mdio@520 { | ||
246 | #address-cells = <1>; | ||
247 | #size-cells = <0>; | ||
248 | compatible = "fsl,gianfar-mdio"; | ||
249 | reg = <0x520 0x20>; | ||
250 | |||
251 | phy2: ethernet-phy@2 { | ||
252 | interrupt-parent = <&ipic>; | ||
253 | interrupts = <17 0x8>; | ||
254 | reg = <0x2>; | ||
255 | device_type = "ethernet-phy"; | ||
256 | }; | ||
257 | |||
258 | phy3: ethernet-phy@3 { | ||
259 | interrupt-parent = <&ipic>; | ||
260 | interrupts = <18 0x8>; | ||
261 | reg = <0x3>; | ||
262 | device_type = "ethernet-phy"; | ||
263 | }; | ||
264 | |||
265 | tbi0: tbi-phy@11 { | ||
266 | reg = <0x11>; | ||
267 | device_type = "tbi-phy"; | ||
268 | }; | ||
269 | }; | ||
270 | }; | ||
271 | |||
272 | enet1: ethernet@25000 { | ||
273 | #address-cells = <1>; | ||
274 | #size-cells = <1>; | ||
275 | cell-index = <1>; | ||
276 | device_type = "network"; | ||
277 | model = "eTSEC"; | ||
278 | compatible = "gianfar"; | ||
279 | reg = <0x25000 0x1000>; | ||
280 | ranges = <0x0 0x25000 0x1000>; | ||
281 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
282 | interrupts = <35 0x8 36 0x8 37 0x8>; | ||
283 | phy-connection-type = "mii"; | ||
284 | interrupt-parent = <&ipic>; | ||
285 | phy-handle = <&phy3>; | ||
286 | tbi-handle = <&tbi1>; | ||
287 | sleep = <&pmc 0x30000000>; | ||
288 | fsl,magic-packet; | ||
289 | |||
290 | mdio@520 { | ||
291 | #address-cells = <1>; | ||
292 | #size-cells = <0>; | ||
293 | compatible = "fsl,gianfar-tbi"; | ||
294 | reg = <0x520 0x20>; | ||
295 | |||
296 | tbi1: tbi-phy@11 { | ||
297 | reg = <0x11>; | ||
298 | device_type = "tbi-phy"; | ||
299 | }; | ||
300 | }; | ||
301 | }; | ||
302 | |||
303 | serial0: serial@4500 { | ||
304 | cell-index = <0>; | ||
305 | device_type = "serial"; | ||
306 | compatible = "ns16550"; | ||
307 | reg = <0x4500 0x100>; | ||
308 | clock-frequency = <0>; | ||
309 | interrupts = <9 0x8>; | ||
310 | interrupt-parent = <&ipic>; | ||
311 | }; | ||
312 | |||
313 | serial1: serial@4600 { | ||
314 | cell-index = <1>; | ||
315 | device_type = "serial"; | ||
316 | compatible = "ns16550"; | ||
317 | reg = <0x4600 0x100>; | ||
318 | clock-frequency = <0>; | ||
319 | interrupts = <10 0x8>; | ||
320 | interrupt-parent = <&ipic>; | ||
321 | }; | ||
322 | |||
323 | crypto@30000 { | ||
324 | compatible = "fsl,sec3.0", "fsl,sec2.4", "fsl,sec2.2", | ||
325 | "fsl,sec2.1", "fsl,sec2.0"; | ||
326 | reg = <0x30000 0x10000>; | ||
327 | interrupts = <11 0x8>; | ||
328 | interrupt-parent = <&ipic>; | ||
329 | fsl,num-channels = <4>; | ||
330 | fsl,channel-fifo-len = <24>; | ||
331 | fsl,exec-units-mask = <0x9fe>; | ||
332 | fsl,descriptor-types-mask = <0x3ab0ebf>; | ||
333 | sleep = <&pmc 0x03000000>; | ||
334 | }; | ||
335 | |||
336 | sata@18000 { | ||
337 | compatible = "fsl,mpc8377-sata", "fsl,pq-sata"; | ||
338 | reg = <0x18000 0x1000>; | ||
339 | interrupts = <44 0x8>; | ||
340 | interrupt-parent = <&ipic>; | ||
341 | sleep = <&pmc 0x000000c0>; | ||
342 | }; | ||
343 | |||
344 | sata@19000 { | ||
345 | compatible = "fsl,mpc8377-sata", "fsl,pq-sata"; | ||
346 | reg = <0x19000 0x1000>; | ||
347 | interrupts = <45 0x8>; | ||
348 | interrupt-parent = <&ipic>; | ||
349 | sleep = <&pmc 0x00000030>; | ||
350 | }; | ||
351 | |||
352 | /* IPIC | ||
353 | * interrupts cell = <intr #, sense> | ||
354 | * sense values match linux IORESOURCE_IRQ_* defines: | ||
355 | * sense == 8: Level, low assertion | ||
356 | * sense == 2: Edge, high-to-low change | ||
357 | */ | ||
358 | ipic: interrupt-controller@700 { | ||
359 | compatible = "fsl,ipic"; | ||
360 | interrupt-controller; | ||
361 | #address-cells = <0>; | ||
362 | #interrupt-cells = <2>; | ||
363 | reg = <0x700 0x100>; | ||
364 | }; | ||
365 | |||
366 | pmc: power@b00 { | ||
367 | compatible = "fsl,mpc8377-pmc", "fsl,mpc8349-pmc"; | ||
368 | reg = <0xb00 0x100 0xa00 0x100>; | ||
369 | interrupts = <80 0x8>; | ||
370 | interrupt-parent = <&ipic>; | ||
371 | }; | ||
372 | }; | ||
373 | |||
374 | pci0: pci@e0008500 { | ||
375 | interrupt-map-mask = <0xf800 0 0 7>; | ||
376 | interrupt-map = < | ||
377 | /* IRQ5 = 21 = 0x15, IRQ6 = 0x16, IRQ7 = 23 = 0x17 */ | ||
378 | |||
379 | /* IDSEL AD14 IRQ6 inta */ | ||
380 | 0x7000 0x0 0x0 0x1 &ipic 22 0x8 | ||
381 | |||
382 | /* IDSEL AD15 IRQ5 inta */ | ||
383 | 0x7800 0x0 0x0 0x1 &ipic 21 0x8>; | ||
384 | interrupt-parent = <&ipic>; | ||
385 | interrupts = <66 0x8>; | ||
386 | bus-range = <0 0>; | ||
387 | ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000 | ||
388 | 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000 | ||
389 | 0x01000000 0x0 0x00000000 0xe0300000 0x0 0x00100000>; | ||
390 | sleep = <&pmc 0x00010000>; | ||
391 | clock-frequency = <66666666>; | ||
392 | #interrupt-cells = <1>; | ||
393 | #size-cells = <2>; | ||
394 | #address-cells = <3>; | ||
395 | reg = <0xe0008500 0x100 /* internal registers */ | ||
396 | 0xe0008300 0x8>; /* config space access registers */ | ||
397 | compatible = "fsl,mpc8349-pci"; | ||
398 | device_type = "pci"; | ||
399 | }; | ||
400 | |||
401 | pci1: pcie@e0009000 { | ||
402 | #address-cells = <3>; | ||
403 | #size-cells = <2>; | ||
404 | #interrupt-cells = <1>; | ||
405 | device_type = "pci"; | ||
406 | compatible = "fsl,mpc8377-pcie", "fsl,mpc8314-pcie"; | ||
407 | reg = <0xe0009000 0x00001000>; | ||
408 | ranges = <0x02000000 0 0xa8000000 0xa8000000 0 0x10000000 | ||
409 | 0x01000000 0 0x00000000 0xb8000000 0 0x00800000>; | ||
410 | bus-range = <0 255>; | ||
411 | interrupt-map-mask = <0xf800 0 0 7>; | ||
412 | interrupt-map = <0 0 0 1 &ipic 1 8 | ||
413 | 0 0 0 2 &ipic 1 8 | ||
414 | 0 0 0 3 &ipic 1 8 | ||
415 | 0 0 0 4 &ipic 1 8>; | ||
416 | sleep = <&pmc 0x00300000>; | ||
417 | clock-frequency = <0>; | ||
418 | |||
419 | pcie@0 { | ||
420 | #address-cells = <3>; | ||
421 | #size-cells = <2>; | ||
422 | device_type = "pci"; | ||
423 | reg = <0 0 0 0 0>; | ||
424 | ranges = <0x02000000 0 0xa8000000 | ||
425 | 0x02000000 0 0xa8000000 | ||
426 | 0 0x10000000 | ||
427 | 0x01000000 0 0x00000000 | ||
428 | 0x01000000 0 0x00000000 | ||
429 | 0 0x00800000>; | ||
430 | }; | ||
431 | }; | ||
432 | |||
433 | pci2: pcie@e000a000 { | ||
434 | #address-cells = <3>; | ||
435 | #size-cells = <2>; | ||
436 | #interrupt-cells = <1>; | ||
437 | device_type = "pci"; | ||
438 | compatible = "fsl,mpc8377-pcie", "fsl,mpc8314-pcie"; | ||
439 | reg = <0xe000a000 0x00001000>; | ||
440 | ranges = <0x02000000 0 0xc8000000 0xc8000000 0 0x10000000 | ||
441 | 0x01000000 0 0x00000000 0xd8000000 0 0x00800000>; | ||
442 | bus-range = <0 255>; | ||
443 | interrupt-map-mask = <0xf800 0 0 7>; | ||
444 | interrupt-map = <0 0 0 1 &ipic 2 8 | ||
445 | 0 0 0 2 &ipic 2 8 | ||
446 | 0 0 0 3 &ipic 2 8 | ||
447 | 0 0 0 4 &ipic 2 8>; | ||
448 | sleep = <&pmc 0x000c0000>; | ||
449 | clock-frequency = <0>; | ||
450 | |||
451 | pcie@0 { | ||
452 | #address-cells = <3>; | ||
453 | #size-cells = <2>; | ||
454 | device_type = "pci"; | ||
455 | reg = <0 0 0 0 0>; | ||
456 | ranges = <0x02000000 0 0xc8000000 | ||
457 | 0x02000000 0 0xc8000000 | ||
458 | 0 0x10000000 | ||
459 | 0x01000000 0 0x00000000 | ||
460 | 0x01000000 0 0x00000000 | ||
461 | 0 0x00800000>; | ||
462 | }; | ||
463 | }; | ||
464 | }; | ||
diff --git a/arch/powerpc/boot/dts/mpc8378_rdb.dts b/arch/powerpc/boot/dts/mpc8378_rdb.dts index aabf3437cadf..a11ead8214b4 100644 --- a/arch/powerpc/boot/dts/mpc8378_rdb.dts +++ b/arch/powerpc/boot/dts/mpc8378_rdb.dts | |||
@@ -174,7 +174,7 @@ | |||
174 | interrupts = <42 0x8>; | 174 | interrupts = <42 0x8>; |
175 | interrupt-parent = <&ipic>; | 175 | interrupt-parent = <&ipic>; |
176 | /* Filled in by U-Boot */ | 176 | /* Filled in by U-Boot */ |
177 | clock-frequency = <0>; | 177 | clock-frequency = <111111111>; |
178 | }; | 178 | }; |
179 | }; | 179 | }; |
180 | 180 | ||
diff --git a/arch/powerpc/boot/dts/mpc8379_rdb.dts b/arch/powerpc/boot/dts/mpc8379_rdb.dts index 9b1da864d890..e35dfba587c8 100644 --- a/arch/powerpc/boot/dts/mpc8379_rdb.dts +++ b/arch/powerpc/boot/dts/mpc8379_rdb.dts | |||
@@ -172,7 +172,7 @@ | |||
172 | interrupts = <42 0x8>; | 172 | interrupts = <42 0x8>; |
173 | interrupt-parent = <&ipic>; | 173 | interrupt-parent = <&ipic>; |
174 | /* Filled in by U-Boot */ | 174 | /* Filled in by U-Boot */ |
175 | clock-frequency = <0>; | 175 | clock-frequency = <111111111>; |
176 | }; | 176 | }; |
177 | }; | 177 | }; |
178 | 178 | ||
diff --git a/arch/powerpc/boot/dts/mpc8536ds.dts b/arch/powerpc/boot/dts/mpc8536ds.dts index e781ad2f1f8a..815cebb2e3e5 100644 --- a/arch/powerpc/boot/dts/mpc8536ds.dts +++ b/arch/powerpc/boot/dts/mpc8536ds.dts | |||
@@ -14,8 +14,8 @@ | |||
14 | / { | 14 | / { |
15 | model = "fsl,mpc8536ds"; | 15 | model = "fsl,mpc8536ds"; |
16 | compatible = "fsl,mpc8536ds"; | 16 | compatible = "fsl,mpc8536ds"; |
17 | #address-cells = <1>; | 17 | #address-cells = <2>; |
18 | #size-cells = <1>; | 18 | #size-cells = <2>; |
19 | 19 | ||
20 | aliases { | 20 | aliases { |
21 | ethernet0 = &enet0; | 21 | ethernet0 = &enet0; |
@@ -42,7 +42,7 @@ | |||
42 | 42 | ||
43 | memory { | 43 | memory { |
44 | device_type = "memory"; | 44 | device_type = "memory"; |
45 | reg = <00000000 00000000>; // Filled by U-Boot | 45 | reg = <0 0 0 0>; // Filled by U-Boot |
46 | }; | 46 | }; |
47 | 47 | ||
48 | soc@ffe00000 { | 48 | soc@ffe00000 { |
@@ -50,7 +50,7 @@ | |||
50 | #size-cells = <1>; | 50 | #size-cells = <1>; |
51 | device_type = "soc"; | 51 | device_type = "soc"; |
52 | compatible = "simple-bus"; | 52 | compatible = "simple-bus"; |
53 | ranges = <0x0 0xffe00000 0x100000>; | 53 | ranges = <0x0 0 0xffe00000 0x100000>; |
54 | bus-frequency = <0>; // Filled out by uboot. | 54 | bus-frequency = <0>; // Filled out by uboot. |
55 | 55 | ||
56 | ecm-law@0 { | 56 | ecm-law@0 { |
@@ -250,6 +250,14 @@ | |||
250 | phy_type = "ulpi"; | 250 | phy_type = "ulpi"; |
251 | }; | 251 | }; |
252 | 252 | ||
253 | sdhci@2e000 { | ||
254 | compatible = "fsl,mpc8536-esdhc", "fsl,esdhc"; | ||
255 | reg = <0x2e000 0x1000>; | ||
256 | interrupts = <72 0x2>; | ||
257 | interrupt-parent = <&mpic>; | ||
258 | clock-frequency = <250000000>; | ||
259 | }; | ||
260 | |||
253 | serial0: serial@4500 { | 261 | serial0: serial@4500 { |
254 | cell-index = <0>; | 262 | cell-index = <0>; |
255 | device_type = "serial"; | 263 | device_type = "serial"; |
@@ -347,13 +355,13 @@ | |||
347 | interrupt-parent = <&mpic>; | 355 | interrupt-parent = <&mpic>; |
348 | interrupts = <24 0x2>; | 356 | interrupts = <24 0x2>; |
349 | bus-range = <0 0xff>; | 357 | bus-range = <0 0xff>; |
350 | ranges = <0x02000000 0 0x80000000 0x80000000 0 0x10000000 | 358 | ranges = <0x02000000 0 0x80000000 0 0x80000000 0 0x10000000 |
351 | 0x01000000 0 0x00000000 0xffc00000 0 0x00010000>; | 359 | 0x01000000 0 0x00000000 0 0xffc00000 0 0x00010000>; |
352 | clock-frequency = <66666666>; | 360 | clock-frequency = <66666666>; |
353 | #interrupt-cells = <1>; | 361 | #interrupt-cells = <1>; |
354 | #size-cells = <2>; | 362 | #size-cells = <2>; |
355 | #address-cells = <3>; | 363 | #address-cells = <3>; |
356 | reg = <0xffe08000 0x1000>; | 364 | reg = <0 0xffe08000 0 0x1000>; |
357 | }; | 365 | }; |
358 | 366 | ||
359 | pci1: pcie@ffe09000 { | 367 | pci1: pcie@ffe09000 { |
@@ -362,10 +370,10 @@ | |||
362 | #interrupt-cells = <1>; | 370 | #interrupt-cells = <1>; |
363 | #size-cells = <2>; | 371 | #size-cells = <2>; |
364 | #address-cells = <3>; | 372 | #address-cells = <3>; |
365 | reg = <0xffe09000 0x1000>; | 373 | reg = <0 0xffe09000 0 0x1000>; |
366 | bus-range = <0 0xff>; | 374 | bus-range = <0 0xff>; |
367 | ranges = <0x02000000 0 0x98000000 0x98000000 0 0x08000000 | 375 | ranges = <0x02000000 0 0x98000000 0 0x98000000 0 0x08000000 |
368 | 0x01000000 0 0x00000000 0xffc20000 0 0x00010000>; | 376 | 0x01000000 0 0x00000000 0 0xffc20000 0 0x00010000>; |
369 | clock-frequency = <33333333>; | 377 | clock-frequency = <33333333>; |
370 | interrupt-parent = <&mpic>; | 378 | interrupt-parent = <&mpic>; |
371 | interrupts = <25 0x2>; | 379 | interrupts = <25 0x2>; |
@@ -398,10 +406,10 @@ | |||
398 | #interrupt-cells = <1>; | 406 | #interrupt-cells = <1>; |
399 | #size-cells = <2>; | 407 | #size-cells = <2>; |
400 | #address-cells = <3>; | 408 | #address-cells = <3>; |
401 | reg = <0xffe0a000 0x1000>; | 409 | reg = <0 0xffe0a000 0 0x1000>; |
402 | bus-range = <0 0xff>; | 410 | bus-range = <0 0xff>; |
403 | ranges = <0x02000000 0 0x90000000 0x90000000 0 0x08000000 | 411 | ranges = <0x02000000 0 0x90000000 0 0x90000000 0 0x08000000 |
404 | 0x01000000 0 0x00000000 0xffc10000 0 0x00010000>; | 412 | 0x01000000 0 0x00000000 0 0xffc10000 0 0x00010000>; |
405 | clock-frequency = <33333333>; | 413 | clock-frequency = <33333333>; |
406 | interrupt-parent = <&mpic>; | 414 | interrupt-parent = <&mpic>; |
407 | interrupts = <26 0x2>; | 415 | interrupts = <26 0x2>; |
@@ -434,10 +442,10 @@ | |||
434 | #interrupt-cells = <1>; | 442 | #interrupt-cells = <1>; |
435 | #size-cells = <2>; | 443 | #size-cells = <2>; |
436 | #address-cells = <3>; | 444 | #address-cells = <3>; |
437 | reg = <0xffe0b000 0x1000>; | 445 | reg = <0 0xffe0b000 0 0x1000>; |
438 | bus-range = <0 0xff>; | 446 | bus-range = <0 0xff>; |
439 | ranges = <0x02000000 0 0xa0000000 0xa0000000 0 0x20000000 | 447 | ranges = <0x02000000 0 0xa0000000 0 0xa0000000 0 0x20000000 |
440 | 0x01000000 0 0x00000000 0xffc30000 0 0x00010000>; | 448 | 0x01000000 0 0x00000000 0 0xffc30000 0 0x00010000>; |
441 | clock-frequency = <33333333>; | 449 | clock-frequency = <33333333>; |
442 | interrupt-parent = <&mpic>; | 450 | interrupt-parent = <&mpic>; |
443 | interrupts = <27 0x2>; | 451 | interrupts = <27 0x2>; |
diff --git a/arch/powerpc/boot/dts/mpc8536ds_36b.dts b/arch/powerpc/boot/dts/mpc8536ds_36b.dts new file mode 100644 index 000000000000..d95b26021e62 --- /dev/null +++ b/arch/powerpc/boot/dts/mpc8536ds_36b.dts | |||
@@ -0,0 +1,475 @@ | |||
1 | /* | ||
2 | * MPC8536 DS Device Tree Source | ||
3 | * | ||
4 | * Copyright 2008-2009 Freescale Semiconductor, Inc. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the | ||
8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
9 | * option) any later version. | ||
10 | */ | ||
11 | |||
12 | /dts-v1/; | ||
13 | |||
14 | / { | ||
15 | model = "fsl,mpc8536ds"; | ||
16 | compatible = "fsl,mpc8536ds"; | ||
17 | #address-cells = <2>; | ||
18 | #size-cells = <2>; | ||
19 | |||
20 | aliases { | ||
21 | ethernet0 = &enet0; | ||
22 | ethernet1 = &enet1; | ||
23 | serial0 = &serial0; | ||
24 | serial1 = &serial1; | ||
25 | pci0 = &pci0; | ||
26 | pci1 = &pci1; | ||
27 | pci2 = &pci2; | ||
28 | pci3 = &pci3; | ||
29 | }; | ||
30 | |||
31 | cpus { | ||
32 | #cpus = <1>; | ||
33 | #address-cells = <1>; | ||
34 | #size-cells = <0>; | ||
35 | |||
36 | PowerPC,8536@0 { | ||
37 | device_type = "cpu"; | ||
38 | reg = <0>; | ||
39 | next-level-cache = <&L2>; | ||
40 | }; | ||
41 | }; | ||
42 | |||
43 | memory { | ||
44 | device_type = "memory"; | ||
45 | reg = <0 0 0 0>; // Filled by U-Boot | ||
46 | }; | ||
47 | |||
48 | soc@fffe00000 { | ||
49 | #address-cells = <1>; | ||
50 | #size-cells = <1>; | ||
51 | device_type = "soc"; | ||
52 | compatible = "simple-bus"; | ||
53 | ranges = <0x0 0xf 0xffe00000 0x100000>; | ||
54 | bus-frequency = <0>; // Filled out by uboot. | ||
55 | |||
56 | ecm-law@0 { | ||
57 | compatible = "fsl,ecm-law"; | ||
58 | reg = <0x0 0x1000>; | ||
59 | fsl,num-laws = <12>; | ||
60 | }; | ||
61 | |||
62 | ecm@1000 { | ||
63 | compatible = "fsl,mpc8536-ecm", "fsl,ecm"; | ||
64 | reg = <0x1000 0x1000>; | ||
65 | interrupts = <17 2>; | ||
66 | interrupt-parent = <&mpic>; | ||
67 | }; | ||
68 | |||
69 | memory-controller@2000 { | ||
70 | compatible = "fsl,mpc8536-memory-controller"; | ||
71 | reg = <0x2000 0x1000>; | ||
72 | interrupt-parent = <&mpic>; | ||
73 | interrupts = <18 0x2>; | ||
74 | }; | ||
75 | |||
76 | L2: l2-cache-controller@20000 { | ||
77 | compatible = "fsl,mpc8536-l2-cache-controller"; | ||
78 | reg = <0x20000 0x1000>; | ||
79 | interrupt-parent = <&mpic>; | ||
80 | interrupts = <16 0x2>; | ||
81 | }; | ||
82 | |||
83 | i2c@3000 { | ||
84 | #address-cells = <1>; | ||
85 | #size-cells = <0>; | ||
86 | cell-index = <0>; | ||
87 | compatible = "fsl-i2c"; | ||
88 | reg = <0x3000 0x100>; | ||
89 | interrupts = <43 0x2>; | ||
90 | interrupt-parent = <&mpic>; | ||
91 | dfsrr; | ||
92 | }; | ||
93 | |||
94 | i2c@3100 { | ||
95 | #address-cells = <1>; | ||
96 | #size-cells = <0>; | ||
97 | cell-index = <1>; | ||
98 | compatible = "fsl-i2c"; | ||
99 | reg = <0x3100 0x100>; | ||
100 | interrupts = <43 0x2>; | ||
101 | interrupt-parent = <&mpic>; | ||
102 | dfsrr; | ||
103 | rtc@68 { | ||
104 | compatible = "dallas,ds3232"; | ||
105 | reg = <0x68>; | ||
106 | interrupts = <0 0x1>; | ||
107 | interrupt-parent = <&mpic>; | ||
108 | }; | ||
109 | }; | ||
110 | |||
111 | dma@21300 { | ||
112 | #address-cells = <1>; | ||
113 | #size-cells = <1>; | ||
114 | compatible = "fsl,mpc8536-dma", "fsl,eloplus-dma"; | ||
115 | reg = <0x21300 4>; | ||
116 | ranges = <0 0x21100 0x200>; | ||
117 | cell-index = <0>; | ||
118 | dma-channel@0 { | ||
119 | compatible = "fsl,mpc8536-dma-channel", | ||
120 | "fsl,eloplus-dma-channel"; | ||
121 | reg = <0x0 0x80>; | ||
122 | cell-index = <0>; | ||
123 | interrupt-parent = <&mpic>; | ||
124 | interrupts = <20 2>; | ||
125 | }; | ||
126 | dma-channel@80 { | ||
127 | compatible = "fsl,mpc8536-dma-channel", | ||
128 | "fsl,eloplus-dma-channel"; | ||
129 | reg = <0x80 0x80>; | ||
130 | cell-index = <1>; | ||
131 | interrupt-parent = <&mpic>; | ||
132 | interrupts = <21 2>; | ||
133 | }; | ||
134 | dma-channel@100 { | ||
135 | compatible = "fsl,mpc8536-dma-channel", | ||
136 | "fsl,eloplus-dma-channel"; | ||
137 | reg = <0x100 0x80>; | ||
138 | cell-index = <2>; | ||
139 | interrupt-parent = <&mpic>; | ||
140 | interrupts = <22 2>; | ||
141 | }; | ||
142 | dma-channel@180 { | ||
143 | compatible = "fsl,mpc8536-dma-channel", | ||
144 | "fsl,eloplus-dma-channel"; | ||
145 | reg = <0x180 0x80>; | ||
146 | cell-index = <3>; | ||
147 | interrupt-parent = <&mpic>; | ||
148 | interrupts = <23 2>; | ||
149 | }; | ||
150 | }; | ||
151 | |||
152 | usb@22000 { | ||
153 | compatible = "fsl,mpc8536-usb2-mph", "fsl-usb2-mph"; | ||
154 | reg = <0x22000 0x1000>; | ||
155 | #address-cells = <1>; | ||
156 | #size-cells = <0>; | ||
157 | interrupt-parent = <&mpic>; | ||
158 | interrupts = <28 0x2>; | ||
159 | phy_type = "ulpi"; | ||
160 | }; | ||
161 | |||
162 | usb@23000 { | ||
163 | compatible = "fsl,mpc8536-usb2-mph", "fsl-usb2-mph"; | ||
164 | reg = <0x23000 0x1000>; | ||
165 | #address-cells = <1>; | ||
166 | #size-cells = <0>; | ||
167 | interrupt-parent = <&mpic>; | ||
168 | interrupts = <46 0x2>; | ||
169 | phy_type = "ulpi"; | ||
170 | }; | ||
171 | |||
172 | enet0: ethernet@24000 { | ||
173 | #address-cells = <1>; | ||
174 | #size-cells = <1>; | ||
175 | cell-index = <0>; | ||
176 | device_type = "network"; | ||
177 | model = "eTSEC"; | ||
178 | compatible = "gianfar"; | ||
179 | reg = <0x24000 0x1000>; | ||
180 | ranges = <0x0 0x24000 0x1000>; | ||
181 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
182 | interrupts = <29 2 30 2 34 2>; | ||
183 | interrupt-parent = <&mpic>; | ||
184 | tbi-handle = <&tbi0>; | ||
185 | phy-handle = <&phy1>; | ||
186 | phy-connection-type = "rgmii-id"; | ||
187 | |||
188 | mdio@520 { | ||
189 | #address-cells = <1>; | ||
190 | #size-cells = <0>; | ||
191 | compatible = "fsl,gianfar-mdio"; | ||
192 | reg = <0x520 0x20>; | ||
193 | |||
194 | phy0: ethernet-phy@0 { | ||
195 | interrupt-parent = <&mpic>; | ||
196 | interrupts = <10 0x1>; | ||
197 | reg = <0>; | ||
198 | device_type = "ethernet-phy"; | ||
199 | }; | ||
200 | phy1: ethernet-phy@1 { | ||
201 | interrupt-parent = <&mpic>; | ||
202 | interrupts = <10 0x1>; | ||
203 | reg = <1>; | ||
204 | device_type = "ethernet-phy"; | ||
205 | }; | ||
206 | tbi0: tbi-phy@11 { | ||
207 | reg = <0x11>; | ||
208 | device_type = "tbi-phy"; | ||
209 | }; | ||
210 | }; | ||
211 | }; | ||
212 | |||
213 | enet1: ethernet@26000 { | ||
214 | #address-cells = <1>; | ||
215 | #size-cells = <1>; | ||
216 | cell-index = <1>; | ||
217 | device_type = "network"; | ||
218 | model = "eTSEC"; | ||
219 | compatible = "gianfar"; | ||
220 | reg = <0x26000 0x1000>; | ||
221 | ranges = <0x0 0x26000 0x1000>; | ||
222 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
223 | interrupts = <31 2 32 2 33 2>; | ||
224 | interrupt-parent = <&mpic>; | ||
225 | tbi-handle = <&tbi1>; | ||
226 | phy-handle = <&phy0>; | ||
227 | phy-connection-type = "rgmii-id"; | ||
228 | |||
229 | mdio@520 { | ||
230 | #address-cells = <1>; | ||
231 | #size-cells = <0>; | ||
232 | compatible = "fsl,gianfar-tbi"; | ||
233 | reg = <0x520 0x20>; | ||
234 | |||
235 | tbi1: tbi-phy@11 { | ||
236 | reg = <0x11>; | ||
237 | device_type = "tbi-phy"; | ||
238 | }; | ||
239 | }; | ||
240 | }; | ||
241 | |||
242 | usb@2b000 { | ||
243 | compatible = "fsl,mpc8536-usb2-dr", "fsl-usb2-dr"; | ||
244 | reg = <0x2b000 0x1000>; | ||
245 | #address-cells = <1>; | ||
246 | #size-cells = <0>; | ||
247 | interrupt-parent = <&mpic>; | ||
248 | interrupts = <60 0x2>; | ||
249 | dr_mode = "peripheral"; | ||
250 | phy_type = "ulpi"; | ||
251 | }; | ||
252 | |||
253 | sdhci@2e000 { | ||
254 | compatible = "fsl,mpc8536-esdhc", "fsl,esdhc"; | ||
255 | reg = <0x2e000 0x1000>; | ||
256 | interrupts = <72 0x2>; | ||
257 | interrupt-parent = <&mpic>; | ||
258 | clock-frequency = <250000000>; | ||
259 | }; | ||
260 | |||
261 | serial0: serial@4500 { | ||
262 | cell-index = <0>; | ||
263 | device_type = "serial"; | ||
264 | compatible = "ns16550"; | ||
265 | reg = <0x4500 0x100>; | ||
266 | clock-frequency = <0>; | ||
267 | interrupts = <42 0x2>; | ||
268 | interrupt-parent = <&mpic>; | ||
269 | }; | ||
270 | |||
271 | serial1: serial@4600 { | ||
272 | cell-index = <1>; | ||
273 | device_type = "serial"; | ||
274 | compatible = "ns16550"; | ||
275 | reg = <0x4600 0x100>; | ||
276 | clock-frequency = <0>; | ||
277 | interrupts = <42 0x2>; | ||
278 | interrupt-parent = <&mpic>; | ||
279 | }; | ||
280 | |||
281 | crypto@30000 { | ||
282 | compatible = "fsl,sec3.0", "fsl,sec2.4", "fsl,sec2.2", | ||
283 | "fsl,sec2.1", "fsl,sec2.0"; | ||
284 | reg = <0x30000 0x10000>; | ||
285 | interrupts = <45 2 58 2>; | ||
286 | interrupt-parent = <&mpic>; | ||
287 | fsl,num-channels = <4>; | ||
288 | fsl,channel-fifo-len = <24>; | ||
289 | fsl,exec-units-mask = <0x9fe>; | ||
290 | fsl,descriptor-types-mask = <0x3ab0ebf>; | ||
291 | }; | ||
292 | |||
293 | sata@18000 { | ||
294 | compatible = "fsl,mpc8536-sata", "fsl,pq-sata"; | ||
295 | reg = <0x18000 0x1000>; | ||
296 | cell-index = <1>; | ||
297 | interrupts = <74 0x2>; | ||
298 | interrupt-parent = <&mpic>; | ||
299 | }; | ||
300 | |||
301 | sata@19000 { | ||
302 | compatible = "fsl,mpc8536-sata", "fsl,pq-sata"; | ||
303 | reg = <0x19000 0x1000>; | ||
304 | cell-index = <2>; | ||
305 | interrupts = <41 0x2>; | ||
306 | interrupt-parent = <&mpic>; | ||
307 | }; | ||
308 | |||
309 | global-utilities@e0000 { //global utilities block | ||
310 | compatible = "fsl,mpc8548-guts"; | ||
311 | reg = <0xe0000 0x1000>; | ||
312 | fsl,has-rstcr; | ||
313 | }; | ||
314 | |||
315 | mpic: pic@40000 { | ||
316 | clock-frequency = <0>; | ||
317 | interrupt-controller; | ||
318 | #address-cells = <0>; | ||
319 | #interrupt-cells = <2>; | ||
320 | reg = <0x40000 0x40000>; | ||
321 | compatible = "chrp,open-pic"; | ||
322 | device_type = "open-pic"; | ||
323 | big-endian; | ||
324 | }; | ||
325 | |||
326 | msi@41600 { | ||
327 | compatible = "fsl,mpc8536-msi", "fsl,mpic-msi"; | ||
328 | reg = <0x41600 0x80>; | ||
329 | msi-available-ranges = <0 0x100>; | ||
330 | interrupts = < | ||
331 | 0xe0 0 | ||
332 | 0xe1 0 | ||
333 | 0xe2 0 | ||
334 | 0xe3 0 | ||
335 | 0xe4 0 | ||
336 | 0xe5 0 | ||
337 | 0xe6 0 | ||
338 | 0xe7 0>; | ||
339 | interrupt-parent = <&mpic>; | ||
340 | }; | ||
341 | }; | ||
342 | |||
343 | pci0: pci@fffe08000 { | ||
344 | compatible = "fsl,mpc8540-pci"; | ||
345 | device_type = "pci"; | ||
346 | interrupt-map-mask = <0xf800 0x0 0x0 0x7>; | ||
347 | interrupt-map = < | ||
348 | |||
349 | /* IDSEL 0x11 J17 Slot 1 */ | ||
350 | 0x8800 0 0 1 &mpic 1 1 | ||
351 | 0x8800 0 0 2 &mpic 2 1 | ||
352 | 0x8800 0 0 3 &mpic 3 1 | ||
353 | 0x8800 0 0 4 &mpic 4 1>; | ||
354 | |||
355 | interrupt-parent = <&mpic>; | ||
356 | interrupts = <24 0x2>; | ||
357 | bus-range = <0 0xff>; | ||
358 | ranges = <0x02000000 0 0xf0000000 0xc 0x00000000 0 0x10000000 | ||
359 | 0x01000000 0 0x00000000 0xf 0xffc00000 0 0x00010000>; | ||
360 | clock-frequency = <66666666>; | ||
361 | #interrupt-cells = <1>; | ||
362 | #size-cells = <2>; | ||
363 | #address-cells = <3>; | ||
364 | reg = <0xf 0xffe08000 0 0x1000>; | ||
365 | }; | ||
366 | |||
367 | pci1: pcie@fffe09000 { | ||
368 | compatible = "fsl,mpc8548-pcie"; | ||
369 | device_type = "pci"; | ||
370 | #interrupt-cells = <1>; | ||
371 | #size-cells = <2>; | ||
372 | #address-cells = <3>; | ||
373 | reg = <0xf 0xffe09000 0 0x1000>; | ||
374 | bus-range = <0 0xff>; | ||
375 | ranges = <0x02000000 0 0xf8000000 0xc 0x18000000 0 0x08000000 | ||
376 | 0x01000000 0 0x00000000 0xf 0xffc20000 0 0x00010000>; | ||
377 | clock-frequency = <33333333>; | ||
378 | interrupt-parent = <&mpic>; | ||
379 | interrupts = <25 0x2>; | ||
380 | interrupt-map-mask = <0xf800 0 0 7>; | ||
381 | interrupt-map = < | ||
382 | /* IDSEL 0x0 */ | ||
383 | 0000 0 0 1 &mpic 4 1 | ||
384 | 0000 0 0 2 &mpic 5 1 | ||
385 | 0000 0 0 3 &mpic 6 1 | ||
386 | 0000 0 0 4 &mpic 7 1 | ||
387 | >; | ||
388 | pcie@0 { | ||
389 | reg = <0 0 0 0 0>; | ||
390 | #size-cells = <2>; | ||
391 | #address-cells = <3>; | ||
392 | device_type = "pci"; | ||
393 | ranges = <0x02000000 0 0xf8000000 | ||
394 | 0x02000000 0 0xf8000000 | ||
395 | 0 0x08000000 | ||
396 | |||
397 | 0x01000000 0 0x00000000 | ||
398 | 0x01000000 0 0x00000000 | ||
399 | 0 0x00010000>; | ||
400 | }; | ||
401 | }; | ||
402 | |||
403 | pci2: pcie@fffe0a000 { | ||
404 | compatible = "fsl,mpc8548-pcie"; | ||
405 | device_type = "pci"; | ||
406 | #interrupt-cells = <1>; | ||
407 | #size-cells = <2>; | ||
408 | #address-cells = <3>; | ||
409 | reg = <0xf 0xffe0a000 0 0x1000>; | ||
410 | bus-range = <0 0xff>; | ||
411 | ranges = <0x02000000 0 0xf8000000 0xc 0x10000000 0 0x08000000 | ||
412 | 0x01000000 0 0x00000000 0xf 0xffc10000 0 0x00010000>; | ||
413 | clock-frequency = <33333333>; | ||
414 | interrupt-parent = <&mpic>; | ||
415 | interrupts = <26 0x2>; | ||
416 | interrupt-map-mask = <0xf800 0 0 7>; | ||
417 | interrupt-map = < | ||
418 | /* IDSEL 0x0 */ | ||
419 | 0000 0 0 1 &mpic 0 1 | ||
420 | 0000 0 0 2 &mpic 1 1 | ||
421 | 0000 0 0 3 &mpic 2 1 | ||
422 | 0000 0 0 4 &mpic 3 1 | ||
423 | >; | ||
424 | pcie@0 { | ||
425 | reg = <0 0 0 0 0>; | ||
426 | #size-cells = <2>; | ||
427 | #address-cells = <3>; | ||
428 | device_type = "pci"; | ||
429 | ranges = <0x02000000 0 0xf8000000 | ||
430 | 0x02000000 0 0xf8000000 | ||
431 | 0 0x08000000 | ||
432 | |||
433 | 0x01000000 0 0x00000000 | ||
434 | 0x01000000 0 0x00000000 | ||
435 | 0 0x00010000>; | ||
436 | }; | ||
437 | }; | ||
438 | |||
439 | pci3: pcie@fffe0b000 { | ||
440 | compatible = "fsl,mpc8548-pcie"; | ||
441 | device_type = "pci"; | ||
442 | #interrupt-cells = <1>; | ||
443 | #size-cells = <2>; | ||
444 | #address-cells = <3>; | ||
445 | reg = <0xf 0xffe0b000 0 0x1000>; | ||
446 | bus-range = <0 0xff>; | ||
447 | ranges = <0x02000000 0 0xe0000000 0xc 0x20000000 0 0x20000000 | ||
448 | 0x01000000 0 0x00000000 0xf 0xffc30000 0 0x00010000>; | ||
449 | clock-frequency = <33333333>; | ||
450 | interrupt-parent = <&mpic>; | ||
451 | interrupts = <27 0x2>; | ||
452 | interrupt-map-mask = <0xf800 0 0 7>; | ||
453 | interrupt-map = < | ||
454 | /* IDSEL 0x0 */ | ||
455 | 0000 0 0 1 &mpic 8 1 | ||
456 | 0000 0 0 2 &mpic 9 1 | ||
457 | 0000 0 0 3 &mpic 10 1 | ||
458 | 0000 0 0 4 &mpic 11 1 | ||
459 | >; | ||
460 | |||
461 | pcie@0 { | ||
462 | reg = <0 0 0 0 0>; | ||
463 | #size-cells = <2>; | ||
464 | #address-cells = <3>; | ||
465 | device_type = "pci"; | ||
466 | ranges = <0x02000000 0 0xe0000000 | ||
467 | 0x02000000 0 0xe0000000 | ||
468 | 0 0x20000000 | ||
469 | |||
470 | 0x01000000 0 0x00000000 | ||
471 | 0x01000000 0 0x00000000 | ||
472 | 0 0x00100000>; | ||
473 | }; | ||
474 | }; | ||
475 | }; | ||
diff --git a/arch/powerpc/boot/dts/mpc8548cds.dts b/arch/powerpc/boot/dts/mpc8548cds.dts index 475be1433fe1..4173af387c63 100644 --- a/arch/powerpc/boot/dts/mpc8548cds.dts +++ b/arch/powerpc/boot/dts/mpc8548cds.dts | |||
@@ -100,6 +100,21 @@ | |||
100 | interrupts = <43 2>; | 100 | interrupts = <43 2>; |
101 | interrupt-parent = <&mpic>; | 101 | interrupt-parent = <&mpic>; |
102 | dfsrr; | 102 | dfsrr; |
103 | |||
104 | eeprom@50 { | ||
105 | compatible = "atmel,24c64"; | ||
106 | reg = <0x50>; | ||
107 | }; | ||
108 | |||
109 | eeprom@56 { | ||
110 | compatible = "atmel,24c64"; | ||
111 | reg = <0x56>; | ||
112 | }; | ||
113 | |||
114 | eeprom@57 { | ||
115 | compatible = "atmel,24c64"; | ||
116 | reg = <0x57>; | ||
117 | }; | ||
103 | }; | 118 | }; |
104 | 119 | ||
105 | i2c@3100 { | 120 | i2c@3100 { |
@@ -111,6 +126,11 @@ | |||
111 | interrupts = <43 2>; | 126 | interrupts = <43 2>; |
112 | interrupt-parent = <&mpic>; | 127 | interrupt-parent = <&mpic>; |
113 | dfsrr; | 128 | dfsrr; |
129 | |||
130 | eeprom@50 { | ||
131 | compatible = "atmel,24c64"; | ||
132 | reg = <0x50>; | ||
133 | }; | ||
114 | }; | 134 | }; |
115 | 135 | ||
116 | dma@21300 { | 136 | dma@21300 { |
diff --git a/arch/powerpc/boot/dts/mpc8569mds.dts b/arch/powerpc/boot/dts/mpc8569mds.dts index 9e4ce99e1613..06332d61830a 100644 --- a/arch/powerpc/boot/dts/mpc8569mds.dts +++ b/arch/powerpc/boot/dts/mpc8569mds.dts | |||
@@ -99,8 +99,18 @@ | |||
99 | }; | 99 | }; |
100 | 100 | ||
101 | bcsr@1,0 { | 101 | bcsr@1,0 { |
102 | #address-cells = <1>; | ||
103 | #size-cells = <1>; | ||
102 | compatible = "fsl,mpc8569mds-bcsr"; | 104 | compatible = "fsl,mpc8569mds-bcsr"; |
103 | reg = <1 0 0x8000>; | 105 | reg = <1 0 0x8000>; |
106 | ranges = <0 1 0 0x8000>; | ||
107 | |||
108 | bcsr17: gpio-controller@11 { | ||
109 | #gpio-cells = <2>; | ||
110 | compatible = "fsl,mpc8569mds-bcsr-gpio"; | ||
111 | reg = <0x11 0x1>; | ||
112 | gpio-controller; | ||
113 | }; | ||
104 | }; | 114 | }; |
105 | 115 | ||
106 | nand@3,0 { | 116 | nand@3,0 { |
@@ -315,6 +325,14 @@ | |||
315 | gpio-controller; | 325 | gpio-controller; |
316 | }; | 326 | }; |
317 | 327 | ||
328 | qe_pio_f: gpio-controller@a0 { | ||
329 | #gpio-cells = <2>; | ||
330 | compatible = "fsl,mpc8569-qe-pario-bank", | ||
331 | "fsl,mpc8323-qe-pario-bank"; | ||
332 | reg = <0xa0 0x18>; | ||
333 | gpio-controller; | ||
334 | }; | ||
335 | |||
318 | pio1: ucc_pin@01 { | 336 | pio1: ucc_pin@01 { |
319 | pio-map = < | 337 | pio-map = < |
320 | /* port pin dir open_drain assignment has_irq */ | 338 | /* port pin dir open_drain assignment has_irq */ |
@@ -419,6 +437,16 @@ | |||
419 | interrupt-parent = <&mpic>; | 437 | interrupt-parent = <&mpic>; |
420 | }; | 438 | }; |
421 | 439 | ||
440 | timer@440 { | ||
441 | compatible = "fsl,mpc8569-qe-gtm", | ||
442 | "fsl,qe-gtm", "fsl,gtm"; | ||
443 | reg = <0x440 0x40>; | ||
444 | interrupts = <12 13 14 15>; | ||
445 | interrupt-parent = <&qeic>; | ||
446 | /* Filled in by U-Boot */ | ||
447 | clock-frequency = <0>; | ||
448 | }; | ||
449 | |||
422 | spi@4c0 { | 450 | spi@4c0 { |
423 | #address-cells = <1>; | 451 | #address-cells = <1>; |
424 | #size-cells = <0>; | 452 | #size-cells = <0>; |
@@ -446,6 +474,23 @@ | |||
446 | mode = "cpu"; | 474 | mode = "cpu"; |
447 | }; | 475 | }; |
448 | 476 | ||
477 | usb@6c0 { | ||
478 | compatible = "fsl,mpc8569-qe-usb", | ||
479 | "fsl,mpc8323-qe-usb"; | ||
480 | reg = <0x6c0 0x40 0x8b00 0x100>; | ||
481 | interrupts = <11>; | ||
482 | interrupt-parent = <&qeic>; | ||
483 | fsl,fullspeed-clock = "clk5"; | ||
484 | fsl,lowspeed-clock = "brg10"; | ||
485 | gpios = <&qe_pio_f 3 0 /* USBOE */ | ||
486 | &qe_pio_f 4 0 /* USBTP */ | ||
487 | &qe_pio_f 5 0 /* USBTN */ | ||
488 | &qe_pio_f 6 0 /* USBRP */ | ||
489 | &qe_pio_f 8 0 /* USBRN */ | ||
490 | &bcsr17 6 0 /* SPEED */ | ||
491 | &bcsr17 5 1>; /* POWER */ | ||
492 | }; | ||
493 | |||
449 | enet0: ucc@2000 { | 494 | enet0: ucc@2000 { |
450 | device_type = "network"; | 495 | device_type = "network"; |
451 | compatible = "ucc_geth"; | 496 | compatible = "ucc_geth"; |
diff --git a/arch/powerpc/boot/dts/p2020rdb.dts b/arch/powerpc/boot/dts/p2020rdb.dts new file mode 100644 index 000000000000..da4cb0d8d215 --- /dev/null +++ b/arch/powerpc/boot/dts/p2020rdb.dts | |||
@@ -0,0 +1,586 @@ | |||
1 | /* | ||
2 | * P2020 RDB Device Tree Source | ||
3 | * | ||
4 | * Copyright 2009 Freescale Semiconductor Inc. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the | ||
8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
9 | * option) any later version. | ||
10 | */ | ||
11 | |||
12 | /dts-v1/; | ||
13 | / { | ||
14 | model = "fsl,P2020"; | ||
15 | compatible = "fsl,P2020RDB"; | ||
16 | #address-cells = <2>; | ||
17 | #size-cells = <2>; | ||
18 | |||
19 | aliases { | ||
20 | ethernet0 = &enet0; | ||
21 | ethernet1 = &enet1; | ||
22 | ethernet2 = &enet2; | ||
23 | serial0 = &serial0; | ||
24 | serial1 = &serial1; | ||
25 | pci0 = &pci0; | ||
26 | pci1 = &pci1; | ||
27 | }; | ||
28 | |||
29 | cpus { | ||
30 | #address-cells = <1>; | ||
31 | #size-cells = <0>; | ||
32 | |||
33 | PowerPC,P2020@0 { | ||
34 | device_type = "cpu"; | ||
35 | reg = <0x0>; | ||
36 | next-level-cache = <&L2>; | ||
37 | }; | ||
38 | |||
39 | PowerPC,P2020@1 { | ||
40 | device_type = "cpu"; | ||
41 | reg = <0x1>; | ||
42 | next-level-cache = <&L2>; | ||
43 | }; | ||
44 | }; | ||
45 | |||
46 | memory { | ||
47 | device_type = "memory"; | ||
48 | }; | ||
49 | |||
50 | localbus@ffe05000 { | ||
51 | #address-cells = <2>; | ||
52 | #size-cells = <1>; | ||
53 | compatible = "fsl,p2020-elbc", "fsl,elbc", "simple-bus"; | ||
54 | reg = <0 0xffe05000 0 0x1000>; | ||
55 | interrupts = <19 2>; | ||
56 | interrupt-parent = <&mpic>; | ||
57 | |||
58 | /* NOR and NAND Flashes */ | ||
59 | ranges = <0x0 0x0 0x0 0xef000000 0x01000000 | ||
60 | 0x1 0x0 0x0 0xffa00000 0x00040000 | ||
61 | 0x2 0x0 0x0 0xffb00000 0x00020000>; | ||
62 | |||
63 | nor@0,0 { | ||
64 | #address-cells = <1>; | ||
65 | #size-cells = <1>; | ||
66 | compatible = "cfi-flash"; | ||
67 | reg = <0x0 0x0 0x1000000>; | ||
68 | bank-width = <2>; | ||
69 | device-width = <1>; | ||
70 | |||
71 | partition@0 { | ||
72 | /* This location must not be altered */ | ||
73 | /* 256KB for Vitesse 7385 Switch firmware */ | ||
74 | reg = <0x0 0x00040000>; | ||
75 | label = "NOR (RO) Vitesse-7385 Firmware"; | ||
76 | read-only; | ||
77 | }; | ||
78 | |||
79 | partition@40000 { | ||
80 | /* 256KB for DTB Image */ | ||
81 | reg = <0x00040000 0x00040000>; | ||
82 | label = "NOR (RO) DTB Image"; | ||
83 | read-only; | ||
84 | }; | ||
85 | |||
86 | partition@80000 { | ||
87 | /* 3.5 MB for Linux Kernel Image */ | ||
88 | reg = <0x00080000 0x00380000>; | ||
89 | label = "NOR (RO) Linux Kernel Image"; | ||
90 | read-only; | ||
91 | }; | ||
92 | |||
93 | partition@400000 { | ||
94 | /* 11MB for JFFS2 based Root file System */ | ||
95 | reg = <0x00400000 0x00b00000>; | ||
96 | label = "NOR (RW) JFFS2 Root File System"; | ||
97 | }; | ||
98 | |||
99 | partition@f00000 { | ||
100 | /* This location must not be altered */ | ||
101 | /* 512KB for u-boot Bootloader Image */ | ||
102 | /* 512KB for u-boot Environment Variables */ | ||
103 | reg = <0x00f00000 0x00100000>; | ||
104 | label = "NOR (RO) U-Boot Image"; | ||
105 | read-only; | ||
106 | }; | ||
107 | }; | ||
108 | |||
109 | nand@1,0 { | ||
110 | #address-cells = <1>; | ||
111 | #size-cells = <1>; | ||
112 | compatible = "fsl,p2020-fcm-nand", | ||
113 | "fsl,elbc-fcm-nand"; | ||
114 | reg = <0x1 0x0 0x40000>; | ||
115 | |||
116 | partition@0 { | ||
117 | /* This location must not be altered */ | ||
118 | /* 1MB for u-boot Bootloader Image */ | ||
119 | reg = <0x0 0x00100000>; | ||
120 | label = "NAND (RO) U-Boot Image"; | ||
121 | read-only; | ||
122 | }; | ||
123 | |||
124 | partition@100000 { | ||
125 | /* 1MB for DTB Image */ | ||
126 | reg = <0x00100000 0x00100000>; | ||
127 | label = "NAND (RO) DTB Image"; | ||
128 | read-only; | ||
129 | }; | ||
130 | |||
131 | partition@200000 { | ||
132 | /* 4MB for Linux Kernel Image */ | ||
133 | reg = <0x00200000 0x00400000>; | ||
134 | label = "NAND (RO) Linux Kernel Image"; | ||
135 | read-only; | ||
136 | }; | ||
137 | |||
138 | partition@600000 { | ||
139 | /* 4MB for Compressed Root file System Image */ | ||
140 | reg = <0x00600000 0x00400000>; | ||
141 | label = "NAND (RO) Compressed RFS Image"; | ||
142 | read-only; | ||
143 | }; | ||
144 | |||
145 | partition@a00000 { | ||
146 | /* 7MB for JFFS2 based Root file System */ | ||
147 | reg = <0x00a00000 0x00700000>; | ||
148 | label = "NAND (RW) JFFS2 Root File System"; | ||
149 | }; | ||
150 | |||
151 | partition@1100000 { | ||
152 | /* 15MB for JFFS2 based Root file System */ | ||
153 | reg = <0x01100000 0x00f00000>; | ||
154 | label = "NAND (RW) Writable User area"; | ||
155 | }; | ||
156 | }; | ||
157 | |||
158 | L2switch@2,0 { | ||
159 | #address-cells = <1>; | ||
160 | #size-cells = <1>; | ||
161 | compatible = "vitesse-7385"; | ||
162 | reg = <0x2 0x0 0x20000>; | ||
163 | }; | ||
164 | |||
165 | }; | ||
166 | |||
167 | soc@ffe00000 { | ||
168 | #address-cells = <1>; | ||
169 | #size-cells = <1>; | ||
170 | device_type = "soc"; | ||
171 | compatible = "fsl,p2020-immr", "simple-bus"; | ||
172 | ranges = <0x0 0x0 0xffe00000 0x100000>; | ||
173 | bus-frequency = <0>; // Filled out by uboot. | ||
174 | |||
175 | ecm-law@0 { | ||
176 | compatible = "fsl,ecm-law"; | ||
177 | reg = <0x0 0x1000>; | ||
178 | fsl,num-laws = <12>; | ||
179 | }; | ||
180 | |||
181 | ecm@1000 { | ||
182 | compatible = "fsl,p2020-ecm", "fsl,ecm"; | ||
183 | reg = <0x1000 0x1000>; | ||
184 | interrupts = <17 2>; | ||
185 | interrupt-parent = <&mpic>; | ||
186 | }; | ||
187 | |||
188 | memory-controller@2000 { | ||
189 | compatible = "fsl,p2020-memory-controller"; | ||
190 | reg = <0x2000 0x1000>; | ||
191 | interrupt-parent = <&mpic>; | ||
192 | interrupts = <18 2>; | ||
193 | }; | ||
194 | |||
195 | i2c@3000 { | ||
196 | #address-cells = <1>; | ||
197 | #size-cells = <0>; | ||
198 | cell-index = <0>; | ||
199 | compatible = "fsl-i2c"; | ||
200 | reg = <0x3000 0x100>; | ||
201 | interrupts = <43 2>; | ||
202 | interrupt-parent = <&mpic>; | ||
203 | dfsrr; | ||
204 | rtc@68 { | ||
205 | compatible = "dallas,ds1339"; | ||
206 | reg = <0x68>; | ||
207 | }; | ||
208 | }; | ||
209 | |||
210 | i2c@3100 { | ||
211 | #address-cells = <1>; | ||
212 | #size-cells = <0>; | ||
213 | cell-index = <1>; | ||
214 | compatible = "fsl-i2c"; | ||
215 | reg = <0x3100 0x100>; | ||
216 | interrupts = <43 2>; | ||
217 | interrupt-parent = <&mpic>; | ||
218 | dfsrr; | ||
219 | }; | ||
220 | |||
221 | serial0: serial@4500 { | ||
222 | cell-index = <0>; | ||
223 | device_type = "serial"; | ||
224 | compatible = "ns16550"; | ||
225 | reg = <0x4500 0x100>; | ||
226 | clock-frequency = <0>; | ||
227 | interrupts = <42 2>; | ||
228 | interrupt-parent = <&mpic>; | ||
229 | }; | ||
230 | |||
231 | serial1: serial@4600 { | ||
232 | cell-index = <1>; | ||
233 | device_type = "serial"; | ||
234 | compatible = "ns16550"; | ||
235 | reg = <0x4600 0x100>; | ||
236 | clock-frequency = <0>; | ||
237 | interrupts = <42 2>; | ||
238 | interrupt-parent = <&mpic>; | ||
239 | }; | ||
240 | |||
241 | spi@7000 { | ||
242 | cell-index = <0>; | ||
243 | #address-cells = <1>; | ||
244 | #size-cells = <0>; | ||
245 | compatible = "fsl,espi"; | ||
246 | reg = <0x7000 0x1000>; | ||
247 | interrupts = <59 0x2>; | ||
248 | interrupt-parent = <&mpic>; | ||
249 | mode = "cpu"; | ||
250 | |||
251 | fsl_m25p80@0 { | ||
252 | #address-cells = <1>; | ||
253 | #size-cells = <1>; | ||
254 | compatible = "fsl,espi-flash"; | ||
255 | reg = <0>; | ||
256 | linux,modalias = "fsl_m25p80"; | ||
257 | modal = "s25sl128b"; | ||
258 | spi-max-frequency = <50000000>; | ||
259 | mode = <0>; | ||
260 | |||
261 | partition@0 { | ||
262 | /* 512KB for u-boot Bootloader Image */ | ||
263 | reg = <0x0 0x00080000>; | ||
264 | label = "SPI (RO) U-Boot Image"; | ||
265 | read-only; | ||
266 | }; | ||
267 | |||
268 | partition@80000 { | ||
269 | /* 512KB for DTB Image */ | ||
270 | reg = <0x00080000 0x00080000>; | ||
271 | label = "SPI (RO) DTB Image"; | ||
272 | read-only; | ||
273 | }; | ||
274 | |||
275 | partition@100000 { | ||
276 | /* 4MB for Linux Kernel Image */ | ||
277 | reg = <0x00100000 0x00400000>; | ||
278 | label = "SPI (RO) Linux Kernel Image"; | ||
279 | read-only; | ||
280 | }; | ||
281 | |||
282 | partition@500000 { | ||
283 | /* 4MB for Compressed RFS Image */ | ||
284 | reg = <0x00500000 0x00400000>; | ||
285 | label = "SPI (RO) Compressed RFS Image"; | ||
286 | read-only; | ||
287 | }; | ||
288 | |||
289 | partition@900000 { | ||
290 | /* 7MB for JFFS2 based RFS */ | ||
291 | reg = <0x00900000 0x00700000>; | ||
292 | label = "SPI (RW) JFFS2 RFS"; | ||
293 | }; | ||
294 | }; | ||
295 | }; | ||
296 | |||
297 | dma@c300 { | ||
298 | #address-cells = <1>; | ||
299 | #size-cells = <1>; | ||
300 | compatible = "fsl,eloplus-dma"; | ||
301 | reg = <0xc300 0x4>; | ||
302 | ranges = <0x0 0xc100 0x200>; | ||
303 | cell-index = <1>; | ||
304 | dma-channel@0 { | ||
305 | compatible = "fsl,eloplus-dma-channel"; | ||
306 | reg = <0x0 0x80>; | ||
307 | cell-index = <0>; | ||
308 | interrupt-parent = <&mpic>; | ||
309 | interrupts = <76 2>; | ||
310 | }; | ||
311 | dma-channel@80 { | ||
312 | compatible = "fsl,eloplus-dma-channel"; | ||
313 | reg = <0x80 0x80>; | ||
314 | cell-index = <1>; | ||
315 | interrupt-parent = <&mpic>; | ||
316 | interrupts = <77 2>; | ||
317 | }; | ||
318 | dma-channel@100 { | ||
319 | compatible = "fsl,eloplus-dma-channel"; | ||
320 | reg = <0x100 0x80>; | ||
321 | cell-index = <2>; | ||
322 | interrupt-parent = <&mpic>; | ||
323 | interrupts = <78 2>; | ||
324 | }; | ||
325 | dma-channel@180 { | ||
326 | compatible = "fsl,eloplus-dma-channel"; | ||
327 | reg = <0x180 0x80>; | ||
328 | cell-index = <3>; | ||
329 | interrupt-parent = <&mpic>; | ||
330 | interrupts = <79 2>; | ||
331 | }; | ||
332 | }; | ||
333 | |||
334 | gpio: gpio-controller@f000 { | ||
335 | #gpio-cells = <2>; | ||
336 | compatible = "fsl,mpc8572-gpio"; | ||
337 | reg = <0xf000 0x100>; | ||
338 | interrupts = <47 0x2>; | ||
339 | interrupt-parent = <&mpic>; | ||
340 | gpio-controller; | ||
341 | }; | ||
342 | |||
343 | L2: l2-cache-controller@20000 { | ||
344 | compatible = "fsl,p2020-l2-cache-controller"; | ||
345 | reg = <0x20000 0x1000>; | ||
346 | cache-line-size = <32>; // 32 bytes | ||
347 | cache-size = <0x80000>; // L2,512K | ||
348 | interrupt-parent = <&mpic>; | ||
349 | interrupts = <16 2>; | ||
350 | }; | ||
351 | |||
352 | dma@21300 { | ||
353 | #address-cells = <1>; | ||
354 | #size-cells = <1>; | ||
355 | compatible = "fsl,eloplus-dma"; | ||
356 | reg = <0x21300 0x4>; | ||
357 | ranges = <0x0 0x21100 0x200>; | ||
358 | cell-index = <0>; | ||
359 | dma-channel@0 { | ||
360 | compatible = "fsl,eloplus-dma-channel"; | ||
361 | reg = <0x0 0x80>; | ||
362 | cell-index = <0>; | ||
363 | interrupt-parent = <&mpic>; | ||
364 | interrupts = <20 2>; | ||
365 | }; | ||
366 | dma-channel@80 { | ||
367 | compatible = "fsl,eloplus-dma-channel"; | ||
368 | reg = <0x80 0x80>; | ||
369 | cell-index = <1>; | ||
370 | interrupt-parent = <&mpic>; | ||
371 | interrupts = <21 2>; | ||
372 | }; | ||
373 | dma-channel@100 { | ||
374 | compatible = "fsl,eloplus-dma-channel"; | ||
375 | reg = <0x100 0x80>; | ||
376 | cell-index = <2>; | ||
377 | interrupt-parent = <&mpic>; | ||
378 | interrupts = <22 2>; | ||
379 | }; | ||
380 | dma-channel@180 { | ||
381 | compatible = "fsl,eloplus-dma-channel"; | ||
382 | reg = <0x180 0x80>; | ||
383 | cell-index = <3>; | ||
384 | interrupt-parent = <&mpic>; | ||
385 | interrupts = <23 2>; | ||
386 | }; | ||
387 | }; | ||
388 | |||
389 | usb@22000 { | ||
390 | #address-cells = <1>; | ||
391 | #size-cells = <0>; | ||
392 | compatible = "fsl-usb2-dr"; | ||
393 | reg = <0x22000 0x1000>; | ||
394 | interrupt-parent = <&mpic>; | ||
395 | interrupts = <28 0x2>; | ||
396 | phy_type = "ulpi"; | ||
397 | }; | ||
398 | |||
399 | enet0: ethernet@24000 { | ||
400 | #address-cells = <1>; | ||
401 | #size-cells = <1>; | ||
402 | cell-index = <0>; | ||
403 | device_type = "network"; | ||
404 | model = "eTSEC"; | ||
405 | compatible = "gianfar"; | ||
406 | reg = <0x24000 0x1000>; | ||
407 | ranges = <0x0 0x24000 0x1000>; | ||
408 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
409 | interrupts = <29 2 30 2 34 2>; | ||
410 | interrupt-parent = <&mpic>; | ||
411 | fixed-link = <1 1 1000 0 0>; | ||
412 | phy-connection-type = "rgmii-id"; | ||
413 | |||
414 | mdio@520 { | ||
415 | #address-cells = <1>; | ||
416 | #size-cells = <0>; | ||
417 | compatible = "fsl,gianfar-mdio"; | ||
418 | reg = <0x520 0x20>; | ||
419 | |||
420 | phy0: ethernet-phy@0 { | ||
421 | interrupt-parent = <&mpic>; | ||
422 | interrupts = <3 1>; | ||
423 | reg = <0x0>; | ||
424 | }; | ||
425 | phy1: ethernet-phy@1 { | ||
426 | interrupt-parent = <&mpic>; | ||
427 | interrupts = <3 1>; | ||
428 | reg = <0x1>; | ||
429 | }; | ||
430 | }; | ||
431 | }; | ||
432 | |||
433 | enet1: ethernet@25000 { | ||
434 | #address-cells = <1>; | ||
435 | #size-cells = <1>; | ||
436 | cell-index = <1>; | ||
437 | device_type = "network"; | ||
438 | model = "eTSEC"; | ||
439 | compatible = "gianfar"; | ||
440 | reg = <0x25000 0x1000>; | ||
441 | ranges = <0x0 0x25000 0x1000>; | ||
442 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
443 | interrupts = <35 2 36 2 40 2>; | ||
444 | interrupt-parent = <&mpic>; | ||
445 | tbi-handle = <&tbi0>; | ||
446 | phy-handle = <&phy0>; | ||
447 | phy-connection-type = "sgmii"; | ||
448 | |||
449 | mdio@520 { | ||
450 | #address-cells = <1>; | ||
451 | #size-cells = <0>; | ||
452 | compatible = "fsl,gianfar-tbi"; | ||
453 | reg = <0x520 0x20>; | ||
454 | |||
455 | tbi0: tbi-phy@11 { | ||
456 | reg = <0x11>; | ||
457 | device_type = "tbi-phy"; | ||
458 | }; | ||
459 | }; | ||
460 | }; | ||
461 | |||
462 | enet2: ethernet@26000 { | ||
463 | #address-cells = <1>; | ||
464 | #size-cells = <1>; | ||
465 | cell-index = <2>; | ||
466 | device_type = "network"; | ||
467 | model = "eTSEC"; | ||
468 | compatible = "gianfar"; | ||
469 | reg = <0x26000 0x1000>; | ||
470 | ranges = <0x0 0x26000 0x1000>; | ||
471 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
472 | interrupts = <31 2 32 2 33 2>; | ||
473 | interrupt-parent = <&mpic>; | ||
474 | phy-handle = <&phy1>; | ||
475 | phy-connection-type = "rgmii-id"; | ||
476 | }; | ||
477 | |||
478 | sdhci@2e000 { | ||
479 | compatible = "fsl,p2020-esdhc", "fsl,esdhc"; | ||
480 | reg = <0x2e000 0x1000>; | ||
481 | interrupts = <72 0x2>; | ||
482 | interrupt-parent = <&mpic>; | ||
483 | /* Filled in by U-Boot */ | ||
484 | clock-frequency = <0>; | ||
485 | }; | ||
486 | |||
487 | crypto@30000 { | ||
488 | compatible = "fsl,sec3.1", "fsl,sec3.0", "fsl,sec2.4", | ||
489 | "fsl,sec2.2", "fsl,sec2.1", "fsl,sec2.0"; | ||
490 | reg = <0x30000 0x10000>; | ||
491 | interrupts = <45 2 58 2>; | ||
492 | interrupt-parent = <&mpic>; | ||
493 | fsl,num-channels = <4>; | ||
494 | fsl,channel-fifo-len = <24>; | ||
495 | fsl,exec-units-mask = <0xbfe>; | ||
496 | fsl,descriptor-types-mask = <0x3ab0ebf>; | ||
497 | }; | ||
498 | |||
499 | mpic: pic@40000 { | ||
500 | interrupt-controller; | ||
501 | #address-cells = <0>; | ||
502 | #interrupt-cells = <2>; | ||
503 | reg = <0x40000 0x40000>; | ||
504 | compatible = "chrp,open-pic"; | ||
505 | device_type = "open-pic"; | ||
506 | }; | ||
507 | |||
508 | msi@41600 { | ||
509 | compatible = "fsl,p2020-msi", "fsl,mpic-msi"; | ||
510 | reg = <0x41600 0x80>; | ||
511 | msi-available-ranges = <0 0x100>; | ||
512 | interrupts = < | ||
513 | 0xe0 0 | ||
514 | 0xe1 0 | ||
515 | 0xe2 0 | ||
516 | 0xe3 0 | ||
517 | 0xe4 0 | ||
518 | 0xe5 0 | ||
519 | 0xe6 0 | ||
520 | 0xe7 0>; | ||
521 | interrupt-parent = <&mpic>; | ||
522 | }; | ||
523 | |||
524 | global-utilities@e0000 { //global utilities block | ||
525 | compatible = "fsl,p2020-guts"; | ||
526 | reg = <0xe0000 0x1000>; | ||
527 | fsl,has-rstcr; | ||
528 | }; | ||
529 | }; | ||
530 | |||
531 | pci0: pcie@ffe09000 { | ||
532 | compatible = "fsl,mpc8548-pcie"; | ||
533 | device_type = "pci"; | ||
534 | #interrupt-cells = <1>; | ||
535 | #size-cells = <2>; | ||
536 | #address-cells = <3>; | ||
537 | reg = <0 0xffe09000 0 0x1000>; | ||
538 | bus-range = <0 255>; | ||
539 | ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000 | ||
540 | 0x1000000 0x0 0x00000000 0 0xffc30000 0x0 0x10000>; | ||
541 | clock-frequency = <33333333>; | ||
542 | interrupt-parent = <&mpic>; | ||
543 | interrupts = <25 2>; | ||
544 | pcie@0 { | ||
545 | reg = <0x0 0x0 0x0 0x0 0x0>; | ||
546 | #size-cells = <2>; | ||
547 | #address-cells = <3>; | ||
548 | device_type = "pci"; | ||
549 | ranges = <0x2000000 0x0 0xa0000000 | ||
550 | 0x2000000 0x0 0xa0000000 | ||
551 | 0x0 0x20000000 | ||
552 | |||
553 | 0x1000000 0x0 0x0 | ||
554 | 0x1000000 0x0 0x0 | ||
555 | 0x0 0x100000>; | ||
556 | }; | ||
557 | }; | ||
558 | |||
559 | pci1: pcie@ffe0a000 { | ||
560 | compatible = "fsl,mpc8548-pcie"; | ||
561 | device_type = "pci"; | ||
562 | #interrupt-cells = <1>; | ||
563 | #size-cells = <2>; | ||
564 | #address-cells = <3>; | ||
565 | reg = <0 0xffe0a000 0 0x1000>; | ||
566 | bus-range = <0 255>; | ||
567 | ranges = <0x2000000 0x0 0xc0000000 0 0xc0000000 0x0 0x20000000 | ||
568 | 0x1000000 0x0 0x00000000 0 0xffc20000 0x0 0x10000>; | ||
569 | clock-frequency = <33333333>; | ||
570 | interrupt-parent = <&mpic>; | ||
571 | interrupts = <26 2>; | ||
572 | pcie@0 { | ||
573 | reg = <0x0 0x0 0x0 0x0 0x0>; | ||
574 | #size-cells = <2>; | ||
575 | #address-cells = <3>; | ||
576 | device_type = "pci"; | ||
577 | ranges = <0x2000000 0x0 0xc0000000 | ||
578 | 0x2000000 0x0 0xc0000000 | ||
579 | 0x0 0x20000000 | ||
580 | |||
581 | 0x1000000 0x0 0x0 | ||
582 | 0x1000000 0x0 0x0 | ||
583 | 0x0 0x100000>; | ||
584 | }; | ||
585 | }; | ||
586 | }; | ||
diff --git a/arch/powerpc/boot/dts/sbc8349.dts b/arch/powerpc/boot/dts/sbc8349.dts index 2d9fa68f641c..0dc90f9bd814 100644 --- a/arch/powerpc/boot/dts/sbc8349.dts +++ b/arch/powerpc/boot/dts/sbc8349.dts | |||
@@ -146,18 +146,6 @@ | |||
146 | phy_type = "ulpi"; | 146 | phy_type = "ulpi"; |
147 | port0; | 147 | port0; |
148 | }; | 148 | }; |
149 | /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */ | ||
150 | usb@23000 { | ||
151 | device_type = "usb"; | ||
152 | compatible = "fsl-usb2-dr"; | ||
153 | reg = <0x23000 0x1000>; | ||
154 | #address-cells = <1>; | ||
155 | #size-cells = <0>; | ||
156 | interrupt-parent = <&ipic>; | ||
157 | interrupts = <38 0x8>; | ||
158 | dr_mode = "otg"; | ||
159 | phy_type = "ulpi"; | ||
160 | }; | ||
161 | 149 | ||
162 | enet0: ethernet@24000 { | 150 | enet0: ethernet@24000 { |
163 | #address-cells = <1>; | 151 | #address-cells = <1>; |
@@ -277,15 +265,55 @@ | |||
277 | }; | 265 | }; |
278 | }; | 266 | }; |
279 | 267 | ||
268 | localbus@e0005000 { | ||
269 | #address-cells = <2>; | ||
270 | #size-cells = <1>; | ||
271 | compatible = "fsl,mpc8349-localbus", "simple-bus"; | ||
272 | reg = <0xe0005000 0x1000>; | ||
273 | interrupts = <77 0x8>; | ||
274 | interrupt-parent = <&ipic>; | ||
275 | ranges = <0x0 0x0 0xff800000 0x00800000 /* 8MB Flash */ | ||
276 | 0x1 0x0 0xf8000000 0x00002000 /* 8KB EEPROM */ | ||
277 | 0x2 0x0 0x10000000 0x04000000 /* 64MB SDRAM */ | ||
278 | 0x3 0x0 0x10000000 0x04000000>; /* 64MB SDRAM */ | ||
279 | |||
280 | flash@0,0 { | ||
281 | #address-cells = <1>; | ||
282 | #size-cells = <1>; | ||
283 | compatible = "intel,28F640J3A", "cfi-flash"; | ||
284 | reg = <0x0 0x0 0x800000>; | ||
285 | bank-width = <2>; | ||
286 | device-width = <1>; | ||
287 | |||
288 | partition@0 { | ||
289 | label = "u-boot"; | ||
290 | reg = <0x00000000 0x00040000>; | ||
291 | read-only; | ||
292 | }; | ||
293 | |||
294 | partition@40000 { | ||
295 | label = "user"; | ||
296 | reg = <0x00040000 0x006c0000>; | ||
297 | }; | ||
298 | |||
299 | partition@700000 { | ||
300 | label = "legacy u-boot"; | ||
301 | reg = <0x00700000 0x00100000>; | ||
302 | read-only; | ||
303 | }; | ||
304 | |||
305 | }; | ||
306 | }; | ||
307 | |||
280 | pci0: pci@e0008500 { | 308 | pci0: pci@e0008500 { |
281 | interrupt-map-mask = <0xf800 0x0 0x0 0x7>; | 309 | interrupt-map-mask = <0xf800 0x0 0x0 0x7>; |
282 | interrupt-map = < | 310 | interrupt-map = < |
283 | 311 | ||
284 | /* IDSEL 0x11 */ | 312 | /* IDSEL 0x11 */ |
285 | 0x8800 0x0 0x0 0x1 &ipic 20 0x8 | 313 | 0x8800 0x0 0x0 0x1 &ipic 48 0x8 |
286 | 0x8800 0x0 0x0 0x2 &ipic 21 0x8 | 314 | 0x8800 0x0 0x0 0x2 &ipic 17 0x8 |
287 | 0x8800 0x0 0x0 0x3 &ipic 22 0x8 | 315 | 0x8800 0x0 0x0 0x3 &ipic 18 0x8 |
288 | 0x8800 0x0 0x0 0x4 &ipic 23 0x8>; | 316 | 0x8800 0x0 0x0 0x4 &ipic 19 0x8>; |
289 | 317 | ||
290 | interrupt-parent = <&ipic>; | 318 | interrupt-parent = <&ipic>; |
291 | interrupts = <0x42 0x8>; | 319 | interrupts = <0x42 0x8>; |
diff --git a/arch/powerpc/boot/dts/sbc8560.dts b/arch/powerpc/boot/dts/sbc8560.dts index 239d57a55cf4..9e13ed8a1193 100644 --- a/arch/powerpc/boot/dts/sbc8560.dts +++ b/arch/powerpc/boot/dts/sbc8560.dts | |||
@@ -303,7 +303,6 @@ | |||
303 | global-utilities@e0000 { | 303 | global-utilities@e0000 { |
304 | compatible = "fsl,mpc8560-guts"; | 304 | compatible = "fsl,mpc8560-guts"; |
305 | reg = <0xe0000 0x1000>; | 305 | reg = <0xe0000 0x1000>; |
306 | fsl,has-rstcr; | ||
307 | }; | 306 | }; |
308 | }; | 307 | }; |
309 | 308 | ||
diff --git a/arch/powerpc/boot/mktree.c b/arch/powerpc/boot/mktree.c index c2baae0a3d89..e2ae24340fc8 100644 --- a/arch/powerpc/boot/mktree.c +++ b/arch/powerpc/boot/mktree.c | |||
@@ -36,7 +36,7 @@ typedef struct boot_block { | |||
36 | } boot_block_t; | 36 | } boot_block_t; |
37 | 37 | ||
38 | #define IMGBLK 512 | 38 | #define IMGBLK 512 |
39 | char tmpbuf[IMGBLK]; | 39 | unsigned int tmpbuf[IMGBLK / sizeof(unsigned int)]; |
40 | 40 | ||
41 | int main(int argc, char *argv[]) | 41 | int main(int argc, char *argv[]) |
42 | { | 42 | { |
@@ -95,13 +95,13 @@ int main(int argc, char *argv[]) | |||
95 | 95 | ||
96 | /* Assume zImage is an ELF file, and skip the 64K header. | 96 | /* Assume zImage is an ELF file, and skip the 64K header. |
97 | */ | 97 | */ |
98 | if (read(in_fd, tmpbuf, IMGBLK) != IMGBLK) { | 98 | if (read(in_fd, tmpbuf, sizeof(tmpbuf)) != sizeof(tmpbuf)) { |
99 | fprintf(stderr, "%s is too small to be an ELF image\n", | 99 | fprintf(stderr, "%s is too small to be an ELF image\n", |
100 | argv[1]); | 100 | argv[1]); |
101 | exit(4); | 101 | exit(4); |
102 | } | 102 | } |
103 | 103 | ||
104 | if ((*(unsigned int *)tmpbuf) != htonl(0x7f454c46)) { | 104 | if (tmpbuf[0] != htonl(0x7f454c46)) { |
105 | fprintf(stderr, "%s is not an ELF image\n", argv[1]); | 105 | fprintf(stderr, "%s is not an ELF image\n", argv[1]); |
106 | exit(4); | 106 | exit(4); |
107 | } | 107 | } |
@@ -121,11 +121,11 @@ int main(int argc, char *argv[]) | |||
121 | } | 121 | } |
122 | 122 | ||
123 | while (nblks-- > 0) { | 123 | while (nblks-- > 0) { |
124 | if (read(in_fd, tmpbuf, IMGBLK) < 0) { | 124 | if (read(in_fd, tmpbuf, sizeof(tmpbuf)) < 0) { |
125 | perror("zImage read"); | 125 | perror("zImage read"); |
126 | exit(5); | 126 | exit(5); |
127 | } | 127 | } |
128 | cp = (unsigned int *)tmpbuf; | 128 | cp = tmpbuf; |
129 | for (i = 0; i < sizeof(tmpbuf) / sizeof(unsigned int); i++) | 129 | for (i = 0; i < sizeof(tmpbuf) / sizeof(unsigned int); i++) |
130 | cksum += *cp++; | 130 | cksum += *cp++; |
131 | if (write(out_fd, tmpbuf, sizeof(tmpbuf)) != sizeof(tmpbuf)) { | 131 | if (write(out_fd, tmpbuf, sizeof(tmpbuf)) != sizeof(tmpbuf)) { |
diff --git a/arch/powerpc/boot/ppcboot-hotfoot.h b/arch/powerpc/boot/ppcboot-hotfoot.h new file mode 100644 index 000000000000..1a3e80b533da --- /dev/null +++ b/arch/powerpc/boot/ppcboot-hotfoot.h | |||
@@ -0,0 +1,133 @@ | |||
1 | /* | ||
2 | * This interface is used for compatibility with old U-boots *ONLY*. | ||
3 | * Please do not imitate or extend this. | ||
4 | */ | ||
5 | |||
6 | /* | ||
7 | * Unfortunately, the ESTeem Hotfoot board uses a mangled version of | ||
8 | * ppcboot.h for historical reasons, and in the interest of having a | ||
9 | * mainline kernel boot on the production board+bootloader, this was the | ||
10 | * least-offensive solution. Please direct all flames to: | ||
11 | * | ||
12 | * Solomon Peachy <solomon@linux-wlan.com> | ||
13 | * | ||
14 | * (This header is identical to ppcboot.h except for the | ||
15 | * TARGET_HOTFOOT bits) | ||
16 | */ | ||
17 | |||
18 | /* | ||
19 | * (C) Copyright 2000, 2001 | ||
20 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. | ||
21 | * | ||
22 | * This program is free software; you can redistribute it and/or | ||
23 | * modify it under the terms of the GNU General Public License as | ||
24 | * published by the Free Software Foundation; either version 2 of | ||
25 | * the License, or (at your option) any later version. | ||
26 | * | ||
27 | * This program is distributed in the hope that it will be useful, | ||
28 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
29 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
30 | * GNU General Public License for more details. | ||
31 | * | ||
32 | * You should have received a copy of the GNU General Public License | ||
33 | * along with this program; if not, write to the Free Software | ||
34 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | ||
35 | * MA 02111-1307 USA | ||
36 | */ | ||
37 | |||
38 | #ifndef __PPCBOOT_H__ | ||
39 | #define __PPCBOOT_H__ | ||
40 | |||
41 | /* | ||
42 | * Board information passed to kernel from PPCBoot | ||
43 | * | ||
44 | * include/asm-ppc/ppcboot.h | ||
45 | */ | ||
46 | |||
47 | #include "types.h" | ||
48 | |||
49 | typedef struct bd_info { | ||
50 | unsigned long bi_memstart; /* start of DRAM memory */ | ||
51 | unsigned long bi_memsize; /* size of DRAM memory in bytes */ | ||
52 | unsigned long bi_flashstart; /* start of FLASH memory */ | ||
53 | unsigned long bi_flashsize; /* size of FLASH memory */ | ||
54 | unsigned long bi_flashoffset; /* reserved area for startup monitor */ | ||
55 | unsigned long bi_sramstart; /* start of SRAM memory */ | ||
56 | unsigned long bi_sramsize; /* size of SRAM memory */ | ||
57 | #if defined(TARGET_8xx) || defined(TARGET_CPM2) || defined(TARGET_85xx) ||\ | ||
58 | defined(TARGET_83xx) | ||
59 | unsigned long bi_immr_base; /* base of IMMR register */ | ||
60 | #endif | ||
61 | #if defined(TARGET_PPC_MPC52xx) | ||
62 | unsigned long bi_mbar_base; /* base of internal registers */ | ||
63 | #endif | ||
64 | unsigned long bi_bootflags; /* boot / reboot flag (for LynxOS) */ | ||
65 | unsigned long bi_ip_addr; /* IP Address */ | ||
66 | unsigned char bi_enetaddr[6]; /* Ethernet address */ | ||
67 | #if defined(TARGET_HOTFOOT) | ||
68 | /* second onboard ethernet port */ | ||
69 | unsigned char bi_enet1addr[6]; | ||
70 | #define HAVE_ENET1ADDR | ||
71 | #endif /* TARGET_HOOTFOOT */ | ||
72 | unsigned short bi_ethspeed; /* Ethernet speed in Mbps */ | ||
73 | unsigned long bi_intfreq; /* Internal Freq, in MHz */ | ||
74 | unsigned long bi_busfreq; /* Bus Freq, in MHz */ | ||
75 | #if defined(TARGET_CPM2) | ||
76 | unsigned long bi_cpmfreq; /* CPM_CLK Freq, in MHz */ | ||
77 | unsigned long bi_brgfreq; /* BRG_CLK Freq, in MHz */ | ||
78 | unsigned long bi_sccfreq; /* SCC_CLK Freq, in MHz */ | ||
79 | unsigned long bi_vco; /* VCO Out from PLL, in MHz */ | ||
80 | #endif | ||
81 | #if defined(TARGET_PPC_MPC52xx) | ||
82 | unsigned long bi_ipbfreq; /* IPB Bus Freq, in MHz */ | ||
83 | unsigned long bi_pcifreq; /* PCI Bus Freq, in MHz */ | ||
84 | #endif | ||
85 | unsigned long bi_baudrate; /* Console Baudrate */ | ||
86 | #if defined(TARGET_4xx) | ||
87 | unsigned char bi_s_version[4]; /* Version of this structure */ | ||
88 | unsigned char bi_r_version[32]; /* Version of the ROM (IBM) */ | ||
89 | unsigned int bi_procfreq; /* CPU (Internal) Freq, in Hz */ | ||
90 | unsigned int bi_plb_busfreq; /* PLB Bus speed, in Hz */ | ||
91 | unsigned int bi_pci_busfreq; /* PCI Bus speed, in Hz */ | ||
92 | unsigned char bi_pci_enetaddr[6]; /* PCI Ethernet MAC address */ | ||
93 | #endif | ||
94 | #if defined(TARGET_HOTFOOT) | ||
95 | unsigned int bi_pllouta_freq; /* PLL OUTA speed, in Hz */ | ||
96 | #endif | ||
97 | #if defined(TARGET_HYMOD) | ||
98 | hymod_conf_t bi_hymod_conf; /* hymod configuration information */ | ||
99 | #endif | ||
100 | #if defined(TARGET_EVB64260) || defined(TARGET_405EP) || defined(TARGET_44x) || \ | ||
101 | defined(TARGET_85xx) || defined(TARGET_83xx) || defined(TARGET_HAS_ETH1) | ||
102 | /* second onboard ethernet port */ | ||
103 | unsigned char bi_enet1addr[6]; | ||
104 | #define HAVE_ENET1ADDR | ||
105 | #endif | ||
106 | #if defined(TARGET_EVB64260) || defined(TARGET_440GX) || \ | ||
107 | defined(TARGET_85xx) || defined(TARGET_HAS_ETH2) | ||
108 | /* third onboard ethernet ports */ | ||
109 | unsigned char bi_enet2addr[6]; | ||
110 | #define HAVE_ENET2ADDR | ||
111 | #endif | ||
112 | #if defined(TARGET_440GX) || defined(TARGET_HAS_ETH3) | ||
113 | /* fourth onboard ethernet ports */ | ||
114 | unsigned char bi_enet3addr[6]; | ||
115 | #define HAVE_ENET3ADDR | ||
116 | #endif | ||
117 | #if defined(TARGET_HOTFOOT) | ||
118 | int bi_phynum[2]; /* Determines phy mapping */ | ||
119 | int bi_phymode[2]; /* Determines phy mode */ | ||
120 | #endif | ||
121 | #if defined(TARGET_4xx) | ||
122 | unsigned int bi_opbfreq; /* OB clock in Hz */ | ||
123 | int bi_iic_fast[2]; /* Use fast i2c mode */ | ||
124 | #endif | ||
125 | #if defined(TARGET_440GX) | ||
126 | int bi_phynum[4]; /* phy mapping */ | ||
127 | int bi_phymode[4]; /* phy mode */ | ||
128 | #endif | ||
129 | } bd_t; | ||
130 | |||
131 | #define bi_tbfreq bi_intfreq | ||
132 | |||
133 | #endif /* __PPCBOOT_H__ */ | ||
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper index 4db487d1d2a8..ac9e9a58b2b0 100755 --- a/arch/powerpc/boot/wrapper +++ b/arch/powerpc/boot/wrapper | |||
@@ -46,6 +46,7 @@ CROSS= | |||
46 | # directory for object and other files used by this script | 46 | # directory for object and other files used by this script |
47 | object=arch/powerpc/boot | 47 | object=arch/powerpc/boot |
48 | objbin=$object | 48 | objbin=$object |
49 | dtc=scripts/dtc/dtc | ||
49 | 50 | ||
50 | # directory for working files | 51 | # directory for working files |
51 | tmpdir=. | 52 | tmpdir=. |
@@ -124,7 +125,7 @@ if [ -n "$dts" ]; then | |||
124 | if [ -z "$dtb" ]; then | 125 | if [ -z "$dtb" ]; then |
125 | dtb="$platform.dtb" | 126 | dtb="$platform.dtb" |
126 | fi | 127 | fi |
127 | $object/dtc -O dtb -o "$dtb" -b 0 "$dts" | 128 | $dtc -O dtb -o "$dtb" -b 0 "$dts" |
128 | fi | 129 | fi |
129 | 130 | ||
130 | if [ -z "$kernel" ]; then | 131 | if [ -z "$kernel" ]; then |
diff --git a/arch/powerpc/configs/40x/kilauea_defconfig b/arch/powerpc/configs/40x/kilauea_defconfig index 865725effe93..9a05ec0ec312 100644 --- a/arch/powerpc/configs/40x/kilauea_defconfig +++ b/arch/powerpc/configs/40x/kilauea_defconfig | |||
@@ -1,14 +1,14 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.30-rc7 | 3 | # Linux kernel version: 2.6.31-rc4 |
4 | # Wed Jun 3 10:18:16 2009 | 4 | # Wed Jul 29 13:28:37 2009 |
5 | # | 5 | # |
6 | # CONFIG_PPC64 is not set | 6 | # CONFIG_PPC64 is not set |
7 | 7 | ||
8 | # | 8 | # |
9 | # Processor support | 9 | # Processor support |
10 | # | 10 | # |
11 | # CONFIG_6xx is not set | 11 | # CONFIG_PPC_BOOK3S_32 is not set |
12 | # CONFIG_PPC_85xx is not set | 12 | # CONFIG_PPC_85xx is not set |
13 | # CONFIG_PPC_8xx is not set | 13 | # CONFIG_PPC_8xx is not set |
14 | CONFIG_40x=y | 14 | CONFIG_40x=y |
@@ -32,11 +32,11 @@ CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y | |||
32 | CONFIG_IRQ_PER_CPU=y | 32 | CONFIG_IRQ_PER_CPU=y |
33 | CONFIG_STACKTRACE_SUPPORT=y | 33 | CONFIG_STACKTRACE_SUPPORT=y |
34 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y | 34 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y |
35 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
35 | CONFIG_LOCKDEP_SUPPORT=y | 36 | CONFIG_LOCKDEP_SUPPORT=y |
36 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | 37 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y |
37 | CONFIG_ARCH_HAS_ILOG2_U32=y | 38 | CONFIG_ARCH_HAS_ILOG2_U32=y |
38 | CONFIG_GENERIC_HWEIGHT=y | 39 | CONFIG_GENERIC_HWEIGHT=y |
39 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
40 | CONFIG_GENERIC_FIND_NEXT_BIT=y | 40 | CONFIG_GENERIC_FIND_NEXT_BIT=y |
41 | # CONFIG_ARCH_NO_VIRT_TO_BUS is not set | 41 | # CONFIG_ARCH_NO_VIRT_TO_BUS is not set |
42 | CONFIG_PPC=y | 42 | CONFIG_PPC=y |
@@ -57,6 +57,7 @@ CONFIG_PPC_DCR_NATIVE=y | |||
57 | CONFIG_PPC_DCR=y | 57 | CONFIG_PPC_DCR=y |
58 | CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y | 58 | CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y |
59 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 59 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
60 | CONFIG_CONSTRUCTORS=y | ||
60 | 61 | ||
61 | # | 62 | # |
62 | # General setup | 63 | # General setup |
@@ -108,7 +109,6 @@ CONFIG_SYSCTL_SYSCALL=y | |||
108 | CONFIG_KALLSYMS=y | 109 | CONFIG_KALLSYMS=y |
109 | CONFIG_KALLSYMS_ALL=y | 110 | CONFIG_KALLSYMS_ALL=y |
110 | CONFIG_KALLSYMS_EXTRA_PASS=y | 111 | CONFIG_KALLSYMS_EXTRA_PASS=y |
111 | # CONFIG_STRIP_ASM_SYMS is not set | ||
112 | CONFIG_HOTPLUG=y | 112 | CONFIG_HOTPLUG=y |
113 | CONFIG_PRINTK=y | 113 | CONFIG_PRINTK=y |
114 | CONFIG_BUG=y | 114 | CONFIG_BUG=y |
@@ -121,9 +121,16 @@ CONFIG_TIMERFD=y | |||
121 | CONFIG_EVENTFD=y | 121 | CONFIG_EVENTFD=y |
122 | CONFIG_SHMEM=y | 122 | CONFIG_SHMEM=y |
123 | CONFIG_AIO=y | 123 | CONFIG_AIO=y |
124 | CONFIG_HAVE_PERF_COUNTERS=y | ||
125 | |||
126 | # | ||
127 | # Performance Counters | ||
128 | # | ||
129 | # CONFIG_PERF_COUNTERS is not set | ||
124 | CONFIG_VM_EVENT_COUNTERS=y | 130 | CONFIG_VM_EVENT_COUNTERS=y |
125 | CONFIG_PCI_QUIRKS=y | 131 | CONFIG_PCI_QUIRKS=y |
126 | CONFIG_SLUB_DEBUG=y | 132 | CONFIG_SLUB_DEBUG=y |
133 | # CONFIG_STRIP_ASM_SYMS is not set | ||
127 | CONFIG_COMPAT_BRK=y | 134 | CONFIG_COMPAT_BRK=y |
128 | # CONFIG_SLAB is not set | 135 | # CONFIG_SLAB is not set |
129 | CONFIG_SLUB=y | 136 | CONFIG_SLUB=y |
@@ -137,6 +144,11 @@ CONFIG_HAVE_IOREMAP_PROT=y | |||
137 | CONFIG_HAVE_KPROBES=y | 144 | CONFIG_HAVE_KPROBES=y |
138 | CONFIG_HAVE_KRETPROBES=y | 145 | CONFIG_HAVE_KRETPROBES=y |
139 | CONFIG_HAVE_ARCH_TRACEHOOK=y | 146 | CONFIG_HAVE_ARCH_TRACEHOOK=y |
147 | |||
148 | # | ||
149 | # GCOV-based kernel profiling | ||
150 | # | ||
151 | # CONFIG_GCOV_KERNEL is not set | ||
140 | # CONFIG_SLOW_WORK is not set | 152 | # CONFIG_SLOW_WORK is not set |
141 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set | 153 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set |
142 | CONFIG_SLABINFO=y | 154 | CONFIG_SLABINFO=y |
@@ -149,7 +161,7 @@ CONFIG_MODULE_UNLOAD=y | |||
149 | # CONFIG_MODVERSIONS is not set | 161 | # CONFIG_MODVERSIONS is not set |
150 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 162 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
151 | CONFIG_BLOCK=y | 163 | CONFIG_BLOCK=y |
152 | CONFIG_LBD=y | 164 | CONFIG_LBDAF=y |
153 | # CONFIG_BLK_DEV_BSG is not set | 165 | # CONFIG_BLK_DEV_BSG is not set |
154 | # CONFIG_BLK_DEV_INTEGRITY is not set | 166 | # CONFIG_BLK_DEV_INTEGRITY is not set |
155 | 167 | ||
@@ -220,6 +232,7 @@ CONFIG_BINFMT_ELF=y | |||
220 | # CONFIG_BINFMT_MISC is not set | 232 | # CONFIG_BINFMT_MISC is not set |
221 | # CONFIG_MATH_EMULATION is not set | 233 | # CONFIG_MATH_EMULATION is not set |
222 | # CONFIG_IOMMU_HELPER is not set | 234 | # CONFIG_IOMMU_HELPER is not set |
235 | # CONFIG_SWIOTLB is not set | ||
223 | CONFIG_PPC_NEED_DMA_SYNC_OPS=y | 236 | CONFIG_PPC_NEED_DMA_SYNC_OPS=y |
224 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | 237 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y |
225 | CONFIG_ARCH_HAS_WALK_MEMORY=y | 238 | CONFIG_ARCH_HAS_WALK_MEMORY=y |
@@ -239,9 +252,9 @@ CONFIG_MIGRATION=y | |||
239 | CONFIG_ZONE_DMA_FLAG=1 | 252 | CONFIG_ZONE_DMA_FLAG=1 |
240 | CONFIG_BOUNCE=y | 253 | CONFIG_BOUNCE=y |
241 | CONFIG_VIRT_TO_BUS=y | 254 | CONFIG_VIRT_TO_BUS=y |
242 | CONFIG_UNEVICTABLE_LRU=y | ||
243 | CONFIG_HAVE_MLOCK=y | 255 | CONFIG_HAVE_MLOCK=y |
244 | CONFIG_HAVE_MLOCKED_PAGE_BIT=y | 256 | CONFIG_HAVE_MLOCKED_PAGE_BIT=y |
257 | CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 | ||
245 | CONFIG_PPC_4K_PAGES=y | 258 | CONFIG_PPC_4K_PAGES=y |
246 | # CONFIG_PPC_16K_PAGES is not set | 259 | # CONFIG_PPC_16K_PAGES is not set |
247 | # CONFIG_PPC_64K_PAGES is not set | 260 | # CONFIG_PPC_64K_PAGES is not set |
@@ -344,6 +357,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
344 | # CONFIG_ECONET is not set | 357 | # CONFIG_ECONET is not set |
345 | # CONFIG_WAN_ROUTER is not set | 358 | # CONFIG_WAN_ROUTER is not set |
346 | # CONFIG_PHONET is not set | 359 | # CONFIG_PHONET is not set |
360 | # CONFIG_IEEE802154 is not set | ||
347 | # CONFIG_NET_SCHED is not set | 361 | # CONFIG_NET_SCHED is not set |
348 | # CONFIG_DCB is not set | 362 | # CONFIG_DCB is not set |
349 | 363 | ||
@@ -393,9 +407,8 @@ CONFIG_MTD_OF_PARTS=y | |||
393 | # User Modules And Translation Layers | 407 | # User Modules And Translation Layers |
394 | # | 408 | # |
395 | CONFIG_MTD_CHAR=y | 409 | CONFIG_MTD_CHAR=y |
396 | CONFIG_MTD_BLKDEVS=m | 410 | CONFIG_MTD_BLKDEVS=y |
397 | CONFIG_MTD_BLOCK=m | 411 | CONFIG_MTD_BLOCK=y |
398 | # CONFIG_MTD_BLOCK_RO is not set | ||
399 | # CONFIG_FTL is not set | 412 | # CONFIG_FTL is not set |
400 | # CONFIG_NFTL is not set | 413 | # CONFIG_NFTL is not set |
401 | # CONFIG_INFTL is not set | 414 | # CONFIG_INFTL is not set |
@@ -452,7 +465,17 @@ CONFIG_MTD_PHYSMAP_OF=y | |||
452 | # CONFIG_MTD_DOC2000 is not set | 465 | # CONFIG_MTD_DOC2000 is not set |
453 | # CONFIG_MTD_DOC2001 is not set | 466 | # CONFIG_MTD_DOC2001 is not set |
454 | # CONFIG_MTD_DOC2001PLUS is not set | 467 | # CONFIG_MTD_DOC2001PLUS is not set |
455 | # CONFIG_MTD_NAND is not set | 468 | CONFIG_MTD_NAND=y |
469 | # CONFIG_MTD_NAND_VERIFY_WRITE is not set | ||
470 | CONFIG_MTD_NAND_ECC_SMC=y | ||
471 | # CONFIG_MTD_NAND_MUSEUM_IDS is not set | ||
472 | CONFIG_MTD_NAND_IDS=y | ||
473 | CONFIG_MTD_NAND_NDFC=y | ||
474 | # CONFIG_MTD_NAND_DISKONCHIP is not set | ||
475 | # CONFIG_MTD_NAND_CAFE is not set | ||
476 | # CONFIG_MTD_NAND_NANDSIM is not set | ||
477 | # CONFIG_MTD_NAND_PLATFORM is not set | ||
478 | # CONFIG_MTD_NAND_FSL_ELBC is not set | ||
456 | # CONFIG_MTD_ONENAND is not set | 479 | # CONFIG_MTD_ONENAND is not set |
457 | 480 | ||
458 | # | 481 | # |
@@ -465,6 +488,7 @@ CONFIG_MTD_PHYSMAP_OF=y | |||
465 | # | 488 | # |
466 | # CONFIG_MTD_UBI is not set | 489 | # CONFIG_MTD_UBI is not set |
467 | CONFIG_OF_DEVICE=y | 490 | CONFIG_OF_DEVICE=y |
491 | CONFIG_OF_I2C=y | ||
468 | # CONFIG_PARPORT is not set | 492 | # CONFIG_PARPORT is not set |
469 | CONFIG_BLK_DEV=y | 493 | CONFIG_BLK_DEV=y |
470 | # CONFIG_BLK_DEV_FD is not set | 494 | # CONFIG_BLK_DEV_FD is not set |
@@ -504,14 +528,17 @@ CONFIG_HAVE_IDE=y | |||
504 | # | 528 | # |
505 | 529 | ||
506 | # | 530 | # |
507 | # Enable only one of the two stacks, unless you know what you are doing | 531 | # You can enable one or both FireWire driver stacks. |
532 | # | ||
533 | |||
534 | # | ||
535 | # See the help texts for more information. | ||
508 | # | 536 | # |
509 | # CONFIG_FIREWIRE is not set | 537 | # CONFIG_FIREWIRE is not set |
510 | # CONFIG_IEEE1394 is not set | 538 | # CONFIG_IEEE1394 is not set |
511 | # CONFIG_I2O is not set | 539 | # CONFIG_I2O is not set |
512 | # CONFIG_MACINTOSH_DRIVERS is not set | 540 | # CONFIG_MACINTOSH_DRIVERS is not set |
513 | CONFIG_NETDEVICES=y | 541 | CONFIG_NETDEVICES=y |
514 | CONFIG_COMPAT_NET_DEV_OPS=y | ||
515 | # CONFIG_DUMMY is not set | 542 | # CONFIG_DUMMY is not set |
516 | # CONFIG_BONDING is not set | 543 | # CONFIG_BONDING is not set |
517 | # CONFIG_MACVLAN is not set | 544 | # CONFIG_MACVLAN is not set |
@@ -546,6 +573,7 @@ CONFIG_IBM_NEW_EMAC_EMAC4=y | |||
546 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set | 573 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set |
547 | # CONFIG_NET_PCI is not set | 574 | # CONFIG_NET_PCI is not set |
548 | # CONFIG_B44 is not set | 575 | # CONFIG_B44 is not set |
576 | # CONFIG_KS8842 is not set | ||
549 | # CONFIG_ATL2 is not set | 577 | # CONFIG_ATL2 is not set |
550 | # CONFIG_NETDEV_1000 is not set | 578 | # CONFIG_NETDEV_1000 is not set |
551 | # CONFIG_NETDEV_10000 is not set | 579 | # CONFIG_NETDEV_10000 is not set |
@@ -621,20 +649,150 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
621 | # CONFIG_IPMI_HANDLER is not set | 649 | # CONFIG_IPMI_HANDLER is not set |
622 | # CONFIG_HW_RANDOM is not set | 650 | # CONFIG_HW_RANDOM is not set |
623 | # CONFIG_NVRAM is not set | 651 | # CONFIG_NVRAM is not set |
624 | # CONFIG_GEN_RTC is not set | ||
625 | # CONFIG_R3964 is not set | 652 | # CONFIG_R3964 is not set |
626 | # CONFIG_APPLICOM is not set | 653 | # CONFIG_APPLICOM is not set |
627 | # CONFIG_RAW_DRIVER is not set | 654 | # CONFIG_RAW_DRIVER is not set |
628 | # CONFIG_TCG_TPM is not set | 655 | # CONFIG_TCG_TPM is not set |
629 | CONFIG_DEVPORT=y | 656 | CONFIG_DEVPORT=y |
630 | # CONFIG_I2C is not set | 657 | CONFIG_I2C=y |
658 | CONFIG_I2C_BOARDINFO=y | ||
659 | CONFIG_I2C_CHARDEV=y | ||
660 | CONFIG_I2C_HELPER_AUTO=y | ||
661 | |||
662 | # | ||
663 | # I2C Hardware Bus support | ||
664 | # | ||
665 | |||
666 | # | ||
667 | # PC SMBus host controller drivers | ||
668 | # | ||
669 | # CONFIG_I2C_ALI1535 is not set | ||
670 | # CONFIG_I2C_ALI1563 is not set | ||
671 | # CONFIG_I2C_ALI15X3 is not set | ||
672 | # CONFIG_I2C_AMD756 is not set | ||
673 | # CONFIG_I2C_AMD8111 is not set | ||
674 | # CONFIG_I2C_I801 is not set | ||
675 | # CONFIG_I2C_ISCH is not set | ||
676 | # CONFIG_I2C_PIIX4 is not set | ||
677 | # CONFIG_I2C_NFORCE2 is not set | ||
678 | # CONFIG_I2C_SIS5595 is not set | ||
679 | # CONFIG_I2C_SIS630 is not set | ||
680 | # CONFIG_I2C_SIS96X is not set | ||
681 | # CONFIG_I2C_VIA is not set | ||
682 | # CONFIG_I2C_VIAPRO is not set | ||
683 | |||
684 | # | ||
685 | # I2C system bus drivers (mostly embedded / system-on-chip) | ||
686 | # | ||
687 | CONFIG_I2C_IBM_IIC=y | ||
688 | # CONFIG_I2C_MPC is not set | ||
689 | # CONFIG_I2C_OCORES is not set | ||
690 | # CONFIG_I2C_SIMTEC is not set | ||
691 | |||
692 | # | ||
693 | # External I2C/SMBus adapter drivers | ||
694 | # | ||
695 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
696 | # CONFIG_I2C_TAOS_EVM is not set | ||
697 | |||
698 | # | ||
699 | # Graphics adapter I2C/DDC channel drivers | ||
700 | # | ||
701 | # CONFIG_I2C_VOODOO3 is not set | ||
702 | |||
703 | # | ||
704 | # Other I2C/SMBus bus drivers | ||
705 | # | ||
706 | # CONFIG_I2C_PCA_PLATFORM is not set | ||
707 | # CONFIG_I2C_STUB is not set | ||
708 | |||
709 | # | ||
710 | # Miscellaneous I2C Chip support | ||
711 | # | ||
712 | # CONFIG_DS1682 is not set | ||
713 | # CONFIG_SENSORS_PCF8574 is not set | ||
714 | # CONFIG_PCF8575 is not set | ||
715 | # CONFIG_SENSORS_PCA9539 is not set | ||
716 | # CONFIG_SENSORS_TSL2550 is not set | ||
717 | # CONFIG_I2C_DEBUG_CORE is not set | ||
718 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
719 | # CONFIG_I2C_DEBUG_BUS is not set | ||
720 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
631 | # CONFIG_SPI is not set | 721 | # CONFIG_SPI is not set |
722 | |||
723 | # | ||
724 | # PPS support | ||
725 | # | ||
726 | # CONFIG_PPS is not set | ||
632 | CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y | 727 | CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y |
633 | # CONFIG_GPIOLIB is not set | 728 | # CONFIG_GPIOLIB is not set |
634 | # CONFIG_W1 is not set | 729 | # CONFIG_W1 is not set |
635 | # CONFIG_POWER_SUPPLY is not set | 730 | # CONFIG_POWER_SUPPLY is not set |
636 | # CONFIG_HWMON is not set | 731 | CONFIG_HWMON=y |
732 | # CONFIG_HWMON_VID is not set | ||
733 | # CONFIG_SENSORS_AD7414 is not set | ||
734 | # CONFIG_SENSORS_AD7418 is not set | ||
735 | # CONFIG_SENSORS_ADM1021 is not set | ||
736 | # CONFIG_SENSORS_ADM1025 is not set | ||
737 | # CONFIG_SENSORS_ADM1026 is not set | ||
738 | # CONFIG_SENSORS_ADM1029 is not set | ||
739 | # CONFIG_SENSORS_ADM1031 is not set | ||
740 | # CONFIG_SENSORS_ADM9240 is not set | ||
741 | # CONFIG_SENSORS_ADT7462 is not set | ||
742 | # CONFIG_SENSORS_ADT7470 is not set | ||
743 | # CONFIG_SENSORS_ADT7473 is not set | ||
744 | # CONFIG_SENSORS_ADT7475 is not set | ||
745 | # CONFIG_SENSORS_ATXP1 is not set | ||
746 | # CONFIG_SENSORS_DS1621 is not set | ||
747 | # CONFIG_SENSORS_I5K_AMB is not set | ||
748 | # CONFIG_SENSORS_F71805F is not set | ||
749 | # CONFIG_SENSORS_F71882FG is not set | ||
750 | # CONFIG_SENSORS_F75375S is not set | ||
751 | # CONFIG_SENSORS_G760A is not set | ||
752 | # CONFIG_SENSORS_GL518SM is not set | ||
753 | # CONFIG_SENSORS_GL520SM is not set | ||
754 | # CONFIG_SENSORS_IT87 is not set | ||
755 | # CONFIG_SENSORS_LM63 is not set | ||
756 | CONFIG_SENSORS_LM75=y | ||
757 | # CONFIG_SENSORS_LM77 is not set | ||
758 | # CONFIG_SENSORS_LM78 is not set | ||
759 | # CONFIG_SENSORS_LM80 is not set | ||
760 | # CONFIG_SENSORS_LM83 is not set | ||
761 | # CONFIG_SENSORS_LM85 is not set | ||
762 | # CONFIG_SENSORS_LM87 is not set | ||
763 | # CONFIG_SENSORS_LM90 is not set | ||
764 | # CONFIG_SENSORS_LM92 is not set | ||
765 | # CONFIG_SENSORS_LM93 is not set | ||
766 | # CONFIG_SENSORS_LTC4215 is not set | ||
767 | # CONFIG_SENSORS_LTC4245 is not set | ||
768 | # CONFIG_SENSORS_LM95241 is not set | ||
769 | # CONFIG_SENSORS_MAX1619 is not set | ||
770 | # CONFIG_SENSORS_MAX6650 is not set | ||
771 | # CONFIG_SENSORS_PC87360 is not set | ||
772 | # CONFIG_SENSORS_PC87427 is not set | ||
773 | # CONFIG_SENSORS_PCF8591 is not set | ||
774 | # CONFIG_SENSORS_SIS5595 is not set | ||
775 | # CONFIG_SENSORS_DME1737 is not set | ||
776 | # CONFIG_SENSORS_SMSC47M1 is not set | ||
777 | # CONFIG_SENSORS_SMSC47M192 is not set | ||
778 | # CONFIG_SENSORS_SMSC47B397 is not set | ||
779 | # CONFIG_SENSORS_ADS7828 is not set | ||
780 | # CONFIG_SENSORS_THMC50 is not set | ||
781 | # CONFIG_SENSORS_TMP401 is not set | ||
782 | # CONFIG_SENSORS_VIA686A is not set | ||
783 | # CONFIG_SENSORS_VT1211 is not set | ||
784 | # CONFIG_SENSORS_VT8231 is not set | ||
785 | # CONFIG_SENSORS_W83781D is not set | ||
786 | # CONFIG_SENSORS_W83791D is not set | ||
787 | # CONFIG_SENSORS_W83792D is not set | ||
788 | # CONFIG_SENSORS_W83793 is not set | ||
789 | # CONFIG_SENSORS_W83L785TS is not set | ||
790 | # CONFIG_SENSORS_W83L786NG is not set | ||
791 | # CONFIG_SENSORS_W83627HF is not set | ||
792 | # CONFIG_SENSORS_W83627EHF is not set | ||
793 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
637 | CONFIG_THERMAL=y | 794 | CONFIG_THERMAL=y |
795 | # CONFIG_THERMAL_HWMON is not set | ||
638 | # CONFIG_WATCHDOG is not set | 796 | # CONFIG_WATCHDOG is not set |
639 | CONFIG_SSB_POSSIBLE=y | 797 | CONFIG_SSB_POSSIBLE=y |
640 | 798 | ||
@@ -649,24 +807,15 @@ CONFIG_SSB_POSSIBLE=y | |||
649 | # CONFIG_MFD_CORE is not set | 807 | # CONFIG_MFD_CORE is not set |
650 | # CONFIG_MFD_SM501 is not set | 808 | # CONFIG_MFD_SM501 is not set |
651 | # CONFIG_HTC_PASIC3 is not set | 809 | # CONFIG_HTC_PASIC3 is not set |
810 | # CONFIG_TWL4030_CORE is not set | ||
652 | # CONFIG_MFD_TMIO is not set | 811 | # CONFIG_MFD_TMIO is not set |
812 | # CONFIG_PMIC_DA903X is not set | ||
813 | # CONFIG_MFD_WM8400 is not set | ||
814 | # CONFIG_MFD_WM8350_I2C is not set | ||
815 | # CONFIG_MFD_PCF50633 is not set | ||
816 | # CONFIG_AB3100_CORE is not set | ||
653 | # CONFIG_REGULATOR is not set | 817 | # CONFIG_REGULATOR is not set |
654 | 818 | # CONFIG_MEDIA_SUPPORT is not set | |
655 | # | ||
656 | # Multimedia devices | ||
657 | # | ||
658 | |||
659 | # | ||
660 | # Multimedia core support | ||
661 | # | ||
662 | # CONFIG_VIDEO_DEV is not set | ||
663 | # CONFIG_DVB_CORE is not set | ||
664 | # CONFIG_VIDEO_MEDIA is not set | ||
665 | |||
666 | # | ||
667 | # Multimedia drivers | ||
668 | # | ||
669 | # CONFIG_DAB is not set | ||
670 | 819 | ||
671 | # | 820 | # |
672 | # Graphics support | 821 | # Graphics support |
@@ -691,10 +840,69 @@ CONFIG_SSB_POSSIBLE=y | |||
691 | # CONFIG_ACCESSIBILITY is not set | 840 | # CONFIG_ACCESSIBILITY is not set |
692 | # CONFIG_INFINIBAND is not set | 841 | # CONFIG_INFINIBAND is not set |
693 | # CONFIG_EDAC is not set | 842 | # CONFIG_EDAC is not set |
694 | # CONFIG_RTC_CLASS is not set | 843 | CONFIG_RTC_LIB=y |
844 | CONFIG_RTC_CLASS=y | ||
845 | CONFIG_RTC_HCTOSYS=y | ||
846 | CONFIG_RTC_HCTOSYS_DEVICE="rtc0" | ||
847 | # CONFIG_RTC_DEBUG is not set | ||
848 | |||
849 | # | ||
850 | # RTC interfaces | ||
851 | # | ||
852 | CONFIG_RTC_INTF_SYSFS=y | ||
853 | CONFIG_RTC_INTF_PROC=y | ||
854 | CONFIG_RTC_INTF_DEV=y | ||
855 | # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set | ||
856 | # CONFIG_RTC_DRV_TEST is not set | ||
857 | |||
858 | # | ||
859 | # I2C RTC drivers | ||
860 | # | ||
861 | CONFIG_RTC_DRV_DS1307=y | ||
862 | # CONFIG_RTC_DRV_DS1374 is not set | ||
863 | # CONFIG_RTC_DRV_DS1672 is not set | ||
864 | # CONFIG_RTC_DRV_MAX6900 is not set | ||
865 | # CONFIG_RTC_DRV_RS5C372 is not set | ||
866 | # CONFIG_RTC_DRV_ISL1208 is not set | ||
867 | # CONFIG_RTC_DRV_X1205 is not set | ||
868 | # CONFIG_RTC_DRV_PCF8563 is not set | ||
869 | # CONFIG_RTC_DRV_PCF8583 is not set | ||
870 | # CONFIG_RTC_DRV_M41T80 is not set | ||
871 | # CONFIG_RTC_DRV_S35390A is not set | ||
872 | # CONFIG_RTC_DRV_FM3130 is not set | ||
873 | # CONFIG_RTC_DRV_RX8581 is not set | ||
874 | # CONFIG_RTC_DRV_RX8025 is not set | ||
875 | |||
876 | # | ||
877 | # SPI RTC drivers | ||
878 | # | ||
879 | |||
880 | # | ||
881 | # Platform RTC drivers | ||
882 | # | ||
883 | # CONFIG_RTC_DRV_CMOS is not set | ||
884 | # CONFIG_RTC_DRV_DS1286 is not set | ||
885 | # CONFIG_RTC_DRV_DS1511 is not set | ||
886 | # CONFIG_RTC_DRV_DS1553 is not set | ||
887 | # CONFIG_RTC_DRV_DS1742 is not set | ||
888 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
889 | # CONFIG_RTC_DRV_M48T86 is not set | ||
890 | # CONFIG_RTC_DRV_M48T35 is not set | ||
891 | # CONFIG_RTC_DRV_M48T59 is not set | ||
892 | # CONFIG_RTC_DRV_BQ4802 is not set | ||
893 | # CONFIG_RTC_DRV_V3020 is not set | ||
894 | |||
895 | # | ||
896 | # on-CPU RTC drivers | ||
897 | # | ||
898 | # CONFIG_RTC_DRV_GENERIC is not set | ||
695 | # CONFIG_DMADEVICES is not set | 899 | # CONFIG_DMADEVICES is not set |
696 | # CONFIG_AUXDISPLAY is not set | 900 | # CONFIG_AUXDISPLAY is not set |
697 | # CONFIG_UIO is not set | 901 | # CONFIG_UIO is not set |
902 | |||
903 | # | ||
904 | # TI VLYNQ | ||
905 | # | ||
698 | # CONFIG_STAGING is not set | 906 | # CONFIG_STAGING is not set |
699 | 907 | ||
700 | # | 908 | # |
@@ -708,11 +916,12 @@ CONFIG_EXT2_FS=y | |||
708 | # CONFIG_REISERFS_FS is not set | 916 | # CONFIG_REISERFS_FS is not set |
709 | # CONFIG_JFS_FS is not set | 917 | # CONFIG_JFS_FS is not set |
710 | # CONFIG_FS_POSIX_ACL is not set | 918 | # CONFIG_FS_POSIX_ACL is not set |
711 | CONFIG_FILE_LOCKING=y | ||
712 | # CONFIG_XFS_FS is not set | 919 | # CONFIG_XFS_FS is not set |
713 | # CONFIG_GFS2_FS is not set | 920 | # CONFIG_GFS2_FS is not set |
714 | # CONFIG_OCFS2_FS is not set | 921 | # CONFIG_OCFS2_FS is not set |
715 | # CONFIG_BTRFS_FS is not set | 922 | # CONFIG_BTRFS_FS is not set |
923 | CONFIG_FILE_LOCKING=y | ||
924 | CONFIG_FSNOTIFY=y | ||
716 | CONFIG_DNOTIFY=y | 925 | CONFIG_DNOTIFY=y |
717 | CONFIG_INOTIFY=y | 926 | CONFIG_INOTIFY=y |
718 | CONFIG_INOTIFY_USER=y | 927 | CONFIG_INOTIFY_USER=y |
@@ -818,6 +1027,7 @@ CONFIG_HAS_IOPORT=y | |||
818 | CONFIG_HAS_DMA=y | 1027 | CONFIG_HAS_DMA=y |
819 | CONFIG_HAVE_LMB=y | 1028 | CONFIG_HAVE_LMB=y |
820 | CONFIG_NLATTR=y | 1029 | CONFIG_NLATTR=y |
1030 | CONFIG_GENERIC_ATOMIC64=y | ||
821 | 1031 | ||
822 | # | 1032 | # |
823 | # Kernel hacking | 1033 | # Kernel hacking |
@@ -848,6 +1058,9 @@ CONFIG_SCHED_DEBUG=y | |||
848 | # CONFIG_RT_MUTEX_TESTER is not set | 1058 | # CONFIG_RT_MUTEX_TESTER is not set |
849 | # CONFIG_DEBUG_SPINLOCK is not set | 1059 | # CONFIG_DEBUG_SPINLOCK is not set |
850 | # CONFIG_DEBUG_MUTEXES is not set | 1060 | # CONFIG_DEBUG_MUTEXES is not set |
1061 | # CONFIG_DEBUG_LOCK_ALLOC is not set | ||
1062 | # CONFIG_PROVE_LOCKING is not set | ||
1063 | # CONFIG_LOCK_STAT is not set | ||
851 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 1064 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
852 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | 1065 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set |
853 | # CONFIG_DEBUG_KOBJECT is not set | 1066 | # CONFIG_DEBUG_KOBJECT is not set |
@@ -859,7 +1072,6 @@ CONFIG_DEBUG_BUGVERBOSE=y | |||
859 | # CONFIG_DEBUG_LIST is not set | 1072 | # CONFIG_DEBUG_LIST is not set |
860 | # CONFIG_DEBUG_SG is not set | 1073 | # CONFIG_DEBUG_SG is not set |
861 | # CONFIG_DEBUG_NOTIFIERS is not set | 1074 | # CONFIG_DEBUG_NOTIFIERS is not set |
862 | # CONFIG_BOOT_PRINTK_DELAY is not set | ||
863 | # CONFIG_RCU_TORTURE_TEST is not set | 1075 | # CONFIG_RCU_TORTURE_TEST is not set |
864 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | 1076 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set |
865 | # CONFIG_BACKTRACE_SELF_TEST is not set | 1077 | # CONFIG_BACKTRACE_SELF_TEST is not set |
@@ -873,16 +1085,15 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y | |||
873 | CONFIG_HAVE_DYNAMIC_FTRACE=y | 1085 | CONFIG_HAVE_DYNAMIC_FTRACE=y |
874 | CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y | 1086 | CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y |
875 | CONFIG_TRACING_SUPPORT=y | 1087 | CONFIG_TRACING_SUPPORT=y |
876 | 1088 | CONFIG_FTRACE=y | |
877 | # | ||
878 | # Tracers | ||
879 | # | ||
880 | # CONFIG_FUNCTION_TRACER is not set | 1089 | # CONFIG_FUNCTION_TRACER is not set |
1090 | # CONFIG_IRQSOFF_TRACER is not set | ||
881 | # CONFIG_SCHED_TRACER is not set | 1091 | # CONFIG_SCHED_TRACER is not set |
882 | # CONFIG_CONTEXT_SWITCH_TRACER is not set | 1092 | # CONFIG_ENABLE_DEFAULT_TRACERS is not set |
883 | # CONFIG_EVENT_TRACER is not set | ||
884 | # CONFIG_BOOT_TRACER is not set | 1093 | # CONFIG_BOOT_TRACER is not set |
885 | # CONFIG_TRACE_BRANCH_PROFILING is not set | 1094 | CONFIG_BRANCH_PROFILE_NONE=y |
1095 | # CONFIG_PROFILE_ANNOTATED_BRANCHES is not set | ||
1096 | # CONFIG_PROFILE_ALL_BRANCHES is not set | ||
886 | # CONFIG_STACK_TRACER is not set | 1097 | # CONFIG_STACK_TRACER is not set |
887 | # CONFIG_KMEMTRACE is not set | 1098 | # CONFIG_KMEMTRACE is not set |
888 | # CONFIG_WORKQUEUE_TRACER is not set | 1099 | # CONFIG_WORKQUEUE_TRACER is not set |
@@ -891,6 +1102,9 @@ CONFIG_TRACING_SUPPORT=y | |||
891 | # CONFIG_SAMPLES is not set | 1102 | # CONFIG_SAMPLES is not set |
892 | CONFIG_HAVE_ARCH_KGDB=y | 1103 | CONFIG_HAVE_ARCH_KGDB=y |
893 | # CONFIG_KGDB is not set | 1104 | # CONFIG_KGDB is not set |
1105 | # CONFIG_KMEMCHECK is not set | ||
1106 | # CONFIG_PPC_DISABLE_WERROR is not set | ||
1107 | CONFIG_PPC_WERROR=y | ||
894 | CONFIG_PRINT_STACK_DEPTH=64 | 1108 | CONFIG_PRINT_STACK_DEPTH=64 |
895 | # CONFIG_DEBUG_STACKOVERFLOW is not set | 1109 | # CONFIG_DEBUG_STACKOVERFLOW is not set |
896 | # CONFIG_DEBUG_STACK_USAGE is not set | 1110 | # CONFIG_DEBUG_STACK_USAGE is not set |
diff --git a/arch/powerpc/configs/44x/arches_defconfig b/arch/powerpc/configs/44x/arches_defconfig index f7fd32c09424..6f976b51cdd0 100644 --- a/arch/powerpc/configs/44x/arches_defconfig +++ b/arch/powerpc/configs/44x/arches_defconfig | |||
@@ -1,14 +1,14 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.29-rc2 | 3 | # Linux kernel version: 2.6.31-rc5 |
4 | # Tue Jan 20 08:22:31 2009 | 4 | # Thu Aug 13 14:14:07 2009 |
5 | # | 5 | # |
6 | # CONFIG_PPC64 is not set | 6 | # CONFIG_PPC64 is not set |
7 | 7 | ||
8 | # | 8 | # |
9 | # Processor support | 9 | # Processor support |
10 | # | 10 | # |
11 | # CONFIG_6xx is not set | 11 | # CONFIG_PPC_BOOK3S_32 is not set |
12 | # CONFIG_PPC_85xx is not set | 12 | # CONFIG_PPC_85xx is not set |
13 | # CONFIG_PPC_8xx is not set | 13 | # CONFIG_PPC_8xx is not set |
14 | # CONFIG_40x is not set | 14 | # CONFIG_40x is not set |
@@ -31,15 +31,16 @@ CONFIG_GENERIC_TIME=y | |||
31 | CONFIG_GENERIC_TIME_VSYSCALL=y | 31 | CONFIG_GENERIC_TIME_VSYSCALL=y |
32 | CONFIG_GENERIC_CLOCKEVENTS=y | 32 | CONFIG_GENERIC_CLOCKEVENTS=y |
33 | CONFIG_GENERIC_HARDIRQS=y | 33 | CONFIG_GENERIC_HARDIRQS=y |
34 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y | ||
34 | # CONFIG_HAVE_SETUP_PER_CPU_AREA is not set | 35 | # CONFIG_HAVE_SETUP_PER_CPU_AREA is not set |
35 | CONFIG_IRQ_PER_CPU=y | 36 | CONFIG_IRQ_PER_CPU=y |
36 | CONFIG_STACKTRACE_SUPPORT=y | 37 | CONFIG_STACKTRACE_SUPPORT=y |
37 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y | 38 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y |
39 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
38 | CONFIG_LOCKDEP_SUPPORT=y | 40 | CONFIG_LOCKDEP_SUPPORT=y |
39 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | 41 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y |
40 | CONFIG_ARCH_HAS_ILOG2_U32=y | 42 | CONFIG_ARCH_HAS_ILOG2_U32=y |
41 | CONFIG_GENERIC_HWEIGHT=y | 43 | CONFIG_GENERIC_HWEIGHT=y |
42 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
43 | CONFIG_GENERIC_FIND_NEXT_BIT=y | 44 | CONFIG_GENERIC_FIND_NEXT_BIT=y |
44 | # CONFIG_ARCH_NO_VIRT_TO_BUS is not set | 45 | # CONFIG_ARCH_NO_VIRT_TO_BUS is not set |
45 | CONFIG_PPC=y | 46 | CONFIG_PPC=y |
@@ -53,11 +54,14 @@ CONFIG_PPC_UDBG_16550=y | |||
53 | # CONFIG_GENERIC_TBSYNC is not set | 54 | # CONFIG_GENERIC_TBSYNC is not set |
54 | CONFIG_AUDIT_ARCH=y | 55 | CONFIG_AUDIT_ARCH=y |
55 | CONFIG_GENERIC_BUG=y | 56 | CONFIG_GENERIC_BUG=y |
57 | CONFIG_DTC=y | ||
56 | # CONFIG_DEFAULT_UIMAGE is not set | 58 | # CONFIG_DEFAULT_UIMAGE is not set |
57 | CONFIG_PPC_DCR_NATIVE=y | 59 | CONFIG_PPC_DCR_NATIVE=y |
58 | # CONFIG_PPC_DCR_MMIO is not set | 60 | # CONFIG_PPC_DCR_MMIO is not set |
59 | CONFIG_PPC_DCR=y | 61 | CONFIG_PPC_DCR=y |
62 | CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y | ||
60 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 63 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
64 | CONFIG_CONSTRUCTORS=y | ||
61 | 65 | ||
62 | # | 66 | # |
63 | # General setup | 67 | # General setup |
@@ -71,9 +75,19 @@ CONFIG_SWAP=y | |||
71 | CONFIG_SYSVIPC=y | 75 | CONFIG_SYSVIPC=y |
72 | CONFIG_SYSVIPC_SYSCTL=y | 76 | CONFIG_SYSVIPC_SYSCTL=y |
73 | CONFIG_POSIX_MQUEUE=y | 77 | CONFIG_POSIX_MQUEUE=y |
78 | CONFIG_POSIX_MQUEUE_SYSCTL=y | ||
74 | # CONFIG_BSD_PROCESS_ACCT is not set | 79 | # CONFIG_BSD_PROCESS_ACCT is not set |
75 | # CONFIG_TASKSTATS is not set | 80 | # CONFIG_TASKSTATS is not set |
76 | # CONFIG_AUDIT is not set | 81 | # CONFIG_AUDIT is not set |
82 | |||
83 | # | ||
84 | # RCU Subsystem | ||
85 | # | ||
86 | CONFIG_CLASSIC_RCU=y | ||
87 | # CONFIG_TREE_RCU is not set | ||
88 | # CONFIG_PREEMPT_RCU is not set | ||
89 | # CONFIG_TREE_RCU_TRACE is not set | ||
90 | # CONFIG_PREEMPT_RCU_TRACE is not set | ||
77 | # CONFIG_IKCONFIG is not set | 91 | # CONFIG_IKCONFIG is not set |
78 | CONFIG_LOG_BUF_SHIFT=14 | 92 | CONFIG_LOG_BUF_SHIFT=14 |
79 | # CONFIG_GROUP_SCHED is not set | 93 | # CONFIG_GROUP_SCHED is not set |
@@ -84,8 +98,12 @@ CONFIG_SYSFS_DEPRECATED_V2=y | |||
84 | # CONFIG_NAMESPACES is not set | 98 | # CONFIG_NAMESPACES is not set |
85 | CONFIG_BLK_DEV_INITRD=y | 99 | CONFIG_BLK_DEV_INITRD=y |
86 | CONFIG_INITRAMFS_SOURCE="" | 100 | CONFIG_INITRAMFS_SOURCE="" |
101 | CONFIG_RD_GZIP=y | ||
102 | # CONFIG_RD_BZIP2 is not set | ||
103 | # CONFIG_RD_LZMA is not set | ||
87 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 104 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
88 | CONFIG_SYSCTL=y | 105 | CONFIG_SYSCTL=y |
106 | CONFIG_ANON_INODES=y | ||
89 | CONFIG_EMBEDDED=y | 107 | CONFIG_EMBEDDED=y |
90 | CONFIG_SYSCTL_SYSCALL=y | 108 | CONFIG_SYSCTL_SYSCALL=y |
91 | CONFIG_KALLSYMS=y | 109 | CONFIG_KALLSYMS=y |
@@ -95,23 +113,30 @@ CONFIG_HOTPLUG=y | |||
95 | CONFIG_PRINTK=y | 113 | CONFIG_PRINTK=y |
96 | CONFIG_BUG=y | 114 | CONFIG_BUG=y |
97 | CONFIG_ELF_CORE=y | 115 | CONFIG_ELF_CORE=y |
98 | CONFIG_COMPAT_BRK=y | ||
99 | CONFIG_BASE_FULL=y | 116 | CONFIG_BASE_FULL=y |
100 | CONFIG_FUTEX=y | 117 | CONFIG_FUTEX=y |
101 | CONFIG_ANON_INODES=y | ||
102 | CONFIG_EPOLL=y | 118 | CONFIG_EPOLL=y |
103 | CONFIG_SIGNALFD=y | 119 | CONFIG_SIGNALFD=y |
104 | CONFIG_TIMERFD=y | 120 | CONFIG_TIMERFD=y |
105 | CONFIG_EVENTFD=y | 121 | CONFIG_EVENTFD=y |
106 | CONFIG_SHMEM=y | 122 | CONFIG_SHMEM=y |
107 | CONFIG_AIO=y | 123 | CONFIG_AIO=y |
124 | CONFIG_HAVE_PERF_COUNTERS=y | ||
125 | |||
126 | # | ||
127 | # Performance Counters | ||
128 | # | ||
129 | # CONFIG_PERF_COUNTERS is not set | ||
108 | CONFIG_VM_EVENT_COUNTERS=y | 130 | CONFIG_VM_EVENT_COUNTERS=y |
109 | CONFIG_PCI_QUIRKS=y | 131 | CONFIG_PCI_QUIRKS=y |
110 | CONFIG_SLUB_DEBUG=y | 132 | CONFIG_SLUB_DEBUG=y |
133 | # CONFIG_STRIP_ASM_SYMS is not set | ||
134 | CONFIG_COMPAT_BRK=y | ||
111 | # CONFIG_SLAB is not set | 135 | # CONFIG_SLAB is not set |
112 | CONFIG_SLUB=y | 136 | CONFIG_SLUB=y |
113 | # CONFIG_SLOB is not set | 137 | # CONFIG_SLOB is not set |
114 | # CONFIG_PROFILING is not set | 138 | # CONFIG_PROFILING is not set |
139 | # CONFIG_MARKERS is not set | ||
115 | CONFIG_HAVE_OPROFILE=y | 140 | CONFIG_HAVE_OPROFILE=y |
116 | # CONFIG_KPROBES is not set | 141 | # CONFIG_KPROBES is not set |
117 | CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y | 142 | CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y |
@@ -119,6 +144,12 @@ CONFIG_HAVE_IOREMAP_PROT=y | |||
119 | CONFIG_HAVE_KPROBES=y | 144 | CONFIG_HAVE_KPROBES=y |
120 | CONFIG_HAVE_KRETPROBES=y | 145 | CONFIG_HAVE_KRETPROBES=y |
121 | CONFIG_HAVE_ARCH_TRACEHOOK=y | 146 | CONFIG_HAVE_ARCH_TRACEHOOK=y |
147 | |||
148 | # | ||
149 | # GCOV-based kernel profiling | ||
150 | # | ||
151 | # CONFIG_GCOV_KERNEL is not set | ||
152 | # CONFIG_SLOW_WORK is not set | ||
122 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set | 153 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set |
123 | CONFIG_SLABINFO=y | 154 | CONFIG_SLABINFO=y |
124 | CONFIG_RT_MUTEXES=y | 155 | CONFIG_RT_MUTEXES=y |
@@ -130,8 +161,7 @@ CONFIG_MODULE_UNLOAD=y | |||
130 | # CONFIG_MODVERSIONS is not set | 161 | # CONFIG_MODVERSIONS is not set |
131 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 162 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
132 | CONFIG_BLOCK=y | 163 | CONFIG_BLOCK=y |
133 | CONFIG_LBD=y | 164 | CONFIG_LBDAF=y |
134 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
135 | # CONFIG_BLK_DEV_BSG is not set | 165 | # CONFIG_BLK_DEV_BSG is not set |
136 | # CONFIG_BLK_DEV_INTEGRITY is not set | 166 | # CONFIG_BLK_DEV_INTEGRITY is not set |
137 | 167 | ||
@@ -147,11 +177,6 @@ CONFIG_DEFAULT_AS=y | |||
147 | # CONFIG_DEFAULT_CFQ is not set | 177 | # CONFIG_DEFAULT_CFQ is not set |
148 | # CONFIG_DEFAULT_NOOP is not set | 178 | # CONFIG_DEFAULT_NOOP is not set |
149 | CONFIG_DEFAULT_IOSCHED="anticipatory" | 179 | CONFIG_DEFAULT_IOSCHED="anticipatory" |
150 | CONFIG_CLASSIC_RCU=y | ||
151 | # CONFIG_TREE_RCU is not set | ||
152 | # CONFIG_PREEMPT_RCU is not set | ||
153 | # CONFIG_TREE_RCU_TRACE is not set | ||
154 | # CONFIG_PREEMPT_RCU_TRACE is not set | ||
155 | # CONFIG_FREEZER is not set | 180 | # CONFIG_FREEZER is not set |
156 | CONFIG_PPC4xx_PCI_EXPRESS=y | 181 | CONFIG_PPC4xx_PCI_EXPRESS=y |
157 | 182 | ||
@@ -172,6 +197,7 @@ CONFIG_PPC4xx_PCI_EXPRESS=y | |||
172 | CONFIG_ARCHES=y | 197 | CONFIG_ARCHES=y |
173 | # CONFIG_CANYONLANDS is not set | 198 | # CONFIG_CANYONLANDS is not set |
174 | # CONFIG_GLACIER is not set | 199 | # CONFIG_GLACIER is not set |
200 | # CONFIG_REDWOOD is not set | ||
175 | # CONFIG_YOSEMITE is not set | 201 | # CONFIG_YOSEMITE is not set |
176 | # CONFIG_XILINX_VIRTEX440_GENERIC_BOARD is not set | 202 | # CONFIG_XILINX_VIRTEX440_GENERIC_BOARD is not set |
177 | CONFIG_PPC44x_SIMPLE=y | 203 | CONFIG_PPC44x_SIMPLE=y |
@@ -214,6 +240,7 @@ CONFIG_BINFMT_ELF=y | |||
214 | # CONFIG_BINFMT_MISC is not set | 240 | # CONFIG_BINFMT_MISC is not set |
215 | # CONFIG_MATH_EMULATION is not set | 241 | # CONFIG_MATH_EMULATION is not set |
216 | # CONFIG_IOMMU_HELPER is not set | 242 | # CONFIG_IOMMU_HELPER is not set |
243 | # CONFIG_SWIOTLB is not set | ||
217 | CONFIG_PPC_NEED_DMA_SYNC_OPS=y | 244 | CONFIG_PPC_NEED_DMA_SYNC_OPS=y |
218 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | 245 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y |
219 | CONFIG_ARCH_HAS_WALK_MEMORY=y | 246 | CONFIG_ARCH_HAS_WALK_MEMORY=y |
@@ -233,10 +260,14 @@ CONFIG_PHYS_ADDR_T_64BIT=y | |||
233 | CONFIG_ZONE_DMA_FLAG=1 | 260 | CONFIG_ZONE_DMA_FLAG=1 |
234 | CONFIG_BOUNCE=y | 261 | CONFIG_BOUNCE=y |
235 | CONFIG_VIRT_TO_BUS=y | 262 | CONFIG_VIRT_TO_BUS=y |
236 | CONFIG_UNEVICTABLE_LRU=y | 263 | CONFIG_HAVE_MLOCK=y |
264 | CONFIG_HAVE_MLOCKED_PAGE_BIT=y | ||
265 | CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 | ||
266 | CONFIG_STDBINUTILS=y | ||
237 | CONFIG_PPC_4K_PAGES=y | 267 | CONFIG_PPC_4K_PAGES=y |
238 | # CONFIG_PPC_16K_PAGES is not set | 268 | # CONFIG_PPC_16K_PAGES is not set |
239 | # CONFIG_PPC_64K_PAGES is not set | 269 | # CONFIG_PPC_64K_PAGES is not set |
270 | # CONFIG_PPC_256K_PAGES is not set | ||
240 | CONFIG_FORCE_MAX_ZONEORDER=11 | 271 | CONFIG_FORCE_MAX_ZONEORDER=11 |
241 | CONFIG_PROC_DEVICETREE=y | 272 | CONFIG_PROC_DEVICETREE=y |
242 | CONFIG_CMDLINE_BOOL=y | 273 | CONFIG_CMDLINE_BOOL=y |
@@ -261,6 +292,7 @@ CONFIG_ARCH_SUPPORTS_MSI=y | |||
261 | # CONFIG_PCI_LEGACY is not set | 292 | # CONFIG_PCI_LEGACY is not set |
262 | # CONFIG_PCI_DEBUG is not set | 293 | # CONFIG_PCI_DEBUG is not set |
263 | # CONFIG_PCI_STUB is not set | 294 | # CONFIG_PCI_STUB is not set |
295 | # CONFIG_PCI_IOV is not set | ||
264 | # CONFIG_PCCARD is not set | 296 | # CONFIG_PCCARD is not set |
265 | # CONFIG_HOTPLUG_PCI is not set | 297 | # CONFIG_HOTPLUG_PCI is not set |
266 | # CONFIG_HAS_RAPIDIO is not set | 298 | # CONFIG_HAS_RAPIDIO is not set |
@@ -278,14 +310,12 @@ CONFIG_PAGE_OFFSET=0xc0000000 | |||
278 | CONFIG_KERNEL_START=0xc0000000 | 310 | CONFIG_KERNEL_START=0xc0000000 |
279 | CONFIG_PHYSICAL_START=0x00000000 | 311 | CONFIG_PHYSICAL_START=0x00000000 |
280 | CONFIG_TASK_SIZE=0xc0000000 | 312 | CONFIG_TASK_SIZE=0xc0000000 |
281 | CONFIG_CONSISTENT_START=0xff100000 | ||
282 | CONFIG_CONSISTENT_SIZE=0x00200000 | 313 | CONFIG_CONSISTENT_SIZE=0x00200000 |
283 | CONFIG_NET=y | 314 | CONFIG_NET=y |
284 | 315 | ||
285 | # | 316 | # |
286 | # Networking options | 317 | # Networking options |
287 | # | 318 | # |
288 | CONFIG_COMPAT_NET_DEV_OPS=y | ||
289 | CONFIG_PACKET=y | 319 | CONFIG_PACKET=y |
290 | # CONFIG_PACKET_MMAP is not set | 320 | # CONFIG_PACKET_MMAP is not set |
291 | CONFIG_UNIX=y | 321 | CONFIG_UNIX=y |
@@ -335,6 +365,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
335 | # CONFIG_LAPB is not set | 365 | # CONFIG_LAPB is not set |
336 | # CONFIG_ECONET is not set | 366 | # CONFIG_ECONET is not set |
337 | # CONFIG_WAN_ROUTER is not set | 367 | # CONFIG_WAN_ROUTER is not set |
368 | # CONFIG_PHONET is not set | ||
369 | # CONFIG_IEEE802154 is not set | ||
338 | # CONFIG_NET_SCHED is not set | 370 | # CONFIG_NET_SCHED is not set |
339 | # CONFIG_DCB is not set | 371 | # CONFIG_DCB is not set |
340 | 372 | ||
@@ -347,7 +379,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
347 | # CONFIG_IRDA is not set | 379 | # CONFIG_IRDA is not set |
348 | # CONFIG_BT is not set | 380 | # CONFIG_BT is not set |
349 | # CONFIG_AF_RXRPC is not set | 381 | # CONFIG_AF_RXRPC is not set |
350 | # CONFIG_PHONET is not set | ||
351 | # CONFIG_WIRELESS is not set | 382 | # CONFIG_WIRELESS is not set |
352 | # CONFIG_WIMAX is not set | 383 | # CONFIG_WIMAX is not set |
353 | # CONFIG_RFKILL is not set | 384 | # CONFIG_RFKILL is not set |
@@ -371,8 +402,92 @@ CONFIG_EXTRA_FIRMWARE="" | |||
371 | # CONFIG_SYS_HYPERVISOR is not set | 402 | # CONFIG_SYS_HYPERVISOR is not set |
372 | CONFIG_CONNECTOR=y | 403 | CONFIG_CONNECTOR=y |
373 | CONFIG_PROC_EVENTS=y | 404 | CONFIG_PROC_EVENTS=y |
374 | # CONFIG_MTD is not set | 405 | CONFIG_MTD=y |
406 | # CONFIG_MTD_DEBUG is not set | ||
407 | # CONFIG_MTD_CONCAT is not set | ||
408 | CONFIG_MTD_PARTITIONS=y | ||
409 | # CONFIG_MTD_TESTS is not set | ||
410 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
411 | CONFIG_MTD_CMDLINE_PARTS=y | ||
412 | CONFIG_MTD_OF_PARTS=y | ||
413 | # CONFIG_MTD_AR7_PARTS is not set | ||
414 | |||
415 | # | ||
416 | # User Modules And Translation Layers | ||
417 | # | ||
418 | CONFIG_MTD_CHAR=y | ||
419 | CONFIG_MTD_BLKDEVS=y | ||
420 | CONFIG_MTD_BLOCK=y | ||
421 | # CONFIG_FTL is not set | ||
422 | # CONFIG_NFTL is not set | ||
423 | # CONFIG_INFTL is not set | ||
424 | # CONFIG_RFD_FTL is not set | ||
425 | # CONFIG_SSFDC is not set | ||
426 | # CONFIG_MTD_OOPS is not set | ||
427 | |||
428 | # | ||
429 | # RAM/ROM/Flash chip drivers | ||
430 | # | ||
431 | CONFIG_MTD_CFI=y | ||
432 | # CONFIG_MTD_JEDECPROBE is not set | ||
433 | CONFIG_MTD_GEN_PROBE=y | ||
434 | # CONFIG_MTD_CFI_ADV_OPTIONS is not set | ||
435 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
436 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
437 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
438 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
439 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
440 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
441 | CONFIG_MTD_CFI_I1=y | ||
442 | CONFIG_MTD_CFI_I2=y | ||
443 | # CONFIG_MTD_CFI_I4 is not set | ||
444 | # CONFIG_MTD_CFI_I8 is not set | ||
445 | # CONFIG_MTD_CFI_INTELEXT is not set | ||
446 | CONFIG_MTD_CFI_AMDSTD=y | ||
447 | # CONFIG_MTD_CFI_STAA is not set | ||
448 | CONFIG_MTD_CFI_UTIL=y | ||
449 | # CONFIG_MTD_RAM is not set | ||
450 | # CONFIG_MTD_ROM is not set | ||
451 | # CONFIG_MTD_ABSENT is not set | ||
452 | |||
453 | # | ||
454 | # Mapping drivers for chip access | ||
455 | # | ||
456 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
457 | # CONFIG_MTD_PHYSMAP is not set | ||
458 | CONFIG_MTD_PHYSMAP_OF=y | ||
459 | # CONFIG_MTD_INTEL_VR_NOR is not set | ||
460 | # CONFIG_MTD_PLATRAM is not set | ||
461 | |||
462 | # | ||
463 | # Self-contained MTD device drivers | ||
464 | # | ||
465 | # CONFIG_MTD_PMC551 is not set | ||
466 | # CONFIG_MTD_SLRAM is not set | ||
467 | # CONFIG_MTD_PHRAM is not set | ||
468 | # CONFIG_MTD_MTDRAM is not set | ||
469 | # CONFIG_MTD_BLOCK2MTD is not set | ||
470 | |||
471 | # | ||
472 | # Disk-On-Chip Device Drivers | ||
473 | # | ||
474 | # CONFIG_MTD_DOC2000 is not set | ||
475 | # CONFIG_MTD_DOC2001 is not set | ||
476 | # CONFIG_MTD_DOC2001PLUS is not set | ||
477 | # CONFIG_MTD_NAND is not set | ||
478 | # CONFIG_MTD_ONENAND is not set | ||
479 | |||
480 | # | ||
481 | # LPDDR flash memory drivers | ||
482 | # | ||
483 | # CONFIG_MTD_LPDDR is not set | ||
484 | |||
485 | # | ||
486 | # UBI - Unsorted block images | ||
487 | # | ||
488 | # CONFIG_MTD_UBI is not set | ||
375 | CONFIG_OF_DEVICE=y | 489 | CONFIG_OF_DEVICE=y |
490 | CONFIG_OF_I2C=y | ||
376 | # CONFIG_PARPORT is not set | 491 | # CONFIG_PARPORT is not set |
377 | CONFIG_BLK_DEV=y | 492 | CONFIG_BLK_DEV=y |
378 | # CONFIG_BLK_DEV_FD is not set | 493 | # CONFIG_BLK_DEV_FD is not set |
@@ -412,7 +527,11 @@ CONFIG_HAVE_IDE=y | |||
412 | # | 527 | # |
413 | 528 | ||
414 | # | 529 | # |
415 | # Enable only one of the two stacks, unless you know what you are doing | 530 | # You can enable one or both FireWire driver stacks. |
531 | # | ||
532 | |||
533 | # | ||
534 | # See the help texts for more information. | ||
416 | # | 535 | # |
417 | # CONFIG_FIREWIRE is not set | 536 | # CONFIG_FIREWIRE is not set |
418 | # CONFIG_IEEE1394 is not set | 537 | # CONFIG_IEEE1394 is not set |
@@ -433,6 +552,8 @@ CONFIG_NET_ETHERNET=y | |||
433 | # CONFIG_SUNGEM is not set | 552 | # CONFIG_SUNGEM is not set |
434 | # CONFIG_CASSINI is not set | 553 | # CONFIG_CASSINI is not set |
435 | # CONFIG_NET_VENDOR_3COM is not set | 554 | # CONFIG_NET_VENDOR_3COM is not set |
555 | # CONFIG_ETHOC is not set | ||
556 | # CONFIG_DNET is not set | ||
436 | # CONFIG_NET_TULIP is not set | 557 | # CONFIG_NET_TULIP is not set |
437 | # CONFIG_HP100 is not set | 558 | # CONFIG_HP100 is not set |
438 | CONFIG_IBM_NEW_EMAC=y | 559 | CONFIG_IBM_NEW_EMAC=y |
@@ -451,6 +572,7 @@ CONFIG_IBM_NEW_EMAC_EMAC4=y | |||
451 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set | 572 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set |
452 | # CONFIG_NET_PCI is not set | 573 | # CONFIG_NET_PCI is not set |
453 | # CONFIG_B44 is not set | 574 | # CONFIG_B44 is not set |
575 | # CONFIG_KS8842 is not set | ||
454 | # CONFIG_ATL2 is not set | 576 | # CONFIG_ATL2 is not set |
455 | # CONFIG_NETDEV_1000 is not set | 577 | # CONFIG_NETDEV_1000 is not set |
456 | # CONFIG_NETDEV_10000 is not set | 578 | # CONFIG_NETDEV_10000 is not set |
@@ -461,7 +583,6 @@ CONFIG_IBM_NEW_EMAC_EMAC4=y | |||
461 | # | 583 | # |
462 | # CONFIG_WLAN_PRE80211 is not set | 584 | # CONFIG_WLAN_PRE80211 is not set |
463 | # CONFIG_WLAN_80211 is not set | 585 | # CONFIG_WLAN_80211 is not set |
464 | # CONFIG_IWLWIFI_LEDS is not set | ||
465 | 586 | ||
466 | # | 587 | # |
467 | # Enable WiMAX (Networking options) to see the WiMAX drivers | 588 | # Enable WiMAX (Networking options) to see the WiMAX drivers |
@@ -533,13 +654,143 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
533 | # CONFIG_RAW_DRIVER is not set | 654 | # CONFIG_RAW_DRIVER is not set |
534 | # CONFIG_TCG_TPM is not set | 655 | # CONFIG_TCG_TPM is not set |
535 | CONFIG_DEVPORT=y | 656 | CONFIG_DEVPORT=y |
536 | # CONFIG_I2C is not set | 657 | CONFIG_I2C=y |
658 | CONFIG_I2C_BOARDINFO=y | ||
659 | CONFIG_I2C_CHARDEV=y | ||
660 | CONFIG_I2C_HELPER_AUTO=y | ||
661 | |||
662 | # | ||
663 | # I2C Hardware Bus support | ||
664 | # | ||
665 | |||
666 | # | ||
667 | # PC SMBus host controller drivers | ||
668 | # | ||
669 | # CONFIG_I2C_ALI1535 is not set | ||
670 | # CONFIG_I2C_ALI1563 is not set | ||
671 | # CONFIG_I2C_ALI15X3 is not set | ||
672 | # CONFIG_I2C_AMD756 is not set | ||
673 | # CONFIG_I2C_AMD8111 is not set | ||
674 | # CONFIG_I2C_I801 is not set | ||
675 | # CONFIG_I2C_ISCH is not set | ||
676 | # CONFIG_I2C_PIIX4 is not set | ||
677 | # CONFIG_I2C_NFORCE2 is not set | ||
678 | # CONFIG_I2C_SIS5595 is not set | ||
679 | # CONFIG_I2C_SIS630 is not set | ||
680 | # CONFIG_I2C_SIS96X is not set | ||
681 | # CONFIG_I2C_VIA is not set | ||
682 | # CONFIG_I2C_VIAPRO is not set | ||
683 | |||
684 | # | ||
685 | # I2C system bus drivers (mostly embedded / system-on-chip) | ||
686 | # | ||
687 | CONFIG_I2C_IBM_IIC=y | ||
688 | # CONFIG_I2C_MPC is not set | ||
689 | # CONFIG_I2C_OCORES is not set | ||
690 | # CONFIG_I2C_SIMTEC is not set | ||
691 | |||
692 | # | ||
693 | # External I2C/SMBus adapter drivers | ||
694 | # | ||
695 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
696 | # CONFIG_I2C_TAOS_EVM is not set | ||
697 | |||
698 | # | ||
699 | # Graphics adapter I2C/DDC channel drivers | ||
700 | # | ||
701 | # CONFIG_I2C_VOODOO3 is not set | ||
702 | |||
703 | # | ||
704 | # Other I2C/SMBus bus drivers | ||
705 | # | ||
706 | # CONFIG_I2C_PCA_PLATFORM is not set | ||
707 | # CONFIG_I2C_STUB is not set | ||
708 | |||
709 | # | ||
710 | # Miscellaneous I2C Chip support | ||
711 | # | ||
712 | # CONFIG_DS1682 is not set | ||
713 | # CONFIG_SENSORS_PCF8574 is not set | ||
714 | # CONFIG_PCF8575 is not set | ||
715 | # CONFIG_SENSORS_PCA9539 is not set | ||
716 | # CONFIG_SENSORS_TSL2550 is not set | ||
717 | # CONFIG_I2C_DEBUG_CORE is not set | ||
718 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
719 | # CONFIG_I2C_DEBUG_BUS is not set | ||
720 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
537 | # CONFIG_SPI is not set | 721 | # CONFIG_SPI is not set |
722 | |||
723 | # | ||
724 | # PPS support | ||
725 | # | ||
726 | # CONFIG_PPS is not set | ||
538 | CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y | 727 | CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y |
539 | # CONFIG_GPIOLIB is not set | 728 | # CONFIG_GPIOLIB is not set |
540 | # CONFIG_W1 is not set | 729 | # CONFIG_W1 is not set |
541 | # CONFIG_POWER_SUPPLY is not set | 730 | # CONFIG_POWER_SUPPLY is not set |
542 | # CONFIG_HWMON is not set | 731 | CONFIG_HWMON=y |
732 | # CONFIG_HWMON_VID is not set | ||
733 | CONFIG_SENSORS_AD7414=y | ||
734 | # CONFIG_SENSORS_AD7418 is not set | ||
735 | # CONFIG_SENSORS_ADM1021 is not set | ||
736 | # CONFIG_SENSORS_ADM1025 is not set | ||
737 | # CONFIG_SENSORS_ADM1026 is not set | ||
738 | # CONFIG_SENSORS_ADM1029 is not set | ||
739 | # CONFIG_SENSORS_ADM1031 is not set | ||
740 | # CONFIG_SENSORS_ADM9240 is not set | ||
741 | # CONFIG_SENSORS_ADT7462 is not set | ||
742 | # CONFIG_SENSORS_ADT7470 is not set | ||
743 | # CONFIG_SENSORS_ADT7473 is not set | ||
744 | # CONFIG_SENSORS_ADT7475 is not set | ||
745 | # CONFIG_SENSORS_ATXP1 is not set | ||
746 | # CONFIG_SENSORS_DS1621 is not set | ||
747 | # CONFIG_SENSORS_I5K_AMB is not set | ||
748 | # CONFIG_SENSORS_F71805F is not set | ||
749 | # CONFIG_SENSORS_F71882FG is not set | ||
750 | # CONFIG_SENSORS_F75375S is not set | ||
751 | # CONFIG_SENSORS_G760A is not set | ||
752 | # CONFIG_SENSORS_GL518SM is not set | ||
753 | # CONFIG_SENSORS_GL520SM is not set | ||
754 | # CONFIG_SENSORS_IT87 is not set | ||
755 | # CONFIG_SENSORS_LM63 is not set | ||
756 | # CONFIG_SENSORS_LM75 is not set | ||
757 | # CONFIG_SENSORS_LM77 is not set | ||
758 | # CONFIG_SENSORS_LM78 is not set | ||
759 | # CONFIG_SENSORS_LM80 is not set | ||
760 | # CONFIG_SENSORS_LM83 is not set | ||
761 | # CONFIG_SENSORS_LM85 is not set | ||
762 | # CONFIG_SENSORS_LM87 is not set | ||
763 | # CONFIG_SENSORS_LM90 is not set | ||
764 | # CONFIG_SENSORS_LM92 is not set | ||
765 | # CONFIG_SENSORS_LM93 is not set | ||
766 | # CONFIG_SENSORS_LTC4215 is not set | ||
767 | # CONFIG_SENSORS_LTC4245 is not set | ||
768 | # CONFIG_SENSORS_LM95241 is not set | ||
769 | # CONFIG_SENSORS_MAX1619 is not set | ||
770 | # CONFIG_SENSORS_MAX6650 is not set | ||
771 | # CONFIG_SENSORS_PC87360 is not set | ||
772 | # CONFIG_SENSORS_PC87427 is not set | ||
773 | # CONFIG_SENSORS_PCF8591 is not set | ||
774 | # CONFIG_SENSORS_SIS5595 is not set | ||
775 | # CONFIG_SENSORS_DME1737 is not set | ||
776 | # CONFIG_SENSORS_SMSC47M1 is not set | ||
777 | # CONFIG_SENSORS_SMSC47M192 is not set | ||
778 | # CONFIG_SENSORS_SMSC47B397 is not set | ||
779 | # CONFIG_SENSORS_ADS7828 is not set | ||
780 | # CONFIG_SENSORS_THMC50 is not set | ||
781 | # CONFIG_SENSORS_TMP401 is not set | ||
782 | # CONFIG_SENSORS_VIA686A is not set | ||
783 | # CONFIG_SENSORS_VT1211 is not set | ||
784 | # CONFIG_SENSORS_VT8231 is not set | ||
785 | # CONFIG_SENSORS_W83781D is not set | ||
786 | # CONFIG_SENSORS_W83791D is not set | ||
787 | # CONFIG_SENSORS_W83792D is not set | ||
788 | # CONFIG_SENSORS_W83793 is not set | ||
789 | # CONFIG_SENSORS_W83L785TS is not set | ||
790 | # CONFIG_SENSORS_W83L786NG is not set | ||
791 | # CONFIG_SENSORS_W83627HF is not set | ||
792 | # CONFIG_SENSORS_W83627EHF is not set | ||
793 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
543 | # CONFIG_THERMAL is not set | 794 | # CONFIG_THERMAL is not set |
544 | # CONFIG_THERMAL_HWMON is not set | 795 | # CONFIG_THERMAL_HWMON is not set |
545 | # CONFIG_WATCHDOG is not set | 796 | # CONFIG_WATCHDOG is not set |
@@ -556,24 +807,15 @@ CONFIG_SSB_POSSIBLE=y | |||
556 | # CONFIG_MFD_CORE is not set | 807 | # CONFIG_MFD_CORE is not set |
557 | # CONFIG_MFD_SM501 is not set | 808 | # CONFIG_MFD_SM501 is not set |
558 | # CONFIG_HTC_PASIC3 is not set | 809 | # CONFIG_HTC_PASIC3 is not set |
810 | # CONFIG_TWL4030_CORE is not set | ||
559 | # CONFIG_MFD_TMIO is not set | 811 | # CONFIG_MFD_TMIO is not set |
812 | # CONFIG_PMIC_DA903X is not set | ||
813 | # CONFIG_MFD_WM8400 is not set | ||
814 | # CONFIG_MFD_WM8350_I2C is not set | ||
815 | # CONFIG_MFD_PCF50633 is not set | ||
816 | # CONFIG_AB3100_CORE is not set | ||
560 | # CONFIG_REGULATOR is not set | 817 | # CONFIG_REGULATOR is not set |
561 | 818 | # CONFIG_MEDIA_SUPPORT is not set | |
562 | # | ||
563 | # Multimedia devices | ||
564 | # | ||
565 | |||
566 | # | ||
567 | # Multimedia core support | ||
568 | # | ||
569 | # CONFIG_VIDEO_DEV is not set | ||
570 | # CONFIG_DVB_CORE is not set | ||
571 | # CONFIG_VIDEO_MEDIA is not set | ||
572 | |||
573 | # | ||
574 | # Multimedia drivers | ||
575 | # | ||
576 | CONFIG_DAB=y | ||
577 | 819 | ||
578 | # | 820 | # |
579 | # Graphics support | 821 | # Graphics support |
@@ -600,7 +842,12 @@ CONFIG_VIDEO_OUTPUT_CONTROL=m | |||
600 | # CONFIG_EDAC is not set | 842 | # CONFIG_EDAC is not set |
601 | # CONFIG_RTC_CLASS is not set | 843 | # CONFIG_RTC_CLASS is not set |
602 | # CONFIG_DMADEVICES is not set | 844 | # CONFIG_DMADEVICES is not set |
845 | # CONFIG_AUXDISPLAY is not set | ||
603 | # CONFIG_UIO is not set | 846 | # CONFIG_UIO is not set |
847 | |||
848 | # | ||
849 | # TI VLYNQ | ||
850 | # | ||
604 | # CONFIG_STAGING is not set | 851 | # CONFIG_STAGING is not set |
605 | 852 | ||
606 | # | 853 | # |
@@ -614,11 +861,12 @@ CONFIG_EXT2_FS=y | |||
614 | # CONFIG_REISERFS_FS is not set | 861 | # CONFIG_REISERFS_FS is not set |
615 | # CONFIG_JFS_FS is not set | 862 | # CONFIG_JFS_FS is not set |
616 | # CONFIG_FS_POSIX_ACL is not set | 863 | # CONFIG_FS_POSIX_ACL is not set |
617 | CONFIG_FILE_LOCKING=y | ||
618 | # CONFIG_XFS_FS is not set | 864 | # CONFIG_XFS_FS is not set |
619 | # CONFIG_GFS2_FS is not set | 865 | # CONFIG_GFS2_FS is not set |
620 | # CONFIG_OCFS2_FS is not set | 866 | # CONFIG_OCFS2_FS is not set |
621 | # CONFIG_BTRFS_FS is not set | 867 | # CONFIG_BTRFS_FS is not set |
868 | CONFIG_FILE_LOCKING=y | ||
869 | CONFIG_FSNOTIFY=y | ||
622 | CONFIG_DNOTIFY=y | 870 | CONFIG_DNOTIFY=y |
623 | CONFIG_INOTIFY=y | 871 | CONFIG_INOTIFY=y |
624 | CONFIG_INOTIFY_USER=y | 872 | CONFIG_INOTIFY_USER=y |
@@ -628,6 +876,11 @@ CONFIG_INOTIFY_USER=y | |||
628 | # CONFIG_FUSE_FS is not set | 876 | # CONFIG_FUSE_FS is not set |
629 | 877 | ||
630 | # | 878 | # |
879 | # Caches | ||
880 | # | ||
881 | # CONFIG_FSCACHE is not set | ||
882 | |||
883 | # | ||
631 | # CD-ROM/DVD Filesystems | 884 | # CD-ROM/DVD Filesystems |
632 | # | 885 | # |
633 | # CONFIG_ISO9660_FS is not set | 886 | # CONFIG_ISO9660_FS is not set |
@@ -660,6 +913,17 @@ CONFIG_MISC_FILESYSTEMS=y | |||
660 | # CONFIG_BEFS_FS is not set | 913 | # CONFIG_BEFS_FS is not set |
661 | # CONFIG_BFS_FS is not set | 914 | # CONFIG_BFS_FS is not set |
662 | # CONFIG_EFS_FS is not set | 915 | # CONFIG_EFS_FS is not set |
916 | CONFIG_JFFS2_FS=y | ||
917 | CONFIG_JFFS2_FS_DEBUG=0 | ||
918 | CONFIG_JFFS2_FS_WRITEBUFFER=y | ||
919 | # CONFIG_JFFS2_FS_WBUF_VERIFY is not set | ||
920 | # CONFIG_JFFS2_SUMMARY is not set | ||
921 | # CONFIG_JFFS2_FS_XATTR is not set | ||
922 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | ||
923 | CONFIG_JFFS2_ZLIB=y | ||
924 | # CONFIG_JFFS2_LZO is not set | ||
925 | CONFIG_JFFS2_RTIME=y | ||
926 | # CONFIG_JFFS2_RUBIN is not set | ||
663 | CONFIG_CRAMFS=y | 927 | CONFIG_CRAMFS=y |
664 | # CONFIG_SQUASHFS is not set | 928 | # CONFIG_SQUASHFS is not set |
665 | # CONFIG_VXFS_FS is not set | 929 | # CONFIG_VXFS_FS is not set |
@@ -670,6 +934,7 @@ CONFIG_CRAMFS=y | |||
670 | # CONFIG_ROMFS_FS is not set | 934 | # CONFIG_ROMFS_FS is not set |
671 | # CONFIG_SYSV_FS is not set | 935 | # CONFIG_SYSV_FS is not set |
672 | # CONFIG_UFS_FS is not set | 936 | # CONFIG_UFS_FS is not set |
937 | # CONFIG_NILFS2_FS is not set | ||
673 | CONFIG_NETWORK_FILESYSTEMS=y | 938 | CONFIG_NETWORK_FILESYSTEMS=y |
674 | CONFIG_NFS_FS=y | 939 | CONFIG_NFS_FS=y |
675 | CONFIG_NFS_V3=y | 940 | CONFIG_NFS_V3=y |
@@ -681,7 +946,6 @@ CONFIG_LOCKD=y | |||
681 | CONFIG_LOCKD_V4=y | 946 | CONFIG_LOCKD_V4=y |
682 | CONFIG_NFS_COMMON=y | 947 | CONFIG_NFS_COMMON=y |
683 | CONFIG_SUNRPC=y | 948 | CONFIG_SUNRPC=y |
684 | # CONFIG_SUNRPC_REGISTER_V4 is not set | ||
685 | # CONFIG_RPCSEC_GSS_KRB5 is not set | 949 | # CONFIG_RPCSEC_GSS_KRB5 is not set |
686 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | 950 | # CONFIG_RPCSEC_GSS_SPKM3 is not set |
687 | # CONFIG_SMB_FS is not set | 951 | # CONFIG_SMB_FS is not set |
@@ -697,6 +961,7 @@ CONFIG_SUNRPC=y | |||
697 | CONFIG_MSDOS_PARTITION=y | 961 | CONFIG_MSDOS_PARTITION=y |
698 | # CONFIG_NLS is not set | 962 | # CONFIG_NLS is not set |
699 | # CONFIG_DLM is not set | 963 | # CONFIG_DLM is not set |
964 | # CONFIG_BINARY_PRINTF is not set | ||
700 | 965 | ||
701 | # | 966 | # |
702 | # Library routines | 967 | # Library routines |
@@ -711,11 +976,14 @@ CONFIG_CRC32=y | |||
711 | # CONFIG_CRC7 is not set | 976 | # CONFIG_CRC7 is not set |
712 | # CONFIG_LIBCRC32C is not set | 977 | # CONFIG_LIBCRC32C is not set |
713 | CONFIG_ZLIB_INFLATE=y | 978 | CONFIG_ZLIB_INFLATE=y |
714 | CONFIG_PLIST=y | 979 | CONFIG_ZLIB_DEFLATE=y |
980 | CONFIG_DECOMPRESS_GZIP=y | ||
715 | CONFIG_HAS_IOMEM=y | 981 | CONFIG_HAS_IOMEM=y |
716 | CONFIG_HAS_IOPORT=y | 982 | CONFIG_HAS_IOPORT=y |
717 | CONFIG_HAS_DMA=y | 983 | CONFIG_HAS_DMA=y |
718 | CONFIG_HAVE_LMB=y | 984 | CONFIG_HAVE_LMB=y |
985 | CONFIG_NLATTR=y | ||
986 | CONFIG_GENERIC_ATOMIC64=y | ||
719 | 987 | ||
720 | # | 988 | # |
721 | # Kernel hacking | 989 | # Kernel hacking |
@@ -733,6 +1001,9 @@ CONFIG_DEBUG_KERNEL=y | |||
733 | CONFIG_DETECT_SOFTLOCKUP=y | 1001 | CONFIG_DETECT_SOFTLOCKUP=y |
734 | # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set | 1002 | # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set |
735 | CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 | 1003 | CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 |
1004 | CONFIG_DETECT_HUNG_TASK=y | ||
1005 | # CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set | ||
1006 | CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 | ||
736 | CONFIG_SCHED_DEBUG=y | 1007 | CONFIG_SCHED_DEBUG=y |
737 | # CONFIG_SCHEDSTATS is not set | 1008 | # CONFIG_SCHEDSTATS is not set |
738 | # CONFIG_TIMER_STATS is not set | 1009 | # CONFIG_TIMER_STATS is not set |
@@ -743,6 +1014,9 @@ CONFIG_SCHED_DEBUG=y | |||
743 | # CONFIG_RT_MUTEX_TESTER is not set | 1014 | # CONFIG_RT_MUTEX_TESTER is not set |
744 | # CONFIG_DEBUG_SPINLOCK is not set | 1015 | # CONFIG_DEBUG_SPINLOCK is not set |
745 | # CONFIG_DEBUG_MUTEXES is not set | 1016 | # CONFIG_DEBUG_MUTEXES is not set |
1017 | # CONFIG_DEBUG_LOCK_ALLOC is not set | ||
1018 | # CONFIG_PROVE_LOCKING is not set | ||
1019 | # CONFIG_LOCK_STAT is not set | ||
746 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 1020 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
747 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | 1021 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set |
748 | # CONFIG_DEBUG_KOBJECT is not set | 1022 | # CONFIG_DEBUG_KOBJECT is not set |
@@ -754,7 +1028,6 @@ CONFIG_SCHED_DEBUG=y | |||
754 | # CONFIG_DEBUG_LIST is not set | 1028 | # CONFIG_DEBUG_LIST is not set |
755 | # CONFIG_DEBUG_SG is not set | 1029 | # CONFIG_DEBUG_SG is not set |
756 | # CONFIG_DEBUG_NOTIFIERS is not set | 1030 | # CONFIG_DEBUG_NOTIFIERS is not set |
757 | # CONFIG_BOOT_PRINTK_DELAY is not set | ||
758 | # CONFIG_RCU_TORTURE_TEST is not set | 1031 | # CONFIG_RCU_TORTURE_TEST is not set |
759 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | 1032 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set |
760 | # CONFIG_BACKTRACE_SELF_TEST is not set | 1033 | # CONFIG_BACKTRACE_SELF_TEST is not set |
@@ -762,27 +1035,36 @@ CONFIG_SCHED_DEBUG=y | |||
762 | # CONFIG_FAULT_INJECTION is not set | 1035 | # CONFIG_FAULT_INJECTION is not set |
763 | # CONFIG_LATENCYTOP is not set | 1036 | # CONFIG_LATENCYTOP is not set |
764 | CONFIG_SYSCTL_SYSCALL_CHECK=y | 1037 | CONFIG_SYSCTL_SYSCALL_CHECK=y |
1038 | # CONFIG_DEBUG_PAGEALLOC is not set | ||
765 | CONFIG_HAVE_FUNCTION_TRACER=y | 1039 | CONFIG_HAVE_FUNCTION_TRACER=y |
1040 | CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y | ||
766 | CONFIG_HAVE_DYNAMIC_FTRACE=y | 1041 | CONFIG_HAVE_DYNAMIC_FTRACE=y |
767 | CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y | 1042 | CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y |
768 | 1043 | CONFIG_TRACING_SUPPORT=y | |
769 | # | 1044 | CONFIG_FTRACE=y |
770 | # Tracers | ||
771 | # | ||
772 | # CONFIG_FUNCTION_TRACER is not set | 1045 | # CONFIG_FUNCTION_TRACER is not set |
1046 | # CONFIG_IRQSOFF_TRACER is not set | ||
773 | # CONFIG_SCHED_TRACER is not set | 1047 | # CONFIG_SCHED_TRACER is not set |
774 | # CONFIG_CONTEXT_SWITCH_TRACER is not set | 1048 | # CONFIG_ENABLE_DEFAULT_TRACERS is not set |
775 | # CONFIG_BOOT_TRACER is not set | 1049 | # CONFIG_BOOT_TRACER is not set |
776 | # CONFIG_TRACE_BRANCH_PROFILING is not set | 1050 | CONFIG_BRANCH_PROFILE_NONE=y |
1051 | # CONFIG_PROFILE_ANNOTATED_BRANCHES is not set | ||
1052 | # CONFIG_PROFILE_ALL_BRANCHES is not set | ||
777 | # CONFIG_STACK_TRACER is not set | 1053 | # CONFIG_STACK_TRACER is not set |
778 | # CONFIG_DYNAMIC_PRINTK_DEBUG is not set | 1054 | # CONFIG_KMEMTRACE is not set |
1055 | # CONFIG_WORKQUEUE_TRACER is not set | ||
1056 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
1057 | # CONFIG_DYNAMIC_DEBUG is not set | ||
779 | # CONFIG_SAMPLES is not set | 1058 | # CONFIG_SAMPLES is not set |
780 | CONFIG_HAVE_ARCH_KGDB=y | 1059 | CONFIG_HAVE_ARCH_KGDB=y |
781 | # CONFIG_KGDB is not set | 1060 | # CONFIG_KGDB is not set |
1061 | # CONFIG_KMEMCHECK is not set | ||
1062 | # CONFIG_PPC_DISABLE_WERROR is not set | ||
1063 | CONFIG_PPC_WERROR=y | ||
782 | CONFIG_PRINT_STACK_DEPTH=64 | 1064 | CONFIG_PRINT_STACK_DEPTH=64 |
783 | # CONFIG_DEBUG_STACKOVERFLOW is not set | 1065 | # CONFIG_DEBUG_STACKOVERFLOW is not set |
784 | # CONFIG_DEBUG_STACK_USAGE is not set | 1066 | # CONFIG_DEBUG_STACK_USAGE is not set |
785 | # CONFIG_DEBUG_PAGEALLOC is not set | 1067 | # CONFIG_PPC_EMULATED_STATS is not set |
786 | # CONFIG_CODE_PATCHING_SELFTEST is not set | 1068 | # CONFIG_CODE_PATCHING_SELFTEST is not set |
787 | # CONFIG_FTR_FIXUP_SELFTEST is not set | 1069 | # CONFIG_FTR_FIXUP_SELFTEST is not set |
788 | # CONFIG_MSI_BITMAP_SELFTEST is not set | 1070 | # CONFIG_MSI_BITMAP_SELFTEST is not set |
diff --git a/arch/powerpc/configs/44x/canyonlands_defconfig b/arch/powerpc/configs/44x/canyonlands_defconfig index 5e85412eb9fa..b312b166be66 100644 --- a/arch/powerpc/configs/44x/canyonlands_defconfig +++ b/arch/powerpc/configs/44x/canyonlands_defconfig | |||
@@ -1,14 +1,14 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.29-rc3 | 3 | # Linux kernel version: 2.6.31-rc4 |
4 | # Mon Feb 2 13:13:04 2009 | 4 | # Wed Jul 29 17:27:20 2009 |
5 | # | 5 | # |
6 | # CONFIG_PPC64 is not set | 6 | # CONFIG_PPC64 is not set |
7 | 7 | ||
8 | # | 8 | # |
9 | # Processor support | 9 | # Processor support |
10 | # | 10 | # |
11 | # CONFIG_6xx is not set | 11 | # CONFIG_PPC_BOOK3S_32 is not set |
12 | # CONFIG_PPC_85xx is not set | 12 | # CONFIG_PPC_85xx is not set |
13 | # CONFIG_PPC_8xx is not set | 13 | # CONFIG_PPC_8xx is not set |
14 | # CONFIG_40x is not set | 14 | # CONFIG_40x is not set |
@@ -31,15 +31,16 @@ CONFIG_GENERIC_TIME=y | |||
31 | CONFIG_GENERIC_TIME_VSYSCALL=y | 31 | CONFIG_GENERIC_TIME_VSYSCALL=y |
32 | CONFIG_GENERIC_CLOCKEVENTS=y | 32 | CONFIG_GENERIC_CLOCKEVENTS=y |
33 | CONFIG_GENERIC_HARDIRQS=y | 33 | CONFIG_GENERIC_HARDIRQS=y |
34 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y | ||
34 | # CONFIG_HAVE_SETUP_PER_CPU_AREA is not set | 35 | # CONFIG_HAVE_SETUP_PER_CPU_AREA is not set |
35 | CONFIG_IRQ_PER_CPU=y | 36 | CONFIG_IRQ_PER_CPU=y |
36 | CONFIG_STACKTRACE_SUPPORT=y | 37 | CONFIG_STACKTRACE_SUPPORT=y |
37 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y | 38 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y |
39 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
38 | CONFIG_LOCKDEP_SUPPORT=y | 40 | CONFIG_LOCKDEP_SUPPORT=y |
39 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | 41 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y |
40 | CONFIG_ARCH_HAS_ILOG2_U32=y | 42 | CONFIG_ARCH_HAS_ILOG2_U32=y |
41 | CONFIG_GENERIC_HWEIGHT=y | 43 | CONFIG_GENERIC_HWEIGHT=y |
42 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
43 | CONFIG_GENERIC_FIND_NEXT_BIT=y | 44 | CONFIG_GENERIC_FIND_NEXT_BIT=y |
44 | # CONFIG_ARCH_NO_VIRT_TO_BUS is not set | 45 | # CONFIG_ARCH_NO_VIRT_TO_BUS is not set |
45 | CONFIG_PPC=y | 46 | CONFIG_PPC=y |
@@ -53,11 +54,14 @@ CONFIG_PPC_UDBG_16550=y | |||
53 | # CONFIG_GENERIC_TBSYNC is not set | 54 | # CONFIG_GENERIC_TBSYNC is not set |
54 | CONFIG_AUDIT_ARCH=y | 55 | CONFIG_AUDIT_ARCH=y |
55 | CONFIG_GENERIC_BUG=y | 56 | CONFIG_GENERIC_BUG=y |
57 | CONFIG_DTC=y | ||
56 | # CONFIG_DEFAULT_UIMAGE is not set | 58 | # CONFIG_DEFAULT_UIMAGE is not set |
57 | CONFIG_PPC_DCR_NATIVE=y | 59 | CONFIG_PPC_DCR_NATIVE=y |
58 | # CONFIG_PPC_DCR_MMIO is not set | 60 | # CONFIG_PPC_DCR_MMIO is not set |
59 | CONFIG_PPC_DCR=y | 61 | CONFIG_PPC_DCR=y |
62 | CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y | ||
60 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 63 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
64 | CONFIG_CONSTRUCTORS=y | ||
61 | 65 | ||
62 | # | 66 | # |
63 | # General setup | 67 | # General setup |
@@ -71,6 +75,7 @@ CONFIG_SWAP=y | |||
71 | CONFIG_SYSVIPC=y | 75 | CONFIG_SYSVIPC=y |
72 | CONFIG_SYSVIPC_SYSCTL=y | 76 | CONFIG_SYSVIPC_SYSCTL=y |
73 | CONFIG_POSIX_MQUEUE=y | 77 | CONFIG_POSIX_MQUEUE=y |
78 | CONFIG_POSIX_MQUEUE_SYSCTL=y | ||
74 | # CONFIG_BSD_PROCESS_ACCT is not set | 79 | # CONFIG_BSD_PROCESS_ACCT is not set |
75 | # CONFIG_TASKSTATS is not set | 80 | # CONFIG_TASKSTATS is not set |
76 | # CONFIG_AUDIT is not set | 81 | # CONFIG_AUDIT is not set |
@@ -93,8 +98,12 @@ CONFIG_SYSFS_DEPRECATED_V2=y | |||
93 | # CONFIG_NAMESPACES is not set | 98 | # CONFIG_NAMESPACES is not set |
94 | CONFIG_BLK_DEV_INITRD=y | 99 | CONFIG_BLK_DEV_INITRD=y |
95 | CONFIG_INITRAMFS_SOURCE="" | 100 | CONFIG_INITRAMFS_SOURCE="" |
101 | CONFIG_RD_GZIP=y | ||
102 | # CONFIG_RD_BZIP2 is not set | ||
103 | # CONFIG_RD_LZMA is not set | ||
96 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 104 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
97 | CONFIG_SYSCTL=y | 105 | CONFIG_SYSCTL=y |
106 | CONFIG_ANON_INODES=y | ||
98 | CONFIG_EMBEDDED=y | 107 | CONFIG_EMBEDDED=y |
99 | CONFIG_SYSCTL_SYSCALL=y | 108 | CONFIG_SYSCTL_SYSCALL=y |
100 | CONFIG_KALLSYMS=y | 109 | CONFIG_KALLSYMS=y |
@@ -104,23 +113,30 @@ CONFIG_HOTPLUG=y | |||
104 | CONFIG_PRINTK=y | 113 | CONFIG_PRINTK=y |
105 | CONFIG_BUG=y | 114 | CONFIG_BUG=y |
106 | CONFIG_ELF_CORE=y | 115 | CONFIG_ELF_CORE=y |
107 | CONFIG_COMPAT_BRK=y | ||
108 | CONFIG_BASE_FULL=y | 116 | CONFIG_BASE_FULL=y |
109 | CONFIG_FUTEX=y | 117 | CONFIG_FUTEX=y |
110 | CONFIG_ANON_INODES=y | ||
111 | CONFIG_EPOLL=y | 118 | CONFIG_EPOLL=y |
112 | CONFIG_SIGNALFD=y | 119 | CONFIG_SIGNALFD=y |
113 | CONFIG_TIMERFD=y | 120 | CONFIG_TIMERFD=y |
114 | CONFIG_EVENTFD=y | 121 | CONFIG_EVENTFD=y |
115 | CONFIG_SHMEM=y | 122 | CONFIG_SHMEM=y |
116 | CONFIG_AIO=y | 123 | CONFIG_AIO=y |
124 | CONFIG_HAVE_PERF_COUNTERS=y | ||
125 | |||
126 | # | ||
127 | # Performance Counters | ||
128 | # | ||
129 | # CONFIG_PERF_COUNTERS is not set | ||
117 | CONFIG_VM_EVENT_COUNTERS=y | 130 | CONFIG_VM_EVENT_COUNTERS=y |
118 | CONFIG_PCI_QUIRKS=y | 131 | CONFIG_PCI_QUIRKS=y |
119 | CONFIG_SLUB_DEBUG=y | 132 | CONFIG_SLUB_DEBUG=y |
133 | # CONFIG_STRIP_ASM_SYMS is not set | ||
134 | CONFIG_COMPAT_BRK=y | ||
120 | # CONFIG_SLAB is not set | 135 | # CONFIG_SLAB is not set |
121 | CONFIG_SLUB=y | 136 | CONFIG_SLUB=y |
122 | # CONFIG_SLOB is not set | 137 | # CONFIG_SLOB is not set |
123 | # CONFIG_PROFILING is not set | 138 | # CONFIG_PROFILING is not set |
139 | # CONFIG_MARKERS is not set | ||
124 | CONFIG_HAVE_OPROFILE=y | 140 | CONFIG_HAVE_OPROFILE=y |
125 | # CONFIG_KPROBES is not set | 141 | # CONFIG_KPROBES is not set |
126 | CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y | 142 | CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y |
@@ -128,6 +144,12 @@ CONFIG_HAVE_IOREMAP_PROT=y | |||
128 | CONFIG_HAVE_KPROBES=y | 144 | CONFIG_HAVE_KPROBES=y |
129 | CONFIG_HAVE_KRETPROBES=y | 145 | CONFIG_HAVE_KRETPROBES=y |
130 | CONFIG_HAVE_ARCH_TRACEHOOK=y | 146 | CONFIG_HAVE_ARCH_TRACEHOOK=y |
147 | |||
148 | # | ||
149 | # GCOV-based kernel profiling | ||
150 | # | ||
151 | # CONFIG_GCOV_KERNEL is not set | ||
152 | # CONFIG_SLOW_WORK is not set | ||
131 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set | 153 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set |
132 | CONFIG_SLABINFO=y | 154 | CONFIG_SLABINFO=y |
133 | CONFIG_RT_MUTEXES=y | 155 | CONFIG_RT_MUTEXES=y |
@@ -139,8 +161,7 @@ CONFIG_MODULE_UNLOAD=y | |||
139 | # CONFIG_MODVERSIONS is not set | 161 | # CONFIG_MODVERSIONS is not set |
140 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 162 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
141 | CONFIG_BLOCK=y | 163 | CONFIG_BLOCK=y |
142 | CONFIG_LBD=y | 164 | CONFIG_LBDAF=y |
143 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
144 | # CONFIG_BLK_DEV_BSG is not set | 165 | # CONFIG_BLK_DEV_BSG is not set |
145 | # CONFIG_BLK_DEV_INTEGRITY is not set | 166 | # CONFIG_BLK_DEV_INTEGRITY is not set |
146 | 167 | ||
@@ -176,6 +197,7 @@ CONFIG_PPC4xx_PCI_EXPRESS=y | |||
176 | # CONFIG_ARCHES is not set | 197 | # CONFIG_ARCHES is not set |
177 | CONFIG_CANYONLANDS=y | 198 | CONFIG_CANYONLANDS=y |
178 | # CONFIG_GLACIER is not set | 199 | # CONFIG_GLACIER is not set |
200 | # CONFIG_REDWOOD is not set | ||
179 | # CONFIG_YOSEMITE is not set | 201 | # CONFIG_YOSEMITE is not set |
180 | # CONFIG_XILINX_VIRTEX440_GENERIC_BOARD is not set | 202 | # CONFIG_XILINX_VIRTEX440_GENERIC_BOARD is not set |
181 | CONFIG_PPC44x_SIMPLE=y | 203 | CONFIG_PPC44x_SIMPLE=y |
@@ -218,6 +240,7 @@ CONFIG_BINFMT_ELF=y | |||
218 | # CONFIG_BINFMT_MISC is not set | 240 | # CONFIG_BINFMT_MISC is not set |
219 | # CONFIG_MATH_EMULATION is not set | 241 | # CONFIG_MATH_EMULATION is not set |
220 | # CONFIG_IOMMU_HELPER is not set | 242 | # CONFIG_IOMMU_HELPER is not set |
243 | # CONFIG_SWIOTLB is not set | ||
221 | CONFIG_PPC_NEED_DMA_SYNC_OPS=y | 244 | CONFIG_PPC_NEED_DMA_SYNC_OPS=y |
222 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | 245 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y |
223 | CONFIG_ARCH_HAS_WALK_MEMORY=y | 246 | CONFIG_ARCH_HAS_WALK_MEMORY=y |
@@ -237,10 +260,14 @@ CONFIG_PHYS_ADDR_T_64BIT=y | |||
237 | CONFIG_ZONE_DMA_FLAG=1 | 260 | CONFIG_ZONE_DMA_FLAG=1 |
238 | CONFIG_BOUNCE=y | 261 | CONFIG_BOUNCE=y |
239 | CONFIG_VIRT_TO_BUS=y | 262 | CONFIG_VIRT_TO_BUS=y |
240 | CONFIG_UNEVICTABLE_LRU=y | 263 | CONFIG_HAVE_MLOCK=y |
264 | CONFIG_HAVE_MLOCKED_PAGE_BIT=y | ||
265 | CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 | ||
266 | CONFIG_STDBINUTILS=y | ||
241 | CONFIG_PPC_4K_PAGES=y | 267 | CONFIG_PPC_4K_PAGES=y |
242 | # CONFIG_PPC_16K_PAGES is not set | 268 | # CONFIG_PPC_16K_PAGES is not set |
243 | # CONFIG_PPC_64K_PAGES is not set | 269 | # CONFIG_PPC_64K_PAGES is not set |
270 | # CONFIG_PPC_256K_PAGES is not set | ||
244 | CONFIG_FORCE_MAX_ZONEORDER=11 | 271 | CONFIG_FORCE_MAX_ZONEORDER=11 |
245 | CONFIG_PROC_DEVICETREE=y | 272 | CONFIG_PROC_DEVICETREE=y |
246 | CONFIG_CMDLINE_BOOL=y | 273 | CONFIG_CMDLINE_BOOL=y |
@@ -265,6 +292,7 @@ CONFIG_ARCH_SUPPORTS_MSI=y | |||
265 | # CONFIG_PCI_LEGACY is not set | 292 | # CONFIG_PCI_LEGACY is not set |
266 | # CONFIG_PCI_DEBUG is not set | 293 | # CONFIG_PCI_DEBUG is not set |
267 | # CONFIG_PCI_STUB is not set | 294 | # CONFIG_PCI_STUB is not set |
295 | # CONFIG_PCI_IOV is not set | ||
268 | # CONFIG_PCCARD is not set | 296 | # CONFIG_PCCARD is not set |
269 | # CONFIG_HOTPLUG_PCI is not set | 297 | # CONFIG_HOTPLUG_PCI is not set |
270 | # CONFIG_HAS_RAPIDIO is not set | 298 | # CONFIG_HAS_RAPIDIO is not set |
@@ -282,14 +310,12 @@ CONFIG_PAGE_OFFSET=0xc0000000 | |||
282 | CONFIG_KERNEL_START=0xc0000000 | 310 | CONFIG_KERNEL_START=0xc0000000 |
283 | CONFIG_PHYSICAL_START=0x00000000 | 311 | CONFIG_PHYSICAL_START=0x00000000 |
284 | CONFIG_TASK_SIZE=0xc0000000 | 312 | CONFIG_TASK_SIZE=0xc0000000 |
285 | CONFIG_CONSISTENT_START=0xff100000 | ||
286 | CONFIG_CONSISTENT_SIZE=0x00200000 | 313 | CONFIG_CONSISTENT_SIZE=0x00200000 |
287 | CONFIG_NET=y | 314 | CONFIG_NET=y |
288 | 315 | ||
289 | # | 316 | # |
290 | # Networking options | 317 | # Networking options |
291 | # | 318 | # |
292 | CONFIG_COMPAT_NET_DEV_OPS=y | ||
293 | CONFIG_PACKET=y | 319 | CONFIG_PACKET=y |
294 | # CONFIG_PACKET_MMAP is not set | 320 | # CONFIG_PACKET_MMAP is not set |
295 | CONFIG_UNIX=y | 321 | CONFIG_UNIX=y |
@@ -339,6 +365,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
339 | # CONFIG_LAPB is not set | 365 | # CONFIG_LAPB is not set |
340 | # CONFIG_ECONET is not set | 366 | # CONFIG_ECONET is not set |
341 | # CONFIG_WAN_ROUTER is not set | 367 | # CONFIG_WAN_ROUTER is not set |
368 | # CONFIG_PHONET is not set | ||
369 | # CONFIG_IEEE802154 is not set | ||
342 | # CONFIG_NET_SCHED is not set | 370 | # CONFIG_NET_SCHED is not set |
343 | # CONFIG_DCB is not set | 371 | # CONFIG_DCB is not set |
344 | 372 | ||
@@ -351,7 +379,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
351 | # CONFIG_IRDA is not set | 379 | # CONFIG_IRDA is not set |
352 | # CONFIG_BT is not set | 380 | # CONFIG_BT is not set |
353 | # CONFIG_AF_RXRPC is not set | 381 | # CONFIG_AF_RXRPC is not set |
354 | # CONFIG_PHONET is not set | ||
355 | # CONFIG_WIRELESS is not set | 382 | # CONFIG_WIRELESS is not set |
356 | # CONFIG_WIMAX is not set | 383 | # CONFIG_WIMAX is not set |
357 | # CONFIG_RFKILL is not set | 384 | # CONFIG_RFKILL is not set |
@@ -375,7 +402,101 @@ CONFIG_EXTRA_FIRMWARE="" | |||
375 | # CONFIG_SYS_HYPERVISOR is not set | 402 | # CONFIG_SYS_HYPERVISOR is not set |
376 | CONFIG_CONNECTOR=y | 403 | CONFIG_CONNECTOR=y |
377 | CONFIG_PROC_EVENTS=y | 404 | CONFIG_PROC_EVENTS=y |
378 | # CONFIG_MTD is not set | 405 | CONFIG_MTD=y |
406 | # CONFIG_MTD_DEBUG is not set | ||
407 | # CONFIG_MTD_CONCAT is not set | ||
408 | CONFIG_MTD_PARTITIONS=y | ||
409 | # CONFIG_MTD_TESTS is not set | ||
410 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
411 | CONFIG_MTD_CMDLINE_PARTS=y | ||
412 | CONFIG_MTD_OF_PARTS=y | ||
413 | # CONFIG_MTD_AR7_PARTS is not set | ||
414 | |||
415 | # | ||
416 | # User Modules And Translation Layers | ||
417 | # | ||
418 | CONFIG_MTD_CHAR=y | ||
419 | CONFIG_MTD_BLKDEVS=y | ||
420 | CONFIG_MTD_BLOCK=y | ||
421 | # CONFIG_FTL is not set | ||
422 | # CONFIG_NFTL is not set | ||
423 | # CONFIG_INFTL is not set | ||
424 | # CONFIG_RFD_FTL is not set | ||
425 | # CONFIG_SSFDC is not set | ||
426 | # CONFIG_MTD_OOPS is not set | ||
427 | |||
428 | # | ||
429 | # RAM/ROM/Flash chip drivers | ||
430 | # | ||
431 | CONFIG_MTD_CFI=y | ||
432 | # CONFIG_MTD_JEDECPROBE is not set | ||
433 | CONFIG_MTD_GEN_PROBE=y | ||
434 | # CONFIG_MTD_CFI_ADV_OPTIONS is not set | ||
435 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
436 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
437 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
438 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
439 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
440 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
441 | CONFIG_MTD_CFI_I1=y | ||
442 | CONFIG_MTD_CFI_I2=y | ||
443 | # CONFIG_MTD_CFI_I4 is not set | ||
444 | # CONFIG_MTD_CFI_I8 is not set | ||
445 | # CONFIG_MTD_CFI_INTELEXT is not set | ||
446 | CONFIG_MTD_CFI_AMDSTD=y | ||
447 | # CONFIG_MTD_CFI_STAA is not set | ||
448 | CONFIG_MTD_CFI_UTIL=y | ||
449 | # CONFIG_MTD_RAM is not set | ||
450 | # CONFIG_MTD_ROM is not set | ||
451 | # CONFIG_MTD_ABSENT is not set | ||
452 | |||
453 | # | ||
454 | # Mapping drivers for chip access | ||
455 | # | ||
456 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
457 | # CONFIG_MTD_PHYSMAP is not set | ||
458 | CONFIG_MTD_PHYSMAP_OF=y | ||
459 | # CONFIG_MTD_INTEL_VR_NOR is not set | ||
460 | # CONFIG_MTD_PLATRAM is not set | ||
461 | |||
462 | # | ||
463 | # Self-contained MTD device drivers | ||
464 | # | ||
465 | # CONFIG_MTD_PMC551 is not set | ||
466 | # CONFIG_MTD_SLRAM is not set | ||
467 | # CONFIG_MTD_PHRAM is not set | ||
468 | # CONFIG_MTD_MTDRAM is not set | ||
469 | # CONFIG_MTD_BLOCK2MTD is not set | ||
470 | |||
471 | # | ||
472 | # Disk-On-Chip Device Drivers | ||
473 | # | ||
474 | # CONFIG_MTD_DOC2000 is not set | ||
475 | # CONFIG_MTD_DOC2001 is not set | ||
476 | # CONFIG_MTD_DOC2001PLUS is not set | ||
477 | CONFIG_MTD_NAND=y | ||
478 | # CONFIG_MTD_NAND_VERIFY_WRITE is not set | ||
479 | CONFIG_MTD_NAND_ECC_SMC=y | ||
480 | # CONFIG_MTD_NAND_MUSEUM_IDS is not set | ||
481 | CONFIG_MTD_NAND_IDS=y | ||
482 | CONFIG_MTD_NAND_NDFC=y | ||
483 | # CONFIG_MTD_NAND_DISKONCHIP is not set | ||
484 | # CONFIG_MTD_NAND_CAFE is not set | ||
485 | # CONFIG_MTD_NAND_NANDSIM is not set | ||
486 | # CONFIG_MTD_NAND_PLATFORM is not set | ||
487 | # CONFIG_MTD_ALAUDA is not set | ||
488 | # CONFIG_MTD_NAND_FSL_ELBC is not set | ||
489 | # CONFIG_MTD_ONENAND is not set | ||
490 | |||
491 | # | ||
492 | # LPDDR flash memory drivers | ||
493 | # | ||
494 | # CONFIG_MTD_LPDDR is not set | ||
495 | |||
496 | # | ||
497 | # UBI - Unsorted block images | ||
498 | # | ||
499 | # CONFIG_MTD_UBI is not set | ||
379 | CONFIG_OF_DEVICE=y | 500 | CONFIG_OF_DEVICE=y |
380 | CONFIG_OF_I2C=y | 501 | CONFIG_OF_I2C=y |
381 | # CONFIG_PARPORT is not set | 502 | # CONFIG_PARPORT is not set |
@@ -418,7 +539,11 @@ CONFIG_HAVE_IDE=y | |||
418 | # | 539 | # |
419 | 540 | ||
420 | # | 541 | # |
421 | # Enable only one of the two stacks, unless you know what you are doing | 542 | # You can enable one or both FireWire driver stacks. |
543 | # | ||
544 | |||
545 | # | ||
546 | # See the help texts for more information. | ||
422 | # | 547 | # |
423 | # CONFIG_FIREWIRE is not set | 548 | # CONFIG_FIREWIRE is not set |
424 | # CONFIG_IEEE1394 is not set | 549 | # CONFIG_IEEE1394 is not set |
@@ -439,6 +564,8 @@ CONFIG_NET_ETHERNET=y | |||
439 | # CONFIG_SUNGEM is not set | 564 | # CONFIG_SUNGEM is not set |
440 | # CONFIG_CASSINI is not set | 565 | # CONFIG_CASSINI is not set |
441 | # CONFIG_NET_VENDOR_3COM is not set | 566 | # CONFIG_NET_VENDOR_3COM is not set |
567 | # CONFIG_ETHOC is not set | ||
568 | # CONFIG_DNET is not set | ||
442 | # CONFIG_NET_TULIP is not set | 569 | # CONFIG_NET_TULIP is not set |
443 | # CONFIG_HP100 is not set | 570 | # CONFIG_HP100 is not set |
444 | CONFIG_IBM_NEW_EMAC=y | 571 | CONFIG_IBM_NEW_EMAC=y |
@@ -457,6 +584,7 @@ CONFIG_IBM_NEW_EMAC_EMAC4=y | |||
457 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set | 584 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set |
458 | # CONFIG_NET_PCI is not set | 585 | # CONFIG_NET_PCI is not set |
459 | # CONFIG_B44 is not set | 586 | # CONFIG_B44 is not set |
587 | # CONFIG_KS8842 is not set | ||
460 | # CONFIG_ATL2 is not set | 588 | # CONFIG_ATL2 is not set |
461 | # CONFIG_NETDEV_1000 is not set | 589 | # CONFIG_NETDEV_1000 is not set |
462 | # CONFIG_NETDEV_10000 is not set | 590 | # CONFIG_NETDEV_10000 is not set |
@@ -467,7 +595,6 @@ CONFIG_IBM_NEW_EMAC_EMAC4=y | |||
467 | # | 595 | # |
468 | # CONFIG_WLAN_PRE80211 is not set | 596 | # CONFIG_WLAN_PRE80211 is not set |
469 | # CONFIG_WLAN_80211 is not set | 597 | # CONFIG_WLAN_80211 is not set |
470 | # CONFIG_IWLWIFI_LEDS is not set | ||
471 | 598 | ||
472 | # | 599 | # |
473 | # Enable WiMAX (Networking options) to see the WiMAX drivers | 600 | # Enable WiMAX (Networking options) to see the WiMAX drivers |
@@ -542,7 +669,6 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
542 | # CONFIG_IPMI_HANDLER is not set | 669 | # CONFIG_IPMI_HANDLER is not set |
543 | # CONFIG_HW_RANDOM is not set | 670 | # CONFIG_HW_RANDOM is not set |
544 | # CONFIG_NVRAM is not set | 671 | # CONFIG_NVRAM is not set |
545 | # CONFIG_GEN_RTC is not set | ||
546 | # CONFIG_R3964 is not set | 672 | # CONFIG_R3964 is not set |
547 | # CONFIG_APPLICOM is not set | 673 | # CONFIG_APPLICOM is not set |
548 | # CONFIG_RAW_DRIVER is not set | 674 | # CONFIG_RAW_DRIVER is not set |
@@ -608,14 +734,17 @@ CONFIG_I2C_IBM_IIC=y | |||
608 | # CONFIG_SENSORS_PCF8574 is not set | 734 | # CONFIG_SENSORS_PCF8574 is not set |
609 | # CONFIG_PCF8575 is not set | 735 | # CONFIG_PCF8575 is not set |
610 | # CONFIG_SENSORS_PCA9539 is not set | 736 | # CONFIG_SENSORS_PCA9539 is not set |
611 | # CONFIG_SENSORS_PCF8591 is not set | ||
612 | # CONFIG_SENSORS_MAX6875 is not set | ||
613 | # CONFIG_SENSORS_TSL2550 is not set | 737 | # CONFIG_SENSORS_TSL2550 is not set |
614 | # CONFIG_I2C_DEBUG_CORE is not set | 738 | # CONFIG_I2C_DEBUG_CORE is not set |
615 | # CONFIG_I2C_DEBUG_ALGO is not set | 739 | # CONFIG_I2C_DEBUG_ALGO is not set |
616 | # CONFIG_I2C_DEBUG_BUS is not set | 740 | # CONFIG_I2C_DEBUG_BUS is not set |
617 | # CONFIG_I2C_DEBUG_CHIP is not set | 741 | # CONFIG_I2C_DEBUG_CHIP is not set |
618 | # CONFIG_SPI is not set | 742 | # CONFIG_SPI is not set |
743 | |||
744 | # | ||
745 | # PPS support | ||
746 | # | ||
747 | # CONFIG_PPS is not set | ||
619 | CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y | 748 | CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y |
620 | # CONFIG_GPIOLIB is not set | 749 | # CONFIG_GPIOLIB is not set |
621 | # CONFIG_W1 is not set | 750 | # CONFIG_W1 is not set |
@@ -640,6 +769,7 @@ CONFIG_SENSORS_AD7414=y | |||
640 | # CONFIG_SENSORS_F71805F is not set | 769 | # CONFIG_SENSORS_F71805F is not set |
641 | # CONFIG_SENSORS_F71882FG is not set | 770 | # CONFIG_SENSORS_F71882FG is not set |
642 | # CONFIG_SENSORS_F75375S is not set | 771 | # CONFIG_SENSORS_F75375S is not set |
772 | # CONFIG_SENSORS_G760A is not set | ||
643 | # CONFIG_SENSORS_GL518SM is not set | 773 | # CONFIG_SENSORS_GL518SM is not set |
644 | # CONFIG_SENSORS_GL520SM is not set | 774 | # CONFIG_SENSORS_GL520SM is not set |
645 | # CONFIG_SENSORS_IT87 is not set | 775 | # CONFIG_SENSORS_IT87 is not set |
@@ -654,11 +784,14 @@ CONFIG_SENSORS_AD7414=y | |||
654 | # CONFIG_SENSORS_LM90 is not set | 784 | # CONFIG_SENSORS_LM90 is not set |
655 | # CONFIG_SENSORS_LM92 is not set | 785 | # CONFIG_SENSORS_LM92 is not set |
656 | # CONFIG_SENSORS_LM93 is not set | 786 | # CONFIG_SENSORS_LM93 is not set |
787 | # CONFIG_SENSORS_LTC4215 is not set | ||
657 | # CONFIG_SENSORS_LTC4245 is not set | 788 | # CONFIG_SENSORS_LTC4245 is not set |
789 | # CONFIG_SENSORS_LM95241 is not set | ||
658 | # CONFIG_SENSORS_MAX1619 is not set | 790 | # CONFIG_SENSORS_MAX1619 is not set |
659 | # CONFIG_SENSORS_MAX6650 is not set | 791 | # CONFIG_SENSORS_MAX6650 is not set |
660 | # CONFIG_SENSORS_PC87360 is not set | 792 | # CONFIG_SENSORS_PC87360 is not set |
661 | # CONFIG_SENSORS_PC87427 is not set | 793 | # CONFIG_SENSORS_PC87427 is not set |
794 | # CONFIG_SENSORS_PCF8591 is not set | ||
662 | # CONFIG_SENSORS_SIS5595 is not set | 795 | # CONFIG_SENSORS_SIS5595 is not set |
663 | # CONFIG_SENSORS_DME1737 is not set | 796 | # CONFIG_SENSORS_DME1737 is not set |
664 | # CONFIG_SENSORS_SMSC47M1 is not set | 797 | # CONFIG_SENSORS_SMSC47M1 is not set |
@@ -666,6 +799,7 @@ CONFIG_SENSORS_AD7414=y | |||
666 | # CONFIG_SENSORS_SMSC47B397 is not set | 799 | # CONFIG_SENSORS_SMSC47B397 is not set |
667 | # CONFIG_SENSORS_ADS7828 is not set | 800 | # CONFIG_SENSORS_ADS7828 is not set |
668 | # CONFIG_SENSORS_THMC50 is not set | 801 | # CONFIG_SENSORS_THMC50 is not set |
802 | # CONFIG_SENSORS_TMP401 is not set | ||
669 | # CONFIG_SENSORS_VIA686A is not set | 803 | # CONFIG_SENSORS_VIA686A is not set |
670 | # CONFIG_SENSORS_VT1211 is not set | 804 | # CONFIG_SENSORS_VT1211 is not set |
671 | # CONFIG_SENSORS_VT8231 is not set | 805 | # CONFIG_SENSORS_VT8231 is not set |
@@ -700,24 +834,9 @@ CONFIG_SSB_POSSIBLE=y | |||
700 | # CONFIG_MFD_WM8400 is not set | 834 | # CONFIG_MFD_WM8400 is not set |
701 | # CONFIG_MFD_WM8350_I2C is not set | 835 | # CONFIG_MFD_WM8350_I2C is not set |
702 | # CONFIG_MFD_PCF50633 is not set | 836 | # CONFIG_MFD_PCF50633 is not set |
837 | # CONFIG_AB3100_CORE is not set | ||
703 | # CONFIG_REGULATOR is not set | 838 | # CONFIG_REGULATOR is not set |
704 | 839 | # CONFIG_MEDIA_SUPPORT is not set | |
705 | # | ||
706 | # Multimedia devices | ||
707 | # | ||
708 | |||
709 | # | ||
710 | # Multimedia core support | ||
711 | # | ||
712 | # CONFIG_VIDEO_DEV is not set | ||
713 | # CONFIG_DVB_CORE is not set | ||
714 | # CONFIG_VIDEO_MEDIA is not set | ||
715 | |||
716 | # | ||
717 | # Multimedia drivers | ||
718 | # | ||
719 | # CONFIG_DAB is not set | ||
720 | # CONFIG_USB_DABUSB is not set | ||
721 | 840 | ||
722 | # | 841 | # |
723 | # Graphics support | 842 | # Graphics support |
@@ -759,6 +878,7 @@ CONFIG_USB_MON=y | |||
759 | # USB Host Controller Drivers | 878 | # USB Host Controller Drivers |
760 | # | 879 | # |
761 | # CONFIG_USB_C67X00_HCD is not set | 880 | # CONFIG_USB_C67X00_HCD is not set |
881 | # CONFIG_USB_XHCI_HCD is not set | ||
762 | CONFIG_USB_EHCI_HCD=m | 882 | CONFIG_USB_EHCI_HCD=m |
763 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set | 883 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set |
764 | # CONFIG_USB_EHCI_TT_NEWSCHED is not set | 884 | # CONFIG_USB_EHCI_TT_NEWSCHED is not set |
@@ -767,9 +887,9 @@ CONFIG_USB_EHCI_HCD_PPC_OF=y | |||
767 | # CONFIG_USB_ISP116X_HCD is not set | 887 | # CONFIG_USB_ISP116X_HCD is not set |
768 | # CONFIG_USB_ISP1760_HCD is not set | 888 | # CONFIG_USB_ISP1760_HCD is not set |
769 | CONFIG_USB_OHCI_HCD=y | 889 | CONFIG_USB_OHCI_HCD=y |
770 | CONFIG_USB_OHCI_HCD_PPC_OF=y | ||
771 | CONFIG_USB_OHCI_HCD_PPC_OF_BE=y | 890 | CONFIG_USB_OHCI_HCD_PPC_OF_BE=y |
772 | CONFIG_USB_OHCI_HCD_PPC_OF_LE=y | 891 | CONFIG_USB_OHCI_HCD_PPC_OF_LE=y |
892 | CONFIG_USB_OHCI_HCD_PPC_OF=y | ||
773 | CONFIG_USB_OHCI_HCD_PCI=y | 893 | CONFIG_USB_OHCI_HCD_PCI=y |
774 | CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y | 894 | CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y |
775 | CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y | 895 | CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y |
@@ -789,11 +909,11 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y | |||
789 | # CONFIG_USB_TMC is not set | 909 | # CONFIG_USB_TMC is not set |
790 | 910 | ||
791 | # | 911 | # |
792 | # NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; | 912 | # NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may |
793 | # | 913 | # |
794 | 914 | ||
795 | # | 915 | # |
796 | # see USB_STORAGE Help for more information | 916 | # also be needed; see USB_STORAGE Help for more info |
797 | # | 917 | # |
798 | CONFIG_USB_LIBUSUAL=y | 918 | CONFIG_USB_LIBUSUAL=y |
799 | 919 | ||
@@ -821,7 +941,6 @@ CONFIG_USB_LIBUSUAL=y | |||
821 | # CONFIG_USB_LED is not set | 941 | # CONFIG_USB_LED is not set |
822 | # CONFIG_USB_CYPRESS_CY7C63 is not set | 942 | # CONFIG_USB_CYPRESS_CY7C63 is not set |
823 | # CONFIG_USB_CYTHERM is not set | 943 | # CONFIG_USB_CYTHERM is not set |
824 | # CONFIG_USB_PHIDGET is not set | ||
825 | # CONFIG_USB_IDMOUSE is not set | 944 | # CONFIG_USB_IDMOUSE is not set |
826 | # CONFIG_USB_FTDI_ELAN is not set | 945 | # CONFIG_USB_FTDI_ELAN is not set |
827 | # CONFIG_USB_APPLEDISPLAY is not set | 946 | # CONFIG_USB_APPLEDISPLAY is not set |
@@ -837,6 +956,7 @@ CONFIG_USB_LIBUSUAL=y | |||
837 | # | 956 | # |
838 | # OTG and related infrastructure | 957 | # OTG and related infrastructure |
839 | # | 958 | # |
959 | # CONFIG_NOP_USB_XCEIV is not set | ||
840 | # CONFIG_UWB is not set | 960 | # CONFIG_UWB is not set |
841 | # CONFIG_MMC is not set | 961 | # CONFIG_MMC is not set |
842 | # CONFIG_MEMSTICK is not set | 962 | # CONFIG_MEMSTICK is not set |
@@ -844,9 +964,70 @@ CONFIG_USB_LIBUSUAL=y | |||
844 | # CONFIG_ACCESSIBILITY is not set | 964 | # CONFIG_ACCESSIBILITY is not set |
845 | # CONFIG_INFINIBAND is not set | 965 | # CONFIG_INFINIBAND is not set |
846 | # CONFIG_EDAC is not set | 966 | # CONFIG_EDAC is not set |
847 | # CONFIG_RTC_CLASS is not set | 967 | CONFIG_RTC_LIB=y |
968 | CONFIG_RTC_CLASS=y | ||
969 | CONFIG_RTC_HCTOSYS=y | ||
970 | CONFIG_RTC_HCTOSYS_DEVICE="rtc0" | ||
971 | # CONFIG_RTC_DEBUG is not set | ||
972 | |||
973 | # | ||
974 | # RTC interfaces | ||
975 | # | ||
976 | CONFIG_RTC_INTF_SYSFS=y | ||
977 | CONFIG_RTC_INTF_PROC=y | ||
978 | CONFIG_RTC_INTF_DEV=y | ||
979 | # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set | ||
980 | # CONFIG_RTC_DRV_TEST is not set | ||
981 | |||
982 | # | ||
983 | # I2C RTC drivers | ||
984 | # | ||
985 | # CONFIG_RTC_DRV_DS1307 is not set | ||
986 | # CONFIG_RTC_DRV_DS1374 is not set | ||
987 | # CONFIG_RTC_DRV_DS1672 is not set | ||
988 | # CONFIG_RTC_DRV_MAX6900 is not set | ||
989 | # CONFIG_RTC_DRV_RS5C372 is not set | ||
990 | # CONFIG_RTC_DRV_ISL1208 is not set | ||
991 | # CONFIG_RTC_DRV_X1205 is not set | ||
992 | # CONFIG_RTC_DRV_PCF8563 is not set | ||
993 | # CONFIG_RTC_DRV_PCF8583 is not set | ||
994 | CONFIG_RTC_DRV_M41T80=y | ||
995 | # CONFIG_RTC_DRV_M41T80_WDT is not set | ||
996 | # CONFIG_RTC_DRV_S35390A is not set | ||
997 | # CONFIG_RTC_DRV_FM3130 is not set | ||
998 | # CONFIG_RTC_DRV_RX8581 is not set | ||
999 | # CONFIG_RTC_DRV_RX8025 is not set | ||
1000 | |||
1001 | # | ||
1002 | # SPI RTC drivers | ||
1003 | # | ||
1004 | |||
1005 | # | ||
1006 | # Platform RTC drivers | ||
1007 | # | ||
1008 | # CONFIG_RTC_DRV_CMOS is not set | ||
1009 | # CONFIG_RTC_DRV_DS1286 is not set | ||
1010 | # CONFIG_RTC_DRV_DS1511 is not set | ||
1011 | # CONFIG_RTC_DRV_DS1553 is not set | ||
1012 | # CONFIG_RTC_DRV_DS1742 is not set | ||
1013 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
1014 | # CONFIG_RTC_DRV_M48T86 is not set | ||
1015 | # CONFIG_RTC_DRV_M48T35 is not set | ||
1016 | # CONFIG_RTC_DRV_M48T59 is not set | ||
1017 | # CONFIG_RTC_DRV_BQ4802 is not set | ||
1018 | # CONFIG_RTC_DRV_V3020 is not set | ||
1019 | |||
1020 | # | ||
1021 | # on-CPU RTC drivers | ||
1022 | # | ||
1023 | # CONFIG_RTC_DRV_GENERIC is not set | ||
848 | # CONFIG_DMADEVICES is not set | 1024 | # CONFIG_DMADEVICES is not set |
1025 | # CONFIG_AUXDISPLAY is not set | ||
849 | # CONFIG_UIO is not set | 1026 | # CONFIG_UIO is not set |
1027 | |||
1028 | # | ||
1029 | # TI VLYNQ | ||
1030 | # | ||
850 | # CONFIG_STAGING is not set | 1031 | # CONFIG_STAGING is not set |
851 | 1032 | ||
852 | # | 1033 | # |
@@ -860,11 +1041,12 @@ CONFIG_EXT2_FS=y | |||
860 | # CONFIG_REISERFS_FS is not set | 1041 | # CONFIG_REISERFS_FS is not set |
861 | # CONFIG_JFS_FS is not set | 1042 | # CONFIG_JFS_FS is not set |
862 | # CONFIG_FS_POSIX_ACL is not set | 1043 | # CONFIG_FS_POSIX_ACL is not set |
863 | CONFIG_FILE_LOCKING=y | ||
864 | # CONFIG_XFS_FS is not set | 1044 | # CONFIG_XFS_FS is not set |
865 | # CONFIG_GFS2_FS is not set | 1045 | # CONFIG_GFS2_FS is not set |
866 | # CONFIG_OCFS2_FS is not set | 1046 | # CONFIG_OCFS2_FS is not set |
867 | # CONFIG_BTRFS_FS is not set | 1047 | # CONFIG_BTRFS_FS is not set |
1048 | CONFIG_FILE_LOCKING=y | ||
1049 | CONFIG_FSNOTIFY=y | ||
868 | CONFIG_DNOTIFY=y | 1050 | CONFIG_DNOTIFY=y |
869 | CONFIG_INOTIFY=y | 1051 | CONFIG_INOTIFY=y |
870 | CONFIG_INOTIFY_USER=y | 1052 | CONFIG_INOTIFY_USER=y |
@@ -874,6 +1056,11 @@ CONFIG_INOTIFY_USER=y | |||
874 | # CONFIG_FUSE_FS is not set | 1056 | # CONFIG_FUSE_FS is not set |
875 | 1057 | ||
876 | # | 1058 | # |
1059 | # Caches | ||
1060 | # | ||
1061 | # CONFIG_FSCACHE is not set | ||
1062 | |||
1063 | # | ||
877 | # CD-ROM/DVD Filesystems | 1064 | # CD-ROM/DVD Filesystems |
878 | # | 1065 | # |
879 | # CONFIG_ISO9660_FS is not set | 1066 | # CONFIG_ISO9660_FS is not set |
@@ -906,6 +1093,7 @@ CONFIG_MISC_FILESYSTEMS=y | |||
906 | # CONFIG_BEFS_FS is not set | 1093 | # CONFIG_BEFS_FS is not set |
907 | # CONFIG_BFS_FS is not set | 1094 | # CONFIG_BFS_FS is not set |
908 | # CONFIG_EFS_FS is not set | 1095 | # CONFIG_EFS_FS is not set |
1096 | # CONFIG_JFFS2_FS is not set | ||
909 | CONFIG_CRAMFS=y | 1097 | CONFIG_CRAMFS=y |
910 | # CONFIG_SQUASHFS is not set | 1098 | # CONFIG_SQUASHFS is not set |
911 | # CONFIG_VXFS_FS is not set | 1099 | # CONFIG_VXFS_FS is not set |
@@ -916,6 +1104,7 @@ CONFIG_CRAMFS=y | |||
916 | # CONFIG_ROMFS_FS is not set | 1104 | # CONFIG_ROMFS_FS is not set |
917 | # CONFIG_SYSV_FS is not set | 1105 | # CONFIG_SYSV_FS is not set |
918 | # CONFIG_UFS_FS is not set | 1106 | # CONFIG_UFS_FS is not set |
1107 | # CONFIG_NILFS2_FS is not set | ||
919 | CONFIG_NETWORK_FILESYSTEMS=y | 1108 | CONFIG_NETWORK_FILESYSTEMS=y |
920 | CONFIG_NFS_FS=y | 1109 | CONFIG_NFS_FS=y |
921 | CONFIG_NFS_V3=y | 1110 | CONFIG_NFS_V3=y |
@@ -927,7 +1116,6 @@ CONFIG_LOCKD=y | |||
927 | CONFIG_LOCKD_V4=y | 1116 | CONFIG_LOCKD_V4=y |
928 | CONFIG_NFS_COMMON=y | 1117 | CONFIG_NFS_COMMON=y |
929 | CONFIG_SUNRPC=y | 1118 | CONFIG_SUNRPC=y |
930 | # CONFIG_SUNRPC_REGISTER_V4 is not set | ||
931 | # CONFIG_RPCSEC_GSS_KRB5 is not set | 1119 | # CONFIG_RPCSEC_GSS_KRB5 is not set |
932 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | 1120 | # CONFIG_RPCSEC_GSS_SPKM3 is not set |
933 | # CONFIG_SMB_FS is not set | 1121 | # CONFIG_SMB_FS is not set |
@@ -941,8 +1129,48 @@ CONFIG_SUNRPC=y | |||
941 | # | 1129 | # |
942 | # CONFIG_PARTITION_ADVANCED is not set | 1130 | # CONFIG_PARTITION_ADVANCED is not set |
943 | CONFIG_MSDOS_PARTITION=y | 1131 | CONFIG_MSDOS_PARTITION=y |
944 | # CONFIG_NLS is not set | 1132 | CONFIG_NLS=y |
1133 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
1134 | # CONFIG_NLS_CODEPAGE_437 is not set | ||
1135 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
1136 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
1137 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
1138 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
1139 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
1140 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
1141 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
1142 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
1143 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
1144 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
1145 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
1146 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
1147 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
1148 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
1149 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
1150 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
1151 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
1152 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
1153 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
1154 | # CONFIG_NLS_ISO8859_8 is not set | ||
1155 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
1156 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
1157 | # CONFIG_NLS_ASCII is not set | ||
1158 | # CONFIG_NLS_ISO8859_1 is not set | ||
1159 | # CONFIG_NLS_ISO8859_2 is not set | ||
1160 | # CONFIG_NLS_ISO8859_3 is not set | ||
1161 | # CONFIG_NLS_ISO8859_4 is not set | ||
1162 | # CONFIG_NLS_ISO8859_5 is not set | ||
1163 | # CONFIG_NLS_ISO8859_6 is not set | ||
1164 | # CONFIG_NLS_ISO8859_7 is not set | ||
1165 | # CONFIG_NLS_ISO8859_9 is not set | ||
1166 | # CONFIG_NLS_ISO8859_13 is not set | ||
1167 | # CONFIG_NLS_ISO8859_14 is not set | ||
1168 | # CONFIG_NLS_ISO8859_15 is not set | ||
1169 | # CONFIG_NLS_KOI8_R is not set | ||
1170 | # CONFIG_NLS_KOI8_U is not set | ||
1171 | # CONFIG_NLS_UTF8 is not set | ||
945 | # CONFIG_DLM is not set | 1172 | # CONFIG_DLM is not set |
1173 | # CONFIG_BINARY_PRINTF is not set | ||
946 | 1174 | ||
947 | # | 1175 | # |
948 | # Library routines | 1176 | # Library routines |
@@ -957,11 +1185,13 @@ CONFIG_CRC32=y | |||
957 | # CONFIG_CRC7 is not set | 1185 | # CONFIG_CRC7 is not set |
958 | # CONFIG_LIBCRC32C is not set | 1186 | # CONFIG_LIBCRC32C is not set |
959 | CONFIG_ZLIB_INFLATE=y | 1187 | CONFIG_ZLIB_INFLATE=y |
960 | CONFIG_PLIST=y | 1188 | CONFIG_DECOMPRESS_GZIP=y |
961 | CONFIG_HAS_IOMEM=y | 1189 | CONFIG_HAS_IOMEM=y |
962 | CONFIG_HAS_IOPORT=y | 1190 | CONFIG_HAS_IOPORT=y |
963 | CONFIG_HAS_DMA=y | 1191 | CONFIG_HAS_DMA=y |
964 | CONFIG_HAVE_LMB=y | 1192 | CONFIG_HAVE_LMB=y |
1193 | CONFIG_NLATTR=y | ||
1194 | CONFIG_GENERIC_ATOMIC64=y | ||
965 | 1195 | ||
966 | # | 1196 | # |
967 | # Kernel hacking | 1197 | # Kernel hacking |
@@ -979,6 +1209,9 @@ CONFIG_DEBUG_KERNEL=y | |||
979 | CONFIG_DETECT_SOFTLOCKUP=y | 1209 | CONFIG_DETECT_SOFTLOCKUP=y |
980 | # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set | 1210 | # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set |
981 | CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 | 1211 | CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 |
1212 | CONFIG_DETECT_HUNG_TASK=y | ||
1213 | # CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set | ||
1214 | CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 | ||
982 | CONFIG_SCHED_DEBUG=y | 1215 | CONFIG_SCHED_DEBUG=y |
983 | # CONFIG_SCHEDSTATS is not set | 1216 | # CONFIG_SCHEDSTATS is not set |
984 | # CONFIG_TIMER_STATS is not set | 1217 | # CONFIG_TIMER_STATS is not set |
@@ -989,6 +1222,9 @@ CONFIG_SCHED_DEBUG=y | |||
989 | # CONFIG_RT_MUTEX_TESTER is not set | 1222 | # CONFIG_RT_MUTEX_TESTER is not set |
990 | # CONFIG_DEBUG_SPINLOCK is not set | 1223 | # CONFIG_DEBUG_SPINLOCK is not set |
991 | # CONFIG_DEBUG_MUTEXES is not set | 1224 | # CONFIG_DEBUG_MUTEXES is not set |
1225 | # CONFIG_DEBUG_LOCK_ALLOC is not set | ||
1226 | # CONFIG_PROVE_LOCKING is not set | ||
1227 | # CONFIG_LOCK_STAT is not set | ||
992 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 1228 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
993 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | 1229 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set |
994 | # CONFIG_DEBUG_KOBJECT is not set | 1230 | # CONFIG_DEBUG_KOBJECT is not set |
@@ -1000,7 +1236,6 @@ CONFIG_SCHED_DEBUG=y | |||
1000 | # CONFIG_DEBUG_LIST is not set | 1236 | # CONFIG_DEBUG_LIST is not set |
1001 | # CONFIG_DEBUG_SG is not set | 1237 | # CONFIG_DEBUG_SG is not set |
1002 | # CONFIG_DEBUG_NOTIFIERS is not set | 1238 | # CONFIG_DEBUG_NOTIFIERS is not set |
1003 | # CONFIG_BOOT_PRINTK_DELAY is not set | ||
1004 | # CONFIG_RCU_TORTURE_TEST is not set | 1239 | # CONFIG_RCU_TORTURE_TEST is not set |
1005 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | 1240 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set |
1006 | # CONFIG_BACKTRACE_SELF_TEST is not set | 1241 | # CONFIG_BACKTRACE_SELF_TEST is not set |
@@ -1008,27 +1243,36 @@ CONFIG_SCHED_DEBUG=y | |||
1008 | # CONFIG_FAULT_INJECTION is not set | 1243 | # CONFIG_FAULT_INJECTION is not set |
1009 | # CONFIG_LATENCYTOP is not set | 1244 | # CONFIG_LATENCYTOP is not set |
1010 | CONFIG_SYSCTL_SYSCALL_CHECK=y | 1245 | CONFIG_SYSCTL_SYSCALL_CHECK=y |
1246 | # CONFIG_DEBUG_PAGEALLOC is not set | ||
1011 | CONFIG_HAVE_FUNCTION_TRACER=y | 1247 | CONFIG_HAVE_FUNCTION_TRACER=y |
1248 | CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y | ||
1012 | CONFIG_HAVE_DYNAMIC_FTRACE=y | 1249 | CONFIG_HAVE_DYNAMIC_FTRACE=y |
1013 | CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y | 1250 | CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y |
1014 | 1251 | CONFIG_TRACING_SUPPORT=y | |
1015 | # | 1252 | CONFIG_FTRACE=y |
1016 | # Tracers | ||
1017 | # | ||
1018 | # CONFIG_FUNCTION_TRACER is not set | 1253 | # CONFIG_FUNCTION_TRACER is not set |
1254 | # CONFIG_IRQSOFF_TRACER is not set | ||
1019 | # CONFIG_SCHED_TRACER is not set | 1255 | # CONFIG_SCHED_TRACER is not set |
1020 | # CONFIG_CONTEXT_SWITCH_TRACER is not set | 1256 | # CONFIG_ENABLE_DEFAULT_TRACERS is not set |
1021 | # CONFIG_BOOT_TRACER is not set | 1257 | # CONFIG_BOOT_TRACER is not set |
1022 | # CONFIG_TRACE_BRANCH_PROFILING is not set | 1258 | CONFIG_BRANCH_PROFILE_NONE=y |
1259 | # CONFIG_PROFILE_ANNOTATED_BRANCHES is not set | ||
1260 | # CONFIG_PROFILE_ALL_BRANCHES is not set | ||
1023 | # CONFIG_STACK_TRACER is not set | 1261 | # CONFIG_STACK_TRACER is not set |
1024 | # CONFIG_DYNAMIC_PRINTK_DEBUG is not set | 1262 | # CONFIG_KMEMTRACE is not set |
1263 | # CONFIG_WORKQUEUE_TRACER is not set | ||
1264 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
1265 | # CONFIG_DYNAMIC_DEBUG is not set | ||
1025 | # CONFIG_SAMPLES is not set | 1266 | # CONFIG_SAMPLES is not set |
1026 | CONFIG_HAVE_ARCH_KGDB=y | 1267 | CONFIG_HAVE_ARCH_KGDB=y |
1027 | # CONFIG_KGDB is not set | 1268 | # CONFIG_KGDB is not set |
1269 | # CONFIG_KMEMCHECK is not set | ||
1270 | # CONFIG_PPC_DISABLE_WERROR is not set | ||
1271 | CONFIG_PPC_WERROR=y | ||
1028 | CONFIG_PRINT_STACK_DEPTH=64 | 1272 | CONFIG_PRINT_STACK_DEPTH=64 |
1029 | # CONFIG_DEBUG_STACKOVERFLOW is not set | 1273 | # CONFIG_DEBUG_STACKOVERFLOW is not set |
1030 | # CONFIG_DEBUG_STACK_USAGE is not set | 1274 | # CONFIG_DEBUG_STACK_USAGE is not set |
1031 | # CONFIG_DEBUG_PAGEALLOC is not set | 1275 | # CONFIG_PPC_EMULATED_STATS is not set |
1032 | # CONFIG_CODE_PATCHING_SELFTEST is not set | 1276 | # CONFIG_CODE_PATCHING_SELFTEST is not set |
1033 | # CONFIG_FTR_FIXUP_SELFTEST is not set | 1277 | # CONFIG_FTR_FIXUP_SELFTEST is not set |
1034 | # CONFIG_MSI_BITMAP_SELFTEST is not set | 1278 | # CONFIG_MSI_BITMAP_SELFTEST is not set |
diff --git a/arch/powerpc/configs/44x/eiger_defconfig b/arch/powerpc/configs/44x/eiger_defconfig new file mode 100644 index 000000000000..007f3bd939e7 --- /dev/null +++ b/arch/powerpc/configs/44x/eiger_defconfig | |||
@@ -0,0 +1,1252 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.31-rc6 | ||
4 | # Wed Aug 19 13:06:50 2009 | ||
5 | # | ||
6 | # CONFIG_PPC64 is not set | ||
7 | |||
8 | # | ||
9 | # Processor support | ||
10 | # | ||
11 | # CONFIG_PPC_BOOK3S_32 is not set | ||
12 | # CONFIG_PPC_85xx is not set | ||
13 | # CONFIG_PPC_8xx is not set | ||
14 | # CONFIG_40x is not set | ||
15 | CONFIG_44x=y | ||
16 | # CONFIG_E200 is not set | ||
17 | CONFIG_PPC_FPU=y | ||
18 | CONFIG_4xx=y | ||
19 | CONFIG_BOOKE=y | ||
20 | CONFIG_PTE_64BIT=y | ||
21 | CONFIG_PHYS_64BIT=y | ||
22 | CONFIG_PPC_MMU_NOHASH=y | ||
23 | CONFIG_PPC_MMU_NOHASH_32=y | ||
24 | # CONFIG_PPC_MM_SLICES is not set | ||
25 | CONFIG_NOT_COHERENT_CACHE=y | ||
26 | CONFIG_PPC32=y | ||
27 | CONFIG_WORD_SIZE=32 | ||
28 | CONFIG_ARCH_PHYS_ADDR_T_64BIT=y | ||
29 | CONFIG_MMU=y | ||
30 | CONFIG_GENERIC_CMOS_UPDATE=y | ||
31 | CONFIG_GENERIC_TIME=y | ||
32 | CONFIG_GENERIC_TIME_VSYSCALL=y | ||
33 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
34 | CONFIG_GENERIC_HARDIRQS=y | ||
35 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y | ||
36 | # CONFIG_HAVE_SETUP_PER_CPU_AREA is not set | ||
37 | CONFIG_IRQ_PER_CPU=y | ||
38 | CONFIG_STACKTRACE_SUPPORT=y | ||
39 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y | ||
40 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
41 | CONFIG_LOCKDEP_SUPPORT=y | ||
42 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
43 | CONFIG_ARCH_HAS_ILOG2_U32=y | ||
44 | CONFIG_GENERIC_HWEIGHT=y | ||
45 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
46 | # CONFIG_ARCH_NO_VIRT_TO_BUS is not set | ||
47 | CONFIG_PPC=y | ||
48 | CONFIG_EARLY_PRINTK=y | ||
49 | CONFIG_GENERIC_NVRAM=y | ||
50 | CONFIG_SCHED_OMIT_FRAME_POINTER=y | ||
51 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | ||
52 | CONFIG_PPC_OF=y | ||
53 | CONFIG_OF=y | ||
54 | CONFIG_PPC_UDBG_16550=y | ||
55 | # CONFIG_GENERIC_TBSYNC is not set | ||
56 | CONFIG_AUDIT_ARCH=y | ||
57 | CONFIG_GENERIC_BUG=y | ||
58 | CONFIG_DTC=y | ||
59 | # CONFIG_DEFAULT_UIMAGE is not set | ||
60 | CONFIG_PPC_DCR_NATIVE=y | ||
61 | # CONFIG_PPC_DCR_MMIO is not set | ||
62 | CONFIG_PPC_DCR=y | ||
63 | CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y | ||
64 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
65 | CONFIG_CONSTRUCTORS=y | ||
66 | |||
67 | # | ||
68 | # General setup | ||
69 | # | ||
70 | CONFIG_EXPERIMENTAL=y | ||
71 | CONFIG_BROKEN_ON_SMP=y | ||
72 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
73 | CONFIG_LOCALVERSION="" | ||
74 | CONFIG_LOCALVERSION_AUTO=y | ||
75 | CONFIG_SWAP=y | ||
76 | CONFIG_SYSVIPC=y | ||
77 | CONFIG_SYSVIPC_SYSCTL=y | ||
78 | CONFIG_POSIX_MQUEUE=y | ||
79 | CONFIG_POSIX_MQUEUE_SYSCTL=y | ||
80 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
81 | # CONFIG_TASKSTATS is not set | ||
82 | # CONFIG_AUDIT is not set | ||
83 | |||
84 | # | ||
85 | # RCU Subsystem | ||
86 | # | ||
87 | CONFIG_CLASSIC_RCU=y | ||
88 | # CONFIG_TREE_RCU is not set | ||
89 | # CONFIG_PREEMPT_RCU is not set | ||
90 | # CONFIG_TREE_RCU_TRACE is not set | ||
91 | # CONFIG_PREEMPT_RCU_TRACE is not set | ||
92 | # CONFIG_IKCONFIG is not set | ||
93 | CONFIG_LOG_BUF_SHIFT=14 | ||
94 | # CONFIG_GROUP_SCHED is not set | ||
95 | # CONFIG_CGROUPS is not set | ||
96 | CONFIG_SYSFS_DEPRECATED=y | ||
97 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
98 | # CONFIG_RELAY is not set | ||
99 | # CONFIG_NAMESPACES is not set | ||
100 | CONFIG_BLK_DEV_INITRD=y | ||
101 | CONFIG_INITRAMFS_SOURCE="" | ||
102 | CONFIG_RD_GZIP=y | ||
103 | # CONFIG_RD_BZIP2 is not set | ||
104 | # CONFIG_RD_LZMA is not set | ||
105 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
106 | CONFIG_SYSCTL=y | ||
107 | CONFIG_ANON_INODES=y | ||
108 | CONFIG_EMBEDDED=y | ||
109 | CONFIG_SYSCTL_SYSCALL=y | ||
110 | CONFIG_KALLSYMS=y | ||
111 | # CONFIG_KALLSYMS_ALL is not set | ||
112 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
113 | CONFIG_HOTPLUG=y | ||
114 | CONFIG_PRINTK=y | ||
115 | CONFIG_BUG=y | ||
116 | CONFIG_ELF_CORE=y | ||
117 | CONFIG_BASE_FULL=y | ||
118 | CONFIG_FUTEX=y | ||
119 | CONFIG_EPOLL=y | ||
120 | CONFIG_SIGNALFD=y | ||
121 | CONFIG_TIMERFD=y | ||
122 | CONFIG_EVENTFD=y | ||
123 | CONFIG_SHMEM=y | ||
124 | CONFIG_AIO=y | ||
125 | CONFIG_HAVE_PERF_COUNTERS=y | ||
126 | |||
127 | # | ||
128 | # Performance Counters | ||
129 | # | ||
130 | # CONFIG_PERF_COUNTERS is not set | ||
131 | CONFIG_VM_EVENT_COUNTERS=y | ||
132 | CONFIG_PCI_QUIRKS=y | ||
133 | CONFIG_SLUB_DEBUG=y | ||
134 | # CONFIG_STRIP_ASM_SYMS is not set | ||
135 | CONFIG_COMPAT_BRK=y | ||
136 | # CONFIG_SLAB is not set | ||
137 | CONFIG_SLUB=y | ||
138 | # CONFIG_SLOB is not set | ||
139 | # CONFIG_PROFILING is not set | ||
140 | # CONFIG_MARKERS is not set | ||
141 | CONFIG_HAVE_OPROFILE=y | ||
142 | # CONFIG_KPROBES is not set | ||
143 | CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y | ||
144 | CONFIG_HAVE_IOREMAP_PROT=y | ||
145 | CONFIG_HAVE_KPROBES=y | ||
146 | CONFIG_HAVE_KRETPROBES=y | ||
147 | CONFIG_HAVE_ARCH_TRACEHOOK=y | ||
148 | |||
149 | # | ||
150 | # GCOV-based kernel profiling | ||
151 | # | ||
152 | # CONFIG_GCOV_KERNEL is not set | ||
153 | # CONFIG_SLOW_WORK is not set | ||
154 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set | ||
155 | CONFIG_SLABINFO=y | ||
156 | CONFIG_RT_MUTEXES=y | ||
157 | CONFIG_BASE_SMALL=0 | ||
158 | CONFIG_MODULES=y | ||
159 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
160 | CONFIG_MODULE_UNLOAD=y | ||
161 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
162 | # CONFIG_MODVERSIONS is not set | ||
163 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
164 | CONFIG_BLOCK=y | ||
165 | CONFIG_LBDAF=y | ||
166 | # CONFIG_BLK_DEV_BSG is not set | ||
167 | # CONFIG_BLK_DEV_INTEGRITY is not set | ||
168 | |||
169 | # | ||
170 | # IO Schedulers | ||
171 | # | ||
172 | CONFIG_IOSCHED_NOOP=y | ||
173 | CONFIG_IOSCHED_AS=y | ||
174 | CONFIG_IOSCHED_DEADLINE=y | ||
175 | CONFIG_IOSCHED_CFQ=y | ||
176 | CONFIG_DEFAULT_AS=y | ||
177 | # CONFIG_DEFAULT_DEADLINE is not set | ||
178 | # CONFIG_DEFAULT_CFQ is not set | ||
179 | # CONFIG_DEFAULT_NOOP is not set | ||
180 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
181 | # CONFIG_FREEZER is not set | ||
182 | CONFIG_PPC4xx_PCI_EXPRESS=y | ||
183 | |||
184 | # | ||
185 | # Platform support | ||
186 | # | ||
187 | # CONFIG_PPC_CELL is not set | ||
188 | # CONFIG_PPC_CELL_NATIVE is not set | ||
189 | # CONFIG_PQ2ADS is not set | ||
190 | # CONFIG_BAMBOO is not set | ||
191 | # CONFIG_EBONY is not set | ||
192 | # CONFIG_SAM440EP is not set | ||
193 | # CONFIG_SEQUOIA is not set | ||
194 | # CONFIG_TAISHAN is not set | ||
195 | # CONFIG_KATMAI is not set | ||
196 | # CONFIG_RAINIER is not set | ||
197 | # CONFIG_WARP is not set | ||
198 | # CONFIG_ARCHES is not set | ||
199 | # CONFIG_CANYONLANDS is not set | ||
200 | # CONFIG_GLACIER is not set | ||
201 | # CONFIG_REDWOOD is not set | ||
202 | CONFIG_EIGER=y | ||
203 | # CONFIG_YOSEMITE is not set | ||
204 | # CONFIG_XILINX_VIRTEX440_GENERIC_BOARD is not set | ||
205 | CONFIG_PPC44x_SIMPLE=y | ||
206 | # CONFIG_PPC4xx_GPIO is not set | ||
207 | CONFIG_460SX=y | ||
208 | # CONFIG_IPIC is not set | ||
209 | # CONFIG_MPIC is not set | ||
210 | # CONFIG_MPIC_WEIRD is not set | ||
211 | # CONFIG_PPC_I8259 is not set | ||
212 | # CONFIG_PPC_RTAS is not set | ||
213 | # CONFIG_MMIO_NVRAM is not set | ||
214 | # CONFIG_PPC_MPC106 is not set | ||
215 | # CONFIG_PPC_970_NAP is not set | ||
216 | # CONFIG_PPC_INDIRECT_IO is not set | ||
217 | # CONFIG_GENERIC_IOMAP is not set | ||
218 | # CONFIG_CPU_FREQ is not set | ||
219 | # CONFIG_FSL_ULI1575 is not set | ||
220 | # CONFIG_SIMPLE_GPIO is not set | ||
221 | |||
222 | # | ||
223 | # Kernel options | ||
224 | # | ||
225 | # CONFIG_HIGHMEM is not set | ||
226 | CONFIG_TICK_ONESHOT=y | ||
227 | CONFIG_NO_HZ=y | ||
228 | CONFIG_HIGH_RES_TIMERS=y | ||
229 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
230 | # CONFIG_HZ_100 is not set | ||
231 | CONFIG_HZ_250=y | ||
232 | # CONFIG_HZ_300 is not set | ||
233 | # CONFIG_HZ_1000 is not set | ||
234 | CONFIG_HZ=250 | ||
235 | CONFIG_SCHED_HRTICK=y | ||
236 | CONFIG_PREEMPT_NONE=y | ||
237 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
238 | # CONFIG_PREEMPT is not set | ||
239 | CONFIG_BINFMT_ELF=y | ||
240 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | ||
241 | # CONFIG_HAVE_AOUT is not set | ||
242 | # CONFIG_BINFMT_MISC is not set | ||
243 | # CONFIG_MATH_EMULATION is not set | ||
244 | # CONFIG_IOMMU_HELPER is not set | ||
245 | # CONFIG_SWIOTLB is not set | ||
246 | CONFIG_PPC_NEED_DMA_SYNC_OPS=y | ||
247 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | ||
248 | CONFIG_ARCH_HAS_WALK_MEMORY=y | ||
249 | CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y | ||
250 | CONFIG_ARCH_FLATMEM_ENABLE=y | ||
251 | CONFIG_ARCH_POPULATES_NODE_MAP=y | ||
252 | CONFIG_SELECT_MEMORY_MODEL=y | ||
253 | CONFIG_FLATMEM_MANUAL=y | ||
254 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
255 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
256 | CONFIG_FLATMEM=y | ||
257 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
258 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
259 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
260 | CONFIG_MIGRATION=y | ||
261 | CONFIG_PHYS_ADDR_T_64BIT=y | ||
262 | CONFIG_ZONE_DMA_FLAG=1 | ||
263 | CONFIG_BOUNCE=y | ||
264 | CONFIG_VIRT_TO_BUS=y | ||
265 | CONFIG_HAVE_MLOCK=y | ||
266 | CONFIG_HAVE_MLOCKED_PAGE_BIT=y | ||
267 | CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 | ||
268 | CONFIG_STDBINUTILS=y | ||
269 | CONFIG_PPC_4K_PAGES=y | ||
270 | # CONFIG_PPC_16K_PAGES is not set | ||
271 | # CONFIG_PPC_64K_PAGES is not set | ||
272 | # CONFIG_PPC_256K_PAGES is not set | ||
273 | CONFIG_FORCE_MAX_ZONEORDER=11 | ||
274 | CONFIG_PROC_DEVICETREE=y | ||
275 | CONFIG_CMDLINE_BOOL=y | ||
276 | CONFIG_CMDLINE="" | ||
277 | CONFIG_EXTRA_TARGETS="" | ||
278 | CONFIG_SECCOMP=y | ||
279 | CONFIG_ISA_DMA_API=y | ||
280 | |||
281 | # | ||
282 | # Bus options | ||
283 | # | ||
284 | CONFIG_ZONE_DMA=y | ||
285 | CONFIG_PPC_INDIRECT_PCI=y | ||
286 | CONFIG_4xx_SOC=y | ||
287 | CONFIG_PPC_PCI_CHOICE=y | ||
288 | CONFIG_PCI=y | ||
289 | CONFIG_PCI_DOMAINS=y | ||
290 | CONFIG_PCI_SYSCALL=y | ||
291 | CONFIG_PCIEPORTBUS=y | ||
292 | CONFIG_PCIEAER=y | ||
293 | # CONFIG_PCIE_ECRC is not set | ||
294 | # CONFIG_PCIEAER_INJECT is not set | ||
295 | # CONFIG_PCIEASPM is not set | ||
296 | CONFIG_ARCH_SUPPORTS_MSI=y | ||
297 | # CONFIG_PCI_MSI is not set | ||
298 | CONFIG_PCI_LEGACY=y | ||
299 | # CONFIG_PCI_DEBUG is not set | ||
300 | # CONFIG_PCI_STUB is not set | ||
301 | # CONFIG_PCI_IOV is not set | ||
302 | # CONFIG_PCCARD is not set | ||
303 | # CONFIG_HOTPLUG_PCI is not set | ||
304 | # CONFIG_HAS_RAPIDIO is not set | ||
305 | |||
306 | # | ||
307 | # Advanced setup | ||
308 | # | ||
309 | # CONFIG_ADVANCED_OPTIONS is not set | ||
310 | |||
311 | # | ||
312 | # Default settings for advanced configuration options are used | ||
313 | # | ||
314 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
315 | CONFIG_PAGE_OFFSET=0xc0000000 | ||
316 | CONFIG_KERNEL_START=0xc0000000 | ||
317 | CONFIG_PHYSICAL_START=0x00000000 | ||
318 | CONFIG_TASK_SIZE=0xc0000000 | ||
319 | CONFIG_CONSISTENT_SIZE=0x00200000 | ||
320 | CONFIG_NET=y | ||
321 | |||
322 | # | ||
323 | # Networking options | ||
324 | # | ||
325 | CONFIG_PACKET=y | ||
326 | # CONFIG_PACKET_MMAP is not set | ||
327 | CONFIG_UNIX=y | ||
328 | # CONFIG_NET_KEY is not set | ||
329 | CONFIG_INET=y | ||
330 | # CONFIG_IP_MULTICAST is not set | ||
331 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
332 | CONFIG_IP_FIB_HASH=y | ||
333 | CONFIG_IP_PNP=y | ||
334 | CONFIG_IP_PNP_DHCP=y | ||
335 | CONFIG_IP_PNP_BOOTP=y | ||
336 | # CONFIG_IP_PNP_RARP is not set | ||
337 | # CONFIG_NET_IPIP is not set | ||
338 | # CONFIG_NET_IPGRE is not set | ||
339 | # CONFIG_ARPD is not set | ||
340 | # CONFIG_SYN_COOKIES is not set | ||
341 | # CONFIG_INET_AH is not set | ||
342 | # CONFIG_INET_ESP is not set | ||
343 | # CONFIG_INET_IPCOMP is not set | ||
344 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
345 | # CONFIG_INET_TUNNEL is not set | ||
346 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
347 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
348 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
349 | # CONFIG_INET_LRO is not set | ||
350 | CONFIG_INET_DIAG=y | ||
351 | CONFIG_INET_TCP_DIAG=y | ||
352 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
353 | CONFIG_TCP_CONG_CUBIC=y | ||
354 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
355 | # CONFIG_TCP_MD5SIG is not set | ||
356 | # CONFIG_IPV6 is not set | ||
357 | # CONFIG_NETWORK_SECMARK is not set | ||
358 | # CONFIG_NETFILTER is not set | ||
359 | # CONFIG_IP_DCCP is not set | ||
360 | # CONFIG_IP_SCTP is not set | ||
361 | # CONFIG_TIPC is not set | ||
362 | # CONFIG_ATM is not set | ||
363 | # CONFIG_BRIDGE is not set | ||
364 | # CONFIG_NET_DSA is not set | ||
365 | # CONFIG_VLAN_8021Q is not set | ||
366 | # CONFIG_DECNET is not set | ||
367 | # CONFIG_LLC2 is not set | ||
368 | # CONFIG_IPX is not set | ||
369 | # CONFIG_ATALK is not set | ||
370 | # CONFIG_X25 is not set | ||
371 | # CONFIG_LAPB is not set | ||
372 | # CONFIG_ECONET is not set | ||
373 | # CONFIG_WAN_ROUTER is not set | ||
374 | # CONFIG_PHONET is not set | ||
375 | # CONFIG_IEEE802154 is not set | ||
376 | # CONFIG_NET_SCHED is not set | ||
377 | # CONFIG_DCB is not set | ||
378 | |||
379 | # | ||
380 | # Network testing | ||
381 | # | ||
382 | # CONFIG_NET_PKTGEN is not set | ||
383 | # CONFIG_HAMRADIO is not set | ||
384 | # CONFIG_CAN is not set | ||
385 | # CONFIG_IRDA is not set | ||
386 | # CONFIG_BT is not set | ||
387 | # CONFIG_AF_RXRPC is not set | ||
388 | CONFIG_WIRELESS=y | ||
389 | # CONFIG_CFG80211 is not set | ||
390 | CONFIG_WIRELESS_OLD_REGULATORY=y | ||
391 | # CONFIG_WIRELESS_EXT is not set | ||
392 | # CONFIG_LIB80211 is not set | ||
393 | |||
394 | # | ||
395 | # CFG80211 needs to be enabled for MAC80211 | ||
396 | # | ||
397 | CONFIG_MAC80211_DEFAULT_PS_VALUE=0 | ||
398 | # CONFIG_WIMAX is not set | ||
399 | # CONFIG_RFKILL is not set | ||
400 | # CONFIG_NET_9P is not set | ||
401 | |||
402 | # | ||
403 | # Device Drivers | ||
404 | # | ||
405 | |||
406 | # | ||
407 | # Generic Driver Options | ||
408 | # | ||
409 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
410 | CONFIG_STANDALONE=y | ||
411 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
412 | CONFIG_FW_LOADER=y | ||
413 | CONFIG_FIRMWARE_IN_KERNEL=y | ||
414 | CONFIG_EXTRA_FIRMWARE="" | ||
415 | # CONFIG_DEBUG_DRIVER is not set | ||
416 | # CONFIG_DEBUG_DEVRES is not set | ||
417 | # CONFIG_SYS_HYPERVISOR is not set | ||
418 | CONFIG_CONNECTOR=y | ||
419 | CONFIG_PROC_EVENTS=y | ||
420 | CONFIG_MTD=y | ||
421 | # CONFIG_MTD_DEBUG is not set | ||
422 | CONFIG_MTD_CONCAT=y | ||
423 | CONFIG_MTD_PARTITIONS=y | ||
424 | # CONFIG_MTD_TESTS is not set | ||
425 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
426 | CONFIG_MTD_CMDLINE_PARTS=y | ||
427 | CONFIG_MTD_OF_PARTS=y | ||
428 | # CONFIG_MTD_AR7_PARTS is not set | ||
429 | |||
430 | # | ||
431 | # User Modules And Translation Layers | ||
432 | # | ||
433 | CONFIG_MTD_CHAR=y | ||
434 | CONFIG_MTD_BLKDEVS=y | ||
435 | CONFIG_MTD_BLOCK=y | ||
436 | # CONFIG_FTL is not set | ||
437 | # CONFIG_NFTL is not set | ||
438 | # CONFIG_INFTL is not set | ||
439 | # CONFIG_RFD_FTL is not set | ||
440 | # CONFIG_SSFDC is not set | ||
441 | # CONFIG_MTD_OOPS is not set | ||
442 | |||
443 | # | ||
444 | # RAM/ROM/Flash chip drivers | ||
445 | # | ||
446 | CONFIG_MTD_CFI=y | ||
447 | # CONFIG_MTD_JEDECPROBE is not set | ||
448 | CONFIG_MTD_GEN_PROBE=y | ||
449 | # CONFIG_MTD_CFI_ADV_OPTIONS is not set | ||
450 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
451 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
452 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
453 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
454 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
455 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
456 | CONFIG_MTD_CFI_I1=y | ||
457 | CONFIG_MTD_CFI_I2=y | ||
458 | # CONFIG_MTD_CFI_I4 is not set | ||
459 | # CONFIG_MTD_CFI_I8 is not set | ||
460 | # CONFIG_MTD_CFI_INTELEXT is not set | ||
461 | CONFIG_MTD_CFI_AMDSTD=y | ||
462 | # CONFIG_MTD_CFI_STAA is not set | ||
463 | CONFIG_MTD_CFI_UTIL=y | ||
464 | # CONFIG_MTD_RAM is not set | ||
465 | # CONFIG_MTD_ROM is not set | ||
466 | # CONFIG_MTD_ABSENT is not set | ||
467 | |||
468 | # | ||
469 | # Mapping drivers for chip access | ||
470 | # | ||
471 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
472 | # CONFIG_MTD_PHYSMAP is not set | ||
473 | CONFIG_MTD_PHYSMAP_OF=y | ||
474 | # CONFIG_MTD_INTEL_VR_NOR is not set | ||
475 | # CONFIG_MTD_PLATRAM is not set | ||
476 | |||
477 | # | ||
478 | # Self-contained MTD device drivers | ||
479 | # | ||
480 | # CONFIG_MTD_PMC551 is not set | ||
481 | # CONFIG_MTD_SLRAM is not set | ||
482 | # CONFIG_MTD_PHRAM is not set | ||
483 | # CONFIG_MTD_MTDRAM is not set | ||
484 | # CONFIG_MTD_BLOCK2MTD is not set | ||
485 | |||
486 | # | ||
487 | # Disk-On-Chip Device Drivers | ||
488 | # | ||
489 | # CONFIG_MTD_DOC2000 is not set | ||
490 | # CONFIG_MTD_DOC2001 is not set | ||
491 | # CONFIG_MTD_DOC2001PLUS is not set | ||
492 | CONFIG_MTD_NAND=y | ||
493 | # CONFIG_MTD_NAND_VERIFY_WRITE is not set | ||
494 | CONFIG_MTD_NAND_ECC_SMC=y | ||
495 | # CONFIG_MTD_NAND_MUSEUM_IDS is not set | ||
496 | CONFIG_MTD_NAND_IDS=y | ||
497 | CONFIG_MTD_NAND_NDFC=y | ||
498 | # CONFIG_MTD_NAND_DISKONCHIP is not set | ||
499 | # CONFIG_MTD_NAND_CAFE is not set | ||
500 | # CONFIG_MTD_NAND_NANDSIM is not set | ||
501 | # CONFIG_MTD_NAND_PLATFORM is not set | ||
502 | # CONFIG_MTD_NAND_FSL_ELBC is not set | ||
503 | # CONFIG_MTD_ONENAND is not set | ||
504 | |||
505 | # | ||
506 | # LPDDR flash memory drivers | ||
507 | # | ||
508 | # CONFIG_MTD_LPDDR is not set | ||
509 | |||
510 | # | ||
511 | # UBI - Unsorted block images | ||
512 | # | ||
513 | # CONFIG_MTD_UBI is not set | ||
514 | CONFIG_OF_DEVICE=y | ||
515 | CONFIG_OF_I2C=y | ||
516 | # CONFIG_PARPORT is not set | ||
517 | CONFIG_BLK_DEV=y | ||
518 | # CONFIG_BLK_DEV_FD is not set | ||
519 | # CONFIG_BLK_CPQ_DA is not set | ||
520 | # CONFIG_BLK_CPQ_CISS_DA is not set | ||
521 | # CONFIG_BLK_DEV_DAC960 is not set | ||
522 | # CONFIG_BLK_DEV_UMEM is not set | ||
523 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
524 | # CONFIG_BLK_DEV_LOOP is not set | ||
525 | # CONFIG_BLK_DEV_NBD is not set | ||
526 | # CONFIG_BLK_DEV_SX8 is not set | ||
527 | CONFIG_BLK_DEV_RAM=y | ||
528 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
529 | CONFIG_BLK_DEV_RAM_SIZE=35000 | ||
530 | # CONFIG_BLK_DEV_XIP is not set | ||
531 | # CONFIG_CDROM_PKTCDVD is not set | ||
532 | # CONFIG_ATA_OVER_ETH is not set | ||
533 | # CONFIG_XILINX_SYSACE is not set | ||
534 | # CONFIG_BLK_DEV_HD is not set | ||
535 | # CONFIG_MISC_DEVICES is not set | ||
536 | CONFIG_HAVE_IDE=y | ||
537 | # CONFIG_IDE is not set | ||
538 | |||
539 | # | ||
540 | # SCSI device support | ||
541 | # | ||
542 | # CONFIG_RAID_ATTRS is not set | ||
543 | CONFIG_SCSI=y | ||
544 | CONFIG_SCSI_DMA=y | ||
545 | # CONFIG_SCSI_TGT is not set | ||
546 | # CONFIG_SCSI_NETLINK is not set | ||
547 | CONFIG_SCSI_PROC_FS=y | ||
548 | |||
549 | # | ||
550 | # SCSI support type (disk, tape, CD-ROM) | ||
551 | # | ||
552 | CONFIG_BLK_DEV_SD=y | ||
553 | # CONFIG_CHR_DEV_ST is not set | ||
554 | # CONFIG_CHR_DEV_OSST is not set | ||
555 | # CONFIG_BLK_DEV_SR is not set | ||
556 | CONFIG_CHR_DEV_SG=y | ||
557 | # CONFIG_CHR_DEV_SCH is not set | ||
558 | # CONFIG_SCSI_MULTI_LUN is not set | ||
559 | # CONFIG_SCSI_CONSTANTS is not set | ||
560 | # CONFIG_SCSI_LOGGING is not set | ||
561 | # CONFIG_SCSI_SCAN_ASYNC is not set | ||
562 | CONFIG_SCSI_WAIT_SCAN=m | ||
563 | |||
564 | # | ||
565 | # SCSI Transports | ||
566 | # | ||
567 | # CONFIG_SCSI_SPI_ATTRS is not set | ||
568 | # CONFIG_SCSI_FC_ATTRS is not set | ||
569 | # CONFIG_SCSI_ISCSI_ATTRS is not set | ||
570 | CONFIG_SCSI_SAS_ATTRS=y | ||
571 | # CONFIG_SCSI_SAS_LIBSAS is not set | ||
572 | # CONFIG_SCSI_SRP_ATTRS is not set | ||
573 | CONFIG_SCSI_LOWLEVEL=y | ||
574 | # CONFIG_ISCSI_TCP is not set | ||
575 | # CONFIG_SCSI_BNX2_ISCSI is not set | ||
576 | # CONFIG_BLK_DEV_3W_XXXX_RAID is not set | ||
577 | # CONFIG_SCSI_3W_9XXX is not set | ||
578 | # CONFIG_SCSI_ACARD is not set | ||
579 | # CONFIG_SCSI_AACRAID is not set | ||
580 | # CONFIG_SCSI_AIC7XXX is not set | ||
581 | # CONFIG_SCSI_AIC7XXX_OLD is not set | ||
582 | # CONFIG_SCSI_AIC79XX is not set | ||
583 | # CONFIG_SCSI_AIC94XX is not set | ||
584 | # CONFIG_SCSI_MVSAS is not set | ||
585 | # CONFIG_SCSI_DPT_I2O is not set | ||
586 | # CONFIG_SCSI_ADVANSYS is not set | ||
587 | # CONFIG_SCSI_ARCMSR is not set | ||
588 | # CONFIG_MEGARAID_NEWGEN is not set | ||
589 | # CONFIG_MEGARAID_LEGACY is not set | ||
590 | # CONFIG_MEGARAID_SAS is not set | ||
591 | # CONFIG_SCSI_MPT2SAS is not set | ||
592 | # CONFIG_SCSI_HPTIOP is not set | ||
593 | # CONFIG_SCSI_BUSLOGIC is not set | ||
594 | # CONFIG_LIBFC is not set | ||
595 | # CONFIG_LIBFCOE is not set | ||
596 | # CONFIG_FCOE is not set | ||
597 | # CONFIG_SCSI_DMX3191D is not set | ||
598 | # CONFIG_SCSI_EATA is not set | ||
599 | # CONFIG_SCSI_FUTURE_DOMAIN is not set | ||
600 | # CONFIG_SCSI_GDTH is not set | ||
601 | # CONFIG_SCSI_IPS is not set | ||
602 | # CONFIG_SCSI_INITIO is not set | ||
603 | # CONFIG_SCSI_INIA100 is not set | ||
604 | # CONFIG_SCSI_STEX is not set | ||
605 | # CONFIG_SCSI_SYM53C8XX_2 is not set | ||
606 | # CONFIG_SCSI_QLOGIC_1280 is not set | ||
607 | # CONFIG_SCSI_QLA_FC is not set | ||
608 | # CONFIG_SCSI_QLA_ISCSI is not set | ||
609 | # CONFIG_SCSI_LPFC is not set | ||
610 | # CONFIG_SCSI_DC395x is not set | ||
611 | # CONFIG_SCSI_DC390T is not set | ||
612 | # CONFIG_SCSI_NSP32 is not set | ||
613 | # CONFIG_SCSI_DEBUG is not set | ||
614 | # CONFIG_SCSI_SRP is not set | ||
615 | # CONFIG_SCSI_DH is not set | ||
616 | # CONFIG_SCSI_OSD_INITIATOR is not set | ||
617 | # CONFIG_ATA is not set | ||
618 | # CONFIG_MD is not set | ||
619 | CONFIG_FUSION=y | ||
620 | # CONFIG_FUSION_SPI is not set | ||
621 | # CONFIG_FUSION_FC is not set | ||
622 | CONFIG_FUSION_SAS=y | ||
623 | CONFIG_FUSION_MAX_SGE=128 | ||
624 | # CONFIG_FUSION_CTL is not set | ||
625 | # CONFIG_FUSION_LOGGING is not set | ||
626 | |||
627 | # | ||
628 | # IEEE 1394 (FireWire) support | ||
629 | # | ||
630 | |||
631 | # | ||
632 | # You can enable one or both FireWire driver stacks. | ||
633 | # | ||
634 | |||
635 | # | ||
636 | # See the help texts for more information. | ||
637 | # | ||
638 | # CONFIG_FIREWIRE is not set | ||
639 | # CONFIG_IEEE1394 is not set | ||
640 | CONFIG_I2O=y | ||
641 | CONFIG_I2O_LCT_NOTIFY_ON_CHANGES=y | ||
642 | CONFIG_I2O_EXT_ADAPTEC=y | ||
643 | # CONFIG_I2O_CONFIG is not set | ||
644 | # CONFIG_I2O_BUS is not set | ||
645 | # CONFIG_I2O_BLOCK is not set | ||
646 | # CONFIG_I2O_SCSI is not set | ||
647 | # CONFIG_I2O_PROC is not set | ||
648 | # CONFIG_MACINTOSH_DRIVERS is not set | ||
649 | CONFIG_NETDEVICES=y | ||
650 | # CONFIG_DUMMY is not set | ||
651 | # CONFIG_BONDING is not set | ||
652 | # CONFIG_MACVLAN is not set | ||
653 | # CONFIG_EQUALIZER is not set | ||
654 | # CONFIG_TUN is not set | ||
655 | # CONFIG_VETH is not set | ||
656 | # CONFIG_ARCNET is not set | ||
657 | # CONFIG_PHYLIB is not set | ||
658 | CONFIG_NET_ETHERNET=y | ||
659 | # CONFIG_MII is not set | ||
660 | # CONFIG_HAPPYMEAL is not set | ||
661 | # CONFIG_SUNGEM is not set | ||
662 | # CONFIG_CASSINI is not set | ||
663 | # CONFIG_NET_VENDOR_3COM is not set | ||
664 | # CONFIG_ETHOC is not set | ||
665 | # CONFIG_DNET is not set | ||
666 | # CONFIG_NET_TULIP is not set | ||
667 | # CONFIG_HP100 is not set | ||
668 | CONFIG_IBM_NEW_EMAC=y | ||
669 | CONFIG_IBM_NEW_EMAC_RXB=256 | ||
670 | CONFIG_IBM_NEW_EMAC_TXB=256 | ||
671 | CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32 | ||
672 | CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256 | ||
673 | CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0 | ||
674 | # CONFIG_IBM_NEW_EMAC_DEBUG is not set | ||
675 | CONFIG_IBM_NEW_EMAC_ZMII=y | ||
676 | CONFIG_IBM_NEW_EMAC_RGMII=y | ||
677 | CONFIG_IBM_NEW_EMAC_TAH=y | ||
678 | CONFIG_IBM_NEW_EMAC_EMAC4=y | ||
679 | # CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set | ||
680 | # CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set | ||
681 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set | ||
682 | # CONFIG_NET_PCI is not set | ||
683 | # CONFIG_B44 is not set | ||
684 | # CONFIG_KS8842 is not set | ||
685 | # CONFIG_ATL2 is not set | ||
686 | CONFIG_NETDEV_1000=y | ||
687 | # CONFIG_ACENIC is not set | ||
688 | # CONFIG_DL2K is not set | ||
689 | # CONFIG_E1000 is not set | ||
690 | CONFIG_E1000E=y | ||
691 | # CONFIG_IP1000 is not set | ||
692 | # CONFIG_IGB is not set | ||
693 | # CONFIG_IGBVF is not set | ||
694 | # CONFIG_NS83820 is not set | ||
695 | # CONFIG_HAMACHI is not set | ||
696 | # CONFIG_YELLOWFIN is not set | ||
697 | # CONFIG_R8169 is not set | ||
698 | # CONFIG_SIS190 is not set | ||
699 | # CONFIG_SKGE is not set | ||
700 | # CONFIG_SKY2 is not set | ||
701 | # CONFIG_VIA_VELOCITY is not set | ||
702 | # CONFIG_TIGON3 is not set | ||
703 | # CONFIG_BNX2 is not set | ||
704 | # CONFIG_CNIC is not set | ||
705 | # CONFIG_MV643XX_ETH is not set | ||
706 | # CONFIG_XILINX_LL_TEMAC is not set | ||
707 | # CONFIG_QLA3XXX is not set | ||
708 | # CONFIG_ATL1 is not set | ||
709 | # CONFIG_ATL1E is not set | ||
710 | # CONFIG_ATL1C is not set | ||
711 | # CONFIG_JME is not set | ||
712 | # CONFIG_NETDEV_10000 is not set | ||
713 | # CONFIG_TR is not set | ||
714 | |||
715 | # | ||
716 | # Wireless LAN | ||
717 | # | ||
718 | # CONFIG_WLAN_PRE80211 is not set | ||
719 | # CONFIG_WLAN_80211 is not set | ||
720 | |||
721 | # | ||
722 | # Enable WiMAX (Networking options) to see the WiMAX drivers | ||
723 | # | ||
724 | # CONFIG_WAN is not set | ||
725 | # CONFIG_FDDI is not set | ||
726 | # CONFIG_HIPPI is not set | ||
727 | # CONFIG_PPP is not set | ||
728 | # CONFIG_SLIP is not set | ||
729 | # CONFIG_NET_FC is not set | ||
730 | # CONFIG_NETCONSOLE is not set | ||
731 | # CONFIG_NETPOLL is not set | ||
732 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
733 | # CONFIG_ISDN is not set | ||
734 | # CONFIG_PHONE is not set | ||
735 | |||
736 | # | ||
737 | # Input device support | ||
738 | # | ||
739 | # CONFIG_INPUT is not set | ||
740 | |||
741 | # | ||
742 | # Hardware I/O ports | ||
743 | # | ||
744 | # CONFIG_SERIO is not set | ||
745 | # CONFIG_GAMEPORT is not set | ||
746 | |||
747 | # | ||
748 | # Character devices | ||
749 | # | ||
750 | # CONFIG_VT is not set | ||
751 | CONFIG_DEVKMEM=y | ||
752 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
753 | # CONFIG_NOZOMI is not set | ||
754 | |||
755 | # | ||
756 | # Serial drivers | ||
757 | # | ||
758 | CONFIG_SERIAL_8250=y | ||
759 | CONFIG_SERIAL_8250_CONSOLE=y | ||
760 | # CONFIG_SERIAL_8250_PCI is not set | ||
761 | CONFIG_SERIAL_8250_NR_UARTS=2 | ||
762 | CONFIG_SERIAL_8250_RUNTIME_UARTS=2 | ||
763 | CONFIG_SERIAL_8250_EXTENDED=y | ||
764 | # CONFIG_SERIAL_8250_MANY_PORTS is not set | ||
765 | CONFIG_SERIAL_8250_SHARE_IRQ=y | ||
766 | # CONFIG_SERIAL_8250_DETECT_IRQ is not set | ||
767 | # CONFIG_SERIAL_8250_RSA is not set | ||
768 | |||
769 | # | ||
770 | # Non-8250 serial port support | ||
771 | # | ||
772 | # CONFIG_SERIAL_UARTLITE is not set | ||
773 | CONFIG_SERIAL_CORE=y | ||
774 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
775 | # CONFIG_SERIAL_JSM is not set | ||
776 | CONFIG_SERIAL_OF_PLATFORM=y | ||
777 | # CONFIG_SERIAL_OF_PLATFORM_NWPSERIAL is not set | ||
778 | CONFIG_UNIX98_PTYS=y | ||
779 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set | ||
780 | CONFIG_LEGACY_PTYS=y | ||
781 | CONFIG_LEGACY_PTY_COUNT=256 | ||
782 | # CONFIG_HVC_UDBG is not set | ||
783 | # CONFIG_IPMI_HANDLER is not set | ||
784 | # CONFIG_HW_RANDOM is not set | ||
785 | # CONFIG_NVRAM is not set | ||
786 | # CONFIG_GEN_RTC is not set | ||
787 | # CONFIG_R3964 is not set | ||
788 | # CONFIG_APPLICOM is not set | ||
789 | # CONFIG_RAW_DRIVER is not set | ||
790 | # CONFIG_TCG_TPM is not set | ||
791 | CONFIG_DEVPORT=y | ||
792 | CONFIG_I2C=y | ||
793 | CONFIG_I2C_BOARDINFO=y | ||
794 | CONFIG_I2C_CHARDEV=y | ||
795 | CONFIG_I2C_HELPER_AUTO=y | ||
796 | |||
797 | # | ||
798 | # I2C Hardware Bus support | ||
799 | # | ||
800 | |||
801 | # | ||
802 | # PC SMBus host controller drivers | ||
803 | # | ||
804 | # CONFIG_I2C_ALI1535 is not set | ||
805 | # CONFIG_I2C_ALI1563 is not set | ||
806 | # CONFIG_I2C_ALI15X3 is not set | ||
807 | # CONFIG_I2C_AMD756 is not set | ||
808 | # CONFIG_I2C_AMD8111 is not set | ||
809 | # CONFIG_I2C_I801 is not set | ||
810 | # CONFIG_I2C_ISCH is not set | ||
811 | # CONFIG_I2C_PIIX4 is not set | ||
812 | # CONFIG_I2C_NFORCE2 is not set | ||
813 | # CONFIG_I2C_SIS5595 is not set | ||
814 | # CONFIG_I2C_SIS630 is not set | ||
815 | # CONFIG_I2C_SIS96X is not set | ||
816 | # CONFIG_I2C_VIA is not set | ||
817 | # CONFIG_I2C_VIAPRO is not set | ||
818 | |||
819 | # | ||
820 | # I2C system bus drivers (mostly embedded / system-on-chip) | ||
821 | # | ||
822 | CONFIG_I2C_IBM_IIC=y | ||
823 | # CONFIG_I2C_MPC is not set | ||
824 | # CONFIG_I2C_OCORES is not set | ||
825 | # CONFIG_I2C_SIMTEC is not set | ||
826 | |||
827 | # | ||
828 | # External I2C/SMBus adapter drivers | ||
829 | # | ||
830 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
831 | # CONFIG_I2C_TAOS_EVM is not set | ||
832 | |||
833 | # | ||
834 | # Graphics adapter I2C/DDC channel drivers | ||
835 | # | ||
836 | # CONFIG_I2C_VOODOO3 is not set | ||
837 | |||
838 | # | ||
839 | # Other I2C/SMBus bus drivers | ||
840 | # | ||
841 | # CONFIG_I2C_PCA_PLATFORM is not set | ||
842 | # CONFIG_I2C_STUB is not set | ||
843 | |||
844 | # | ||
845 | # Miscellaneous I2C Chip support | ||
846 | # | ||
847 | # CONFIG_DS1682 is not set | ||
848 | # CONFIG_SENSORS_PCF8574 is not set | ||
849 | # CONFIG_PCF8575 is not set | ||
850 | # CONFIG_SENSORS_PCA9539 is not set | ||
851 | # CONFIG_SENSORS_TSL2550 is not set | ||
852 | CONFIG_I2C_DEBUG_CORE=y | ||
853 | CONFIG_I2C_DEBUG_ALGO=y | ||
854 | CONFIG_I2C_DEBUG_BUS=y | ||
855 | CONFIG_I2C_DEBUG_CHIP=y | ||
856 | # CONFIG_SPI is not set | ||
857 | |||
858 | # | ||
859 | # PPS support | ||
860 | # | ||
861 | # CONFIG_PPS is not set | ||
862 | CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y | ||
863 | # CONFIG_GPIOLIB is not set | ||
864 | # CONFIG_W1 is not set | ||
865 | # CONFIG_POWER_SUPPLY is not set | ||
866 | # CONFIG_HWMON is not set | ||
867 | # CONFIG_THERMAL is not set | ||
868 | # CONFIG_THERMAL_HWMON is not set | ||
869 | # CONFIG_WATCHDOG is not set | ||
870 | CONFIG_SSB_POSSIBLE=y | ||
871 | |||
872 | # | ||
873 | # Sonics Silicon Backplane | ||
874 | # | ||
875 | # CONFIG_SSB is not set | ||
876 | |||
877 | # | ||
878 | # Multifunction device drivers | ||
879 | # | ||
880 | # CONFIG_MFD_CORE is not set | ||
881 | # CONFIG_MFD_SM501 is not set | ||
882 | # CONFIG_HTC_PASIC3 is not set | ||
883 | # CONFIG_TWL4030_CORE is not set | ||
884 | # CONFIG_MFD_TMIO is not set | ||
885 | # CONFIG_PMIC_DA903X is not set | ||
886 | # CONFIG_MFD_WM8400 is not set | ||
887 | # CONFIG_MFD_WM8350_I2C is not set | ||
888 | # CONFIG_MFD_PCF50633 is not set | ||
889 | # CONFIG_AB3100_CORE is not set | ||
890 | # CONFIG_REGULATOR is not set | ||
891 | # CONFIG_MEDIA_SUPPORT is not set | ||
892 | |||
893 | # | ||
894 | # Graphics support | ||
895 | # | ||
896 | # CONFIG_AGP is not set | ||
897 | # CONFIG_DRM is not set | ||
898 | # CONFIG_VGASTATE is not set | ||
899 | CONFIG_VIDEO_OUTPUT_CONTROL=m | ||
900 | # CONFIG_FB is not set | ||
901 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
902 | |||
903 | # | ||
904 | # Display device support | ||
905 | # | ||
906 | # CONFIG_DISPLAY_SUPPORT is not set | ||
907 | # CONFIG_SOUND is not set | ||
908 | # CONFIG_USB_SUPPORT is not set | ||
909 | # CONFIG_UWB is not set | ||
910 | # CONFIG_MMC is not set | ||
911 | # CONFIG_MEMSTICK is not set | ||
912 | # CONFIG_NEW_LEDS is not set | ||
913 | # CONFIG_ACCESSIBILITY is not set | ||
914 | # CONFIG_INFINIBAND is not set | ||
915 | # CONFIG_EDAC is not set | ||
916 | # CONFIG_RTC_CLASS is not set | ||
917 | CONFIG_DMADEVICES=y | ||
918 | |||
919 | # | ||
920 | # DMA Devices | ||
921 | # | ||
922 | # CONFIG_AUXDISPLAY is not set | ||
923 | # CONFIG_UIO is not set | ||
924 | |||
925 | # | ||
926 | # TI VLYNQ | ||
927 | # | ||
928 | # CONFIG_STAGING is not set | ||
929 | |||
930 | # | ||
931 | # File systems | ||
932 | # | ||
933 | CONFIG_EXT2_FS=y | ||
934 | # CONFIG_EXT2_FS_XATTR is not set | ||
935 | # CONFIG_EXT2_FS_XIP is not set | ||
936 | # CONFIG_EXT3_FS is not set | ||
937 | # CONFIG_EXT4_FS is not set | ||
938 | # CONFIG_REISERFS_FS is not set | ||
939 | # CONFIG_JFS_FS is not set | ||
940 | # CONFIG_FS_POSIX_ACL is not set | ||
941 | # CONFIG_XFS_FS is not set | ||
942 | # CONFIG_GFS2_FS is not set | ||
943 | # CONFIG_OCFS2_FS is not set | ||
944 | # CONFIG_BTRFS_FS is not set | ||
945 | CONFIG_FILE_LOCKING=y | ||
946 | CONFIG_FSNOTIFY=y | ||
947 | CONFIG_DNOTIFY=y | ||
948 | CONFIG_INOTIFY=y | ||
949 | CONFIG_INOTIFY_USER=y | ||
950 | # CONFIG_QUOTA is not set | ||
951 | # CONFIG_AUTOFS_FS is not set | ||
952 | # CONFIG_AUTOFS4_FS is not set | ||
953 | # CONFIG_FUSE_FS is not set | ||
954 | |||
955 | # | ||
956 | # Caches | ||
957 | # | ||
958 | # CONFIG_FSCACHE is not set | ||
959 | |||
960 | # | ||
961 | # CD-ROM/DVD Filesystems | ||
962 | # | ||
963 | # CONFIG_ISO9660_FS is not set | ||
964 | # CONFIG_UDF_FS is not set | ||
965 | |||
966 | # | ||
967 | # DOS/FAT/NT Filesystems | ||
968 | # | ||
969 | # CONFIG_MSDOS_FS is not set | ||
970 | # CONFIG_VFAT_FS is not set | ||
971 | # CONFIG_NTFS_FS is not set | ||
972 | |||
973 | # | ||
974 | # Pseudo filesystems | ||
975 | # | ||
976 | CONFIG_PROC_FS=y | ||
977 | CONFIG_PROC_KCORE=y | ||
978 | CONFIG_PROC_SYSCTL=y | ||
979 | CONFIG_PROC_PAGE_MONITOR=y | ||
980 | CONFIG_SYSFS=y | ||
981 | CONFIG_TMPFS=y | ||
982 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
983 | # CONFIG_HUGETLB_PAGE is not set | ||
984 | # CONFIG_CONFIGFS_FS is not set | ||
985 | CONFIG_MISC_FILESYSTEMS=y | ||
986 | # CONFIG_ADFS_FS is not set | ||
987 | # CONFIG_AFFS_FS is not set | ||
988 | # CONFIG_HFS_FS is not set | ||
989 | # CONFIG_HFSPLUS_FS is not set | ||
990 | # CONFIG_BEFS_FS is not set | ||
991 | # CONFIG_BFS_FS is not set | ||
992 | # CONFIG_EFS_FS is not set | ||
993 | # CONFIG_JFFS2_FS is not set | ||
994 | CONFIG_CRAMFS=y | ||
995 | # CONFIG_SQUASHFS is not set | ||
996 | # CONFIG_VXFS_FS is not set | ||
997 | # CONFIG_MINIX_FS is not set | ||
998 | # CONFIG_OMFS_FS is not set | ||
999 | # CONFIG_HPFS_FS is not set | ||
1000 | # CONFIG_QNX4FS_FS is not set | ||
1001 | # CONFIG_ROMFS_FS is not set | ||
1002 | # CONFIG_SYSV_FS is not set | ||
1003 | # CONFIG_UFS_FS is not set | ||
1004 | # CONFIG_NILFS2_FS is not set | ||
1005 | CONFIG_NETWORK_FILESYSTEMS=y | ||
1006 | CONFIG_NFS_FS=y | ||
1007 | CONFIG_NFS_V3=y | ||
1008 | # CONFIG_NFS_V3_ACL is not set | ||
1009 | # CONFIG_NFS_V4 is not set | ||
1010 | CONFIG_ROOT_NFS=y | ||
1011 | # CONFIG_NFSD is not set | ||
1012 | CONFIG_LOCKD=y | ||
1013 | CONFIG_LOCKD_V4=y | ||
1014 | CONFIG_NFS_COMMON=y | ||
1015 | CONFIG_SUNRPC=y | ||
1016 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
1017 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
1018 | # CONFIG_SMB_FS is not set | ||
1019 | # CONFIG_CIFS is not set | ||
1020 | # CONFIG_NCP_FS is not set | ||
1021 | # CONFIG_CODA_FS is not set | ||
1022 | # CONFIG_AFS_FS is not set | ||
1023 | |||
1024 | # | ||
1025 | # Partition Types | ||
1026 | # | ||
1027 | # CONFIG_PARTITION_ADVANCED is not set | ||
1028 | CONFIG_MSDOS_PARTITION=y | ||
1029 | # CONFIG_NLS is not set | ||
1030 | # CONFIG_DLM is not set | ||
1031 | # CONFIG_BINARY_PRINTF is not set | ||
1032 | |||
1033 | # | ||
1034 | # Library routines | ||
1035 | # | ||
1036 | CONFIG_BITREVERSE=y | ||
1037 | CONFIG_GENERIC_FIND_LAST_BIT=y | ||
1038 | # CONFIG_CRC_CCITT is not set | ||
1039 | # CONFIG_CRC16 is not set | ||
1040 | # CONFIG_CRC_T10DIF is not set | ||
1041 | # CONFIG_CRC_ITU_T is not set | ||
1042 | CONFIG_CRC32=y | ||
1043 | # CONFIG_CRC7 is not set | ||
1044 | # CONFIG_LIBCRC32C is not set | ||
1045 | CONFIG_ZLIB_INFLATE=y | ||
1046 | CONFIG_DECOMPRESS_GZIP=y | ||
1047 | CONFIG_HAS_IOMEM=y | ||
1048 | CONFIG_HAS_IOPORT=y | ||
1049 | CONFIG_HAS_DMA=y | ||
1050 | CONFIG_HAVE_LMB=y | ||
1051 | CONFIG_NLATTR=y | ||
1052 | CONFIG_GENERIC_ATOMIC64=y | ||
1053 | |||
1054 | # | ||
1055 | # Kernel hacking | ||
1056 | # | ||
1057 | # CONFIG_PRINTK_TIME is not set | ||
1058 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
1059 | CONFIG_ENABLE_MUST_CHECK=y | ||
1060 | CONFIG_FRAME_WARN=1024 | ||
1061 | CONFIG_MAGIC_SYSRQ=y | ||
1062 | # CONFIG_UNUSED_SYMBOLS is not set | ||
1063 | CONFIG_DEBUG_FS=y | ||
1064 | # CONFIG_HEADERS_CHECK is not set | ||
1065 | CONFIG_DEBUG_KERNEL=y | ||
1066 | # CONFIG_DEBUG_SHIRQ is not set | ||
1067 | CONFIG_DETECT_SOFTLOCKUP=y | ||
1068 | # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set | ||
1069 | CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 | ||
1070 | CONFIG_DETECT_HUNG_TASK=y | ||
1071 | # CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set | ||
1072 | CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 | ||
1073 | CONFIG_SCHED_DEBUG=y | ||
1074 | # CONFIG_SCHEDSTATS is not set | ||
1075 | # CONFIG_TIMER_STATS is not set | ||
1076 | # CONFIG_DEBUG_OBJECTS is not set | ||
1077 | # CONFIG_SLUB_DEBUG_ON is not set | ||
1078 | # CONFIG_SLUB_STATS is not set | ||
1079 | # CONFIG_DEBUG_KMEMLEAK is not set | ||
1080 | # CONFIG_DEBUG_RT_MUTEXES is not set | ||
1081 | # CONFIG_RT_MUTEX_TESTER is not set | ||
1082 | # CONFIG_DEBUG_SPINLOCK is not set | ||
1083 | # CONFIG_DEBUG_MUTEXES is not set | ||
1084 | # CONFIG_DEBUG_LOCK_ALLOC is not set | ||
1085 | # CONFIG_PROVE_LOCKING is not set | ||
1086 | # CONFIG_LOCK_STAT is not set | ||
1087 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
1088 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | ||
1089 | # CONFIG_DEBUG_KOBJECT is not set | ||
1090 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
1091 | # CONFIG_DEBUG_INFO is not set | ||
1092 | # CONFIG_DEBUG_VM is not set | ||
1093 | # CONFIG_DEBUG_WRITECOUNT is not set | ||
1094 | # CONFIG_DEBUG_MEMORY_INIT is not set | ||
1095 | # CONFIG_DEBUG_LIST is not set | ||
1096 | # CONFIG_DEBUG_SG is not set | ||
1097 | # CONFIG_DEBUG_NOTIFIERS is not set | ||
1098 | # CONFIG_RCU_TORTURE_TEST is not set | ||
1099 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
1100 | # CONFIG_BACKTRACE_SELF_TEST is not set | ||
1101 | # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set | ||
1102 | # CONFIG_FAULT_INJECTION is not set | ||
1103 | # CONFIG_LATENCYTOP is not set | ||
1104 | CONFIG_SYSCTL_SYSCALL_CHECK=y | ||
1105 | # CONFIG_DEBUG_PAGEALLOC is not set | ||
1106 | CONFIG_HAVE_FUNCTION_TRACER=y | ||
1107 | CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y | ||
1108 | CONFIG_HAVE_DYNAMIC_FTRACE=y | ||
1109 | CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y | ||
1110 | CONFIG_TRACING_SUPPORT=y | ||
1111 | CONFIG_FTRACE=y | ||
1112 | # CONFIG_FUNCTION_TRACER is not set | ||
1113 | # CONFIG_IRQSOFF_TRACER is not set | ||
1114 | # CONFIG_SCHED_TRACER is not set | ||
1115 | # CONFIG_ENABLE_DEFAULT_TRACERS is not set | ||
1116 | # CONFIG_BOOT_TRACER is not set | ||
1117 | CONFIG_BRANCH_PROFILE_NONE=y | ||
1118 | # CONFIG_PROFILE_ANNOTATED_BRANCHES is not set | ||
1119 | # CONFIG_PROFILE_ALL_BRANCHES is not set | ||
1120 | # CONFIG_STACK_TRACER is not set | ||
1121 | # CONFIG_KMEMTRACE is not set | ||
1122 | # CONFIG_WORKQUEUE_TRACER is not set | ||
1123 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
1124 | # CONFIG_DYNAMIC_DEBUG is not set | ||
1125 | # CONFIG_SAMPLES is not set | ||
1126 | CONFIG_HAVE_ARCH_KGDB=y | ||
1127 | # CONFIG_KGDB is not set | ||
1128 | # CONFIG_KMEMCHECK is not set | ||
1129 | # CONFIG_PPC_DISABLE_WERROR is not set | ||
1130 | CONFIG_PPC_WERROR=y | ||
1131 | CONFIG_PRINT_STACK_DEPTH=64 | ||
1132 | # CONFIG_DEBUG_STACKOVERFLOW is not set | ||
1133 | # CONFIG_DEBUG_STACK_USAGE is not set | ||
1134 | # CONFIG_PPC_EMULATED_STATS is not set | ||
1135 | # CONFIG_CODE_PATCHING_SELFTEST is not set | ||
1136 | # CONFIG_FTR_FIXUP_SELFTEST is not set | ||
1137 | # CONFIG_MSI_BITMAP_SELFTEST is not set | ||
1138 | # CONFIG_XMON is not set | ||
1139 | # CONFIG_IRQSTACKS is not set | ||
1140 | # CONFIG_VIRQ_DEBUG is not set | ||
1141 | # CONFIG_BDI_SWITCH is not set | ||
1142 | # CONFIG_PPC_EARLY_DEBUG is not set | ||
1143 | |||
1144 | # | ||
1145 | # Security options | ||
1146 | # | ||
1147 | # CONFIG_KEYS is not set | ||
1148 | # CONFIG_SECURITY is not set | ||
1149 | # CONFIG_SECURITYFS is not set | ||
1150 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | ||
1151 | CONFIG_CRYPTO=y | ||
1152 | |||
1153 | # | ||
1154 | # Crypto core or helper | ||
1155 | # | ||
1156 | # CONFIG_CRYPTO_FIPS is not set | ||
1157 | CONFIG_CRYPTO_ALGAPI=y | ||
1158 | CONFIG_CRYPTO_ALGAPI2=y | ||
1159 | CONFIG_CRYPTO_AEAD=y | ||
1160 | CONFIG_CRYPTO_AEAD2=y | ||
1161 | CONFIG_CRYPTO_BLKCIPHER=y | ||
1162 | CONFIG_CRYPTO_BLKCIPHER2=y | ||
1163 | CONFIG_CRYPTO_HASH=y | ||
1164 | CONFIG_CRYPTO_HASH2=y | ||
1165 | CONFIG_CRYPTO_RNG=y | ||
1166 | CONFIG_CRYPTO_RNG2=y | ||
1167 | CONFIG_CRYPTO_PCOMP=y | ||
1168 | CONFIG_CRYPTO_MANAGER=y | ||
1169 | CONFIG_CRYPTO_MANAGER2=y | ||
1170 | CONFIG_CRYPTO_GF128MUL=y | ||
1171 | # CONFIG_CRYPTO_NULL is not set | ||
1172 | CONFIG_CRYPTO_WORKQUEUE=y | ||
1173 | CONFIG_CRYPTO_CRYPTD=y | ||
1174 | CONFIG_CRYPTO_AUTHENC=y | ||
1175 | # CONFIG_CRYPTO_TEST is not set | ||
1176 | |||
1177 | # | ||
1178 | # Authenticated Encryption with Associated Data | ||
1179 | # | ||
1180 | CONFIG_CRYPTO_CCM=y | ||
1181 | CONFIG_CRYPTO_GCM=y | ||
1182 | CONFIG_CRYPTO_SEQIV=y | ||
1183 | |||
1184 | # | ||
1185 | # Block modes | ||
1186 | # | ||
1187 | CONFIG_CRYPTO_CBC=y | ||
1188 | CONFIG_CRYPTO_CTR=y | ||
1189 | CONFIG_CRYPTO_CTS=y | ||
1190 | CONFIG_CRYPTO_ECB=y | ||
1191 | CONFIG_CRYPTO_LRW=y | ||
1192 | CONFIG_CRYPTO_PCBC=y | ||
1193 | CONFIG_CRYPTO_XTS=y | ||
1194 | |||
1195 | # | ||
1196 | # Hash modes | ||
1197 | # | ||
1198 | CONFIG_CRYPTO_HMAC=y | ||
1199 | CONFIG_CRYPTO_XCBC=y | ||
1200 | |||
1201 | # | ||
1202 | # Digest | ||
1203 | # | ||
1204 | # CONFIG_CRYPTO_CRC32C is not set | ||
1205 | CONFIG_CRYPTO_MD4=y | ||
1206 | CONFIG_CRYPTO_MD5=y | ||
1207 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
1208 | # CONFIG_CRYPTO_RMD128 is not set | ||
1209 | # CONFIG_CRYPTO_RMD160 is not set | ||
1210 | # CONFIG_CRYPTO_RMD256 is not set | ||
1211 | # CONFIG_CRYPTO_RMD320 is not set | ||
1212 | CONFIG_CRYPTO_SHA1=y | ||
1213 | CONFIG_CRYPTO_SHA256=y | ||
1214 | CONFIG_CRYPTO_SHA512=y | ||
1215 | # CONFIG_CRYPTO_TGR192 is not set | ||
1216 | # CONFIG_CRYPTO_WP512 is not set | ||
1217 | |||
1218 | # | ||
1219 | # Ciphers | ||
1220 | # | ||
1221 | CONFIG_CRYPTO_AES=y | ||
1222 | # CONFIG_CRYPTO_ANUBIS is not set | ||
1223 | CONFIG_CRYPTO_ARC4=y | ||
1224 | CONFIG_CRYPTO_BLOWFISH=y | ||
1225 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1226 | # CONFIG_CRYPTO_CAST5 is not set | ||
1227 | # CONFIG_CRYPTO_CAST6 is not set | ||
1228 | CONFIG_CRYPTO_DES=y | ||
1229 | # CONFIG_CRYPTO_FCRYPT is not set | ||
1230 | # CONFIG_CRYPTO_KHAZAD is not set | ||
1231 | # CONFIG_CRYPTO_SALSA20 is not set | ||
1232 | # CONFIG_CRYPTO_SEED is not set | ||
1233 | # CONFIG_CRYPTO_SERPENT is not set | ||
1234 | # CONFIG_CRYPTO_TEA is not set | ||
1235 | # CONFIG_CRYPTO_TWOFISH is not set | ||
1236 | |||
1237 | # | ||
1238 | # Compression | ||
1239 | # | ||
1240 | # CONFIG_CRYPTO_DEFLATE is not set | ||
1241 | # CONFIG_CRYPTO_ZLIB is not set | ||
1242 | # CONFIG_CRYPTO_LZO is not set | ||
1243 | |||
1244 | # | ||
1245 | # Random Number Generation | ||
1246 | # | ||
1247 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | ||
1248 | CONFIG_CRYPTO_HW=y | ||
1249 | # CONFIG_CRYPTO_DEV_HIFN_795X is not set | ||
1250 | # CONFIG_CRYPTO_DEV_PPC4XX is not set | ||
1251 | # CONFIG_PPC_CLOCK is not set | ||
1252 | # CONFIG_VIRTUALIZATION is not set | ||
diff --git a/arch/powerpc/configs/83xx/sbc834x_defconfig b/arch/powerpc/configs/83xx/sbc834x_defconfig index a592b5efdc4d..3a68f861b1bd 100644 --- a/arch/powerpc/configs/83xx/sbc834x_defconfig +++ b/arch/powerpc/configs/83xx/sbc834x_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.31-rc4 | 3 | # Linux kernel version: 2.6.31-rc5 |
4 | # Wed Jul 29 23:32:13 2009 | 4 | # Tue Aug 11 19:57:51 2009 |
5 | # | 5 | # |
6 | # CONFIG_PPC64 is not set | 6 | # CONFIG_PPC64 is not set |
7 | 7 | ||
@@ -420,7 +420,90 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y | |||
420 | # CONFIG_FW_LOADER is not set | 420 | # CONFIG_FW_LOADER is not set |
421 | # CONFIG_SYS_HYPERVISOR is not set | 421 | # CONFIG_SYS_HYPERVISOR is not set |
422 | # CONFIG_CONNECTOR is not set | 422 | # CONFIG_CONNECTOR is not set |
423 | # CONFIG_MTD is not set | 423 | CONFIG_MTD=y |
424 | # CONFIG_MTD_DEBUG is not set | ||
425 | CONFIG_MTD_CONCAT=y | ||
426 | CONFIG_MTD_PARTITIONS=y | ||
427 | # CONFIG_MTD_TESTS is not set | ||
428 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
429 | CONFIG_MTD_CMDLINE_PARTS=y | ||
430 | CONFIG_MTD_OF_PARTS=y | ||
431 | # CONFIG_MTD_AR7_PARTS is not set | ||
432 | |||
433 | # | ||
434 | # User Modules And Translation Layers | ||
435 | # | ||
436 | CONFIG_MTD_CHAR=y | ||
437 | CONFIG_MTD_BLKDEVS=y | ||
438 | CONFIG_MTD_BLOCK=y | ||
439 | # CONFIG_FTL is not set | ||
440 | # CONFIG_NFTL is not set | ||
441 | # CONFIG_INFTL is not set | ||
442 | # CONFIG_RFD_FTL is not set | ||
443 | # CONFIG_SSFDC is not set | ||
444 | # CONFIG_MTD_OOPS is not set | ||
445 | |||
446 | # | ||
447 | # RAM/ROM/Flash chip drivers | ||
448 | # | ||
449 | CONFIG_MTD_CFI=y | ||
450 | # CONFIG_MTD_JEDECPROBE is not set | ||
451 | CONFIG_MTD_GEN_PROBE=y | ||
452 | # CONFIG_MTD_CFI_ADV_OPTIONS is not set | ||
453 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
454 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
455 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
456 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
457 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
458 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
459 | CONFIG_MTD_CFI_I1=y | ||
460 | CONFIG_MTD_CFI_I2=y | ||
461 | # CONFIG_MTD_CFI_I4 is not set | ||
462 | # CONFIG_MTD_CFI_I8 is not set | ||
463 | CONFIG_MTD_CFI_INTELEXT=y | ||
464 | # CONFIG_MTD_CFI_AMDSTD is not set | ||
465 | # CONFIG_MTD_CFI_STAA is not set | ||
466 | CONFIG_MTD_CFI_UTIL=y | ||
467 | # CONFIG_MTD_RAM is not set | ||
468 | # CONFIG_MTD_ROM is not set | ||
469 | # CONFIG_MTD_ABSENT is not set | ||
470 | |||
471 | # | ||
472 | # Mapping drivers for chip access | ||
473 | # | ||
474 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
475 | # CONFIG_MTD_PHYSMAP is not set | ||
476 | CONFIG_MTD_PHYSMAP_OF=y | ||
477 | # CONFIG_MTD_INTEL_VR_NOR is not set | ||
478 | # CONFIG_MTD_PLATRAM is not set | ||
479 | |||
480 | # | ||
481 | # Self-contained MTD device drivers | ||
482 | # | ||
483 | # CONFIG_MTD_PMC551 is not set | ||
484 | # CONFIG_MTD_SLRAM is not set | ||
485 | # CONFIG_MTD_PHRAM is not set | ||
486 | # CONFIG_MTD_MTDRAM is not set | ||
487 | # CONFIG_MTD_BLOCK2MTD is not set | ||
488 | |||
489 | # | ||
490 | # Disk-On-Chip Device Drivers | ||
491 | # | ||
492 | # CONFIG_MTD_DOC2000 is not set | ||
493 | # CONFIG_MTD_DOC2001 is not set | ||
494 | # CONFIG_MTD_DOC2001PLUS is not set | ||
495 | # CONFIG_MTD_NAND is not set | ||
496 | # CONFIG_MTD_ONENAND is not set | ||
497 | |||
498 | # | ||
499 | # LPDDR flash memory drivers | ||
500 | # | ||
501 | # CONFIG_MTD_LPDDR is not set | ||
502 | |||
503 | # | ||
504 | # UBI - Unsorted block images | ||
505 | # | ||
506 | # CONFIG_MTD_UBI is not set | ||
424 | CONFIG_OF_DEVICE=y | 507 | CONFIG_OF_DEVICE=y |
425 | CONFIG_OF_I2C=y | 508 | CONFIG_OF_I2C=y |
426 | CONFIG_OF_MDIO=y | 509 | CONFIG_OF_MDIO=y |
@@ -436,6 +519,7 @@ CONFIG_BLK_DEV_LOOP=y | |||
436 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | 519 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set |
437 | # CONFIG_BLK_DEV_NBD is not set | 520 | # CONFIG_BLK_DEV_NBD is not set |
438 | # CONFIG_BLK_DEV_SX8 is not set | 521 | # CONFIG_BLK_DEV_SX8 is not set |
522 | # CONFIG_BLK_DEV_UB is not set | ||
439 | CONFIG_BLK_DEV_RAM=y | 523 | CONFIG_BLK_DEV_RAM=y |
440 | CONFIG_BLK_DEV_RAM_COUNT=16 | 524 | CONFIG_BLK_DEV_RAM_COUNT=16 |
441 | CONFIG_BLK_DEV_RAM_SIZE=32768 | 525 | CONFIG_BLK_DEV_RAM_SIZE=32768 |
@@ -468,9 +552,38 @@ CONFIG_HAVE_IDE=y | |||
468 | # SCSI device support | 552 | # SCSI device support |
469 | # | 553 | # |
470 | # CONFIG_RAID_ATTRS is not set | 554 | # CONFIG_RAID_ATTRS is not set |
471 | # CONFIG_SCSI is not set | 555 | CONFIG_SCSI=y |
472 | # CONFIG_SCSI_DMA is not set | 556 | CONFIG_SCSI_DMA=y |
557 | # CONFIG_SCSI_TGT is not set | ||
473 | # CONFIG_SCSI_NETLINK is not set | 558 | # CONFIG_SCSI_NETLINK is not set |
559 | # CONFIG_SCSI_PROC_FS is not set | ||
560 | |||
561 | # | ||
562 | # SCSI support type (disk, tape, CD-ROM) | ||
563 | # | ||
564 | CONFIG_BLK_DEV_SD=y | ||
565 | # CONFIG_CHR_DEV_ST is not set | ||
566 | # CONFIG_CHR_DEV_OSST is not set | ||
567 | # CONFIG_BLK_DEV_SR is not set | ||
568 | # CONFIG_CHR_DEV_SG is not set | ||
569 | # CONFIG_CHR_DEV_SCH is not set | ||
570 | # CONFIG_SCSI_MULTI_LUN is not set | ||
571 | # CONFIG_SCSI_CONSTANTS is not set | ||
572 | # CONFIG_SCSI_LOGGING is not set | ||
573 | # CONFIG_SCSI_SCAN_ASYNC is not set | ||
574 | CONFIG_SCSI_WAIT_SCAN=m | ||
575 | |||
576 | # | ||
577 | # SCSI Transports | ||
578 | # | ||
579 | # CONFIG_SCSI_SPI_ATTRS is not set | ||
580 | # CONFIG_SCSI_FC_ATTRS is not set | ||
581 | # CONFIG_SCSI_ISCSI_ATTRS is not set | ||
582 | # CONFIG_SCSI_SAS_LIBSAS is not set | ||
583 | # CONFIG_SCSI_SRP_ATTRS is not set | ||
584 | # CONFIG_SCSI_LOWLEVEL is not set | ||
585 | # CONFIG_SCSI_DH is not set | ||
586 | # CONFIG_SCSI_OSD_INITIATOR is not set | ||
474 | # CONFIG_ATA is not set | 587 | # CONFIG_ATA is not set |
475 | # CONFIG_MD is not set | 588 | # CONFIG_MD is not set |
476 | # CONFIG_FUSION is not set | 589 | # CONFIG_FUSION is not set |
@@ -578,11 +691,21 @@ CONFIG_GIANFAR=y | |||
578 | # | 691 | # |
579 | # Enable WiMAX (Networking options) to see the WiMAX drivers | 692 | # Enable WiMAX (Networking options) to see the WiMAX drivers |
580 | # | 693 | # |
694 | |||
695 | # | ||
696 | # USB Network Adapters | ||
697 | # | ||
698 | # CONFIG_USB_CATC is not set | ||
699 | # CONFIG_USB_KAWETH is not set | ||
700 | # CONFIG_USB_PEGASUS is not set | ||
701 | # CONFIG_USB_RTL8150 is not set | ||
702 | # CONFIG_USB_USBNET is not set | ||
581 | # CONFIG_WAN is not set | 703 | # CONFIG_WAN is not set |
582 | # CONFIG_FDDI is not set | 704 | # CONFIG_FDDI is not set |
583 | # CONFIG_HIPPI is not set | 705 | # CONFIG_HIPPI is not set |
584 | # CONFIG_PPP is not set | 706 | # CONFIG_PPP is not set |
585 | # CONFIG_SLIP is not set | 707 | # CONFIG_SLIP is not set |
708 | # CONFIG_NET_FC is not set | ||
586 | # CONFIG_NETCONSOLE is not set | 709 | # CONFIG_NETCONSOLE is not set |
587 | # CONFIG_NETPOLL is not set | 710 | # CONFIG_NETPOLL is not set |
588 | # CONFIG_NET_POLL_CONTROLLER is not set | 711 | # CONFIG_NET_POLL_CONTROLLER is not set |
@@ -633,9 +756,9 @@ CONFIG_DEVKMEM=y | |||
633 | # | 756 | # |
634 | CONFIG_SERIAL_8250=y | 757 | CONFIG_SERIAL_8250=y |
635 | CONFIG_SERIAL_8250_CONSOLE=y | 758 | CONFIG_SERIAL_8250_CONSOLE=y |
636 | CONFIG_SERIAL_8250_PCI=y | 759 | # CONFIG_SERIAL_8250_PCI is not set |
637 | CONFIG_SERIAL_8250_NR_UARTS=4 | 760 | CONFIG_SERIAL_8250_NR_UARTS=2 |
638 | CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | 761 | CONFIG_SERIAL_8250_RUNTIME_UARTS=2 |
639 | # CONFIG_SERIAL_8250_EXTENDED is not set | 762 | # CONFIG_SERIAL_8250_EXTENDED is not set |
640 | 763 | ||
641 | # | 764 | # |
@@ -700,6 +823,7 @@ CONFIG_I2C_MPC=y | |||
700 | # | 823 | # |
701 | # CONFIG_I2C_PARPORT_LIGHT is not set | 824 | # CONFIG_I2C_PARPORT_LIGHT is not set |
702 | # CONFIG_I2C_TAOS_EVM is not set | 825 | # CONFIG_I2C_TAOS_EVM is not set |
826 | # CONFIG_I2C_TINY_USB is not set | ||
703 | 827 | ||
704 | # | 828 | # |
705 | # Graphics adapter I2C/DDC channel drivers | 829 | # Graphics adapter I2C/DDC channel drivers |
@@ -814,6 +938,11 @@ CONFIG_WATCHDOG=y | |||
814 | # | 938 | # |
815 | # CONFIG_PCIPCWATCHDOG is not set | 939 | # CONFIG_PCIPCWATCHDOG is not set |
816 | # CONFIG_WDTPCI is not set | 940 | # CONFIG_WDTPCI is not set |
941 | |||
942 | # | ||
943 | # USB-based Watchdog Cards | ||
944 | # | ||
945 | # CONFIG_USBPCWATCHDOG is not set | ||
817 | CONFIG_SSB_POSSIBLE=y | 946 | CONFIG_SSB_POSSIBLE=y |
818 | 947 | ||
819 | # | 948 | # |
@@ -856,12 +985,134 @@ CONFIG_HID_SUPPORT=y | |||
856 | CONFIG_HID=y | 985 | CONFIG_HID=y |
857 | # CONFIG_HID_DEBUG is not set | 986 | # CONFIG_HID_DEBUG is not set |
858 | # CONFIG_HIDRAW is not set | 987 | # CONFIG_HIDRAW is not set |
988 | |||
989 | # | ||
990 | # USB Input Devices | ||
991 | # | ||
992 | # CONFIG_USB_HID is not set | ||
859 | # CONFIG_HID_PID is not set | 993 | # CONFIG_HID_PID is not set |
860 | 994 | ||
861 | # | 995 | # |
996 | # USB HID Boot Protocol drivers | ||
997 | # | ||
998 | # CONFIG_USB_KBD is not set | ||
999 | # CONFIG_USB_MOUSE is not set | ||
1000 | |||
1001 | # | ||
862 | # Special HID drivers | 1002 | # Special HID drivers |
863 | # | 1003 | # |
864 | # CONFIG_USB_SUPPORT is not set | 1004 | CONFIG_USB_SUPPORT=y |
1005 | CONFIG_USB_ARCH_HAS_HCD=y | ||
1006 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
1007 | CONFIG_USB_ARCH_HAS_EHCI=y | ||
1008 | CONFIG_USB=y | ||
1009 | # CONFIG_USB_DEBUG is not set | ||
1010 | # CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set | ||
1011 | |||
1012 | # | ||
1013 | # Miscellaneous USB options | ||
1014 | # | ||
1015 | CONFIG_USB_DEVICEFS=y | ||
1016 | CONFIG_USB_DEVICE_CLASS=y | ||
1017 | # CONFIG_USB_DYNAMIC_MINORS is not set | ||
1018 | # CONFIG_USB_OTG is not set | ||
1019 | # CONFIG_USB_OTG_WHITELIST is not set | ||
1020 | # CONFIG_USB_OTG_BLACKLIST_HUB is not set | ||
1021 | CONFIG_USB_MON=y | ||
1022 | # CONFIG_USB_WUSB is not set | ||
1023 | # CONFIG_USB_WUSB_CBAF is not set | ||
1024 | |||
1025 | # | ||
1026 | # USB Host Controller Drivers | ||
1027 | # | ||
1028 | # CONFIG_USB_C67X00_HCD is not set | ||
1029 | # CONFIG_USB_XHCI_HCD is not set | ||
1030 | CONFIG_USB_EHCI_HCD=y | ||
1031 | CONFIG_USB_EHCI_ROOT_HUB_TT=y | ||
1032 | # CONFIG_USB_EHCI_TT_NEWSCHED is not set | ||
1033 | CONFIG_USB_EHCI_FSL=y | ||
1034 | CONFIG_USB_EHCI_HCD_PPC_OF=y | ||
1035 | # CONFIG_USB_OXU210HP_HCD is not set | ||
1036 | # CONFIG_USB_ISP116X_HCD is not set | ||
1037 | # CONFIG_USB_ISP1760_HCD is not set | ||
1038 | # CONFIG_USB_OHCI_HCD is not set | ||
1039 | # CONFIG_USB_UHCI_HCD is not set | ||
1040 | # CONFIG_USB_SL811_HCD is not set | ||
1041 | # CONFIG_USB_R8A66597_HCD is not set | ||
1042 | # CONFIG_USB_WHCI_HCD is not set | ||
1043 | # CONFIG_USB_HWA_HCD is not set | ||
1044 | |||
1045 | # | ||
1046 | # USB Device Class drivers | ||
1047 | # | ||
1048 | # CONFIG_USB_ACM is not set | ||
1049 | # CONFIG_USB_PRINTER is not set | ||
1050 | # CONFIG_USB_WDM is not set | ||
1051 | # CONFIG_USB_TMC is not set | ||
1052 | |||
1053 | # | ||
1054 | # NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may | ||
1055 | # | ||
1056 | |||
1057 | # | ||
1058 | # also be needed; see USB_STORAGE Help for more info | ||
1059 | # | ||
1060 | CONFIG_USB_STORAGE=y | ||
1061 | # CONFIG_USB_STORAGE_DEBUG is not set | ||
1062 | # CONFIG_USB_STORAGE_DATAFAB is not set | ||
1063 | # CONFIG_USB_STORAGE_FREECOM is not set | ||
1064 | # CONFIG_USB_STORAGE_ISD200 is not set | ||
1065 | # CONFIG_USB_STORAGE_USBAT is not set | ||
1066 | # CONFIG_USB_STORAGE_SDDR09 is not set | ||
1067 | # CONFIG_USB_STORAGE_SDDR55 is not set | ||
1068 | # CONFIG_USB_STORAGE_JUMPSHOT is not set | ||
1069 | # CONFIG_USB_STORAGE_ALAUDA is not set | ||
1070 | # CONFIG_USB_STORAGE_ONETOUCH is not set | ||
1071 | # CONFIG_USB_STORAGE_KARMA is not set | ||
1072 | # CONFIG_USB_STORAGE_CYPRESS_ATACB is not set | ||
1073 | # CONFIG_USB_LIBUSUAL is not set | ||
1074 | |||
1075 | # | ||
1076 | # USB Imaging devices | ||
1077 | # | ||
1078 | # CONFIG_USB_MDC800 is not set | ||
1079 | # CONFIG_USB_MICROTEK is not set | ||
1080 | |||
1081 | # | ||
1082 | # USB port drivers | ||
1083 | # | ||
1084 | # CONFIG_USB_SERIAL is not set | ||
1085 | |||
1086 | # | ||
1087 | # USB Miscellaneous drivers | ||
1088 | # | ||
1089 | # CONFIG_USB_EMI62 is not set | ||
1090 | # CONFIG_USB_EMI26 is not set | ||
1091 | # CONFIG_USB_ADUTUX is not set | ||
1092 | # CONFIG_USB_SEVSEG is not set | ||
1093 | # CONFIG_USB_RIO500 is not set | ||
1094 | # CONFIG_USB_LEGOTOWER is not set | ||
1095 | # CONFIG_USB_LCD is not set | ||
1096 | # CONFIG_USB_BERRY_CHARGE is not set | ||
1097 | # CONFIG_USB_LED is not set | ||
1098 | # CONFIG_USB_CYPRESS_CY7C63 is not set | ||
1099 | # CONFIG_USB_CYTHERM is not set | ||
1100 | # CONFIG_USB_IDMOUSE is not set | ||
1101 | # CONFIG_USB_FTDI_ELAN is not set | ||
1102 | # CONFIG_USB_APPLEDISPLAY is not set | ||
1103 | # CONFIG_USB_SISUSBVGA is not set | ||
1104 | # CONFIG_USB_LD is not set | ||
1105 | # CONFIG_USB_TRANCEVIBRATOR is not set | ||
1106 | # CONFIG_USB_IOWARRIOR is not set | ||
1107 | # CONFIG_USB_TEST is not set | ||
1108 | # CONFIG_USB_ISIGHTFW is not set | ||
1109 | # CONFIG_USB_VST is not set | ||
1110 | # CONFIG_USB_GADGET is not set | ||
1111 | |||
1112 | # | ||
1113 | # OTG and related infrastructure | ||
1114 | # | ||
1115 | # CONFIG_NOP_USB_XCEIV is not set | ||
865 | # CONFIG_UWB is not set | 1116 | # CONFIG_UWB is not set |
866 | # CONFIG_MMC is not set | 1117 | # CONFIG_MMC is not set |
867 | # CONFIG_MEMSTICK is not set | 1118 | # CONFIG_MEMSTICK is not set |
@@ -882,9 +1133,14 @@ CONFIG_HID=y | |||
882 | # | 1133 | # |
883 | # File systems | 1134 | # File systems |
884 | # | 1135 | # |
885 | # CONFIG_EXT2_FS is not set | 1136 | CONFIG_EXT2_FS=y |
886 | # CONFIG_EXT3_FS is not set | 1137 | # CONFIG_EXT2_FS_XATTR is not set |
1138 | # CONFIG_EXT2_FS_XIP is not set | ||
1139 | CONFIG_EXT3_FS=y | ||
1140 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set | ||
1141 | # CONFIG_EXT3_FS_XATTR is not set | ||
887 | # CONFIG_EXT4_FS is not set | 1142 | # CONFIG_EXT4_FS is not set |
1143 | CONFIG_JBD=y | ||
888 | # CONFIG_REISERFS_FS is not set | 1144 | # CONFIG_REISERFS_FS is not set |
889 | # CONFIG_JFS_FS is not set | 1145 | # CONFIG_JFS_FS is not set |
890 | # CONFIG_FS_POSIX_ACL is not set | 1146 | # CONFIG_FS_POSIX_ACL is not set |
@@ -940,6 +1196,7 @@ CONFIG_MISC_FILESYSTEMS=y | |||
940 | # CONFIG_BEFS_FS is not set | 1196 | # CONFIG_BEFS_FS is not set |
941 | # CONFIG_BFS_FS is not set | 1197 | # CONFIG_BFS_FS is not set |
942 | # CONFIG_EFS_FS is not set | 1198 | # CONFIG_EFS_FS is not set |
1199 | # CONFIG_JFFS2_FS is not set | ||
943 | # CONFIG_CRAMFS is not set | 1200 | # CONFIG_CRAMFS is not set |
944 | # CONFIG_SQUASHFS is not set | 1201 | # CONFIG_SQUASHFS is not set |
945 | # CONFIG_VXFS_FS is not set | 1202 | # CONFIG_VXFS_FS is not set |
@@ -977,7 +1234,46 @@ CONFIG_RPCSEC_GSS_KRB5=y | |||
977 | # | 1234 | # |
978 | # CONFIG_PARTITION_ADVANCED is not set | 1235 | # CONFIG_PARTITION_ADVANCED is not set |
979 | CONFIG_MSDOS_PARTITION=y | 1236 | CONFIG_MSDOS_PARTITION=y |
980 | # CONFIG_NLS is not set | 1237 | CONFIG_NLS=y |
1238 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
1239 | # CONFIG_NLS_CODEPAGE_437 is not set | ||
1240 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
1241 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
1242 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
1243 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
1244 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
1245 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
1246 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
1247 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
1248 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
1249 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
1250 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
1251 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
1252 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
1253 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
1254 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
1255 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
1256 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
1257 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
1258 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
1259 | # CONFIG_NLS_ISO8859_8 is not set | ||
1260 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
1261 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
1262 | # CONFIG_NLS_ASCII is not set | ||
1263 | # CONFIG_NLS_ISO8859_1 is not set | ||
1264 | # CONFIG_NLS_ISO8859_2 is not set | ||
1265 | # CONFIG_NLS_ISO8859_3 is not set | ||
1266 | # CONFIG_NLS_ISO8859_4 is not set | ||
1267 | # CONFIG_NLS_ISO8859_5 is not set | ||
1268 | # CONFIG_NLS_ISO8859_6 is not set | ||
1269 | # CONFIG_NLS_ISO8859_7 is not set | ||
1270 | # CONFIG_NLS_ISO8859_9 is not set | ||
1271 | # CONFIG_NLS_ISO8859_13 is not set | ||
1272 | # CONFIG_NLS_ISO8859_14 is not set | ||
1273 | # CONFIG_NLS_ISO8859_15 is not set | ||
1274 | # CONFIG_NLS_KOI8_R is not set | ||
1275 | # CONFIG_NLS_KOI8_U is not set | ||
1276 | # CONFIG_NLS_UTF8 is not set | ||
981 | # CONFIG_DLM is not set | 1277 | # CONFIG_DLM is not set |
982 | # CONFIG_BINARY_PRINTF is not set | 1278 | # CONFIG_BINARY_PRINTF is not set |
983 | 1279 | ||
diff --git a/arch/powerpc/configs/mgcoge_defconfig b/arch/powerpc/configs/mgcoge_defconfig index e9491c1c3f31..30b68bfacebf 100644 --- a/arch/powerpc/configs/mgcoge_defconfig +++ b/arch/powerpc/configs/mgcoge_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.31-rc4 | 3 | # Linux kernel version: 2.6.31-rc5 |
4 | # Wed Jul 29 23:31:51 2009 | 4 | # Fri Aug 7 08:19:15 2009 |
5 | # | 5 | # |
6 | # CONFIG_PPC64 is not set | 6 | # CONFIG_PPC64 is not set |
7 | 7 | ||
@@ -158,6 +158,7 @@ CONFIG_BASE_SMALL=0 | |||
158 | # CONFIG_MODULES is not set | 158 | # CONFIG_MODULES is not set |
159 | CONFIG_BLOCK=y | 159 | CONFIG_BLOCK=y |
160 | CONFIG_LBDAF=y | 160 | CONFIG_LBDAF=y |
161 | CONFIG_BLK_DEV_BSG=y | ||
161 | # CONFIG_BLK_DEV_INTEGRITY is not set | 162 | # CONFIG_BLK_DEV_INTEGRITY is not set |
162 | 163 | ||
163 | # | 164 | # |
@@ -506,6 +507,7 @@ CONFIG_MTD_PHYSMAP_OF=y | |||
506 | # CONFIG_MTD_UBI is not set | 507 | # CONFIG_MTD_UBI is not set |
507 | CONFIG_OF_DEVICE=y | 508 | CONFIG_OF_DEVICE=y |
508 | CONFIG_OF_GPIO=y | 509 | CONFIG_OF_GPIO=y |
510 | CONFIG_OF_I2C=y | ||
509 | CONFIG_OF_MDIO=y | 511 | CONFIG_OF_MDIO=y |
510 | # CONFIG_PARPORT is not set | 512 | # CONFIG_PARPORT is not set |
511 | CONFIG_BLK_DEV=y | 513 | CONFIG_BLK_DEV=y |
@@ -582,7 +584,8 @@ CONFIG_PHYLIB=y | |||
582 | # CONFIG_STE10XP is not set | 584 | # CONFIG_STE10XP is not set |
583 | # CONFIG_LSI_ET1011C_PHY is not set | 585 | # CONFIG_LSI_ET1011C_PHY is not set |
584 | CONFIG_FIXED_PHY=y | 586 | CONFIG_FIXED_PHY=y |
585 | # CONFIG_MDIO_BITBANG is not set | 587 | CONFIG_MDIO_BITBANG=y |
588 | # CONFIG_MDIO_GPIO is not set | ||
586 | CONFIG_NET_ETHERNET=y | 589 | CONFIG_NET_ETHERNET=y |
587 | CONFIG_MII=y | 590 | CONFIG_MII=y |
588 | # CONFIG_MACE is not set | 591 | # CONFIG_MACE is not set |
@@ -608,8 +611,8 @@ CONFIG_MII=y | |||
608 | # CONFIG_ATL2 is not set | 611 | # CONFIG_ATL2 is not set |
609 | CONFIG_FS_ENET=y | 612 | CONFIG_FS_ENET=y |
610 | CONFIG_FS_ENET_HAS_SCC=y | 613 | CONFIG_FS_ENET_HAS_SCC=y |
611 | # CONFIG_FS_ENET_HAS_FCC is not set | 614 | CONFIG_FS_ENET_HAS_FCC=y |
612 | # CONFIG_FS_ENET_MDIO_FCC is not set | 615 | CONFIG_FS_ENET_MDIO_FCC=y |
613 | # CONFIG_NETDEV_1000 is not set | 616 | # CONFIG_NETDEV_1000 is not set |
614 | # CONFIG_NETDEV_10000 is not set | 617 | # CONFIG_NETDEV_10000 is not set |
615 | # CONFIG_TR is not set | 618 | # CONFIG_TR is not set |
@@ -680,7 +683,68 @@ CONFIG_HW_RANDOM=y | |||
680 | # CONFIG_APPLICOM is not set | 683 | # CONFIG_APPLICOM is not set |
681 | # CONFIG_RAW_DRIVER is not set | 684 | # CONFIG_RAW_DRIVER is not set |
682 | CONFIG_DEVPORT=y | 685 | CONFIG_DEVPORT=y |
683 | # CONFIG_I2C is not set | 686 | CONFIG_I2C=y |
687 | CONFIG_I2C_BOARDINFO=y | ||
688 | CONFIG_I2C_CHARDEV=y | ||
689 | CONFIG_I2C_HELPER_AUTO=y | ||
690 | |||
691 | # | ||
692 | # I2C Hardware Bus support | ||
693 | # | ||
694 | |||
695 | # | ||
696 | # PC SMBus host controller drivers | ||
697 | # | ||
698 | # CONFIG_I2C_ALI1535 is not set | ||
699 | # CONFIG_I2C_ALI15X3 is not set | ||
700 | # CONFIG_I2C_AMD756 is not set | ||
701 | # CONFIG_I2C_AMD8111 is not set | ||
702 | # CONFIG_I2C_I801 is not set | ||
703 | # CONFIG_I2C_ISCH is not set | ||
704 | # CONFIG_I2C_PIIX4 is not set | ||
705 | # CONFIG_I2C_NFORCE2 is not set | ||
706 | # CONFIG_I2C_SIS5595 is not set | ||
707 | # CONFIG_I2C_SIS630 is not set | ||
708 | # CONFIG_I2C_SIS96X is not set | ||
709 | # CONFIG_I2C_VIAPRO is not set | ||
710 | |||
711 | # | ||
712 | # Mac SMBus host controller drivers | ||
713 | # | ||
714 | # CONFIG_I2C_POWERMAC is not set | ||
715 | |||
716 | # | ||
717 | # I2C system bus drivers (mostly embedded / system-on-chip) | ||
718 | # | ||
719 | CONFIG_I2C_CPM=y | ||
720 | # CONFIG_I2C_DESIGNWARE is not set | ||
721 | # CONFIG_I2C_GPIO is not set | ||
722 | # CONFIG_I2C_MPC is not set | ||
723 | # CONFIG_I2C_SIMTEC is not set | ||
724 | |||
725 | # | ||
726 | # External I2C/SMBus adapter drivers | ||
727 | # | ||
728 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
729 | |||
730 | # | ||
731 | # Graphics adapter I2C/DDC channel drivers | ||
732 | # | ||
733 | # CONFIG_I2C_VOODOO3 is not set | ||
734 | |||
735 | # | ||
736 | # Other I2C/SMBus bus drivers | ||
737 | # | ||
738 | # CONFIG_I2C_PCA_PLATFORM is not set | ||
739 | |||
740 | # | ||
741 | # Miscellaneous I2C Chip support | ||
742 | # | ||
743 | # CONFIG_PCF8575 is not set | ||
744 | # CONFIG_I2C_DEBUG_CORE is not set | ||
745 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
746 | # CONFIG_I2C_DEBUG_BUS is not set | ||
747 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
684 | # CONFIG_SPI is not set | 748 | # CONFIG_SPI is not set |
685 | 749 | ||
686 | # | 750 | # |
@@ -699,6 +763,9 @@ CONFIG_GPIOLIB=y | |||
699 | # | 763 | # |
700 | # I2C GPIO expanders: | 764 | # I2C GPIO expanders: |
701 | # | 765 | # |
766 | # CONFIG_GPIO_MAX732X is not set | ||
767 | # CONFIG_GPIO_PCA953X is not set | ||
768 | # CONFIG_GPIO_PCF857X is not set | ||
702 | 769 | ||
703 | # | 770 | # |
704 | # PCI GPIO expanders: | 771 | # PCI GPIO expanders: |
@@ -727,7 +794,14 @@ CONFIG_SSB_POSSIBLE=y | |||
727 | # CONFIG_MFD_CORE is not set | 794 | # CONFIG_MFD_CORE is not set |
728 | # CONFIG_MFD_SM501 is not set | 795 | # CONFIG_MFD_SM501 is not set |
729 | # CONFIG_HTC_PASIC3 is not set | 796 | # CONFIG_HTC_PASIC3 is not set |
797 | # CONFIG_TPS65010 is not set | ||
798 | # CONFIG_TWL4030_CORE is not set | ||
730 | # CONFIG_MFD_TMIO is not set | 799 | # CONFIG_MFD_TMIO is not set |
800 | # CONFIG_PMIC_DA903X is not set | ||
801 | # CONFIG_MFD_WM8400 is not set | ||
802 | # CONFIG_MFD_WM8350_I2C is not set | ||
803 | # CONFIG_MFD_PCF50633 is not set | ||
804 | # CONFIG_AB3100_CORE is not set | ||
731 | # CONFIG_REGULATOR is not set | 805 | # CONFIG_REGULATOR is not set |
732 | # CONFIG_MEDIA_SUPPORT is not set | 806 | # CONFIG_MEDIA_SUPPORT is not set |
733 | 807 | ||
diff --git a/arch/powerpc/configs/mpc85xx_defconfig b/arch/powerpc/configs/mpc85xx_defconfig index ada595898af1..ee6acc6557f8 100644 --- a/arch/powerpc/configs/mpc85xx_defconfig +++ b/arch/powerpc/configs/mpc85xx_defconfig | |||
@@ -203,6 +203,7 @@ CONFIG_MPC85xx_CDS=y | |||
203 | CONFIG_MPC85xx_MDS=y | 203 | CONFIG_MPC85xx_MDS=y |
204 | CONFIG_MPC8536_DS=y | 204 | CONFIG_MPC8536_DS=y |
205 | CONFIG_MPC85xx_DS=y | 205 | CONFIG_MPC85xx_DS=y |
206 | CONFIG_MPC85xx_RDB=y | ||
206 | CONFIG_SOCRATES=y | 207 | CONFIG_SOCRATES=y |
207 | CONFIG_KSI8560=y | 208 | CONFIG_KSI8560=y |
208 | # CONFIG_XES_MPC85xx is not set | 209 | # CONFIG_XES_MPC85xx is not set |
diff --git a/arch/powerpc/include/asm/bitops.h b/arch/powerpc/include/asm/bitops.h index 897eade3afbe..56f2f2ea5631 100644 --- a/arch/powerpc/include/asm/bitops.h +++ b/arch/powerpc/include/asm/bitops.h | |||
@@ -56,174 +56,102 @@ | |||
56 | #define BITOP_WORD(nr) ((nr) / BITS_PER_LONG) | 56 | #define BITOP_WORD(nr) ((nr) / BITS_PER_LONG) |
57 | #define BITOP_LE_SWIZZLE ((BITS_PER_LONG-1) & ~0x7) | 57 | #define BITOP_LE_SWIZZLE ((BITS_PER_LONG-1) & ~0x7) |
58 | 58 | ||
59 | /* Macro for generating the ***_bits() functions */ | ||
60 | #define DEFINE_BITOP(fn, op, prefix, postfix) \ | ||
61 | static __inline__ void fn(unsigned long mask, \ | ||
62 | volatile unsigned long *_p) \ | ||
63 | { \ | ||
64 | unsigned long old; \ | ||
65 | unsigned long *p = (unsigned long *)_p; \ | ||
66 | __asm__ __volatile__ ( \ | ||
67 | prefix \ | ||
68 | "1:" PPC_LLARX "%0,0,%3\n" \ | ||
69 | stringify_in_c(op) "%0,%0,%2\n" \ | ||
70 | PPC405_ERR77(0,%3) \ | ||
71 | PPC_STLCX "%0,0,%3\n" \ | ||
72 | "bne- 1b\n" \ | ||
73 | postfix \ | ||
74 | : "=&r" (old), "+m" (*p) \ | ||
75 | : "r" (mask), "r" (p) \ | ||
76 | : "cc", "memory"); \ | ||
77 | } | ||
78 | |||
79 | DEFINE_BITOP(set_bits, or, "", "") | ||
80 | DEFINE_BITOP(clear_bits, andc, "", "") | ||
81 | DEFINE_BITOP(clear_bits_unlock, andc, LWSYNC_ON_SMP, "") | ||
82 | DEFINE_BITOP(change_bits, xor, "", "") | ||
83 | |||
59 | static __inline__ void set_bit(int nr, volatile unsigned long *addr) | 84 | static __inline__ void set_bit(int nr, volatile unsigned long *addr) |
60 | { | 85 | { |
61 | unsigned long old; | 86 | set_bits(BITOP_MASK(nr), addr + BITOP_WORD(nr)); |
62 | unsigned long mask = BITOP_MASK(nr); | ||
63 | unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr); | ||
64 | |||
65 | __asm__ __volatile__( | ||
66 | "1:" PPC_LLARX "%0,0,%3 # set_bit\n" | ||
67 | "or %0,%0,%2\n" | ||
68 | PPC405_ERR77(0,%3) | ||
69 | PPC_STLCX "%0,0,%3\n" | ||
70 | "bne- 1b" | ||
71 | : "=&r" (old), "+m" (*p) | ||
72 | : "r" (mask), "r" (p) | ||
73 | : "cc" ); | ||
74 | } | 87 | } |
75 | 88 | ||
76 | static __inline__ void clear_bit(int nr, volatile unsigned long *addr) | 89 | static __inline__ void clear_bit(int nr, volatile unsigned long *addr) |
77 | { | 90 | { |
78 | unsigned long old; | 91 | clear_bits(BITOP_MASK(nr), addr + BITOP_WORD(nr)); |
79 | unsigned long mask = BITOP_MASK(nr); | ||
80 | unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr); | ||
81 | |||
82 | __asm__ __volatile__( | ||
83 | "1:" PPC_LLARX "%0,0,%3 # clear_bit\n" | ||
84 | "andc %0,%0,%2\n" | ||
85 | PPC405_ERR77(0,%3) | ||
86 | PPC_STLCX "%0,0,%3\n" | ||
87 | "bne- 1b" | ||
88 | : "=&r" (old), "+m" (*p) | ||
89 | : "r" (mask), "r" (p) | ||
90 | : "cc" ); | ||
91 | } | 92 | } |
92 | 93 | ||
93 | static __inline__ void clear_bit_unlock(int nr, volatile unsigned long *addr) | 94 | static __inline__ void clear_bit_unlock(int nr, volatile unsigned long *addr) |
94 | { | 95 | { |
95 | unsigned long old; | 96 | clear_bits_unlock(BITOP_MASK(nr), addr + BITOP_WORD(nr)); |
96 | unsigned long mask = BITOP_MASK(nr); | ||
97 | unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr); | ||
98 | |||
99 | __asm__ __volatile__( | ||
100 | LWSYNC_ON_SMP | ||
101 | "1:" PPC_LLARX "%0,0,%3 # clear_bit_unlock\n" | ||
102 | "andc %0,%0,%2\n" | ||
103 | PPC405_ERR77(0,%3) | ||
104 | PPC_STLCX "%0,0,%3\n" | ||
105 | "bne- 1b" | ||
106 | : "=&r" (old), "+m" (*p) | ||
107 | : "r" (mask), "r" (p) | ||
108 | : "cc", "memory"); | ||
109 | } | 97 | } |
110 | 98 | ||
111 | static __inline__ void change_bit(int nr, volatile unsigned long *addr) | 99 | static __inline__ void change_bit(int nr, volatile unsigned long *addr) |
112 | { | 100 | { |
113 | unsigned long old; | 101 | change_bits(BITOP_MASK(nr), addr + BITOP_WORD(nr)); |
114 | unsigned long mask = BITOP_MASK(nr); | 102 | } |
115 | unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr); | 103 | |
116 | 104 | /* Like DEFINE_BITOP(), with changes to the arguments to 'op' and the output | |
117 | __asm__ __volatile__( | 105 | * operands. */ |
118 | "1:" PPC_LLARX "%0,0,%3 # change_bit\n" | 106 | #define DEFINE_TESTOP(fn, op, prefix, postfix) \ |
119 | "xor %0,%0,%2\n" | 107 | static __inline__ unsigned long fn( \ |
120 | PPC405_ERR77(0,%3) | 108 | unsigned long mask, \ |
121 | PPC_STLCX "%0,0,%3\n" | 109 | volatile unsigned long *_p) \ |
122 | "bne- 1b" | 110 | { \ |
123 | : "=&r" (old), "+m" (*p) | 111 | unsigned long old, t; \ |
124 | : "r" (mask), "r" (p) | 112 | unsigned long *p = (unsigned long *)_p; \ |
125 | : "cc" ); | 113 | __asm__ __volatile__ ( \ |
114 | prefix \ | ||
115 | "1:" PPC_LLARX "%0,0,%3\n" \ | ||
116 | stringify_in_c(op) "%1,%0,%2\n" \ | ||
117 | PPC405_ERR77(0,%3) \ | ||
118 | PPC_STLCX "%1,0,%3\n" \ | ||
119 | "bne- 1b\n" \ | ||
120 | postfix \ | ||
121 | : "=&r" (old), "=&r" (t) \ | ||
122 | : "r" (mask), "r" (p) \ | ||
123 | : "cc", "memory"); \ | ||
124 | return (old & mask); \ | ||
126 | } | 125 | } |
127 | 126 | ||
127 | DEFINE_TESTOP(test_and_set_bits, or, LWSYNC_ON_SMP, ISYNC_ON_SMP) | ||
128 | DEFINE_TESTOP(test_and_set_bits_lock, or, "", ISYNC_ON_SMP) | ||
129 | DEFINE_TESTOP(test_and_clear_bits, andc, LWSYNC_ON_SMP, ISYNC_ON_SMP) | ||
130 | DEFINE_TESTOP(test_and_change_bits, xor, LWSYNC_ON_SMP, ISYNC_ON_SMP) | ||
131 | |||
128 | static __inline__ int test_and_set_bit(unsigned long nr, | 132 | static __inline__ int test_and_set_bit(unsigned long nr, |
129 | volatile unsigned long *addr) | 133 | volatile unsigned long *addr) |
130 | { | 134 | { |
131 | unsigned long old, t; | 135 | return test_and_set_bits(BITOP_MASK(nr), addr + BITOP_WORD(nr)) != 0; |
132 | unsigned long mask = BITOP_MASK(nr); | ||
133 | unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr); | ||
134 | |||
135 | __asm__ __volatile__( | ||
136 | LWSYNC_ON_SMP | ||
137 | "1:" PPC_LLARX "%0,0,%3 # test_and_set_bit\n" | ||
138 | "or %1,%0,%2 \n" | ||
139 | PPC405_ERR77(0,%3) | ||
140 | PPC_STLCX "%1,0,%3 \n" | ||
141 | "bne- 1b" | ||
142 | ISYNC_ON_SMP | ||
143 | : "=&r" (old), "=&r" (t) | ||
144 | : "r" (mask), "r" (p) | ||
145 | : "cc", "memory"); | ||
146 | |||
147 | return (old & mask) != 0; | ||
148 | } | 136 | } |
149 | 137 | ||
150 | static __inline__ int test_and_set_bit_lock(unsigned long nr, | 138 | static __inline__ int test_and_set_bit_lock(unsigned long nr, |
151 | volatile unsigned long *addr) | 139 | volatile unsigned long *addr) |
152 | { | 140 | { |
153 | unsigned long old, t; | 141 | return test_and_set_bits_lock(BITOP_MASK(nr), |
154 | unsigned long mask = BITOP_MASK(nr); | 142 | addr + BITOP_WORD(nr)) != 0; |
155 | unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr); | ||
156 | |||
157 | __asm__ __volatile__( | ||
158 | "1:" PPC_LLARX "%0,0,%3 # test_and_set_bit_lock\n" | ||
159 | "or %1,%0,%2 \n" | ||
160 | PPC405_ERR77(0,%3) | ||
161 | PPC_STLCX "%1,0,%3 \n" | ||
162 | "bne- 1b" | ||
163 | ISYNC_ON_SMP | ||
164 | : "=&r" (old), "=&r" (t) | ||
165 | : "r" (mask), "r" (p) | ||
166 | : "cc", "memory"); | ||
167 | |||
168 | return (old & mask) != 0; | ||
169 | } | 143 | } |
170 | 144 | ||
171 | static __inline__ int test_and_clear_bit(unsigned long nr, | 145 | static __inline__ int test_and_clear_bit(unsigned long nr, |
172 | volatile unsigned long *addr) | 146 | volatile unsigned long *addr) |
173 | { | 147 | { |
174 | unsigned long old, t; | 148 | return test_and_clear_bits(BITOP_MASK(nr), addr + BITOP_WORD(nr)) != 0; |
175 | unsigned long mask = BITOP_MASK(nr); | ||
176 | unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr); | ||
177 | |||
178 | __asm__ __volatile__( | ||
179 | LWSYNC_ON_SMP | ||
180 | "1:" PPC_LLARX "%0,0,%3 # test_and_clear_bit\n" | ||
181 | "andc %1,%0,%2 \n" | ||
182 | PPC405_ERR77(0,%3) | ||
183 | PPC_STLCX "%1,0,%3 \n" | ||
184 | "bne- 1b" | ||
185 | ISYNC_ON_SMP | ||
186 | : "=&r" (old), "=&r" (t) | ||
187 | : "r" (mask), "r" (p) | ||
188 | : "cc", "memory"); | ||
189 | |||
190 | return (old & mask) != 0; | ||
191 | } | 149 | } |
192 | 150 | ||
193 | static __inline__ int test_and_change_bit(unsigned long nr, | 151 | static __inline__ int test_and_change_bit(unsigned long nr, |
194 | volatile unsigned long *addr) | 152 | volatile unsigned long *addr) |
195 | { | 153 | { |
196 | unsigned long old, t; | 154 | return test_and_change_bits(BITOP_MASK(nr), addr + BITOP_WORD(nr)) != 0; |
197 | unsigned long mask = BITOP_MASK(nr); | ||
198 | unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr); | ||
199 | |||
200 | __asm__ __volatile__( | ||
201 | LWSYNC_ON_SMP | ||
202 | "1:" PPC_LLARX "%0,0,%3 # test_and_change_bit\n" | ||
203 | "xor %1,%0,%2 \n" | ||
204 | PPC405_ERR77(0,%3) | ||
205 | PPC_STLCX "%1,0,%3 \n" | ||
206 | "bne- 1b" | ||
207 | ISYNC_ON_SMP | ||
208 | : "=&r" (old), "=&r" (t) | ||
209 | : "r" (mask), "r" (p) | ||
210 | : "cc", "memory"); | ||
211 | |||
212 | return (old & mask) != 0; | ||
213 | } | ||
214 | |||
215 | static __inline__ void set_bits(unsigned long mask, unsigned long *addr) | ||
216 | { | ||
217 | unsigned long old; | ||
218 | |||
219 | __asm__ __volatile__( | ||
220 | "1:" PPC_LLARX "%0,0,%3 # set_bits\n" | ||
221 | "or %0,%0,%2\n" | ||
222 | PPC_STLCX "%0,0,%3\n" | ||
223 | "bne- 1b" | ||
224 | : "=&r" (old), "+m" (*addr) | ||
225 | : "r" (mask), "r" (addr) | ||
226 | : "cc"); | ||
227 | } | 155 | } |
228 | 156 | ||
229 | #include <asm-generic/bitops/non-atomic.h> | 157 | #include <asm-generic/bitops/non-atomic.h> |
diff --git a/arch/powerpc/include/asm/cell-regs.h b/arch/powerpc/include/asm/cell-regs.h index fd6fd00434ef..fdf64fd25950 100644 --- a/arch/powerpc/include/asm/cell-regs.h +++ b/arch/powerpc/include/asm/cell-regs.h | |||
@@ -303,6 +303,17 @@ struct cbe_mic_tm_regs { | |||
303 | extern struct cbe_mic_tm_regs __iomem *cbe_get_mic_tm_regs(struct device_node *np); | 303 | extern struct cbe_mic_tm_regs __iomem *cbe_get_mic_tm_regs(struct device_node *np); |
304 | extern struct cbe_mic_tm_regs __iomem *cbe_get_cpu_mic_tm_regs(int cpu); | 304 | extern struct cbe_mic_tm_regs __iomem *cbe_get_cpu_mic_tm_regs(int cpu); |
305 | 305 | ||
306 | |||
307 | /* Cell page table entries */ | ||
308 | #define CBE_IOPTE_PP_W 0x8000000000000000ul /* protection: write */ | ||
309 | #define CBE_IOPTE_PP_R 0x4000000000000000ul /* protection: read */ | ||
310 | #define CBE_IOPTE_M 0x2000000000000000ul /* coherency required */ | ||
311 | #define CBE_IOPTE_SO_R 0x1000000000000000ul /* ordering: writes */ | ||
312 | #define CBE_IOPTE_SO_RW 0x1800000000000000ul /* ordering: r & w */ | ||
313 | #define CBE_IOPTE_RPN_Mask 0x07fffffffffff000ul /* RPN */ | ||
314 | #define CBE_IOPTE_H 0x0000000000000800ul /* cache hint */ | ||
315 | #define CBE_IOPTE_IOID_Mask 0x00000000000007fful /* ioid */ | ||
316 | |||
306 | /* some utility functions to deal with SMT */ | 317 | /* some utility functions to deal with SMT */ |
307 | extern u32 cbe_get_hw_thread_id(int cpu); | 318 | extern u32 cbe_get_hw_thread_id(int cpu); |
308 | extern u32 cbe_cpu_to_node(int cpu); | 319 | extern u32 cbe_cpu_to_node(int cpu); |
diff --git a/arch/powerpc/include/asm/cputhreads.h b/arch/powerpc/include/asm/cputhreads.h index fb11b0c459b8..a8e18447c62b 100644 --- a/arch/powerpc/include/asm/cputhreads.h +++ b/arch/powerpc/include/asm/cputhreads.h | |||
@@ -5,6 +5,15 @@ | |||
5 | 5 | ||
6 | /* | 6 | /* |
7 | * Mapping of threads to cores | 7 | * Mapping of threads to cores |
8 | * | ||
9 | * Note: This implementation is limited to a power of 2 number of | ||
10 | * threads per core and the same number for each core in the system | ||
11 | * (though it would work if some processors had less threads as long | ||
12 | * as the CPU numbers are still allocated, just not brought offline). | ||
13 | * | ||
14 | * However, the API allows for a different implementation in the future | ||
15 | * if needed, as long as you only use the functions and not the variables | ||
16 | * directly. | ||
8 | */ | 17 | */ |
9 | 18 | ||
10 | #ifdef CONFIG_SMP | 19 | #ifdef CONFIG_SMP |
@@ -67,5 +76,12 @@ static inline int cpu_first_thread_in_core(int cpu) | |||
67 | return cpu & ~(threads_per_core - 1); | 76 | return cpu & ~(threads_per_core - 1); |
68 | } | 77 | } |
69 | 78 | ||
79 | static inline int cpu_last_thread_in_core(int cpu) | ||
80 | { | ||
81 | return cpu | (threads_per_core - 1); | ||
82 | } | ||
83 | |||
84 | |||
85 | |||
70 | #endif /* _ASM_POWERPC_CPUTHREADS_H */ | 86 | #endif /* _ASM_POWERPC_CPUTHREADS_H */ |
71 | 87 | ||
diff --git a/arch/powerpc/include/asm/device.h b/arch/powerpc/include/asm/device.h index e3e06e0f7fc0..9dade15d1ab4 100644 --- a/arch/powerpc/include/asm/device.h +++ b/arch/powerpc/include/asm/device.h | |||
@@ -6,7 +6,7 @@ | |||
6 | #ifndef _ASM_POWERPC_DEVICE_H | 6 | #ifndef _ASM_POWERPC_DEVICE_H |
7 | #define _ASM_POWERPC_DEVICE_H | 7 | #define _ASM_POWERPC_DEVICE_H |
8 | 8 | ||
9 | struct dma_mapping_ops; | 9 | struct dma_map_ops; |
10 | struct device_node; | 10 | struct device_node; |
11 | 11 | ||
12 | struct dev_archdata { | 12 | struct dev_archdata { |
@@ -14,8 +14,11 @@ struct dev_archdata { | |||
14 | struct device_node *of_node; | 14 | struct device_node *of_node; |
15 | 15 | ||
16 | /* DMA operations on that device */ | 16 | /* DMA operations on that device */ |
17 | struct dma_mapping_ops *dma_ops; | 17 | struct dma_map_ops *dma_ops; |
18 | void *dma_data; | 18 | void *dma_data; |
19 | #ifdef CONFIG_SWIOTLB | ||
20 | dma_addr_t max_direct_dma_addr; | ||
21 | #endif | ||
19 | }; | 22 | }; |
20 | 23 | ||
21 | static inline void dev_archdata_set_node(struct dev_archdata *ad, | 24 | static inline void dev_archdata_set_node(struct dev_archdata *ad, |
diff --git a/arch/powerpc/include/asm/dma-mapping.h b/arch/powerpc/include/asm/dma-mapping.h index 0c34371ec49c..cb2ca41dd526 100644 --- a/arch/powerpc/include/asm/dma-mapping.h +++ b/arch/powerpc/include/asm/dma-mapping.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
15 | #include <linux/scatterlist.h> | 15 | #include <linux/scatterlist.h> |
16 | #include <linux/dma-attrs.h> | 16 | #include <linux/dma-attrs.h> |
17 | #include <linux/dma-debug.h> | ||
17 | #include <asm/io.h> | 18 | #include <asm/io.h> |
18 | #include <asm/swiotlb.h> | 19 | #include <asm/swiotlb.h> |
19 | 20 | ||
@@ -64,58 +65,14 @@ static inline unsigned long device_to_mask(struct device *dev) | |||
64 | } | 65 | } |
65 | 66 | ||
66 | /* | 67 | /* |
67 | * DMA operations are abstracted for G5 vs. i/pSeries, PCI vs. VIO | ||
68 | */ | ||
69 | struct dma_mapping_ops { | ||
70 | void * (*alloc_coherent)(struct device *dev, size_t size, | ||
71 | dma_addr_t *dma_handle, gfp_t flag); | ||
72 | void (*free_coherent)(struct device *dev, size_t size, | ||
73 | void *vaddr, dma_addr_t dma_handle); | ||
74 | int (*map_sg)(struct device *dev, struct scatterlist *sg, | ||
75 | int nents, enum dma_data_direction direction, | ||
76 | struct dma_attrs *attrs); | ||
77 | void (*unmap_sg)(struct device *dev, struct scatterlist *sg, | ||
78 | int nents, enum dma_data_direction direction, | ||
79 | struct dma_attrs *attrs); | ||
80 | int (*dma_supported)(struct device *dev, u64 mask); | ||
81 | int (*set_dma_mask)(struct device *dev, u64 dma_mask); | ||
82 | dma_addr_t (*map_page)(struct device *dev, struct page *page, | ||
83 | unsigned long offset, size_t size, | ||
84 | enum dma_data_direction direction, | ||
85 | struct dma_attrs *attrs); | ||
86 | void (*unmap_page)(struct device *dev, | ||
87 | dma_addr_t dma_address, size_t size, | ||
88 | enum dma_data_direction direction, | ||
89 | struct dma_attrs *attrs); | ||
90 | int (*addr_needs_map)(struct device *dev, dma_addr_t addr, | ||
91 | size_t size); | ||
92 | #ifdef CONFIG_PPC_NEED_DMA_SYNC_OPS | ||
93 | void (*sync_single_range_for_cpu)(struct device *hwdev, | ||
94 | dma_addr_t dma_handle, unsigned long offset, | ||
95 | size_t size, | ||
96 | enum dma_data_direction direction); | ||
97 | void (*sync_single_range_for_device)(struct device *hwdev, | ||
98 | dma_addr_t dma_handle, unsigned long offset, | ||
99 | size_t size, | ||
100 | enum dma_data_direction direction); | ||
101 | void (*sync_sg_for_cpu)(struct device *hwdev, | ||
102 | struct scatterlist *sg, int nelems, | ||
103 | enum dma_data_direction direction); | ||
104 | void (*sync_sg_for_device)(struct device *hwdev, | ||
105 | struct scatterlist *sg, int nelems, | ||
106 | enum dma_data_direction direction); | ||
107 | #endif | ||
108 | }; | ||
109 | |||
110 | /* | ||
111 | * Available generic sets of operations | 68 | * Available generic sets of operations |
112 | */ | 69 | */ |
113 | #ifdef CONFIG_PPC64 | 70 | #ifdef CONFIG_PPC64 |
114 | extern struct dma_mapping_ops dma_iommu_ops; | 71 | extern struct dma_map_ops dma_iommu_ops; |
115 | #endif | 72 | #endif |
116 | extern struct dma_mapping_ops dma_direct_ops; | 73 | extern struct dma_map_ops dma_direct_ops; |
117 | 74 | ||
118 | static inline struct dma_mapping_ops *get_dma_ops(struct device *dev) | 75 | static inline struct dma_map_ops *get_dma_ops(struct device *dev) |
119 | { | 76 | { |
120 | /* We don't handle the NULL dev case for ISA for now. We could | 77 | /* We don't handle the NULL dev case for ISA for now. We could |
121 | * do it via an out of line call but it is not needed for now. The | 78 | * do it via an out of line call but it is not needed for now. The |
@@ -128,14 +85,19 @@ static inline struct dma_mapping_ops *get_dma_ops(struct device *dev) | |||
128 | return dev->archdata.dma_ops; | 85 | return dev->archdata.dma_ops; |
129 | } | 86 | } |
130 | 87 | ||
131 | static inline void set_dma_ops(struct device *dev, struct dma_mapping_ops *ops) | 88 | static inline void set_dma_ops(struct device *dev, struct dma_map_ops *ops) |
132 | { | 89 | { |
133 | dev->archdata.dma_ops = ops; | 90 | dev->archdata.dma_ops = ops; |
134 | } | 91 | } |
135 | 92 | ||
93 | /* this will be removed soon */ | ||
94 | #define flush_write_buffers() | ||
95 | |||
96 | #include <asm-generic/dma-mapping-common.h> | ||
97 | |||
136 | static inline int dma_supported(struct device *dev, u64 mask) | 98 | static inline int dma_supported(struct device *dev, u64 mask) |
137 | { | 99 | { |
138 | struct dma_mapping_ops *dma_ops = get_dma_ops(dev); | 100 | struct dma_map_ops *dma_ops = get_dma_ops(dev); |
139 | 101 | ||
140 | if (unlikely(dma_ops == NULL)) | 102 | if (unlikely(dma_ops == NULL)) |
141 | return 0; | 103 | return 0; |
@@ -149,7 +111,7 @@ static inline int dma_supported(struct device *dev, u64 mask) | |||
149 | 111 | ||
150 | static inline int dma_set_mask(struct device *dev, u64 dma_mask) | 112 | static inline int dma_set_mask(struct device *dev, u64 dma_mask) |
151 | { | 113 | { |
152 | struct dma_mapping_ops *dma_ops = get_dma_ops(dev); | 114 | struct dma_map_ops *dma_ops = get_dma_ops(dev); |
153 | 115 | ||
154 | if (unlikely(dma_ops == NULL)) | 116 | if (unlikely(dma_ops == NULL)) |
155 | return -EIO; | 117 | return -EIO; |
@@ -161,262 +123,40 @@ static inline int dma_set_mask(struct device *dev, u64 dma_mask) | |||
161 | return 0; | 123 | return 0; |
162 | } | 124 | } |
163 | 125 | ||
164 | /* | ||
165 | * map_/unmap_single actually call through to map/unmap_page now that all the | ||
166 | * dma_mapping_ops have been converted over. We just have to get the page and | ||
167 | * offset to pass through to map_page | ||
168 | */ | ||
169 | static inline dma_addr_t dma_map_single_attrs(struct device *dev, | ||
170 | void *cpu_addr, | ||
171 | size_t size, | ||
172 | enum dma_data_direction direction, | ||
173 | struct dma_attrs *attrs) | ||
174 | { | ||
175 | struct dma_mapping_ops *dma_ops = get_dma_ops(dev); | ||
176 | |||
177 | BUG_ON(!dma_ops); | ||
178 | |||
179 | return dma_ops->map_page(dev, virt_to_page(cpu_addr), | ||
180 | (unsigned long)cpu_addr % PAGE_SIZE, size, | ||
181 | direction, attrs); | ||
182 | } | ||
183 | |||
184 | static inline void dma_unmap_single_attrs(struct device *dev, | ||
185 | dma_addr_t dma_addr, | ||
186 | size_t size, | ||
187 | enum dma_data_direction direction, | ||
188 | struct dma_attrs *attrs) | ||
189 | { | ||
190 | struct dma_mapping_ops *dma_ops = get_dma_ops(dev); | ||
191 | |||
192 | BUG_ON(!dma_ops); | ||
193 | |||
194 | dma_ops->unmap_page(dev, dma_addr, size, direction, attrs); | ||
195 | } | ||
196 | |||
197 | static inline dma_addr_t dma_map_page_attrs(struct device *dev, | ||
198 | struct page *page, | ||
199 | unsigned long offset, size_t size, | ||
200 | enum dma_data_direction direction, | ||
201 | struct dma_attrs *attrs) | ||
202 | { | ||
203 | struct dma_mapping_ops *dma_ops = get_dma_ops(dev); | ||
204 | |||
205 | BUG_ON(!dma_ops); | ||
206 | |||
207 | return dma_ops->map_page(dev, page, offset, size, direction, attrs); | ||
208 | } | ||
209 | |||
210 | static inline void dma_unmap_page_attrs(struct device *dev, | ||
211 | dma_addr_t dma_address, | ||
212 | size_t size, | ||
213 | enum dma_data_direction direction, | ||
214 | struct dma_attrs *attrs) | ||
215 | { | ||
216 | struct dma_mapping_ops *dma_ops = get_dma_ops(dev); | ||
217 | |||
218 | BUG_ON(!dma_ops); | ||
219 | |||
220 | dma_ops->unmap_page(dev, dma_address, size, direction, attrs); | ||
221 | } | ||
222 | |||
223 | static inline int dma_map_sg_attrs(struct device *dev, struct scatterlist *sg, | ||
224 | int nents, enum dma_data_direction direction, | ||
225 | struct dma_attrs *attrs) | ||
226 | { | ||
227 | struct dma_mapping_ops *dma_ops = get_dma_ops(dev); | ||
228 | |||
229 | BUG_ON(!dma_ops); | ||
230 | return dma_ops->map_sg(dev, sg, nents, direction, attrs); | ||
231 | } | ||
232 | |||
233 | static inline void dma_unmap_sg_attrs(struct device *dev, | ||
234 | struct scatterlist *sg, | ||
235 | int nhwentries, | ||
236 | enum dma_data_direction direction, | ||
237 | struct dma_attrs *attrs) | ||
238 | { | ||
239 | struct dma_mapping_ops *dma_ops = get_dma_ops(dev); | ||
240 | |||
241 | BUG_ON(!dma_ops); | ||
242 | dma_ops->unmap_sg(dev, sg, nhwentries, direction, attrs); | ||
243 | } | ||
244 | |||
245 | static inline void *dma_alloc_coherent(struct device *dev, size_t size, | 126 | static inline void *dma_alloc_coherent(struct device *dev, size_t size, |
246 | dma_addr_t *dma_handle, gfp_t flag) | 127 | dma_addr_t *dma_handle, gfp_t flag) |
247 | { | 128 | { |
248 | struct dma_mapping_ops *dma_ops = get_dma_ops(dev); | 129 | struct dma_map_ops *dma_ops = get_dma_ops(dev); |
249 | 130 | void *cpu_addr; | |
250 | BUG_ON(!dma_ops); | ||
251 | return dma_ops->alloc_coherent(dev, size, dma_handle, flag); | ||
252 | } | ||
253 | |||
254 | static inline void dma_free_coherent(struct device *dev, size_t size, | ||
255 | void *cpu_addr, dma_addr_t dma_handle) | ||
256 | { | ||
257 | struct dma_mapping_ops *dma_ops = get_dma_ops(dev); | ||
258 | |||
259 | BUG_ON(!dma_ops); | ||
260 | dma_ops->free_coherent(dev, size, cpu_addr, dma_handle); | ||
261 | } | ||
262 | |||
263 | static inline dma_addr_t dma_map_single(struct device *dev, void *cpu_addr, | ||
264 | size_t size, | ||
265 | enum dma_data_direction direction) | ||
266 | { | ||
267 | return dma_map_single_attrs(dev, cpu_addr, size, direction, NULL); | ||
268 | } | ||
269 | |||
270 | static inline void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, | ||
271 | size_t size, | ||
272 | enum dma_data_direction direction) | ||
273 | { | ||
274 | dma_unmap_single_attrs(dev, dma_addr, size, direction, NULL); | ||
275 | } | ||
276 | |||
277 | static inline dma_addr_t dma_map_page(struct device *dev, struct page *page, | ||
278 | unsigned long offset, size_t size, | ||
279 | enum dma_data_direction direction) | ||
280 | { | ||
281 | return dma_map_page_attrs(dev, page, offset, size, direction, NULL); | ||
282 | } | ||
283 | |||
284 | static inline void dma_unmap_page(struct device *dev, dma_addr_t dma_address, | ||
285 | size_t size, | ||
286 | enum dma_data_direction direction) | ||
287 | { | ||
288 | dma_unmap_page_attrs(dev, dma_address, size, direction, NULL); | ||
289 | } | ||
290 | |||
291 | static inline int dma_map_sg(struct device *dev, struct scatterlist *sg, | ||
292 | int nents, enum dma_data_direction direction) | ||
293 | { | ||
294 | return dma_map_sg_attrs(dev, sg, nents, direction, NULL); | ||
295 | } | ||
296 | |||
297 | static inline void dma_unmap_sg(struct device *dev, struct scatterlist *sg, | ||
298 | int nhwentries, | ||
299 | enum dma_data_direction direction) | ||
300 | { | ||
301 | dma_unmap_sg_attrs(dev, sg, nhwentries, direction, NULL); | ||
302 | } | ||
303 | |||
304 | #ifdef CONFIG_PPC_NEED_DMA_SYNC_OPS | ||
305 | static inline void dma_sync_single_for_cpu(struct device *dev, | ||
306 | dma_addr_t dma_handle, size_t size, | ||
307 | enum dma_data_direction direction) | ||
308 | { | ||
309 | struct dma_mapping_ops *dma_ops = get_dma_ops(dev); | ||
310 | |||
311 | BUG_ON(!dma_ops); | ||
312 | |||
313 | if (dma_ops->sync_single_range_for_cpu) | ||
314 | dma_ops->sync_single_range_for_cpu(dev, dma_handle, 0, | ||
315 | size, direction); | ||
316 | } | ||
317 | |||
318 | static inline void dma_sync_single_for_device(struct device *dev, | ||
319 | dma_addr_t dma_handle, size_t size, | ||
320 | enum dma_data_direction direction) | ||
321 | { | ||
322 | struct dma_mapping_ops *dma_ops = get_dma_ops(dev); | ||
323 | |||
324 | BUG_ON(!dma_ops); | ||
325 | |||
326 | if (dma_ops->sync_single_range_for_device) | ||
327 | dma_ops->sync_single_range_for_device(dev, dma_handle, | ||
328 | 0, size, direction); | ||
329 | } | ||
330 | |||
331 | static inline void dma_sync_sg_for_cpu(struct device *dev, | ||
332 | struct scatterlist *sgl, int nents, | ||
333 | enum dma_data_direction direction) | ||
334 | { | ||
335 | struct dma_mapping_ops *dma_ops = get_dma_ops(dev); | ||
336 | 131 | ||
337 | BUG_ON(!dma_ops); | 132 | BUG_ON(!dma_ops); |
338 | 133 | ||
339 | if (dma_ops->sync_sg_for_cpu) | 134 | cpu_addr = dma_ops->alloc_coherent(dev, size, dma_handle, flag); |
340 | dma_ops->sync_sg_for_cpu(dev, sgl, nents, direction); | ||
341 | } | ||
342 | |||
343 | static inline void dma_sync_sg_for_device(struct device *dev, | ||
344 | struct scatterlist *sgl, int nents, | ||
345 | enum dma_data_direction direction) | ||
346 | { | ||
347 | struct dma_mapping_ops *dma_ops = get_dma_ops(dev); | ||
348 | |||
349 | BUG_ON(!dma_ops); | ||
350 | |||
351 | if (dma_ops->sync_sg_for_device) | ||
352 | dma_ops->sync_sg_for_device(dev, sgl, nents, direction); | ||
353 | } | ||
354 | |||
355 | static inline void dma_sync_single_range_for_cpu(struct device *dev, | ||
356 | dma_addr_t dma_handle, unsigned long offset, size_t size, | ||
357 | enum dma_data_direction direction) | ||
358 | { | ||
359 | struct dma_mapping_ops *dma_ops = get_dma_ops(dev); | ||
360 | 135 | ||
361 | BUG_ON(!dma_ops); | 136 | debug_dma_alloc_coherent(dev, size, *dma_handle, cpu_addr); |
362 | 137 | ||
363 | if (dma_ops->sync_single_range_for_cpu) | 138 | return cpu_addr; |
364 | dma_ops->sync_single_range_for_cpu(dev, dma_handle, | ||
365 | offset, size, direction); | ||
366 | } | 139 | } |
367 | 140 | ||
368 | static inline void dma_sync_single_range_for_device(struct device *dev, | 141 | static inline void dma_free_coherent(struct device *dev, size_t size, |
369 | dma_addr_t dma_handle, unsigned long offset, size_t size, | 142 | void *cpu_addr, dma_addr_t dma_handle) |
370 | enum dma_data_direction direction) | ||
371 | { | 143 | { |
372 | struct dma_mapping_ops *dma_ops = get_dma_ops(dev); | 144 | struct dma_map_ops *dma_ops = get_dma_ops(dev); |
373 | 145 | ||
374 | BUG_ON(!dma_ops); | 146 | BUG_ON(!dma_ops); |
375 | 147 | ||
376 | if (dma_ops->sync_single_range_for_device) | 148 | debug_dma_free_coherent(dev, size, cpu_addr, dma_handle); |
377 | dma_ops->sync_single_range_for_device(dev, dma_handle, offset, | ||
378 | size, direction); | ||
379 | } | ||
380 | #else /* CONFIG_PPC_NEED_DMA_SYNC_OPS */ | ||
381 | static inline void dma_sync_single_for_cpu(struct device *dev, | ||
382 | dma_addr_t dma_handle, size_t size, | ||
383 | enum dma_data_direction direction) | ||
384 | { | ||
385 | } | ||
386 | |||
387 | static inline void dma_sync_single_for_device(struct device *dev, | ||
388 | dma_addr_t dma_handle, size_t size, | ||
389 | enum dma_data_direction direction) | ||
390 | { | ||
391 | } | ||
392 | |||
393 | static inline void dma_sync_sg_for_cpu(struct device *dev, | ||
394 | struct scatterlist *sgl, int nents, | ||
395 | enum dma_data_direction direction) | ||
396 | { | ||
397 | } | ||
398 | 149 | ||
399 | static inline void dma_sync_sg_for_device(struct device *dev, | 150 | dma_ops->free_coherent(dev, size, cpu_addr, dma_handle); |
400 | struct scatterlist *sgl, int nents, | ||
401 | enum dma_data_direction direction) | ||
402 | { | ||
403 | } | 151 | } |
404 | 152 | ||
405 | static inline void dma_sync_single_range_for_cpu(struct device *dev, | 153 | static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) |
406 | dma_addr_t dma_handle, unsigned long offset, size_t size, | ||
407 | enum dma_data_direction direction) | ||
408 | { | 154 | { |
409 | } | 155 | struct dma_map_ops *dma_ops = get_dma_ops(dev); |
410 | 156 | ||
411 | static inline void dma_sync_single_range_for_device(struct device *dev, | 157 | if (dma_ops->mapping_error) |
412 | dma_addr_t dma_handle, unsigned long offset, size_t size, | 158 | return dma_ops->mapping_error(dev, dma_addr); |
413 | enum dma_data_direction direction) | ||
414 | { | ||
415 | } | ||
416 | #endif | ||
417 | 159 | ||
418 | static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) | ||
419 | { | ||
420 | #ifdef CONFIG_PPC64 | 160 | #ifdef CONFIG_PPC64 |
421 | return (dma_addr == DMA_ERROR_CODE); | 161 | return (dma_addr == DMA_ERROR_CODE); |
422 | #else | 162 | #else |
@@ -426,10 +166,12 @@ static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) | |||
426 | 166 | ||
427 | static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size) | 167 | static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size) |
428 | { | 168 | { |
429 | struct dma_mapping_ops *ops = get_dma_ops(dev); | 169 | #ifdef CONFIG_SWIOTLB |
170 | struct dev_archdata *sd = &dev->archdata; | ||
430 | 171 | ||
431 | if (ops->addr_needs_map && ops->addr_needs_map(dev, addr, size)) | 172 | if (sd->max_direct_dma_addr && addr + size > sd->max_direct_dma_addr) |
432 | return 0; | 173 | return 0; |
174 | #endif | ||
433 | 175 | ||
434 | if (!dev->dma_mask) | 176 | if (!dev->dma_mask) |
435 | return 0; | 177 | return 0; |
diff --git a/arch/powerpc/include/asm/exception-64e.h b/arch/powerpc/include/asm/exception-64e.h new file mode 100644 index 000000000000..6d53f311d942 --- /dev/null +++ b/arch/powerpc/include/asm/exception-64e.h | |||
@@ -0,0 +1,205 @@ | |||
1 | /* | ||
2 | * Definitions for use by exception code on Book3-E | ||
3 | * | ||
4 | * Copyright (C) 2008 Ben. Herrenschmidt (benh@kernel.crashing.org), IBM Corp. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the License, or (at your option) any later version. | ||
10 | */ | ||
11 | #ifndef _ASM_POWERPC_EXCEPTION_64E_H | ||
12 | #define _ASM_POWERPC_EXCEPTION_64E_H | ||
13 | |||
14 | /* | ||
15 | * SPRGs usage an other considerations... | ||
16 | * | ||
17 | * Since TLB miss and other standard exceptions can be interrupted by | ||
18 | * critical exceptions which can themselves be interrupted by machine | ||
19 | * checks, and since the two later can themselves cause a TLB miss when | ||
20 | * hitting the linear mapping for the kernel stacks, we need to be a bit | ||
21 | * creative on how we use SPRGs. | ||
22 | * | ||
23 | * The base idea is that we have one SRPG reserved for critical and one | ||
24 | * for machine check interrupts. Those are used to save a GPR that can | ||
25 | * then be used to get the PACA, and store as much context as we need | ||
26 | * to save in there. That includes saving the SPRGs used by the TLB miss | ||
27 | * handler for linear mapping misses and the associated SRR0/1 due to | ||
28 | * the above re-entrancy issue. | ||
29 | * | ||
30 | * So here's the current usage pattern. It's done regardless of which | ||
31 | * SPRGs are user-readable though, thus we might have to change some of | ||
32 | * this later. In order to do that more easily, we use special constants | ||
33 | * for naming them | ||
34 | * | ||
35 | * WARNING: Some of these SPRGs are user readable. We need to do something | ||
36 | * about it as some point by making sure they can't be used to leak kernel | ||
37 | * critical data | ||
38 | */ | ||
39 | |||
40 | |||
41 | /* We are out of SPRGs so we save some things in the PACA. The normal | ||
42 | * exception frame is smaller than the CRIT or MC one though | ||
43 | */ | ||
44 | #define EX_R1 (0 * 8) | ||
45 | #define EX_CR (1 * 8) | ||
46 | #define EX_R10 (2 * 8) | ||
47 | #define EX_R11 (3 * 8) | ||
48 | #define EX_R14 (4 * 8) | ||
49 | #define EX_R15 (5 * 8) | ||
50 | |||
51 | /* The TLB miss exception uses different slots */ | ||
52 | |||
53 | #define EX_TLB_R10 ( 0 * 8) | ||
54 | #define EX_TLB_R11 ( 1 * 8) | ||
55 | #define EX_TLB_R12 ( 2 * 8) | ||
56 | #define EX_TLB_R13 ( 3 * 8) | ||
57 | #define EX_TLB_R14 ( 4 * 8) | ||
58 | #define EX_TLB_R15 ( 5 * 8) | ||
59 | #define EX_TLB_R16 ( 6 * 8) | ||
60 | #define EX_TLB_CR ( 7 * 8) | ||
61 | #define EX_TLB_DEAR ( 8 * 8) /* Level 0 and 2 only */ | ||
62 | #define EX_TLB_ESR ( 9 * 8) /* Level 0 and 2 only */ | ||
63 | #define EX_TLB_SRR0 (10 * 8) | ||
64 | #define EX_TLB_SRR1 (11 * 8) | ||
65 | #define EX_TLB_MMUCR0 (12 * 8) /* Level 0 */ | ||
66 | #define EX_TLB_MAS1 (12 * 8) /* Level 0 */ | ||
67 | #define EX_TLB_MAS2 (13 * 8) /* Level 0 */ | ||
68 | #ifdef CONFIG_BOOK3E_MMU_TLB_STATS | ||
69 | #define EX_TLB_R8 (14 * 8) | ||
70 | #define EX_TLB_R9 (15 * 8) | ||
71 | #define EX_TLB_LR (16 * 8) | ||
72 | #define EX_TLB_SIZE (17 * 8) | ||
73 | #else | ||
74 | #define EX_TLB_SIZE (14 * 8) | ||
75 | #endif | ||
76 | |||
77 | #define START_EXCEPTION(label) \ | ||
78 | .globl exc_##label##_book3e; \ | ||
79 | exc_##label##_book3e: | ||
80 | |||
81 | /* TLB miss exception prolog | ||
82 | * | ||
83 | * This prolog handles re-entrancy (up to 3 levels supported in the PACA | ||
84 | * though we currently don't test for overflow). It provides you with a | ||
85 | * re-entrancy safe working space of r10...r16 and CR with r12 being used | ||
86 | * as the exception area pointer in the PACA for that level of re-entrancy | ||
87 | * and r13 containing the PACA pointer. | ||
88 | * | ||
89 | * SRR0 and SRR1 are saved, but DEAR and ESR are not, since they don't apply | ||
90 | * as-is for instruction exceptions. It's up to the actual exception code | ||
91 | * to save them as well if required. | ||
92 | */ | ||
93 | #define TLB_MISS_PROLOG \ | ||
94 | mtspr SPRN_SPRG_TLB_SCRATCH,r12; \ | ||
95 | mfspr r12,SPRN_SPRG_TLB_EXFRAME; \ | ||
96 | std r10,EX_TLB_R10(r12); \ | ||
97 | mfcr r10; \ | ||
98 | std r11,EX_TLB_R11(r12); \ | ||
99 | mfspr r11,SPRN_SPRG_TLB_SCRATCH; \ | ||
100 | std r13,EX_TLB_R13(r12); \ | ||
101 | mfspr r13,SPRN_SPRG_PACA; \ | ||
102 | std r14,EX_TLB_R14(r12); \ | ||
103 | addi r14,r12,EX_TLB_SIZE; \ | ||
104 | std r15,EX_TLB_R15(r12); \ | ||
105 | mfspr r15,SPRN_SRR1; \ | ||
106 | std r16,EX_TLB_R16(r12); \ | ||
107 | mfspr r16,SPRN_SRR0; \ | ||
108 | std r10,EX_TLB_CR(r12); \ | ||
109 | std r11,EX_TLB_R12(r12); \ | ||
110 | mtspr SPRN_SPRG_TLB_EXFRAME,r14; \ | ||
111 | std r15,EX_TLB_SRR1(r12); \ | ||
112 | std r16,EX_TLB_SRR0(r12); \ | ||
113 | TLB_MISS_PROLOG_STATS | ||
114 | |||
115 | /* And these are the matching epilogs that restores things | ||
116 | * | ||
117 | * There are 3 epilogs: | ||
118 | * | ||
119 | * - SUCCESS : Unwinds one level | ||
120 | * - ERROR : restore from level 0 and reset | ||
121 | * - ERROR_SPECIAL : restore from current level and reset | ||
122 | * | ||
123 | * Normal errors use ERROR, that is, they restore the initial fault context | ||
124 | * and trigger a fault. However, there is a special case for linear mapping | ||
125 | * errors. Those should basically never happen, but if they do happen, we | ||
126 | * want the error to point out the context that did that linear mapping | ||
127 | * fault, not the initial level 0 (basically, we got a bogus PGF or something | ||
128 | * like that). For userland errors on the linear mapping, there is no | ||
129 | * difference since those are always level 0 anyway | ||
130 | */ | ||
131 | |||
132 | #define TLB_MISS_RESTORE(freg) \ | ||
133 | ld r14,EX_TLB_CR(r12); \ | ||
134 | ld r10,EX_TLB_R10(r12); \ | ||
135 | ld r15,EX_TLB_SRR0(r12); \ | ||
136 | ld r16,EX_TLB_SRR1(r12); \ | ||
137 | mtspr SPRN_SPRG_TLB_EXFRAME,freg; \ | ||
138 | ld r11,EX_TLB_R11(r12); \ | ||
139 | mtcr r14; \ | ||
140 | ld r13,EX_TLB_R13(r12); \ | ||
141 | ld r14,EX_TLB_R14(r12); \ | ||
142 | mtspr SPRN_SRR0,r15; \ | ||
143 | ld r15,EX_TLB_R15(r12); \ | ||
144 | mtspr SPRN_SRR1,r16; \ | ||
145 | TLB_MISS_RESTORE_STATS \ | ||
146 | ld r16,EX_TLB_R16(r12); \ | ||
147 | ld r12,EX_TLB_R12(r12); \ | ||
148 | |||
149 | #define TLB_MISS_EPILOG_SUCCESS \ | ||
150 | TLB_MISS_RESTORE(r12) | ||
151 | |||
152 | #define TLB_MISS_EPILOG_ERROR \ | ||
153 | addi r12,r13,PACA_EXTLB; \ | ||
154 | TLB_MISS_RESTORE(r12) | ||
155 | |||
156 | #define TLB_MISS_EPILOG_ERROR_SPECIAL \ | ||
157 | addi r11,r13,PACA_EXTLB; \ | ||
158 | TLB_MISS_RESTORE(r11) | ||
159 | |||
160 | #ifdef CONFIG_BOOK3E_MMU_TLB_STATS | ||
161 | #define TLB_MISS_PROLOG_STATS \ | ||
162 | mflr r10; \ | ||
163 | std r8,EX_TLB_R8(r12); \ | ||
164 | std r9,EX_TLB_R9(r12); \ | ||
165 | std r10,EX_TLB_LR(r12); | ||
166 | #define TLB_MISS_RESTORE_STATS \ | ||
167 | ld r16,EX_TLB_LR(r12); \ | ||
168 | ld r9,EX_TLB_R9(r12); \ | ||
169 | ld r8,EX_TLB_R8(r12); \ | ||
170 | mtlr r16; | ||
171 | #define TLB_MISS_STATS_D(name) \ | ||
172 | addi r9,r13,MMSTAT_DSTATS+name; \ | ||
173 | bl .tlb_stat_inc; | ||
174 | #define TLB_MISS_STATS_I(name) \ | ||
175 | addi r9,r13,MMSTAT_ISTATS+name; \ | ||
176 | bl .tlb_stat_inc; | ||
177 | #define TLB_MISS_STATS_X(name) \ | ||
178 | ld r8,PACA_EXTLB+EX_TLB_ESR(r13); \ | ||
179 | cmpdi cr2,r8,-1; \ | ||
180 | beq cr2,61f; \ | ||
181 | addi r9,r13,MMSTAT_DSTATS+name; \ | ||
182 | b 62f; \ | ||
183 | 61: addi r9,r13,MMSTAT_ISTATS+name; \ | ||
184 | 62: bl .tlb_stat_inc; | ||
185 | #define TLB_MISS_STATS_SAVE_INFO \ | ||
186 | std r14,EX_TLB_ESR(r12); /* save ESR */ \ | ||
187 | |||
188 | |||
189 | #else | ||
190 | #define TLB_MISS_PROLOG_STATS | ||
191 | #define TLB_MISS_RESTORE_STATS | ||
192 | #define TLB_MISS_STATS_D(name) | ||
193 | #define TLB_MISS_STATS_I(name) | ||
194 | #define TLB_MISS_STATS_X(name) | ||
195 | #define TLB_MISS_STATS_Y(name) | ||
196 | #define TLB_MISS_STATS_SAVE_INFO | ||
197 | #endif | ||
198 | |||
199 | #define SET_IVOR(vector_number, vector_offset) \ | ||
200 | li r3,vector_offset@l; \ | ||
201 | ori r3,r3,interrupt_base_book3e@l; \ | ||
202 | mtspr SPRN_IVOR##vector_number,r3; | ||
203 | |||
204 | #endif /* _ASM_POWERPC_EXCEPTION_64E_H */ | ||
205 | |||
diff --git a/arch/powerpc/include/asm/exception.h b/arch/powerpc/include/asm/exception-64s.h index d3d4534e3c74..a98653b26231 100644 --- a/arch/powerpc/include/asm/exception.h +++ b/arch/powerpc/include/asm/exception-64s.h | |||
@@ -57,17 +57,16 @@ | |||
57 | addi reg,reg,(label)-_stext; /* virt addr of handler ... */ | 57 | addi reg,reg,(label)-_stext; /* virt addr of handler ... */ |
58 | 58 | ||
59 | #define EXCEPTION_PROLOG_1(area) \ | 59 | #define EXCEPTION_PROLOG_1(area) \ |
60 | mfspr r13,SPRN_SPRG3; /* get paca address into r13 */ \ | 60 | mfspr r13,SPRN_SPRG_PACA; /* get paca address into r13 */ \ |
61 | std r9,area+EX_R9(r13); /* save r9 - r12 */ \ | 61 | std r9,area+EX_R9(r13); /* save r9 - r12 */ \ |
62 | std r10,area+EX_R10(r13); \ | 62 | std r10,area+EX_R10(r13); \ |
63 | std r11,area+EX_R11(r13); \ | 63 | std r11,area+EX_R11(r13); \ |
64 | std r12,area+EX_R12(r13); \ | 64 | std r12,area+EX_R12(r13); \ |
65 | mfspr r9,SPRN_SPRG1; \ | 65 | mfspr r9,SPRN_SPRG_SCRATCH0; \ |
66 | std r9,area+EX_R13(r13); \ | 66 | std r9,area+EX_R13(r13); \ |
67 | mfcr r9 | 67 | mfcr r9 |
68 | 68 | ||
69 | #define EXCEPTION_PROLOG_PSERIES(area, label) \ | 69 | #define EXCEPTION_PROLOG_PSERIES_1(label) \ |
70 | EXCEPTION_PROLOG_1(area); \ | ||
71 | ld r12,PACAKBASE(r13); /* get high part of &label */ \ | 70 | ld r12,PACAKBASE(r13); /* get high part of &label */ \ |
72 | ld r10,PACAKMSR(r13); /* get MSR value for kernel */ \ | 71 | ld r10,PACAKMSR(r13); /* get MSR value for kernel */ \ |
73 | mfspr r11,SPRN_SRR0; /* save SRR0 */ \ | 72 | mfspr r11,SPRN_SRR0; /* save SRR0 */ \ |
@@ -78,6 +77,10 @@ | |||
78 | rfid; \ | 77 | rfid; \ |
79 | b . /* prevent speculative execution */ | 78 | b . /* prevent speculative execution */ |
80 | 79 | ||
80 | #define EXCEPTION_PROLOG_PSERIES(area, label) \ | ||
81 | EXCEPTION_PROLOG_1(area); \ | ||
82 | EXCEPTION_PROLOG_PSERIES_1(label); | ||
83 | |||
81 | /* | 84 | /* |
82 | * The common exception prolog is used for all except a few exceptions | 85 | * The common exception prolog is used for all except a few exceptions |
83 | * such as a segment miss on a kernel address. We have to be prepared | 86 | * such as a segment miss on a kernel address. We have to be prepared |
@@ -144,7 +147,7 @@ | |||
144 | .globl label##_pSeries; \ | 147 | .globl label##_pSeries; \ |
145 | label##_pSeries: \ | 148 | label##_pSeries: \ |
146 | HMT_MEDIUM; \ | 149 | HMT_MEDIUM; \ |
147 | mtspr SPRN_SPRG1,r13; /* save r13 */ \ | 150 | mtspr SPRN_SPRG_SCRATCH0,r13; /* save r13 */ \ |
148 | EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, label##_common) | 151 | EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, label##_common) |
149 | 152 | ||
150 | #define HSTD_EXCEPTION_PSERIES(n, label) \ | 153 | #define HSTD_EXCEPTION_PSERIES(n, label) \ |
@@ -152,13 +155,13 @@ label##_pSeries: \ | |||
152 | .globl label##_pSeries; \ | 155 | .globl label##_pSeries; \ |
153 | label##_pSeries: \ | 156 | label##_pSeries: \ |
154 | HMT_MEDIUM; \ | 157 | HMT_MEDIUM; \ |
155 | mtspr SPRN_SPRG1,r20; /* save r20 */ \ | 158 | mtspr SPRN_SPRG_SCRATCH0,r20; /* save r20 */ \ |
156 | mfspr r20,SPRN_HSRR0; /* copy HSRR0 to SRR0 */ \ | 159 | mfspr r20,SPRN_HSRR0; /* copy HSRR0 to SRR0 */ \ |
157 | mtspr SPRN_SRR0,r20; \ | 160 | mtspr SPRN_SRR0,r20; \ |
158 | mfspr r20,SPRN_HSRR1; /* copy HSRR0 to SRR0 */ \ | 161 | mfspr r20,SPRN_HSRR1; /* copy HSRR0 to SRR0 */ \ |
159 | mtspr SPRN_SRR1,r20; \ | 162 | mtspr SPRN_SRR1,r20; \ |
160 | mfspr r20,SPRN_SPRG1; /* restore r20 */ \ | 163 | mfspr r20,SPRN_SPRG_SCRATCH0; /* restore r20 */ \ |
161 | mtspr SPRN_SPRG1,r13; /* save r13 */ \ | 164 | mtspr SPRN_SPRG_SCRATCH0,r13; /* save r13 */ \ |
162 | EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, label##_common) | 165 | EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, label##_common) |
163 | 166 | ||
164 | 167 | ||
@@ -167,15 +170,15 @@ label##_pSeries: \ | |||
167 | .globl label##_pSeries; \ | 170 | .globl label##_pSeries; \ |
168 | label##_pSeries: \ | 171 | label##_pSeries: \ |
169 | HMT_MEDIUM; \ | 172 | HMT_MEDIUM; \ |
170 | mtspr SPRN_SPRG1,r13; /* save r13 */ \ | 173 | mtspr SPRN_SPRG_SCRATCH0,r13; /* save r13 */ \ |
171 | mfspr r13,SPRN_SPRG3; /* get paca address into r13 */ \ | 174 | mfspr r13,SPRN_SPRG_PACA; /* get paca address into r13 */ \ |
172 | std r9,PACA_EXGEN+EX_R9(r13); /* save r9, r10 */ \ | 175 | std r9,PACA_EXGEN+EX_R9(r13); /* save r9, r10 */ \ |
173 | std r10,PACA_EXGEN+EX_R10(r13); \ | 176 | std r10,PACA_EXGEN+EX_R10(r13); \ |
174 | lbz r10,PACASOFTIRQEN(r13); \ | 177 | lbz r10,PACASOFTIRQEN(r13); \ |
175 | mfcr r9; \ | 178 | mfcr r9; \ |
176 | cmpwi r10,0; \ | 179 | cmpwi r10,0; \ |
177 | beq masked_interrupt; \ | 180 | beq masked_interrupt; \ |
178 | mfspr r10,SPRN_SPRG1; \ | 181 | mfspr r10,SPRN_SPRG_SCRATCH0; \ |
179 | std r10,PACA_EXGEN+EX_R13(r13); \ | 182 | std r10,PACA_EXGEN+EX_R13(r13); \ |
180 | std r11,PACA_EXGEN+EX_R11(r13); \ | 183 | std r11,PACA_EXGEN+EX_R11(r13); \ |
181 | std r12,PACA_EXGEN+EX_R12(r13); \ | 184 | std r12,PACA_EXGEN+EX_R12(r13); \ |
diff --git a/arch/powerpc/include/asm/hardirq.h b/arch/powerpc/include/asm/hardirq.h index 288e14d53b7f..fb3c05a0cbbf 100644 --- a/arch/powerpc/include/asm/hardirq.h +++ b/arch/powerpc/include/asm/hardirq.h | |||
@@ -1,29 +1 @@ | |||
1 | #ifndef _ASM_POWERPC_HARDIRQ_H | #include <asm-generic/hardirq.h> | |
2 | #define _ASM_POWERPC_HARDIRQ_H | ||
3 | #ifdef __KERNEL__ | ||
4 | |||
5 | #include <asm/irq.h> | ||
6 | #include <asm/bug.h> | ||
7 | |||
8 | /* The __last_jiffy_stamp field is needed to ensure that no decrementer | ||
9 | * interrupt is lost on SMP machines. Since on most CPUs it is in the same | ||
10 | * cache line as local_irq_count, it is cheap to access and is also used on UP | ||
11 | * for uniformity. | ||
12 | */ | ||
13 | typedef struct { | ||
14 | unsigned int __softirq_pending; /* set_bit is used on this */ | ||
15 | unsigned int __last_jiffy_stamp; | ||
16 | } ____cacheline_aligned irq_cpustat_t; | ||
17 | |||
18 | #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ | ||
19 | |||
20 | #define last_jiffy_stamp(cpu) __IRQ_STAT((cpu), __last_jiffy_stamp) | ||
21 | |||
22 | static inline void ack_bad_irq(int irq) | ||
23 | { | ||
24 | printk(KERN_CRIT "illegal vector %d received!\n", irq); | ||
25 | BUG(); | ||
26 | } | ||
27 | |||
28 | #endif /* __KERNEL__ */ | ||
29 | #endif /* _ASM_POWERPC_HARDIRQ_H */ | ||
diff --git a/arch/powerpc/include/asm/hw_irq.h b/arch/powerpc/include/asm/hw_irq.h index 8b505eaaa38a..e73d554538dd 100644 --- a/arch/powerpc/include/asm/hw_irq.h +++ b/arch/powerpc/include/asm/hw_irq.h | |||
@@ -49,8 +49,13 @@ extern void iseries_handle_interrupts(void); | |||
49 | #define raw_irqs_disabled() (local_get_flags() == 0) | 49 | #define raw_irqs_disabled() (local_get_flags() == 0) |
50 | #define raw_irqs_disabled_flags(flags) ((flags) == 0) | 50 | #define raw_irqs_disabled_flags(flags) ((flags) == 0) |
51 | 51 | ||
52 | #ifdef CONFIG_PPC_BOOK3E | ||
53 | #define __hard_irq_enable() __asm__ __volatile__("wrteei 1": : :"memory"); | ||
54 | #define __hard_irq_disable() __asm__ __volatile__("wrteei 0": : :"memory"); | ||
55 | #else | ||
52 | #define __hard_irq_enable() __mtmsrd(mfmsr() | MSR_EE, 1) | 56 | #define __hard_irq_enable() __mtmsrd(mfmsr() | MSR_EE, 1) |
53 | #define __hard_irq_disable() __mtmsrd(mfmsr() & ~MSR_EE, 1) | 57 | #define __hard_irq_disable() __mtmsrd(mfmsr() & ~MSR_EE, 1) |
58 | #endif | ||
54 | 59 | ||
55 | #define hard_irq_disable() \ | 60 | #define hard_irq_disable() \ |
56 | do { \ | 61 | do { \ |
diff --git a/arch/powerpc/include/asm/iommu.h b/arch/powerpc/include/asm/iommu.h index 7ead7c16fb7c..7464c0daddd1 100644 --- a/arch/powerpc/include/asm/iommu.h +++ b/arch/powerpc/include/asm/iommu.h | |||
@@ -35,16 +35,6 @@ | |||
35 | #define IOMMU_PAGE_MASK (~((1 << IOMMU_PAGE_SHIFT) - 1)) | 35 | #define IOMMU_PAGE_MASK (~((1 << IOMMU_PAGE_SHIFT) - 1)) |
36 | #define IOMMU_PAGE_ALIGN(addr) _ALIGN_UP(addr, IOMMU_PAGE_SIZE) | 36 | #define IOMMU_PAGE_ALIGN(addr) _ALIGN_UP(addr, IOMMU_PAGE_SIZE) |
37 | 37 | ||
38 | /* Cell page table entries */ | ||
39 | #define CBE_IOPTE_PP_W 0x8000000000000000ul /* protection: write */ | ||
40 | #define CBE_IOPTE_PP_R 0x4000000000000000ul /* protection: read */ | ||
41 | #define CBE_IOPTE_M 0x2000000000000000ul /* coherency required */ | ||
42 | #define CBE_IOPTE_SO_R 0x1000000000000000ul /* ordering: writes */ | ||
43 | #define CBE_IOPTE_SO_RW 0x1800000000000000ul /* ordering: r & w */ | ||
44 | #define CBE_IOPTE_RPN_Mask 0x07fffffffffff000ul /* RPN */ | ||
45 | #define CBE_IOPTE_H 0x0000000000000800ul /* cache hint */ | ||
46 | #define CBE_IOPTE_IOID_Mask 0x00000000000007fful /* ioid */ | ||
47 | |||
48 | /* Boot time flags */ | 38 | /* Boot time flags */ |
49 | extern int iommu_is_off; | 39 | extern int iommu_is_off; |
50 | extern int iommu_force_on; | 40 | extern int iommu_force_on; |
diff --git a/arch/powerpc/include/asm/irq.h b/arch/powerpc/include/asm/irq.h index 0a5137676e1b..bbcd1aaf3dfd 100644 --- a/arch/powerpc/include/asm/irq.h +++ b/arch/powerpc/include/asm/irq.h | |||
@@ -302,7 +302,8 @@ extern void irq_free_virt(unsigned int virq, unsigned int count); | |||
302 | 302 | ||
303 | /* -- OF helpers -- */ | 303 | /* -- OF helpers -- */ |
304 | 304 | ||
305 | /* irq_create_of_mapping - Map a hardware interrupt into linux virq space | 305 | /** |
306 | * irq_create_of_mapping - Map a hardware interrupt into linux virq space | ||
306 | * @controller: Device node of the interrupt controller | 307 | * @controller: Device node of the interrupt controller |
307 | * @inspec: Interrupt specifier from the device-tree | 308 | * @inspec: Interrupt specifier from the device-tree |
308 | * @intsize: Size of the interrupt specifier from the device-tree | 309 | * @intsize: Size of the interrupt specifier from the device-tree |
@@ -314,8 +315,8 @@ extern void irq_free_virt(unsigned int virq, unsigned int count); | |||
314 | extern unsigned int irq_create_of_mapping(struct device_node *controller, | 315 | extern unsigned int irq_create_of_mapping(struct device_node *controller, |
315 | u32 *intspec, unsigned int intsize); | 316 | u32 *intspec, unsigned int intsize); |
316 | 317 | ||
317 | 318 | /** | |
318 | /* irq_of_parse_and_map - Parse nad Map an interrupt into linux virq space | 319 | * irq_of_parse_and_map - Parse and Map an interrupt into linux virq space |
319 | * @device: Device node of the device whose interrupt is to be mapped | 320 | * @device: Device node of the device whose interrupt is to be mapped |
320 | * @index: Index of the interrupt to map | 321 | * @index: Index of the interrupt to map |
321 | * | 322 | * |
diff --git a/arch/powerpc/include/asm/machdep.h b/arch/powerpc/include/asm/machdep.h index 11d1fc3a8962..9efa2be78331 100644 --- a/arch/powerpc/include/asm/machdep.h +++ b/arch/powerpc/include/asm/machdep.h | |||
@@ -209,14 +209,14 @@ struct machdep_calls { | |||
209 | /* | 209 | /* |
210 | * optional PCI "hooks" | 210 | * optional PCI "hooks" |
211 | */ | 211 | */ |
212 | /* Called in indirect_* to avoid touching devices */ | ||
213 | int (*pci_exclude_device)(struct pci_controller *, unsigned char, unsigned char); | ||
214 | |||
215 | /* Called at then very end of pcibios_init() */ | 212 | /* Called at then very end of pcibios_init() */ |
216 | void (*pcibios_after_init)(void); | 213 | void (*pcibios_after_init)(void); |
217 | 214 | ||
218 | #endif /* CONFIG_PPC32 */ | 215 | #endif /* CONFIG_PPC32 */ |
219 | 216 | ||
217 | /* Called in indirect_* to avoid touching devices */ | ||
218 | int (*pci_exclude_device)(struct pci_controller *, unsigned char, unsigned char); | ||
219 | |||
220 | /* Called after PPC generic resource fixup to perform | 220 | /* Called after PPC generic resource fixup to perform |
221 | machine specific fixups */ | 221 | machine specific fixups */ |
222 | void (*pcibios_fixup_resources)(struct pci_dev *); | 222 | void (*pcibios_fixup_resources)(struct pci_dev *); |
diff --git a/arch/powerpc/include/asm/mmu-40x.h b/arch/powerpc/include/asm/mmu-40x.h index 776f415a36aa..34916865eaef 100644 --- a/arch/powerpc/include/asm/mmu-40x.h +++ b/arch/powerpc/include/asm/mmu-40x.h | |||
@@ -61,4 +61,7 @@ typedef struct { | |||
61 | 61 | ||
62 | #endif /* !__ASSEMBLY__ */ | 62 | #endif /* !__ASSEMBLY__ */ |
63 | 63 | ||
64 | #define mmu_virtual_psize MMU_PAGE_4K | ||
65 | #define mmu_linear_psize MMU_PAGE_256M | ||
66 | |||
64 | #endif /* _ASM_POWERPC_MMU_40X_H_ */ | 67 | #endif /* _ASM_POWERPC_MMU_40X_H_ */ |
diff --git a/arch/powerpc/include/asm/mmu-44x.h b/arch/powerpc/include/asm/mmu-44x.h index 3c86576bfefa..0372669383a8 100644 --- a/arch/powerpc/include/asm/mmu-44x.h +++ b/arch/powerpc/include/asm/mmu-44x.h | |||
@@ -79,16 +79,22 @@ typedef struct { | |||
79 | 79 | ||
80 | #if (PAGE_SHIFT == 12) | 80 | #if (PAGE_SHIFT == 12) |
81 | #define PPC44x_TLBE_SIZE PPC44x_TLB_4K | 81 | #define PPC44x_TLBE_SIZE PPC44x_TLB_4K |
82 | #define mmu_virtual_psize MMU_PAGE_4K | ||
82 | #elif (PAGE_SHIFT == 14) | 83 | #elif (PAGE_SHIFT == 14) |
83 | #define PPC44x_TLBE_SIZE PPC44x_TLB_16K | 84 | #define PPC44x_TLBE_SIZE PPC44x_TLB_16K |
85 | #define mmu_virtual_psize MMU_PAGE_16K | ||
84 | #elif (PAGE_SHIFT == 16) | 86 | #elif (PAGE_SHIFT == 16) |
85 | #define PPC44x_TLBE_SIZE PPC44x_TLB_64K | 87 | #define PPC44x_TLBE_SIZE PPC44x_TLB_64K |
88 | #define mmu_virtual_psize MMU_PAGE_64K | ||
86 | #elif (PAGE_SHIFT == 18) | 89 | #elif (PAGE_SHIFT == 18) |
87 | #define PPC44x_TLBE_SIZE PPC44x_TLB_256K | 90 | #define PPC44x_TLBE_SIZE PPC44x_TLB_256K |
91 | #define mmu_virtual_psize MMU_PAGE_256K | ||
88 | #else | 92 | #else |
89 | #error "Unsupported PAGE_SIZE" | 93 | #error "Unsupported PAGE_SIZE" |
90 | #endif | 94 | #endif |
91 | 95 | ||
96 | #define mmu_linear_psize MMU_PAGE_256M | ||
97 | |||
92 | #define PPC44x_PGD_OFF_SHIFT (32 - PGDIR_SHIFT + PGD_T_LOG2) | 98 | #define PPC44x_PGD_OFF_SHIFT (32 - PGDIR_SHIFT + PGD_T_LOG2) |
93 | #define PPC44x_PGD_OFF_MASK_BIT (PGDIR_SHIFT - PGD_T_LOG2) | 99 | #define PPC44x_PGD_OFF_MASK_BIT (PGDIR_SHIFT - PGD_T_LOG2) |
94 | #define PPC44x_PTE_ADD_SHIFT (32 - PGDIR_SHIFT + PTE_SHIFT + PTE_T_LOG2) | 100 | #define PPC44x_PTE_ADD_SHIFT (32 - PGDIR_SHIFT + PTE_SHIFT + PTE_T_LOG2) |
diff --git a/arch/powerpc/include/asm/mmu-8xx.h b/arch/powerpc/include/asm/mmu-8xx.h index 07865a357848..3d11d3ce79ec 100644 --- a/arch/powerpc/include/asm/mmu-8xx.h +++ b/arch/powerpc/include/asm/mmu-8xx.h | |||
@@ -143,4 +143,7 @@ typedef struct { | |||
143 | } mm_context_t; | 143 | } mm_context_t; |
144 | #endif /* !__ASSEMBLY__ */ | 144 | #endif /* !__ASSEMBLY__ */ |
145 | 145 | ||
146 | #define mmu_virtual_psize MMU_PAGE_4K | ||
147 | #define mmu_linear_psize MMU_PAGE_8M | ||
148 | |||
146 | #endif /* _ASM_POWERPC_MMU_8XX_H_ */ | 149 | #endif /* _ASM_POWERPC_MMU_8XX_H_ */ |
diff --git a/arch/powerpc/include/asm/mmu-book3e.h b/arch/powerpc/include/asm/mmu-book3e.h index 7e74cff81d86..74695816205c 100644 --- a/arch/powerpc/include/asm/mmu-book3e.h +++ b/arch/powerpc/include/asm/mmu-book3e.h | |||
@@ -38,58 +38,140 @@ | |||
38 | #define BOOK3E_PAGESZ_1TB 30 | 38 | #define BOOK3E_PAGESZ_1TB 30 |
39 | #define BOOK3E_PAGESZ_2TB 31 | 39 | #define BOOK3E_PAGESZ_2TB 31 |
40 | 40 | ||
41 | #define MAS0_TLBSEL(x) ((x << 28) & 0x30000000) | 41 | /* MAS registers bit definitions */ |
42 | #define MAS0_ESEL(x) ((x << 16) & 0x0FFF0000) | 42 | |
43 | #define MAS0_NV(x) ((x) & 0x00000FFF) | 43 | #define MAS0_TLBSEL(x) ((x << 28) & 0x30000000) |
44 | 44 | #define MAS0_ESEL(x) ((x << 16) & 0x0FFF0000) | |
45 | #define MAS1_VALID 0x80000000 | 45 | #define MAS0_NV(x) ((x) & 0x00000FFF) |
46 | #define MAS1_IPROT 0x40000000 | 46 | #define MAS0_HES 0x00004000 |
47 | #define MAS1_TID(x) ((x << 16) & 0x3FFF0000) | 47 | #define MAS0_WQ_ALLWAYS 0x00000000 |
48 | #define MAS1_IND 0x00002000 | 48 | #define MAS0_WQ_COND 0x00001000 |
49 | #define MAS1_TS 0x00001000 | 49 | #define MAS0_WQ_CLR_RSRV 0x00002000 |
50 | #define MAS1_TSIZE(x) ((x << 7) & 0x00000F80) | 50 | |
51 | 51 | #define MAS1_VALID 0x80000000 | |
52 | #define MAS2_EPN 0xFFFFF000 | 52 | #define MAS1_IPROT 0x40000000 |
53 | #define MAS2_X0 0x00000040 | 53 | #define MAS1_TID(x) ((x << 16) & 0x3FFF0000) |
54 | #define MAS2_X1 0x00000020 | 54 | #define MAS1_IND 0x00002000 |
55 | #define MAS2_W 0x00000010 | 55 | #define MAS1_TS 0x00001000 |
56 | #define MAS2_I 0x00000008 | 56 | #define MAS1_TSIZE_MASK 0x00000f80 |
57 | #define MAS2_M 0x00000004 | 57 | #define MAS1_TSIZE_SHIFT 7 |
58 | #define MAS2_G 0x00000002 | 58 | #define MAS1_TSIZE(x) ((x << MAS1_TSIZE_SHIFT) & MAS1_TSIZE_MASK) |
59 | #define MAS2_E 0x00000001 | 59 | |
60 | #define MAS2_EPN 0xFFFFF000 | ||
61 | #define MAS2_X0 0x00000040 | ||
62 | #define MAS2_X1 0x00000020 | ||
63 | #define MAS2_W 0x00000010 | ||
64 | #define MAS2_I 0x00000008 | ||
65 | #define MAS2_M 0x00000004 | ||
66 | #define MAS2_G 0x00000002 | ||
67 | #define MAS2_E 0x00000001 | ||
60 | #define MAS2_EPN_MASK(size) (~0 << (size + 10)) | 68 | #define MAS2_EPN_MASK(size) (~0 << (size + 10)) |
61 | #define MAS2_VAL(addr, size, flags) ((addr) & MAS2_EPN_MASK(size) | (flags)) | 69 | #define MAS2_VAL(addr, size, flags) ((addr) & MAS2_EPN_MASK(size) | (flags)) |
62 | 70 | ||
63 | #define MAS3_RPN 0xFFFFF000 | 71 | #define MAS3_RPN 0xFFFFF000 |
64 | #define MAS3_U0 0x00000200 | 72 | #define MAS3_U0 0x00000200 |
65 | #define MAS3_U1 0x00000100 | 73 | #define MAS3_U1 0x00000100 |
66 | #define MAS3_U2 0x00000080 | 74 | #define MAS3_U2 0x00000080 |
67 | #define MAS3_U3 0x00000040 | 75 | #define MAS3_U3 0x00000040 |
68 | #define MAS3_UX 0x00000020 | 76 | #define MAS3_UX 0x00000020 |
69 | #define MAS3_SX 0x00000010 | 77 | #define MAS3_SX 0x00000010 |
70 | #define MAS3_UW 0x00000008 | 78 | #define MAS3_UW 0x00000008 |
71 | #define MAS3_SW 0x00000004 | 79 | #define MAS3_SW 0x00000004 |
72 | #define MAS3_UR 0x00000002 | 80 | #define MAS3_UR 0x00000002 |
73 | #define MAS3_SR 0x00000001 | 81 | #define MAS3_SR 0x00000001 |
74 | 82 | #define MAS3_SPSIZE 0x0000003e | |
75 | #define MAS4_TLBSELD(x) MAS0_TLBSEL(x) | 83 | #define MAS3_SPSIZE_SHIFT 1 |
76 | #define MAS4_INDD 0x00008000 | 84 | |
77 | #define MAS4_TSIZED(x) MAS1_TSIZE(x) | 85 | #define MAS4_TLBSELD(x) MAS0_TLBSEL(x) |
78 | #define MAS4_X0D 0x00000040 | 86 | #define MAS4_INDD 0x00008000 /* Default IND */ |
79 | #define MAS4_X1D 0x00000020 | 87 | #define MAS4_TSIZED(x) MAS1_TSIZE(x) |
80 | #define MAS4_WD 0x00000010 | 88 | #define MAS4_X0D 0x00000040 |
81 | #define MAS4_ID 0x00000008 | 89 | #define MAS4_X1D 0x00000020 |
82 | #define MAS4_MD 0x00000004 | 90 | #define MAS4_WD 0x00000010 |
83 | #define MAS4_GD 0x00000002 | 91 | #define MAS4_ID 0x00000008 |
84 | #define MAS4_ED 0x00000001 | 92 | #define MAS4_MD 0x00000004 |
85 | 93 | #define MAS4_GD 0x00000002 | |
86 | #define MAS6_SPID0 0x3FFF0000 | 94 | #define MAS4_ED 0x00000001 |
87 | #define MAS6_SPID1 0x00007FFE | 95 | #define MAS4_WIMGED_MASK 0x0000001f /* Default WIMGE */ |
88 | #define MAS6_ISIZE(x) MAS1_TSIZE(x) | 96 | #define MAS4_WIMGED_SHIFT 0 |
89 | #define MAS6_SAS 0x00000001 | 97 | #define MAS4_VLED MAS4_X1D /* Default VLE */ |
90 | #define MAS6_SPID MAS6_SPID0 | 98 | #define MAS4_ACMD 0x000000c0 /* Default ACM */ |
91 | 99 | #define MAS4_ACMD_SHIFT 6 | |
92 | #define MAS7_RPN 0xFFFFFFFF | 100 | #define MAS4_TSIZED_MASK 0x00000f80 /* Default TSIZE */ |
101 | #define MAS4_TSIZED_SHIFT 7 | ||
102 | |||
103 | #define MAS6_SPID0 0x3FFF0000 | ||
104 | #define MAS6_SPID1 0x00007FFE | ||
105 | #define MAS6_ISIZE(x) MAS1_TSIZE(x) | ||
106 | #define MAS6_SAS 0x00000001 | ||
107 | #define MAS6_SPID MAS6_SPID0 | ||
108 | #define MAS6_SIND 0x00000002 /* Indirect page */ | ||
109 | #define MAS6_SIND_SHIFT 1 | ||
110 | #define MAS6_SPID_MASK 0x3fff0000 | ||
111 | #define MAS6_SPID_SHIFT 16 | ||
112 | #define MAS6_ISIZE_MASK 0x00000f80 | ||
113 | #define MAS6_ISIZE_SHIFT 7 | ||
114 | |||
115 | #define MAS7_RPN 0xFFFFFFFF | ||
116 | |||
117 | /* Bit definitions for MMUCSR0 */ | ||
118 | #define MMUCSR0_TLB1FI 0x00000002 /* TLB1 Flash invalidate */ | ||
119 | #define MMUCSR0_TLB0FI 0x00000004 /* TLB0 Flash invalidate */ | ||
120 | #define MMUCSR0_TLB2FI 0x00000040 /* TLB2 Flash invalidate */ | ||
121 | #define MMUCSR0_TLB3FI 0x00000020 /* TLB3 Flash invalidate */ | ||
122 | #define MMUCSR0_TLBFI (MMUCSR0_TLB0FI | MMUCSR0_TLB1FI | \ | ||
123 | MMUCSR0_TLB2FI | MMUCSR0_TLB3FI) | ||
124 | #define MMUCSR0_TLB0PS 0x00000780 /* TLB0 Page Size */ | ||
125 | #define MMUCSR0_TLB1PS 0x00007800 /* TLB1 Page Size */ | ||
126 | #define MMUCSR0_TLB2PS 0x00078000 /* TLB2 Page Size */ | ||
127 | #define MMUCSR0_TLB3PS 0x00780000 /* TLB3 Page Size */ | ||
128 | |||
129 | /* TLBnCFG encoding */ | ||
130 | #define TLBnCFG_N_ENTRY 0x00000fff /* number of entries */ | ||
131 | #define TLBnCFG_HES 0x00002000 /* HW select supported */ | ||
132 | #define TLBnCFG_IPROT 0x00008000 /* IPROT supported */ | ||
133 | #define TLBnCFG_GTWE 0x00010000 /* Guest can write */ | ||
134 | #define TLBnCFG_IND 0x00020000 /* IND entries supported */ | ||
135 | #define TLBnCFG_PT 0x00040000 /* Can load from page table */ | ||
136 | #define TLBnCFG_ASSOC 0xff000000 /* Associativity */ | ||
137 | |||
138 | /* TLBnPS encoding */ | ||
139 | #define TLBnPS_4K 0x00000004 | ||
140 | #define TLBnPS_8K 0x00000008 | ||
141 | #define TLBnPS_16K 0x00000010 | ||
142 | #define TLBnPS_32K 0x00000020 | ||
143 | #define TLBnPS_64K 0x00000040 | ||
144 | #define TLBnPS_128K 0x00000080 | ||
145 | #define TLBnPS_256K 0x00000100 | ||
146 | #define TLBnPS_512K 0x00000200 | ||
147 | #define TLBnPS_1M 0x00000400 | ||
148 | #define TLBnPS_2M 0x00000800 | ||
149 | #define TLBnPS_4M 0x00001000 | ||
150 | #define TLBnPS_8M 0x00002000 | ||
151 | #define TLBnPS_16M 0x00004000 | ||
152 | #define TLBnPS_32M 0x00008000 | ||
153 | #define TLBnPS_64M 0x00010000 | ||
154 | #define TLBnPS_128M 0x00020000 | ||
155 | #define TLBnPS_256M 0x00040000 | ||
156 | #define TLBnPS_512M 0x00080000 | ||
157 | #define TLBnPS_1G 0x00100000 | ||
158 | #define TLBnPS_2G 0x00200000 | ||
159 | #define TLBnPS_4G 0x00400000 | ||
160 | #define TLBnPS_8G 0x00800000 | ||
161 | #define TLBnPS_16G 0x01000000 | ||
162 | #define TLBnPS_32G 0x02000000 | ||
163 | #define TLBnPS_64G 0x04000000 | ||
164 | #define TLBnPS_128G 0x08000000 | ||
165 | #define TLBnPS_256G 0x10000000 | ||
166 | |||
167 | /* tlbilx action encoding */ | ||
168 | #define TLBILX_T_ALL 0 | ||
169 | #define TLBILX_T_TID 1 | ||
170 | #define TLBILX_T_FULLMATCH 3 | ||
171 | #define TLBILX_T_CLASS0 4 | ||
172 | #define TLBILX_T_CLASS1 5 | ||
173 | #define TLBILX_T_CLASS2 6 | ||
174 | #define TLBILX_T_CLASS3 7 | ||
93 | 175 | ||
94 | #ifndef __ASSEMBLY__ | 176 | #ifndef __ASSEMBLY__ |
95 | 177 | ||
@@ -100,6 +182,34 @@ typedef struct { | |||
100 | unsigned int active; | 182 | unsigned int active; |
101 | unsigned long vdso_base; | 183 | unsigned long vdso_base; |
102 | } mm_context_t; | 184 | } mm_context_t; |
185 | |||
186 | /* Page size definitions, common between 32 and 64-bit | ||
187 | * | ||
188 | * shift : is the "PAGE_SHIFT" value for that page size | ||
189 | * penc : is the pte encoding mask | ||
190 | * | ||
191 | */ | ||
192 | struct mmu_psize_def | ||
193 | { | ||
194 | unsigned int shift; /* number of bits */ | ||
195 | unsigned int enc; /* PTE encoding */ | ||
196 | }; | ||
197 | extern struct mmu_psize_def mmu_psize_defs[MMU_PAGE_COUNT]; | ||
198 | |||
199 | /* The page sizes use the same names as 64-bit hash but are | ||
200 | * constants | ||
201 | */ | ||
202 | #if defined(CONFIG_PPC_4K_PAGES) | ||
203 | #define mmu_virtual_psize MMU_PAGE_4K | ||
204 | #elif defined(CONFIG_PPC_64K_PAGES) | ||
205 | #define mmu_virtual_psize MMU_PAGE_64K | ||
206 | #else | ||
207 | #error Unsupported page size | ||
208 | #endif | ||
209 | |||
210 | extern int mmu_linear_psize; | ||
211 | extern int mmu_vmemmap_psize; | ||
212 | |||
103 | #endif /* !__ASSEMBLY__ */ | 213 | #endif /* !__ASSEMBLY__ */ |
104 | 214 | ||
105 | #endif /* _ASM_POWERPC_MMU_BOOK3E_H_ */ | 215 | #endif /* _ASM_POWERPC_MMU_BOOK3E_H_ */ |
diff --git a/arch/powerpc/include/asm/mmu-hash32.h b/arch/powerpc/include/asm/mmu-hash32.h index 16b1a1e77e64..16f513e5cbd7 100644 --- a/arch/powerpc/include/asm/mmu-hash32.h +++ b/arch/powerpc/include/asm/mmu-hash32.h | |||
@@ -55,21 +55,25 @@ struct ppc_bat { | |||
55 | 55 | ||
56 | #ifndef __ASSEMBLY__ | 56 | #ifndef __ASSEMBLY__ |
57 | 57 | ||
58 | /* Hardware Page Table Entry */ | 58 | /* |
59 | * Hardware Page Table Entry | ||
60 | * Note that the xpn and x bitfields are used only by processors that | ||
61 | * support extended addressing; otherwise, those bits are reserved. | ||
62 | */ | ||
59 | struct hash_pte { | 63 | struct hash_pte { |
60 | unsigned long v:1; /* Entry is valid */ | 64 | unsigned long v:1; /* Entry is valid */ |
61 | unsigned long vsid:24; /* Virtual segment identifier */ | 65 | unsigned long vsid:24; /* Virtual segment identifier */ |
62 | unsigned long h:1; /* Hash algorithm indicator */ | 66 | unsigned long h:1; /* Hash algorithm indicator */ |
63 | unsigned long api:6; /* Abbreviated page index */ | 67 | unsigned long api:6; /* Abbreviated page index */ |
64 | unsigned long rpn:20; /* Real (physical) page number */ | 68 | unsigned long rpn:20; /* Real (physical) page number */ |
65 | unsigned long :3; /* Unused */ | 69 | unsigned long xpn:3; /* Real page number bits 0-2, optional */ |
66 | unsigned long r:1; /* Referenced */ | 70 | unsigned long r:1; /* Referenced */ |
67 | unsigned long c:1; /* Changed */ | 71 | unsigned long c:1; /* Changed */ |
68 | unsigned long w:1; /* Write-thru cache mode */ | 72 | unsigned long w:1; /* Write-thru cache mode */ |
69 | unsigned long i:1; /* Cache inhibited */ | 73 | unsigned long i:1; /* Cache inhibited */ |
70 | unsigned long m:1; /* Memory coherence */ | 74 | unsigned long m:1; /* Memory coherence */ |
71 | unsigned long g:1; /* Guarded */ | 75 | unsigned long g:1; /* Guarded */ |
72 | unsigned long :1; /* Unused */ | 76 | unsigned long x:1; /* Real page number bit 3, optional */ |
73 | unsigned long pp:2; /* Page protection */ | 77 | unsigned long pp:2; /* Page protection */ |
74 | }; | 78 | }; |
75 | 79 | ||
@@ -80,4 +84,10 @@ typedef struct { | |||
80 | 84 | ||
81 | #endif /* !__ASSEMBLY__ */ | 85 | #endif /* !__ASSEMBLY__ */ |
82 | 86 | ||
87 | /* We happily ignore the smaller BATs on 601, we don't actually use | ||
88 | * those definitions on hash32 at the moment anyway | ||
89 | */ | ||
90 | #define mmu_virtual_psize MMU_PAGE_4K | ||
91 | #define mmu_linear_psize MMU_PAGE_256M | ||
92 | |||
83 | #endif /* _ASM_POWERPC_MMU_HASH32_H_ */ | 93 | #endif /* _ASM_POWERPC_MMU_HASH32_H_ */ |
diff --git a/arch/powerpc/include/asm/mmu-hash64.h b/arch/powerpc/include/asm/mmu-hash64.h index 98c104a09961..bebe31c2e907 100644 --- a/arch/powerpc/include/asm/mmu-hash64.h +++ b/arch/powerpc/include/asm/mmu-hash64.h | |||
@@ -41,6 +41,7 @@ extern char initial_stab[]; | |||
41 | 41 | ||
42 | #define SLB_NUM_BOLTED 3 | 42 | #define SLB_NUM_BOLTED 3 |
43 | #define SLB_CACHE_ENTRIES 8 | 43 | #define SLB_CACHE_ENTRIES 8 |
44 | #define SLB_MIN_SIZE 32 | ||
44 | 45 | ||
45 | /* Bits in the SLB ESID word */ | 46 | /* Bits in the SLB ESID word */ |
46 | #define SLB_ESID_V ASM_CONST(0x0000000008000000) /* valid */ | 47 | #define SLB_ESID_V ASM_CONST(0x0000000008000000) /* valid */ |
@@ -139,26 +140,6 @@ struct mmu_psize_def | |||
139 | #endif /* __ASSEMBLY__ */ | 140 | #endif /* __ASSEMBLY__ */ |
140 | 141 | ||
141 | /* | 142 | /* |
142 | * The kernel use the constants below to index in the page sizes array. | ||
143 | * The use of fixed constants for this purpose is better for performances | ||
144 | * of the low level hash refill handlers. | ||
145 | * | ||
146 | * A non supported page size has a "shift" field set to 0 | ||
147 | * | ||
148 | * Any new page size being implemented can get a new entry in here. Whether | ||
149 | * the kernel will use it or not is a different matter though. The actual page | ||
150 | * size used by hugetlbfs is not defined here and may be made variable | ||
151 | */ | ||
152 | |||
153 | #define MMU_PAGE_4K 0 /* 4K */ | ||
154 | #define MMU_PAGE_64K 1 /* 64K */ | ||
155 | #define MMU_PAGE_64K_AP 2 /* 64K Admixed (in a 4K segment) */ | ||
156 | #define MMU_PAGE_1M 3 /* 1M */ | ||
157 | #define MMU_PAGE_16M 4 /* 16M */ | ||
158 | #define MMU_PAGE_16G 5 /* 16G */ | ||
159 | #define MMU_PAGE_COUNT 6 | ||
160 | |||
161 | /* | ||
162 | * Segment sizes. | 143 | * Segment sizes. |
163 | * These are the values used by hardware in the B field of | 144 | * These are the values used by hardware in the B field of |
164 | * SLB entries and the first dword of MMU hashtable entries. | 145 | * SLB entries and the first dword of MMU hashtable entries. |
@@ -296,6 +277,7 @@ extern void slb_flush_and_rebolt(void); | |||
296 | extern void stab_initialize(unsigned long stab); | 277 | extern void stab_initialize(unsigned long stab); |
297 | 278 | ||
298 | extern void slb_vmalloc_update(void); | 279 | extern void slb_vmalloc_update(void); |
280 | extern void slb_set_size(u16 size); | ||
299 | #endif /* __ASSEMBLY__ */ | 281 | #endif /* __ASSEMBLY__ */ |
300 | 282 | ||
301 | /* | 283 | /* |
diff --git a/arch/powerpc/include/asm/mmu.h b/arch/powerpc/include/asm/mmu.h index fb57ded592f9..7ffbb65ff7a9 100644 --- a/arch/powerpc/include/asm/mmu.h +++ b/arch/powerpc/include/asm/mmu.h | |||
@@ -17,6 +17,7 @@ | |||
17 | #define MMU_FTR_TYPE_40x ASM_CONST(0x00000004) | 17 | #define MMU_FTR_TYPE_40x ASM_CONST(0x00000004) |
18 | #define MMU_FTR_TYPE_44x ASM_CONST(0x00000008) | 18 | #define MMU_FTR_TYPE_44x ASM_CONST(0x00000008) |
19 | #define MMU_FTR_TYPE_FSL_E ASM_CONST(0x00000010) | 19 | #define MMU_FTR_TYPE_FSL_E ASM_CONST(0x00000010) |
20 | #define MMU_FTR_TYPE_3E ASM_CONST(0x00000020) | ||
20 | 21 | ||
21 | /* | 22 | /* |
22 | * This is individual features | 23 | * This is individual features |
@@ -57,6 +58,15 @@ | |||
57 | */ | 58 | */ |
58 | #define MMU_FTR_TLBIE_206 ASM_CONST(0x00400000) | 59 | #define MMU_FTR_TLBIE_206 ASM_CONST(0x00400000) |
59 | 60 | ||
61 | /* Enable use of TLB reservation. Processor should support tlbsrx. | ||
62 | * instruction and MAS0[WQ]. | ||
63 | */ | ||
64 | #define MMU_FTR_USE_TLBRSRV ASM_CONST(0x00800000) | ||
65 | |||
66 | /* Use paired MAS registers (MAS7||MAS3, etc.) | ||
67 | */ | ||
68 | #define MMU_FTR_USE_PAIRED_MAS ASM_CONST(0x01000000) | ||
69 | |||
60 | #ifndef __ASSEMBLY__ | 70 | #ifndef __ASSEMBLY__ |
61 | #include <asm/cputable.h> | 71 | #include <asm/cputable.h> |
62 | 72 | ||
@@ -73,6 +83,41 @@ extern void early_init_mmu_secondary(void); | |||
73 | 83 | ||
74 | #endif /* !__ASSEMBLY__ */ | 84 | #endif /* !__ASSEMBLY__ */ |
75 | 85 | ||
86 | /* The kernel use the constants below to index in the page sizes array. | ||
87 | * The use of fixed constants for this purpose is better for performances | ||
88 | * of the low level hash refill handlers. | ||
89 | * | ||
90 | * A non supported page size has a "shift" field set to 0 | ||
91 | * | ||
92 | * Any new page size being implemented can get a new entry in here. Whether | ||
93 | * the kernel will use it or not is a different matter though. The actual page | ||
94 | * size used by hugetlbfs is not defined here and may be made variable | ||
95 | * | ||
96 | * Note: This array ended up being a false good idea as it's growing to the | ||
97 | * point where I wonder if we should replace it with something different, | ||
98 | * to think about, feedback welcome. --BenH. | ||
99 | */ | ||
100 | |||
101 | /* There are #define as they have to be used in assembly | ||
102 | * | ||
103 | * WARNING: If you change this list, make sure to update the array of | ||
104 | * names currently in arch/powerpc/mm/hugetlbpage.c or bad things will | ||
105 | * happen | ||
106 | */ | ||
107 | #define MMU_PAGE_4K 0 | ||
108 | #define MMU_PAGE_16K 1 | ||
109 | #define MMU_PAGE_64K 2 | ||
110 | #define MMU_PAGE_64K_AP 3 /* "Admixed pages" (hash64 only) */ | ||
111 | #define MMU_PAGE_256K 4 | ||
112 | #define MMU_PAGE_1M 5 | ||
113 | #define MMU_PAGE_8M 6 | ||
114 | #define MMU_PAGE_16M 7 | ||
115 | #define MMU_PAGE_256M 8 | ||
116 | #define MMU_PAGE_1G 9 | ||
117 | #define MMU_PAGE_16G 10 | ||
118 | #define MMU_PAGE_64G 11 | ||
119 | #define MMU_PAGE_COUNT 12 | ||
120 | |||
76 | 121 | ||
77 | #if defined(CONFIG_PPC_STD_MMU_64) | 122 | #if defined(CONFIG_PPC_STD_MMU_64) |
78 | /* 64-bit classic hash table MMU */ | 123 | /* 64-bit classic hash table MMU */ |
@@ -94,5 +139,6 @@ extern void early_init_mmu_secondary(void); | |||
94 | # include <asm/mmu-8xx.h> | 139 | # include <asm/mmu-8xx.h> |
95 | #endif | 140 | #endif |
96 | 141 | ||
142 | |||
97 | #endif /* __KERNEL__ */ | 143 | #endif /* __KERNEL__ */ |
98 | #endif /* _ASM_POWERPC_MMU_H_ */ | 144 | #endif /* _ASM_POWERPC_MMU_H_ */ |
diff --git a/arch/powerpc/include/asm/mmu_context.h b/arch/powerpc/include/asm/mmu_context.h index b7063669f972..b34e94d94435 100644 --- a/arch/powerpc/include/asm/mmu_context.h +++ b/arch/powerpc/include/asm/mmu_context.h | |||
@@ -14,7 +14,6 @@ | |||
14 | /* | 14 | /* |
15 | * Most if the context management is out of line | 15 | * Most if the context management is out of line |
16 | */ | 16 | */ |
17 | extern void mmu_context_init(void); | ||
18 | extern int init_new_context(struct task_struct *tsk, struct mm_struct *mm); | 17 | extern int init_new_context(struct task_struct *tsk, struct mm_struct *mm); |
19 | extern void destroy_context(struct mm_struct *mm); | 18 | extern void destroy_context(struct mm_struct *mm); |
20 | 19 | ||
@@ -23,6 +22,12 @@ extern void switch_stab(struct task_struct *tsk, struct mm_struct *mm); | |||
23 | extern void switch_slb(struct task_struct *tsk, struct mm_struct *mm); | 22 | extern void switch_slb(struct task_struct *tsk, struct mm_struct *mm); |
24 | extern void set_context(unsigned long id, pgd_t *pgd); | 23 | extern void set_context(unsigned long id, pgd_t *pgd); |
25 | 24 | ||
25 | #ifdef CONFIG_PPC_BOOK3S_64 | ||
26 | static inline void mmu_context_init(void) { } | ||
27 | #else | ||
28 | extern void mmu_context_init(void); | ||
29 | #endif | ||
30 | |||
26 | /* | 31 | /* |
27 | * switch_mm is the entry point called from the architecture independent | 32 | * switch_mm is the entry point called from the architecture independent |
28 | * code in kernel/sched.c | 33 | * code in kernel/sched.c |
@@ -38,6 +43,10 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, | |||
38 | tsk->thread.pgdir = next->pgd; | 43 | tsk->thread.pgdir = next->pgd; |
39 | #endif /* CONFIG_PPC32 */ | 44 | #endif /* CONFIG_PPC32 */ |
40 | 45 | ||
46 | /* 64-bit Book3E keeps track of current PGD in the PACA */ | ||
47 | #ifdef CONFIG_PPC_BOOK3E_64 | ||
48 | get_paca()->pgd = next->pgd; | ||
49 | #endif | ||
41 | /* Nothing else to do if we aren't actually switching */ | 50 | /* Nothing else to do if we aren't actually switching */ |
42 | if (prev == next) | 51 | if (prev == next) |
43 | return; | 52 | return; |
@@ -84,6 +93,10 @@ static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next) | |||
84 | static inline void enter_lazy_tlb(struct mm_struct *mm, | 93 | static inline void enter_lazy_tlb(struct mm_struct *mm, |
85 | struct task_struct *tsk) | 94 | struct task_struct *tsk) |
86 | { | 95 | { |
96 | /* 64-bit Book3E keeps track of current PGD in the PACA */ | ||
97 | #ifdef CONFIG_PPC_BOOK3E_64 | ||
98 | get_paca()->pgd = NULL; | ||
99 | #endif | ||
87 | } | 100 | } |
88 | 101 | ||
89 | #endif /* __KERNEL__ */ | 102 | #endif /* __KERNEL__ */ |
diff --git a/arch/powerpc/include/asm/nvram.h b/arch/powerpc/include/asm/nvram.h index efde5ac82f7b..6c587eddee59 100644 --- a/arch/powerpc/include/asm/nvram.h +++ b/arch/powerpc/include/asm/nvram.h | |||
@@ -107,6 +107,9 @@ extern void pmac_xpram_write(int xpaddr, u8 data); | |||
107 | /* Synchronize NVRAM */ | 107 | /* Synchronize NVRAM */ |
108 | extern void nvram_sync(void); | 108 | extern void nvram_sync(void); |
109 | 109 | ||
110 | /* Determine NVRAM size */ | ||
111 | extern ssize_t nvram_get_size(void); | ||
112 | |||
110 | /* Normal access to NVRAM */ | 113 | /* Normal access to NVRAM */ |
111 | extern unsigned char nvram_read_byte(int i); | 114 | extern unsigned char nvram_read_byte(int i); |
112 | extern void nvram_write_byte(unsigned char c, int i); | 115 | extern void nvram_write_byte(unsigned char c, int i); |
diff --git a/arch/powerpc/include/asm/paca.h b/arch/powerpc/include/asm/paca.h index c8a3cbfe02ff..b634456ea893 100644 --- a/arch/powerpc/include/asm/paca.h +++ b/arch/powerpc/include/asm/paca.h | |||
@@ -14,9 +14,11 @@ | |||
14 | #define _ASM_POWERPC_PACA_H | 14 | #define _ASM_POWERPC_PACA_H |
15 | #ifdef __KERNEL__ | 15 | #ifdef __KERNEL__ |
16 | 16 | ||
17 | #include <asm/types.h> | 17 | #include <asm/types.h> |
18 | #include <asm/lppaca.h> | 18 | #include <asm/lppaca.h> |
19 | #include <asm/mmu.h> | 19 | #include <asm/mmu.h> |
20 | #include <asm/page.h> | ||
21 | #include <asm/exception-64e.h> | ||
20 | 22 | ||
21 | register struct paca_struct *local_paca asm("r13"); | 23 | register struct paca_struct *local_paca asm("r13"); |
22 | 24 | ||
@@ -91,6 +93,21 @@ struct paca_struct { | |||
91 | u16 slb_cache[SLB_CACHE_ENTRIES]; | 93 | u16 slb_cache[SLB_CACHE_ENTRIES]; |
92 | #endif /* CONFIG_PPC_STD_MMU_64 */ | 94 | #endif /* CONFIG_PPC_STD_MMU_64 */ |
93 | 95 | ||
96 | #ifdef CONFIG_PPC_BOOK3E | ||
97 | pgd_t *pgd; /* Current PGD */ | ||
98 | pgd_t *kernel_pgd; /* Kernel PGD */ | ||
99 | u64 exgen[8] __attribute__((aligned(0x80))); | ||
100 | u64 extlb[EX_TLB_SIZE*3] __attribute__((aligned(0x80))); | ||
101 | u64 exmc[8]; /* used for machine checks */ | ||
102 | u64 excrit[8]; /* used for crit interrupts */ | ||
103 | u64 exdbg[8]; /* used for debug interrupts */ | ||
104 | |||
105 | /* Kernel stack pointers for use by special exceptions */ | ||
106 | void *mc_kstack; | ||
107 | void *crit_kstack; | ||
108 | void *dbg_kstack; | ||
109 | #endif /* CONFIG_PPC_BOOK3E */ | ||
110 | |||
94 | mm_context_t context; | 111 | mm_context_t context; |
95 | 112 | ||
96 | /* | 113 | /* |
diff --git a/arch/powerpc/include/asm/page.h b/arch/powerpc/include/asm/page.h index 4940662ee87e..ff24254990e1 100644 --- a/arch/powerpc/include/asm/page.h +++ b/arch/powerpc/include/asm/page.h | |||
@@ -139,7 +139,11 @@ extern phys_addr_t kernstart_addr; | |||
139 | * Don't compare things with KERNELBASE or PAGE_OFFSET to test for | 139 | * Don't compare things with KERNELBASE or PAGE_OFFSET to test for |
140 | * "kernelness", use is_kernel_addr() - it should do what you want. | 140 | * "kernelness", use is_kernel_addr() - it should do what you want. |
141 | */ | 141 | */ |
142 | #ifdef CONFIG_PPC_BOOK3E_64 | ||
143 | #define is_kernel_addr(x) ((x) >= 0x8000000000000000ul) | ||
144 | #else | ||
142 | #define is_kernel_addr(x) ((x) >= PAGE_OFFSET) | 145 | #define is_kernel_addr(x) ((x) >= PAGE_OFFSET) |
146 | #endif | ||
143 | 147 | ||
144 | #ifndef __ASSEMBLY__ | 148 | #ifndef __ASSEMBLY__ |
145 | 149 | ||
diff --git a/arch/powerpc/include/asm/page_64.h b/arch/powerpc/include/asm/page_64.h index 5817a3b747e5..3f17b83f55a1 100644 --- a/arch/powerpc/include/asm/page_64.h +++ b/arch/powerpc/include/asm/page_64.h | |||
@@ -135,12 +135,22 @@ extern void slice_set_range_psize(struct mm_struct *mm, unsigned long start, | |||
135 | #endif /* __ASSEMBLY__ */ | 135 | #endif /* __ASSEMBLY__ */ |
136 | #else | 136 | #else |
137 | #define slice_init() | 137 | #define slice_init() |
138 | #ifdef CONFIG_PPC_STD_MMU_64 | ||
138 | #define get_slice_psize(mm, addr) ((mm)->context.user_psize) | 139 | #define get_slice_psize(mm, addr) ((mm)->context.user_psize) |
139 | #define slice_set_user_psize(mm, psize) \ | 140 | #define slice_set_user_psize(mm, psize) \ |
140 | do { \ | 141 | do { \ |
141 | (mm)->context.user_psize = (psize); \ | 142 | (mm)->context.user_psize = (psize); \ |
142 | (mm)->context.sllp = SLB_VSID_USER | mmu_psize_defs[(psize)].sllp; \ | 143 | (mm)->context.sllp = SLB_VSID_USER | mmu_psize_defs[(psize)].sllp; \ |
143 | } while (0) | 144 | } while (0) |
145 | #else /* CONFIG_PPC_STD_MMU_64 */ | ||
146 | #ifdef CONFIG_PPC_64K_PAGES | ||
147 | #define get_slice_psize(mm, addr) MMU_PAGE_64K | ||
148 | #else /* CONFIG_PPC_64K_PAGES */ | ||
149 | #define get_slice_psize(mm, addr) MMU_PAGE_4K | ||
150 | #endif /* !CONFIG_PPC_64K_PAGES */ | ||
151 | #define slice_set_user_psize(mm, psize) do { BUG(); } while(0) | ||
152 | #endif /* !CONFIG_PPC_STD_MMU_64 */ | ||
153 | |||
144 | #define slice_set_range_psize(mm, start, len, psize) \ | 154 | #define slice_set_range_psize(mm, start, len, psize) \ |
145 | slice_set_user_psize((mm), (psize)) | 155 | slice_set_user_psize((mm), (psize)) |
146 | #define slice_mm_new_context(mm) 1 | 156 | #define slice_mm_new_context(mm) 1 |
diff --git a/arch/powerpc/include/asm/pci-bridge.h b/arch/powerpc/include/asm/pci-bridge.h index 4c61fa0b8d75..76e1f313a58e 100644 --- a/arch/powerpc/include/asm/pci-bridge.h +++ b/arch/powerpc/include/asm/pci-bridge.h | |||
@@ -77,9 +77,7 @@ struct pci_controller { | |||
77 | 77 | ||
78 | int first_busno; | 78 | int first_busno; |
79 | int last_busno; | 79 | int last_busno; |
80 | #ifndef CONFIG_PPC64 | ||
81 | int self_busno; | 80 | int self_busno; |
82 | #endif | ||
83 | 81 | ||
84 | void __iomem *io_base_virt; | 82 | void __iomem *io_base_virt; |
85 | #ifdef CONFIG_PPC64 | 83 | #ifdef CONFIG_PPC64 |
@@ -104,7 +102,6 @@ struct pci_controller { | |||
104 | unsigned int __iomem *cfg_addr; | 102 | unsigned int __iomem *cfg_addr; |
105 | void __iomem *cfg_data; | 103 | void __iomem *cfg_data; |
106 | 104 | ||
107 | #ifndef CONFIG_PPC64 | ||
108 | /* | 105 | /* |
109 | * Used for variants of PCI indirect handling and possible quirks: | 106 | * Used for variants of PCI indirect handling and possible quirks: |
110 | * SET_CFG_TYPE - used on 4xx or any PHB that does explicit type0/1 | 107 | * SET_CFG_TYPE - used on 4xx or any PHB that does explicit type0/1 |
@@ -128,7 +125,6 @@ struct pci_controller { | |||
128 | #define PPC_INDIRECT_TYPE_BIG_ENDIAN 0x00000010 | 125 | #define PPC_INDIRECT_TYPE_BIG_ENDIAN 0x00000010 |
129 | #define PPC_INDIRECT_TYPE_BROKEN_MRM 0x00000020 | 126 | #define PPC_INDIRECT_TYPE_BROKEN_MRM 0x00000020 |
130 | u32 indirect_type; | 127 | u32 indirect_type; |
131 | #endif /* !CONFIG_PPC64 */ | ||
132 | /* Currently, we limit ourselves to 1 IO range and 3 mem | 128 | /* Currently, we limit ourselves to 1 IO range and 3 mem |
133 | * ranges since the common pci_bus structure can't handle more | 129 | * ranges since the common pci_bus structure can't handle more |
134 | */ | 130 | */ |
@@ -146,21 +142,6 @@ struct pci_controller { | |||
146 | #endif /* CONFIG_PPC64 */ | 142 | #endif /* CONFIG_PPC64 */ |
147 | }; | 143 | }; |
148 | 144 | ||
149 | #ifndef CONFIG_PPC64 | ||
150 | |||
151 | static inline struct pci_controller *pci_bus_to_host(const struct pci_bus *bus) | ||
152 | { | ||
153 | return bus->sysdata; | ||
154 | } | ||
155 | |||
156 | static inline int isa_vaddr_is_ioport(void __iomem *address) | ||
157 | { | ||
158 | /* No specific ISA handling on ppc32 at this stage, it | ||
159 | * all goes through PCI | ||
160 | */ | ||
161 | return 0; | ||
162 | } | ||
163 | |||
164 | /* These are used for config access before all the PCI probing | 145 | /* These are used for config access before all the PCI probing |
165 | has been done. */ | 146 | has been done. */ |
166 | extern int early_read_config_byte(struct pci_controller *hose, int bus, | 147 | extern int early_read_config_byte(struct pci_controller *hose, int bus, |
@@ -182,6 +163,22 @@ extern int early_find_capability(struct pci_controller *hose, int bus, | |||
182 | extern void setup_indirect_pci(struct pci_controller* hose, | 163 | extern void setup_indirect_pci(struct pci_controller* hose, |
183 | resource_size_t cfg_addr, | 164 | resource_size_t cfg_addr, |
184 | resource_size_t cfg_data, u32 flags); | 165 | resource_size_t cfg_data, u32 flags); |
166 | |||
167 | #ifndef CONFIG_PPC64 | ||
168 | |||
169 | static inline struct pci_controller *pci_bus_to_host(const struct pci_bus *bus) | ||
170 | { | ||
171 | return bus->sysdata; | ||
172 | } | ||
173 | |||
174 | static inline int isa_vaddr_is_ioport(void __iomem *address) | ||
175 | { | ||
176 | /* No specific ISA handling on ppc32 at this stage, it | ||
177 | * all goes through PCI | ||
178 | */ | ||
179 | return 0; | ||
180 | } | ||
181 | |||
185 | #else /* CONFIG_PPC64 */ | 182 | #else /* CONFIG_PPC64 */ |
186 | 183 | ||
187 | /* | 184 | /* |
@@ -284,11 +281,6 @@ static inline int isa_vaddr_is_ioport(void __iomem *address) | |||
284 | extern int pcibios_unmap_io_space(struct pci_bus *bus); | 281 | extern int pcibios_unmap_io_space(struct pci_bus *bus); |
285 | extern int pcibios_map_io_space(struct pci_bus *bus); | 282 | extern int pcibios_map_io_space(struct pci_bus *bus); |
286 | 283 | ||
287 | /* Return values for ppc_md.pci_probe_mode function */ | ||
288 | #define PCI_PROBE_NONE -1 /* Don't look at this bus at all */ | ||
289 | #define PCI_PROBE_NORMAL 0 /* Do normal PCI probing */ | ||
290 | #define PCI_PROBE_DEVTREE 1 /* Instantiate from device tree */ | ||
291 | |||
292 | #ifdef CONFIG_NUMA | 284 | #ifdef CONFIG_NUMA |
293 | #define PHB_SET_NODE(PHB, NODE) ((PHB)->node = (NODE)) | 285 | #define PHB_SET_NODE(PHB, NODE) ((PHB)->node = (NODE)) |
294 | #else | 286 | #else |
diff --git a/arch/powerpc/include/asm/pci.h b/arch/powerpc/include/asm/pci.h index d9483c504d2d..7aca4839387b 100644 --- a/arch/powerpc/include/asm/pci.h +++ b/arch/powerpc/include/asm/pci.h | |||
@@ -22,6 +22,11 @@ | |||
22 | 22 | ||
23 | #include <asm-generic/pci-dma-compat.h> | 23 | #include <asm-generic/pci-dma-compat.h> |
24 | 24 | ||
25 | /* Return values for ppc_md.pci_probe_mode function */ | ||
26 | #define PCI_PROBE_NONE -1 /* Don't look at this bus at all */ | ||
27 | #define PCI_PROBE_NORMAL 0 /* Do normal PCI probing */ | ||
28 | #define PCI_PROBE_DEVTREE 1 /* Instantiate from device tree */ | ||
29 | |||
25 | #define PCIBIOS_MIN_IO 0x1000 | 30 | #define PCIBIOS_MIN_IO 0x1000 |
26 | #define PCIBIOS_MIN_MEM 0x10000000 | 31 | #define PCIBIOS_MIN_MEM 0x10000000 |
27 | 32 | ||
@@ -61,8 +66,8 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) | |||
61 | } | 66 | } |
62 | 67 | ||
63 | #ifdef CONFIG_PCI | 68 | #ifdef CONFIG_PCI |
64 | extern void set_pci_dma_ops(struct dma_mapping_ops *dma_ops); | 69 | extern void set_pci_dma_ops(struct dma_map_ops *dma_ops); |
65 | extern struct dma_mapping_ops *get_pci_dma_ops(void); | 70 | extern struct dma_map_ops *get_pci_dma_ops(void); |
66 | #else /* CONFIG_PCI */ | 71 | #else /* CONFIG_PCI */ |
67 | #define set_pci_dma_ops(d) | 72 | #define set_pci_dma_ops(d) |
68 | #define get_pci_dma_ops() NULL | 73 | #define get_pci_dma_ops() NULL |
@@ -228,6 +233,8 @@ extern void pci_resource_to_user(const struct pci_dev *dev, int bar, | |||
228 | 233 | ||
229 | extern void pcibios_setup_bus_devices(struct pci_bus *bus); | 234 | extern void pcibios_setup_bus_devices(struct pci_bus *bus); |
230 | extern void pcibios_setup_bus_self(struct pci_bus *bus); | 235 | extern void pcibios_setup_bus_self(struct pci_bus *bus); |
236 | extern void pcibios_setup_phb_io_space(struct pci_controller *hose); | ||
237 | extern void pcibios_scan_phb(struct pci_controller *hose, void *sysdata); | ||
231 | 238 | ||
232 | #endif /* __KERNEL__ */ | 239 | #endif /* __KERNEL__ */ |
233 | #endif /* __ASM_POWERPC_PCI_H */ | 240 | #endif /* __ASM_POWERPC_PCI_H */ |
diff --git a/arch/powerpc/include/asm/pgalloc.h b/arch/powerpc/include/asm/pgalloc.h index 1730e5e298d6..f2e812de7c3c 100644 --- a/arch/powerpc/include/asm/pgalloc.h +++ b/arch/powerpc/include/asm/pgalloc.h | |||
@@ -4,6 +4,15 @@ | |||
4 | 4 | ||
5 | #include <linux/mm.h> | 5 | #include <linux/mm.h> |
6 | 6 | ||
7 | #ifdef CONFIG_PPC_BOOK3E | ||
8 | extern void tlb_flush_pgtable(struct mmu_gather *tlb, unsigned long address); | ||
9 | #else /* CONFIG_PPC_BOOK3E */ | ||
10 | static inline void tlb_flush_pgtable(struct mmu_gather *tlb, | ||
11 | unsigned long address) | ||
12 | { | ||
13 | } | ||
14 | #endif /* !CONFIG_PPC_BOOK3E */ | ||
15 | |||
7 | static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) | 16 | static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) |
8 | { | 17 | { |
9 | free_page((unsigned long)pte); | 18 | free_page((unsigned long)pte); |
@@ -19,7 +28,12 @@ typedef struct pgtable_free { | |||
19 | unsigned long val; | 28 | unsigned long val; |
20 | } pgtable_free_t; | 29 | } pgtable_free_t; |
21 | 30 | ||
22 | #define PGF_CACHENUM_MASK 0x7 | 31 | /* This needs to be big enough to allow for MMU_PAGE_COUNT + 2 to be stored |
32 | * and small enough to fit in the low bits of any naturally aligned page | ||
33 | * table cache entry. Arbitrarily set to 0x1f, that should give us some | ||
34 | * room to grow | ||
35 | */ | ||
36 | #define PGF_CACHENUM_MASK 0x1f | ||
23 | 37 | ||
24 | static inline pgtable_free_t pgtable_free_cache(void *p, int cachenum, | 38 | static inline pgtable_free_t pgtable_free_cache(void *p, int cachenum, |
25 | unsigned long mask) | 39 | unsigned long mask) |
@@ -35,19 +49,27 @@ static inline pgtable_free_t pgtable_free_cache(void *p, int cachenum, | |||
35 | #include <asm/pgalloc-32.h> | 49 | #include <asm/pgalloc-32.h> |
36 | #endif | 50 | #endif |
37 | 51 | ||
38 | extern void pgtable_free_tlb(struct mmu_gather *tlb, pgtable_free_t pgf); | ||
39 | |||
40 | #ifdef CONFIG_SMP | 52 | #ifdef CONFIG_SMP |
41 | #define __pte_free_tlb(tlb,ptepage,address) \ | 53 | extern void pgtable_free_tlb(struct mmu_gather *tlb, pgtable_free_t pgf); |
42 | do { \ | 54 | extern void pte_free_finish(void); |
43 | pgtable_page_dtor(ptepage); \ | 55 | #else /* CONFIG_SMP */ |
44 | pgtable_free_tlb(tlb, pgtable_free_cache(page_address(ptepage), \ | 56 | static inline void pgtable_free_tlb(struct mmu_gather *tlb, pgtable_free_t pgf) |
45 | PTE_NONCACHE_NUM, PTE_TABLE_SIZE-1)); \ | 57 | { |
46 | } while (0) | 58 | pgtable_free(pgf); |
47 | #else | 59 | } |
48 | #define __pte_free_tlb(tlb, pte, address) pte_free((tlb)->mm, (pte)) | 60 | static inline void pte_free_finish(void) { } |
49 | #endif | 61 | #endif /* !CONFIG_SMP */ |
50 | 62 | ||
63 | static inline void __pte_free_tlb(struct mmu_gather *tlb, struct page *ptepage, | ||
64 | unsigned long address) | ||
65 | { | ||
66 | pgtable_free_t pgf = pgtable_free_cache(page_address(ptepage), | ||
67 | PTE_NONCACHE_NUM, | ||
68 | PTE_TABLE_SIZE-1); | ||
69 | tlb_flush_pgtable(tlb, address); | ||
70 | pgtable_page_dtor(ptepage); | ||
71 | pgtable_free_tlb(tlb, pgf); | ||
72 | } | ||
51 | 73 | ||
52 | #endif /* __KERNEL__ */ | 74 | #endif /* __KERNEL__ */ |
53 | #endif /* _ASM_POWERPC_PGALLOC_H */ | 75 | #endif /* _ASM_POWERPC_PGALLOC_H */ |
diff --git a/arch/powerpc/include/asm/pgtable-ppc32.h b/arch/powerpc/include/asm/pgtable-ppc32.h index c9ff9d75990e..55646adfa843 100644 --- a/arch/powerpc/include/asm/pgtable-ppc32.h +++ b/arch/powerpc/include/asm/pgtable-ppc32.h | |||
@@ -111,6 +111,8 @@ extern int icache_44x_need_flush; | |||
111 | #include <asm/pte-40x.h> | 111 | #include <asm/pte-40x.h> |
112 | #elif defined(CONFIG_44x) | 112 | #elif defined(CONFIG_44x) |
113 | #include <asm/pte-44x.h> | 113 | #include <asm/pte-44x.h> |
114 | #elif defined(CONFIG_FSL_BOOKE) && defined(CONFIG_PTE_64BIT) | ||
115 | #include <asm/pte-book3e.h> | ||
114 | #elif defined(CONFIG_FSL_BOOKE) | 116 | #elif defined(CONFIG_FSL_BOOKE) |
115 | #include <asm/pte-fsl-booke.h> | 117 | #include <asm/pte-fsl-booke.h> |
116 | #elif defined(CONFIG_8xx) | 118 | #elif defined(CONFIG_8xx) |
@@ -186,7 +188,7 @@ static inline unsigned long pte_update(pte_t *p, | |||
186 | #endif /* !PTE_ATOMIC_UPDATES */ | 188 | #endif /* !PTE_ATOMIC_UPDATES */ |
187 | 189 | ||
188 | #ifdef CONFIG_44x | 190 | #ifdef CONFIG_44x |
189 | if ((old & _PAGE_USER) && (old & _PAGE_HWEXEC)) | 191 | if ((old & _PAGE_USER) && (old & _PAGE_EXEC)) |
190 | icache_44x_need_flush = 1; | 192 | icache_44x_need_flush = 1; |
191 | #endif | 193 | #endif |
192 | return old; | 194 | return old; |
@@ -217,7 +219,7 @@ static inline unsigned long long pte_update(pte_t *p, | |||
217 | #endif /* !PTE_ATOMIC_UPDATES */ | 219 | #endif /* !PTE_ATOMIC_UPDATES */ |
218 | 220 | ||
219 | #ifdef CONFIG_44x | 221 | #ifdef CONFIG_44x |
220 | if ((old & _PAGE_USER) && (old & _PAGE_HWEXEC)) | 222 | if ((old & _PAGE_USER) && (old & _PAGE_EXEC)) |
221 | icache_44x_need_flush = 1; | 223 | icache_44x_need_flush = 1; |
222 | #endif | 224 | #endif |
223 | return old; | 225 | return old; |
@@ -267,8 +269,7 @@ static inline void huge_ptep_set_wrprotect(struct mm_struct *mm, | |||
267 | static inline void __ptep_set_access_flags(pte_t *ptep, pte_t entry) | 269 | static inline void __ptep_set_access_flags(pte_t *ptep, pte_t entry) |
268 | { | 270 | { |
269 | unsigned long bits = pte_val(entry) & | 271 | unsigned long bits = pte_val(entry) & |
270 | (_PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_RW | | 272 | (_PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_RW | _PAGE_EXEC); |
271 | _PAGE_HWEXEC | _PAGE_EXEC); | ||
272 | pte_update(ptep, 0, bits); | 273 | pte_update(ptep, 0, bits); |
273 | } | 274 | } |
274 | 275 | ||
diff --git a/arch/powerpc/include/asm/pgtable-ppc64-64k.h b/arch/powerpc/include/asm/pgtable-ppc64-64k.h index 6cc085b945a5..90533ddcd703 100644 --- a/arch/powerpc/include/asm/pgtable-ppc64-64k.h +++ b/arch/powerpc/include/asm/pgtable-ppc64-64k.h | |||
@@ -10,10 +10,10 @@ | |||
10 | #define PGD_INDEX_SIZE 4 | 10 | #define PGD_INDEX_SIZE 4 |
11 | 11 | ||
12 | #ifndef __ASSEMBLY__ | 12 | #ifndef __ASSEMBLY__ |
13 | |||
14 | #define PTE_TABLE_SIZE (sizeof(real_pte_t) << PTE_INDEX_SIZE) | 13 | #define PTE_TABLE_SIZE (sizeof(real_pte_t) << PTE_INDEX_SIZE) |
15 | #define PMD_TABLE_SIZE (sizeof(pmd_t) << PMD_INDEX_SIZE) | 14 | #define PMD_TABLE_SIZE (sizeof(pmd_t) << PMD_INDEX_SIZE) |
16 | #define PGD_TABLE_SIZE (sizeof(pgd_t) << PGD_INDEX_SIZE) | 15 | #define PGD_TABLE_SIZE (sizeof(pgd_t) << PGD_INDEX_SIZE) |
16 | #endif /* __ASSEMBLY__ */ | ||
17 | 17 | ||
18 | #define PTRS_PER_PTE (1 << PTE_INDEX_SIZE) | 18 | #define PTRS_PER_PTE (1 << PTE_INDEX_SIZE) |
19 | #define PTRS_PER_PMD (1 << PMD_INDEX_SIZE) | 19 | #define PTRS_PER_PMD (1 << PMD_INDEX_SIZE) |
@@ -32,8 +32,6 @@ | |||
32 | #define PGDIR_SIZE (1UL << PGDIR_SHIFT) | 32 | #define PGDIR_SIZE (1UL << PGDIR_SHIFT) |
33 | #define PGDIR_MASK (~(PGDIR_SIZE-1)) | 33 | #define PGDIR_MASK (~(PGDIR_SIZE-1)) |
34 | 34 | ||
35 | #endif /* __ASSEMBLY__ */ | ||
36 | |||
37 | /* Bits to mask out from a PMD to get to the PTE page */ | 35 | /* Bits to mask out from a PMD to get to the PTE page */ |
38 | #define PMD_MASKED_BITS 0x1ff | 36 | #define PMD_MASKED_BITS 0x1ff |
39 | /* Bits to mask out from a PGD/PUD to get to the PMD page */ | 37 | /* Bits to mask out from a PGD/PUD to get to the PMD page */ |
diff --git a/arch/powerpc/include/asm/pgtable-ppc64.h b/arch/powerpc/include/asm/pgtable-ppc64.h index 8cd083c61503..806abe7a3fa5 100644 --- a/arch/powerpc/include/asm/pgtable-ppc64.h +++ b/arch/powerpc/include/asm/pgtable-ppc64.h | |||
@@ -5,11 +5,6 @@ | |||
5 | * the ppc64 hashed page table. | 5 | * the ppc64 hashed page table. |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #ifndef __ASSEMBLY__ | ||
9 | #include <linux/stddef.h> | ||
10 | #include <asm/tlbflush.h> | ||
11 | #endif /* __ASSEMBLY__ */ | ||
12 | |||
13 | #ifdef CONFIG_PPC_64K_PAGES | 8 | #ifdef CONFIG_PPC_64K_PAGES |
14 | #include <asm/pgtable-ppc64-64k.h> | 9 | #include <asm/pgtable-ppc64-64k.h> |
15 | #else | 10 | #else |
@@ -38,26 +33,47 @@ | |||
38 | #endif | 33 | #endif |
39 | 34 | ||
40 | /* | 35 | /* |
41 | * Define the address range of the vmalloc VM area. | 36 | * Define the address range of the kernel non-linear virtual area |
37 | */ | ||
38 | |||
39 | #ifdef CONFIG_PPC_BOOK3E | ||
40 | #define KERN_VIRT_START ASM_CONST(0x8000000000000000) | ||
41 | #else | ||
42 | #define KERN_VIRT_START ASM_CONST(0xD000000000000000) | ||
43 | #endif | ||
44 | #define KERN_VIRT_SIZE PGTABLE_RANGE | ||
45 | |||
46 | /* | ||
47 | * The vmalloc space starts at the beginning of that region, and | ||
48 | * occupies half of it on hash CPUs and a quarter of it on Book3E | ||
49 | * (we keep a quarter for the virtual memmap) | ||
42 | */ | 50 | */ |
43 | #define VMALLOC_START ASM_CONST(0xD000000000000000) | 51 | #define VMALLOC_START KERN_VIRT_START |
44 | #define VMALLOC_SIZE (PGTABLE_RANGE >> 1) | 52 | #ifdef CONFIG_PPC_BOOK3E |
45 | #define VMALLOC_END (VMALLOC_START + VMALLOC_SIZE) | 53 | #define VMALLOC_SIZE (KERN_VIRT_SIZE >> 2) |
54 | #else | ||
55 | #define VMALLOC_SIZE (KERN_VIRT_SIZE >> 1) | ||
56 | #endif | ||
57 | #define VMALLOC_END (VMALLOC_START + VMALLOC_SIZE) | ||
46 | 58 | ||
47 | /* | 59 | /* |
48 | * Define the address ranges for MMIO and IO space : | 60 | * The second half of the kernel virtual space is used for IO mappings, |
61 | * it's itself carved into the PIO region (ISA and PHB IO space) and | ||
62 | * the ioremap space | ||
49 | * | 63 | * |
50 | * ISA_IO_BASE = VMALLOC_END, 64K reserved area | 64 | * ISA_IO_BASE = KERN_IO_START, 64K reserved area |
51 | * PHB_IO_BASE = ISA_IO_BASE + 64K to ISA_IO_BASE + 2G, PHB IO spaces | 65 | * PHB_IO_BASE = ISA_IO_BASE + 64K to ISA_IO_BASE + 2G, PHB IO spaces |
52 | * IOREMAP_BASE = ISA_IO_BASE + 2G to VMALLOC_START + PGTABLE_RANGE | 66 | * IOREMAP_BASE = ISA_IO_BASE + 2G to VMALLOC_START + PGTABLE_RANGE |
53 | */ | 67 | */ |
68 | #define KERN_IO_START (KERN_VIRT_START + (KERN_VIRT_SIZE >> 1)) | ||
54 | #define FULL_IO_SIZE 0x80000000ul | 69 | #define FULL_IO_SIZE 0x80000000ul |
55 | #define ISA_IO_BASE (VMALLOC_END) | 70 | #define ISA_IO_BASE (KERN_IO_START) |
56 | #define ISA_IO_END (VMALLOC_END + 0x10000ul) | 71 | #define ISA_IO_END (KERN_IO_START + 0x10000ul) |
57 | #define PHB_IO_BASE (ISA_IO_END) | 72 | #define PHB_IO_BASE (ISA_IO_END) |
58 | #define PHB_IO_END (VMALLOC_END + FULL_IO_SIZE) | 73 | #define PHB_IO_END (KERN_IO_START + FULL_IO_SIZE) |
59 | #define IOREMAP_BASE (PHB_IO_END) | 74 | #define IOREMAP_BASE (PHB_IO_END) |
60 | #define IOREMAP_END (VMALLOC_START + PGTABLE_RANGE) | 75 | #define IOREMAP_END (KERN_VIRT_START + KERN_VIRT_SIZE) |
76 | |||
61 | 77 | ||
62 | /* | 78 | /* |
63 | * Region IDs | 79 | * Region IDs |
@@ -68,23 +84,32 @@ | |||
68 | 84 | ||
69 | #define VMALLOC_REGION_ID (REGION_ID(VMALLOC_START)) | 85 | #define VMALLOC_REGION_ID (REGION_ID(VMALLOC_START)) |
70 | #define KERNEL_REGION_ID (REGION_ID(PAGE_OFFSET)) | 86 | #define KERNEL_REGION_ID (REGION_ID(PAGE_OFFSET)) |
71 | #define VMEMMAP_REGION_ID (0xfUL) | 87 | #define VMEMMAP_REGION_ID (0xfUL) /* Server only */ |
72 | #define USER_REGION_ID (0UL) | 88 | #define USER_REGION_ID (0UL) |
73 | 89 | ||
74 | /* | 90 | /* |
75 | * Defines the address of the vmemap area, in its own region | 91 | * Defines the address of the vmemap area, in its own region on |
92 | * hash table CPUs and after the vmalloc space on Book3E | ||
76 | */ | 93 | */ |
94 | #ifdef CONFIG_PPC_BOOK3E | ||
95 | #define VMEMMAP_BASE VMALLOC_END | ||
96 | #define VMEMMAP_END KERN_IO_START | ||
97 | #else | ||
77 | #define VMEMMAP_BASE (VMEMMAP_REGION_ID << REGION_SHIFT) | 98 | #define VMEMMAP_BASE (VMEMMAP_REGION_ID << REGION_SHIFT) |
99 | #endif | ||
78 | #define vmemmap ((struct page *)VMEMMAP_BASE) | 100 | #define vmemmap ((struct page *)VMEMMAP_BASE) |
79 | 101 | ||
80 | 102 | ||
81 | /* | 103 | /* |
82 | * Include the PTE bits definitions | 104 | * Include the PTE bits definitions |
83 | */ | 105 | */ |
106 | #ifdef CONFIG_PPC_BOOK3S | ||
84 | #include <asm/pte-hash64.h> | 107 | #include <asm/pte-hash64.h> |
108 | #else | ||
109 | #include <asm/pte-book3e.h> | ||
110 | #endif | ||
85 | #include <asm/pte-common.h> | 111 | #include <asm/pte-common.h> |
86 | 112 | ||
87 | |||
88 | #ifdef CONFIG_PPC_MM_SLICES | 113 | #ifdef CONFIG_PPC_MM_SLICES |
89 | #define HAVE_ARCH_UNMAPPED_AREA | 114 | #define HAVE_ARCH_UNMAPPED_AREA |
90 | #define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN | 115 | #define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN |
@@ -92,6 +117,9 @@ | |||
92 | 117 | ||
93 | #ifndef __ASSEMBLY__ | 118 | #ifndef __ASSEMBLY__ |
94 | 119 | ||
120 | #include <linux/stddef.h> | ||
121 | #include <asm/tlbflush.h> | ||
122 | |||
95 | /* | 123 | /* |
96 | * This is the default implementation of various PTE accessors, it's | 124 | * This is the default implementation of various PTE accessors, it's |
97 | * used in all cases except Book3S with 64K pages where we have a | 125 | * used in all cases except Book3S with 64K pages where we have a |
@@ -285,8 +313,7 @@ static inline void pte_clear(struct mm_struct *mm, unsigned long addr, | |||
285 | static inline void __ptep_set_access_flags(pte_t *ptep, pte_t entry) | 313 | static inline void __ptep_set_access_flags(pte_t *ptep, pte_t entry) |
286 | { | 314 | { |
287 | unsigned long bits = pte_val(entry) & | 315 | unsigned long bits = pte_val(entry) & |
288 | (_PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_RW | | 316 | (_PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_RW | _PAGE_EXEC); |
289 | _PAGE_EXEC | _PAGE_HWEXEC); | ||
290 | 317 | ||
291 | #ifdef PTE_ATOMIC_UPDATES | 318 | #ifdef PTE_ATOMIC_UPDATES |
292 | unsigned long old, tmp; | 319 | unsigned long old, tmp; |
diff --git a/arch/powerpc/include/asm/pmc.h b/arch/powerpc/include/asm/pmc.h index d6a616a1b3ea..ccc68b50d05d 100644 --- a/arch/powerpc/include/asm/pmc.h +++ b/arch/powerpc/include/asm/pmc.h | |||
@@ -27,10 +27,22 @@ extern perf_irq_t perf_irq; | |||
27 | 27 | ||
28 | int reserve_pmc_hardware(perf_irq_t new_perf_irq); | 28 | int reserve_pmc_hardware(perf_irq_t new_perf_irq); |
29 | void release_pmc_hardware(void); | 29 | void release_pmc_hardware(void); |
30 | void ppc_enable_pmcs(void); | ||
30 | 31 | ||
31 | #ifdef CONFIG_PPC64 | 32 | #ifdef CONFIG_PPC64 |
32 | void power4_enable_pmcs(void); | 33 | #include <asm/lppaca.h> |
33 | void pasemi_enable_pmcs(void); | 34 | |
35 | static inline void ppc_set_pmu_inuse(int inuse) | ||
36 | { | ||
37 | get_lppaca()->pmcregs_in_use = inuse; | ||
38 | } | ||
39 | |||
40 | extern void power4_enable_pmcs(void); | ||
41 | |||
42 | #else /* CONFIG_PPC64 */ | ||
43 | |||
44 | static inline void ppc_set_pmu_inuse(int inuse) { } | ||
45 | |||
34 | #endif | 46 | #endif |
35 | 47 | ||
36 | #endif /* __KERNEL__ */ | 48 | #endif /* __KERNEL__ */ |
diff --git a/arch/powerpc/include/asm/ppc-opcode.h b/arch/powerpc/include/asm/ppc-opcode.h index b74f16d45cb4..ef9aa84cac5a 100644 --- a/arch/powerpc/include/asm/ppc-opcode.h +++ b/arch/powerpc/include/asm/ppc-opcode.h | |||
@@ -48,6 +48,8 @@ | |||
48 | #define PPC_INST_TLBIE 0x7c000264 | 48 | #define PPC_INST_TLBIE 0x7c000264 |
49 | #define PPC_INST_TLBILX 0x7c000024 | 49 | #define PPC_INST_TLBILX 0x7c000024 |
50 | #define PPC_INST_WAIT 0x7c00007c | 50 | #define PPC_INST_WAIT 0x7c00007c |
51 | #define PPC_INST_TLBIVAX 0x7c000624 | ||
52 | #define PPC_INST_TLBSRX_DOT 0x7c0006a5 | ||
51 | 53 | ||
52 | /* macros to insert fields into opcodes */ | 54 | /* macros to insert fields into opcodes */ |
53 | #define __PPC_RA(a) (((a) & 0x1f) << 16) | 55 | #define __PPC_RA(a) (((a) & 0x1f) << 16) |
@@ -76,6 +78,10 @@ | |||
76 | __PPC_WC(w)) | 78 | __PPC_WC(w)) |
77 | #define PPC_TLBIE(lp,a) stringify_in_c(.long PPC_INST_TLBIE | \ | 79 | #define PPC_TLBIE(lp,a) stringify_in_c(.long PPC_INST_TLBIE | \ |
78 | __PPC_RB(a) | __PPC_RS(lp)) | 80 | __PPC_RB(a) | __PPC_RS(lp)) |
81 | #define PPC_TLBSRX_DOT(a,b) stringify_in_c(.long PPC_INST_TLBSRX_DOT | \ | ||
82 | __PPC_RA(a) | __PPC_RB(b)) | ||
83 | #define PPC_TLBIVAX(a,b) stringify_in_c(.long PPC_INST_TLBIVAX | \ | ||
84 | __PPC_RA(a) | __PPC_RB(b)) | ||
79 | 85 | ||
80 | /* | 86 | /* |
81 | * Define what the VSX XX1 form instructions will look like, then add | 87 | * Define what the VSX XX1 form instructions will look like, then add |
diff --git a/arch/powerpc/include/asm/ppc-pci.h b/arch/powerpc/include/asm/ppc-pci.h index 854ab713f56c..2828f9d0f66d 100644 --- a/arch/powerpc/include/asm/ppc-pci.h +++ b/arch/powerpc/include/asm/ppc-pci.h | |||
@@ -39,7 +39,6 @@ void *traverse_pci_devices(struct device_node *start, traverse_func pre, | |||
39 | 39 | ||
40 | extern void pci_devs_phb_init(void); | 40 | extern void pci_devs_phb_init(void); |
41 | extern void pci_devs_phb_init_dynamic(struct pci_controller *phb); | 41 | extern void pci_devs_phb_init_dynamic(struct pci_controller *phb); |
42 | extern void scan_phb(struct pci_controller *hose); | ||
43 | 42 | ||
44 | /* From rtas_pci.h */ | 43 | /* From rtas_pci.h */ |
45 | extern void init_pci_config_tokens (void); | 44 | extern void init_pci_config_tokens (void); |
diff --git a/arch/powerpc/include/asm/ppc_asm.h b/arch/powerpc/include/asm/ppc_asm.h index f9729529c20d..498fe09263d3 100644 --- a/arch/powerpc/include/asm/ppc_asm.h +++ b/arch/powerpc/include/asm/ppc_asm.h | |||
@@ -98,13 +98,13 @@ END_FTR_SECTION_IFCLR(CPU_FTR_PURR); \ | |||
98 | #define REST_16FPRS(n, base) REST_8FPRS(n, base); REST_8FPRS(n+8, base) | 98 | #define REST_16FPRS(n, base) REST_8FPRS(n, base); REST_8FPRS(n+8, base) |
99 | #define REST_32FPRS(n, base) REST_16FPRS(n, base); REST_16FPRS(n+16, base) | 99 | #define REST_32FPRS(n, base) REST_16FPRS(n, base); REST_16FPRS(n+16, base) |
100 | 100 | ||
101 | #define SAVE_VR(n,b,base) li b,THREAD_VR0+(16*(n)); stvx n,b,base | 101 | #define SAVE_VR(n,b,base) li b,THREAD_VR0+(16*(n)); stvx n,base,b |
102 | #define SAVE_2VRS(n,b,base) SAVE_VR(n,b,base); SAVE_VR(n+1,b,base) | 102 | #define SAVE_2VRS(n,b,base) SAVE_VR(n,b,base); SAVE_VR(n+1,b,base) |
103 | #define SAVE_4VRS(n,b,base) SAVE_2VRS(n,b,base); SAVE_2VRS(n+2,b,base) | 103 | #define SAVE_4VRS(n,b,base) SAVE_2VRS(n,b,base); SAVE_2VRS(n+2,b,base) |
104 | #define SAVE_8VRS(n,b,base) SAVE_4VRS(n,b,base); SAVE_4VRS(n+4,b,base) | 104 | #define SAVE_8VRS(n,b,base) SAVE_4VRS(n,b,base); SAVE_4VRS(n+4,b,base) |
105 | #define SAVE_16VRS(n,b,base) SAVE_8VRS(n,b,base); SAVE_8VRS(n+8,b,base) | 105 | #define SAVE_16VRS(n,b,base) SAVE_8VRS(n,b,base); SAVE_8VRS(n+8,b,base) |
106 | #define SAVE_32VRS(n,b,base) SAVE_16VRS(n,b,base); SAVE_16VRS(n+16,b,base) | 106 | #define SAVE_32VRS(n,b,base) SAVE_16VRS(n,b,base); SAVE_16VRS(n+16,b,base) |
107 | #define REST_VR(n,b,base) li b,THREAD_VR0+(16*(n)); lvx n,b,base | 107 | #define REST_VR(n,b,base) li b,THREAD_VR0+(16*(n)); lvx n,base,b |
108 | #define REST_2VRS(n,b,base) REST_VR(n,b,base); REST_VR(n+1,b,base) | 108 | #define REST_2VRS(n,b,base) REST_VR(n,b,base); REST_VR(n+1,b,base) |
109 | #define REST_4VRS(n,b,base) REST_2VRS(n,b,base); REST_2VRS(n+2,b,base) | 109 | #define REST_4VRS(n,b,base) REST_2VRS(n,b,base); REST_2VRS(n+2,b,base) |
110 | #define REST_8VRS(n,b,base) REST_4VRS(n,b,base); REST_4VRS(n+4,b,base) | 110 | #define REST_8VRS(n,b,base) REST_4VRS(n,b,base); REST_4VRS(n+4,b,base) |
@@ -112,26 +112,26 @@ END_FTR_SECTION_IFCLR(CPU_FTR_PURR); \ | |||
112 | #define REST_32VRS(n,b,base) REST_16VRS(n,b,base); REST_16VRS(n+16,b,base) | 112 | #define REST_32VRS(n,b,base) REST_16VRS(n,b,base); REST_16VRS(n+16,b,base) |
113 | 113 | ||
114 | /* Save the lower 32 VSRs in the thread VSR region */ | 114 | /* Save the lower 32 VSRs in the thread VSR region */ |
115 | #define SAVE_VSR(n,b,base) li b,THREAD_VSR0+(16*(n)); STXVD2X(n,b,base) | 115 | #define SAVE_VSR(n,b,base) li b,THREAD_VSR0+(16*(n)); STXVD2X(n,base,b) |
116 | #define SAVE_2VSRS(n,b,base) SAVE_VSR(n,b,base); SAVE_VSR(n+1,b,base) | 116 | #define SAVE_2VSRS(n,b,base) SAVE_VSR(n,b,base); SAVE_VSR(n+1,b,base) |
117 | #define SAVE_4VSRS(n,b,base) SAVE_2VSRS(n,b,base); SAVE_2VSRS(n+2,b,base) | 117 | #define SAVE_4VSRS(n,b,base) SAVE_2VSRS(n,b,base); SAVE_2VSRS(n+2,b,base) |
118 | #define SAVE_8VSRS(n,b,base) SAVE_4VSRS(n,b,base); SAVE_4VSRS(n+4,b,base) | 118 | #define SAVE_8VSRS(n,b,base) SAVE_4VSRS(n,b,base); SAVE_4VSRS(n+4,b,base) |
119 | #define SAVE_16VSRS(n,b,base) SAVE_8VSRS(n,b,base); SAVE_8VSRS(n+8,b,base) | 119 | #define SAVE_16VSRS(n,b,base) SAVE_8VSRS(n,b,base); SAVE_8VSRS(n+8,b,base) |
120 | #define SAVE_32VSRS(n,b,base) SAVE_16VSRS(n,b,base); SAVE_16VSRS(n+16,b,base) | 120 | #define SAVE_32VSRS(n,b,base) SAVE_16VSRS(n,b,base); SAVE_16VSRS(n+16,b,base) |
121 | #define REST_VSR(n,b,base) li b,THREAD_VSR0+(16*(n)); LXVD2X(n,b,base) | 121 | #define REST_VSR(n,b,base) li b,THREAD_VSR0+(16*(n)); LXVD2X(n,base,b) |
122 | #define REST_2VSRS(n,b,base) REST_VSR(n,b,base); REST_VSR(n+1,b,base) | 122 | #define REST_2VSRS(n,b,base) REST_VSR(n,b,base); REST_VSR(n+1,b,base) |
123 | #define REST_4VSRS(n,b,base) REST_2VSRS(n,b,base); REST_2VSRS(n+2,b,base) | 123 | #define REST_4VSRS(n,b,base) REST_2VSRS(n,b,base); REST_2VSRS(n+2,b,base) |
124 | #define REST_8VSRS(n,b,base) REST_4VSRS(n,b,base); REST_4VSRS(n+4,b,base) | 124 | #define REST_8VSRS(n,b,base) REST_4VSRS(n,b,base); REST_4VSRS(n+4,b,base) |
125 | #define REST_16VSRS(n,b,base) REST_8VSRS(n,b,base); REST_8VSRS(n+8,b,base) | 125 | #define REST_16VSRS(n,b,base) REST_8VSRS(n,b,base); REST_8VSRS(n+8,b,base) |
126 | #define REST_32VSRS(n,b,base) REST_16VSRS(n,b,base); REST_16VSRS(n+16,b,base) | 126 | #define REST_32VSRS(n,b,base) REST_16VSRS(n,b,base); REST_16VSRS(n+16,b,base) |
127 | /* Save the upper 32 VSRs (32-63) in the thread VSX region (0-31) */ | 127 | /* Save the upper 32 VSRs (32-63) in the thread VSX region (0-31) */ |
128 | #define SAVE_VSRU(n,b,base) li b,THREAD_VR0+(16*(n)); STXVD2X(n+32,b,base) | 128 | #define SAVE_VSRU(n,b,base) li b,THREAD_VR0+(16*(n)); STXVD2X(n+32,base,b) |
129 | #define SAVE_2VSRSU(n,b,base) SAVE_VSRU(n,b,base); SAVE_VSRU(n+1,b,base) | 129 | #define SAVE_2VSRSU(n,b,base) SAVE_VSRU(n,b,base); SAVE_VSRU(n+1,b,base) |
130 | #define SAVE_4VSRSU(n,b,base) SAVE_2VSRSU(n,b,base); SAVE_2VSRSU(n+2,b,base) | 130 | #define SAVE_4VSRSU(n,b,base) SAVE_2VSRSU(n,b,base); SAVE_2VSRSU(n+2,b,base) |
131 | #define SAVE_8VSRSU(n,b,base) SAVE_4VSRSU(n,b,base); SAVE_4VSRSU(n+4,b,base) | 131 | #define SAVE_8VSRSU(n,b,base) SAVE_4VSRSU(n,b,base); SAVE_4VSRSU(n+4,b,base) |
132 | #define SAVE_16VSRSU(n,b,base) SAVE_8VSRSU(n,b,base); SAVE_8VSRSU(n+8,b,base) | 132 | #define SAVE_16VSRSU(n,b,base) SAVE_8VSRSU(n,b,base); SAVE_8VSRSU(n+8,b,base) |
133 | #define SAVE_32VSRSU(n,b,base) SAVE_16VSRSU(n,b,base); SAVE_16VSRSU(n+16,b,base) | 133 | #define SAVE_32VSRSU(n,b,base) SAVE_16VSRSU(n,b,base); SAVE_16VSRSU(n+16,b,base) |
134 | #define REST_VSRU(n,b,base) li b,THREAD_VR0+(16*(n)); LXVD2X(n+32,b,base) | 134 | #define REST_VSRU(n,b,base) li b,THREAD_VR0+(16*(n)); LXVD2X(n+32,base,b) |
135 | #define REST_2VSRSU(n,b,base) REST_VSRU(n,b,base); REST_VSRU(n+1,b,base) | 135 | #define REST_2VSRSU(n,b,base) REST_VSRU(n,b,base); REST_VSRU(n+1,b,base) |
136 | #define REST_4VSRSU(n,b,base) REST_2VSRSU(n,b,base); REST_2VSRSU(n+2,b,base) | 136 | #define REST_4VSRSU(n,b,base) REST_2VSRSU(n,b,base); REST_2VSRSU(n+2,b,base) |
137 | #define REST_8VSRSU(n,b,base) REST_4VSRSU(n,b,base); REST_4VSRSU(n+4,b,base) | 137 | #define REST_8VSRSU(n,b,base) REST_4VSRSU(n,b,base); REST_4VSRSU(n+4,b,base) |
@@ -375,8 +375,15 @@ END_FTR_SECTION_IFCLR(CPU_FTR_601) | |||
375 | #define PPC440EP_ERR42 | 375 | #define PPC440EP_ERR42 |
376 | #endif | 376 | #endif |
377 | 377 | ||
378 | 378 | /* | |
379 | #if defined(CONFIG_BOOKE) | 379 | * toreal/fromreal/tophys/tovirt macros. 32-bit BookE makes them |
380 | * keep the address intact to be compatible with code shared with | ||
381 | * 32-bit classic. | ||
382 | * | ||
383 | * On the other hand, I find it useful to have them behave as expected | ||
384 | * by their name (ie always do the addition) on 64-bit BookE | ||
385 | */ | ||
386 | #if defined(CONFIG_BOOKE) && !defined(CONFIG_PPC64) | ||
380 | #define toreal(rd) | 387 | #define toreal(rd) |
381 | #define fromreal(rd) | 388 | #define fromreal(rd) |
382 | 389 | ||
@@ -426,10 +433,9 @@ END_FTR_SECTION_IFCLR(CPU_FTR_601) | |||
426 | .previous | 433 | .previous |
427 | #endif | 434 | #endif |
428 | 435 | ||
429 | #ifdef CONFIG_PPC64 | 436 | #ifdef CONFIG_PPC_BOOK3S_64 |
430 | #define RFI rfid | 437 | #define RFI rfid |
431 | #define MTMSRD(r) mtmsrd r | 438 | #define MTMSRD(r) mtmsrd r |
432 | |||
433 | #else | 439 | #else |
434 | #define FIX_SRR1(ra, rb) | 440 | #define FIX_SRR1(ra, rb) |
435 | #ifndef CONFIG_40x | 441 | #ifndef CONFIG_40x |
diff --git a/arch/powerpc/include/asm/pte-40x.h b/arch/powerpc/include/asm/pte-40x.h index 07630faae029..6c3e1f4378d4 100644 --- a/arch/powerpc/include/asm/pte-40x.h +++ b/arch/powerpc/include/asm/pte-40x.h | |||
@@ -46,7 +46,7 @@ | |||
46 | #define _PAGE_RW 0x040 /* software: Writes permitted */ | 46 | #define _PAGE_RW 0x040 /* software: Writes permitted */ |
47 | #define _PAGE_DIRTY 0x080 /* software: dirty page */ | 47 | #define _PAGE_DIRTY 0x080 /* software: dirty page */ |
48 | #define _PAGE_HWWRITE 0x100 /* hardware: Dirty & RW, set in exception */ | 48 | #define _PAGE_HWWRITE 0x100 /* hardware: Dirty & RW, set in exception */ |
49 | #define _PAGE_HWEXEC 0x200 /* hardware: EX permission */ | 49 | #define _PAGE_EXEC 0x200 /* hardware: EX permission */ |
50 | #define _PAGE_ACCESSED 0x400 /* software: R: page referenced */ | 50 | #define _PAGE_ACCESSED 0x400 /* software: R: page referenced */ |
51 | 51 | ||
52 | #define _PMD_PRESENT 0x400 /* PMD points to page of PTEs */ | 52 | #define _PMD_PRESENT 0x400 /* PMD points to page of PTEs */ |
diff --git a/arch/powerpc/include/asm/pte-44x.h b/arch/powerpc/include/asm/pte-44x.h index 37e98bcf83e0..4192b9bad901 100644 --- a/arch/powerpc/include/asm/pte-44x.h +++ b/arch/powerpc/include/asm/pte-44x.h | |||
@@ -78,7 +78,7 @@ | |||
78 | #define _PAGE_PRESENT 0x00000001 /* S: PTE valid */ | 78 | #define _PAGE_PRESENT 0x00000001 /* S: PTE valid */ |
79 | #define _PAGE_RW 0x00000002 /* S: Write permission */ | 79 | #define _PAGE_RW 0x00000002 /* S: Write permission */ |
80 | #define _PAGE_FILE 0x00000004 /* S: nonlinear file mapping */ | 80 | #define _PAGE_FILE 0x00000004 /* S: nonlinear file mapping */ |
81 | #define _PAGE_HWEXEC 0x00000004 /* H: Execute permission */ | 81 | #define _PAGE_EXEC 0x00000004 /* H: Execute permission */ |
82 | #define _PAGE_ACCESSED 0x00000008 /* S: Page referenced */ | 82 | #define _PAGE_ACCESSED 0x00000008 /* S: Page referenced */ |
83 | #define _PAGE_DIRTY 0x00000010 /* S: Page dirty */ | 83 | #define _PAGE_DIRTY 0x00000010 /* S: Page dirty */ |
84 | #define _PAGE_SPECIAL 0x00000020 /* S: Special page */ | 84 | #define _PAGE_SPECIAL 0x00000020 /* S: Special page */ |
diff --git a/arch/powerpc/include/asm/pte-8xx.h b/arch/powerpc/include/asm/pte-8xx.h index 8c6e31251034..94e979718dcf 100644 --- a/arch/powerpc/include/asm/pte-8xx.h +++ b/arch/powerpc/include/asm/pte-8xx.h | |||
@@ -36,7 +36,6 @@ | |||
36 | /* These five software bits must be masked out when the entry is loaded | 36 | /* These five software bits must be masked out when the entry is loaded |
37 | * into the TLB. | 37 | * into the TLB. |
38 | */ | 38 | */ |
39 | #define _PAGE_EXEC 0x0008 /* software: i-cache coherency required */ | ||
40 | #define _PAGE_GUARDED 0x0010 /* software: guarded access */ | 39 | #define _PAGE_GUARDED 0x0010 /* software: guarded access */ |
41 | #define _PAGE_DIRTY 0x0020 /* software: page changed */ | 40 | #define _PAGE_DIRTY 0x0020 /* software: page changed */ |
42 | #define _PAGE_RW 0x0040 /* software: user write access allowed */ | 41 | #define _PAGE_RW 0x0040 /* software: user write access allowed */ |
diff --git a/arch/powerpc/include/asm/pte-book3e.h b/arch/powerpc/include/asm/pte-book3e.h new file mode 100644 index 000000000000..082d515930a2 --- /dev/null +++ b/arch/powerpc/include/asm/pte-book3e.h | |||
@@ -0,0 +1,84 @@ | |||
1 | #ifndef _ASM_POWERPC_PTE_BOOK3E_H | ||
2 | #define _ASM_POWERPC_PTE_BOOK3E_H | ||
3 | #ifdef __KERNEL__ | ||
4 | |||
5 | /* PTE bit definitions for processors compliant to the Book3E | ||
6 | * architecture 2.06 or later. The position of the PTE bits | ||
7 | * matches the HW definition of the optional Embedded Page Table | ||
8 | * category. | ||
9 | */ | ||
10 | |||
11 | /* Architected bits */ | ||
12 | #define _PAGE_PRESENT 0x000001 /* software: pte contains a translation */ | ||
13 | #define _PAGE_FILE 0x000002 /* (!present only) software: pte holds file offset */ | ||
14 | #define _PAGE_SW1 0x000002 | ||
15 | #define _PAGE_BAP_SR 0x000004 | ||
16 | #define _PAGE_BAP_UR 0x000008 | ||
17 | #define _PAGE_BAP_SW 0x000010 | ||
18 | #define _PAGE_BAP_UW 0x000020 | ||
19 | #define _PAGE_BAP_SX 0x000040 | ||
20 | #define _PAGE_BAP_UX 0x000080 | ||
21 | #define _PAGE_PSIZE_MSK 0x000f00 | ||
22 | #define _PAGE_PSIZE_4K 0x000200 | ||
23 | #define _PAGE_PSIZE_8K 0x000300 | ||
24 | #define _PAGE_PSIZE_16K 0x000400 | ||
25 | #define _PAGE_PSIZE_32K 0x000500 | ||
26 | #define _PAGE_PSIZE_64K 0x000600 | ||
27 | #define _PAGE_PSIZE_128K 0x000700 | ||
28 | #define _PAGE_PSIZE_256K 0x000800 | ||
29 | #define _PAGE_PSIZE_512K 0x000900 | ||
30 | #define _PAGE_PSIZE_1M 0x000a00 | ||
31 | #define _PAGE_PSIZE_2M 0x000b00 | ||
32 | #define _PAGE_PSIZE_4M 0x000c00 | ||
33 | #define _PAGE_PSIZE_8M 0x000d00 | ||
34 | #define _PAGE_PSIZE_16M 0x000e00 | ||
35 | #define _PAGE_PSIZE_32M 0x000f00 | ||
36 | #define _PAGE_DIRTY 0x001000 /* C: page changed */ | ||
37 | #define _PAGE_SW0 0x002000 | ||
38 | #define _PAGE_U3 0x004000 | ||
39 | #define _PAGE_U2 0x008000 | ||
40 | #define _PAGE_U1 0x010000 | ||
41 | #define _PAGE_U0 0x020000 | ||
42 | #define _PAGE_ACCESSED 0x040000 | ||
43 | #define _PAGE_LENDIAN 0x080000 | ||
44 | #define _PAGE_GUARDED 0x100000 | ||
45 | #define _PAGE_COHERENT 0x200000 /* M: enforce memory coherence */ | ||
46 | #define _PAGE_NO_CACHE 0x400000 /* I: cache inhibit */ | ||
47 | #define _PAGE_WRITETHRU 0x800000 /* W: cache write-through */ | ||
48 | |||
49 | /* "Higher level" linux bit combinations */ | ||
50 | #define _PAGE_EXEC _PAGE_BAP_UX /* .. and was cache cleaned */ | ||
51 | #define _PAGE_RW (_PAGE_BAP_SW | _PAGE_BAP_UW) /* User write permission */ | ||
52 | #define _PAGE_KERNEL_RW (_PAGE_BAP_SW | _PAGE_BAP_SR | _PAGE_DIRTY) | ||
53 | #define _PAGE_KERNEL_RO (_PAGE_BAP_SR) | ||
54 | #define _PAGE_KERNEL_RWX (_PAGE_BAP_SW | _PAGE_BAP_SR | _PAGE_DIRTY | _PAGE_BAP_SX) | ||
55 | #define _PAGE_KERNEL_ROX (_PAGE_BAP_SR | _PAGE_BAP_SX) | ||
56 | #define _PAGE_USER (_PAGE_BAP_UR | _PAGE_BAP_SR) /* Can be read */ | ||
57 | |||
58 | #define _PAGE_HASHPTE 0 | ||
59 | #define _PAGE_BUSY 0 | ||
60 | |||
61 | #define _PAGE_SPECIAL _PAGE_SW0 | ||
62 | |||
63 | /* Flags to be preserved on PTE modifications */ | ||
64 | #define _PAGE_HPTEFLAGS _PAGE_BUSY | ||
65 | |||
66 | /* Base page size */ | ||
67 | #ifdef CONFIG_PPC_64K_PAGES | ||
68 | #define _PAGE_PSIZE _PAGE_PSIZE_64K | ||
69 | #define PTE_RPN_SHIFT (28) | ||
70 | #else | ||
71 | #define _PAGE_PSIZE _PAGE_PSIZE_4K | ||
72 | #define PTE_RPN_SHIFT (24) | ||
73 | #endif | ||
74 | |||
75 | /* On 32-bit, we never clear the top part of the PTE */ | ||
76 | #ifdef CONFIG_PPC32 | ||
77 | #define _PTE_NONE_MASK 0xffffffff00000000ULL | ||
78 | #define _PMD_PRESENT 0 | ||
79 | #define _PMD_PRESENT_MASK (PAGE_MASK) | ||
80 | #define _PMD_BAD (~PAGE_MASK) | ||
81 | #endif | ||
82 | |||
83 | #endif /* __KERNEL__ */ | ||
84 | #endif /* _ASM_POWERPC_PTE_FSL_BOOKE_H */ | ||
diff --git a/arch/powerpc/include/asm/pte-common.h b/arch/powerpc/include/asm/pte-common.h index a7e210b6b48c..c3b65076a263 100644 --- a/arch/powerpc/include/asm/pte-common.h +++ b/arch/powerpc/include/asm/pte-common.h | |||
@@ -13,9 +13,6 @@ | |||
13 | #ifndef _PAGE_HWWRITE | 13 | #ifndef _PAGE_HWWRITE |
14 | #define _PAGE_HWWRITE 0 | 14 | #define _PAGE_HWWRITE 0 |
15 | #endif | 15 | #endif |
16 | #ifndef _PAGE_HWEXEC | ||
17 | #define _PAGE_HWEXEC 0 | ||
18 | #endif | ||
19 | #ifndef _PAGE_EXEC | 16 | #ifndef _PAGE_EXEC |
20 | #define _PAGE_EXEC 0 | 17 | #define _PAGE_EXEC 0 |
21 | #endif | 18 | #endif |
@@ -34,6 +31,9 @@ | |||
34 | #ifndef _PAGE_4K_PFN | 31 | #ifndef _PAGE_4K_PFN |
35 | #define _PAGE_4K_PFN 0 | 32 | #define _PAGE_4K_PFN 0 |
36 | #endif | 33 | #endif |
34 | #ifndef _PAGE_SAO | ||
35 | #define _PAGE_SAO 0 | ||
36 | #endif | ||
37 | #ifndef _PAGE_PSIZE | 37 | #ifndef _PAGE_PSIZE |
38 | #define _PAGE_PSIZE 0 | 38 | #define _PAGE_PSIZE 0 |
39 | #endif | 39 | #endif |
@@ -45,10 +45,16 @@ | |||
45 | #define PMD_PAGE_SIZE(pmd) bad_call_to_PMD_PAGE_SIZE() | 45 | #define PMD_PAGE_SIZE(pmd) bad_call_to_PMD_PAGE_SIZE() |
46 | #endif | 46 | #endif |
47 | #ifndef _PAGE_KERNEL_RO | 47 | #ifndef _PAGE_KERNEL_RO |
48 | #define _PAGE_KERNEL_RO 0 | 48 | #define _PAGE_KERNEL_RO 0 |
49 | #endif | ||
50 | #ifndef _PAGE_KERNEL_ROX | ||
51 | #define _PAGE_KERNEL_ROX (_PAGE_EXEC) | ||
49 | #endif | 52 | #endif |
50 | #ifndef _PAGE_KERNEL_RW | 53 | #ifndef _PAGE_KERNEL_RW |
51 | #define _PAGE_KERNEL_RW (_PAGE_DIRTY | _PAGE_RW | _PAGE_HWWRITE) | 54 | #define _PAGE_KERNEL_RW (_PAGE_DIRTY | _PAGE_RW | _PAGE_HWWRITE) |
55 | #endif | ||
56 | #ifndef _PAGE_KERNEL_RWX | ||
57 | #define _PAGE_KERNEL_RWX (_PAGE_DIRTY | _PAGE_RW | _PAGE_HWWRITE | _PAGE_EXEC) | ||
52 | #endif | 58 | #endif |
53 | #ifndef _PAGE_HPTEFLAGS | 59 | #ifndef _PAGE_HPTEFLAGS |
54 | #define _PAGE_HPTEFLAGS _PAGE_HASHPTE | 60 | #define _PAGE_HPTEFLAGS _PAGE_HASHPTE |
@@ -93,8 +99,7 @@ extern unsigned long bad_call_to_PMD_PAGE_SIZE(void); | |||
93 | #define PAGE_PROT_BITS (_PAGE_GUARDED | _PAGE_COHERENT | _PAGE_NO_CACHE | \ | 99 | #define PAGE_PROT_BITS (_PAGE_GUARDED | _PAGE_COHERENT | _PAGE_NO_CACHE | \ |
94 | _PAGE_WRITETHRU | _PAGE_ENDIAN | _PAGE_4K_PFN | \ | 100 | _PAGE_WRITETHRU | _PAGE_ENDIAN | _PAGE_4K_PFN | \ |
95 | _PAGE_USER | _PAGE_ACCESSED | \ | 101 | _PAGE_USER | _PAGE_ACCESSED | \ |
96 | _PAGE_RW | _PAGE_HWWRITE | _PAGE_DIRTY | \ | 102 | _PAGE_RW | _PAGE_HWWRITE | _PAGE_DIRTY | _PAGE_EXEC) |
97 | _PAGE_EXEC | _PAGE_HWEXEC) | ||
98 | 103 | ||
99 | /* | 104 | /* |
100 | * We define 2 sets of base prot bits, one for basic pages (ie, | 105 | * We define 2 sets of base prot bits, one for basic pages (ie, |
@@ -151,11 +156,9 @@ extern unsigned long bad_call_to_PMD_PAGE_SIZE(void); | |||
151 | _PAGE_NO_CACHE) | 156 | _PAGE_NO_CACHE) |
152 | #define PAGE_KERNEL_NCG __pgprot(_PAGE_BASE_NC | _PAGE_KERNEL_RW | \ | 157 | #define PAGE_KERNEL_NCG __pgprot(_PAGE_BASE_NC | _PAGE_KERNEL_RW | \ |
153 | _PAGE_NO_CACHE | _PAGE_GUARDED) | 158 | _PAGE_NO_CACHE | _PAGE_GUARDED) |
154 | #define PAGE_KERNEL_X __pgprot(_PAGE_BASE | _PAGE_KERNEL_RW | _PAGE_EXEC | \ | 159 | #define PAGE_KERNEL_X __pgprot(_PAGE_BASE | _PAGE_KERNEL_RWX) |
155 | _PAGE_HWEXEC) | ||
156 | #define PAGE_KERNEL_RO __pgprot(_PAGE_BASE | _PAGE_KERNEL_RO) | 160 | #define PAGE_KERNEL_RO __pgprot(_PAGE_BASE | _PAGE_KERNEL_RO) |
157 | #define PAGE_KERNEL_ROX __pgprot(_PAGE_BASE | _PAGE_KERNEL_RO | _PAGE_EXEC | \ | 161 | #define PAGE_KERNEL_ROX __pgprot(_PAGE_BASE | _PAGE_KERNEL_ROX) |
158 | _PAGE_HWEXEC) | ||
159 | 162 | ||
160 | /* Protection used for kernel text. We want the debuggers to be able to | 163 | /* Protection used for kernel text. We want the debuggers to be able to |
161 | * set breakpoints anywhere, so don't write protect the kernel text | 164 | * set breakpoints anywhere, so don't write protect the kernel text |
diff --git a/arch/powerpc/include/asm/pte-fsl-booke.h b/arch/powerpc/include/asm/pte-fsl-booke.h index 10820f58acf5..2c12be5f677a 100644 --- a/arch/powerpc/include/asm/pte-fsl-booke.h +++ b/arch/powerpc/include/asm/pte-fsl-booke.h | |||
@@ -23,7 +23,7 @@ | |||
23 | #define _PAGE_FILE 0x00002 /* S: when !present: nonlinear file mapping */ | 23 | #define _PAGE_FILE 0x00002 /* S: when !present: nonlinear file mapping */ |
24 | #define _PAGE_RW 0x00004 /* S: Write permission (SW) */ | 24 | #define _PAGE_RW 0x00004 /* S: Write permission (SW) */ |
25 | #define _PAGE_DIRTY 0x00008 /* S: Page dirty */ | 25 | #define _PAGE_DIRTY 0x00008 /* S: Page dirty */ |
26 | #define _PAGE_HWEXEC 0x00010 /* H: SX permission */ | 26 | #define _PAGE_EXEC 0x00010 /* H: SX permission */ |
27 | #define _PAGE_ACCESSED 0x00020 /* S: Page referenced */ | 27 | #define _PAGE_ACCESSED 0x00020 /* S: Page referenced */ |
28 | 28 | ||
29 | #define _PAGE_ENDIAN 0x00040 /* H: E bit */ | 29 | #define _PAGE_ENDIAN 0x00040 /* H: E bit */ |
@@ -33,13 +33,6 @@ | |||
33 | #define _PAGE_WRITETHRU 0x00400 /* H: W bit */ | 33 | #define _PAGE_WRITETHRU 0x00400 /* H: W bit */ |
34 | #define _PAGE_SPECIAL 0x00800 /* S: Special page */ | 34 | #define _PAGE_SPECIAL 0x00800 /* S: Special page */ |
35 | 35 | ||
36 | #ifdef CONFIG_PTE_64BIT | ||
37 | /* ERPN in a PTE never gets cleared, ignore it */ | ||
38 | #define _PTE_NONE_MASK 0xffffffffffff0000ULL | ||
39 | /* We extend the size of the PTE flags area when using 64-bit PTEs */ | ||
40 | #define PTE_RPN_SHIFT (PAGE_SHIFT + 8) | ||
41 | #endif | ||
42 | |||
43 | #define _PMD_PRESENT 0 | 36 | #define _PMD_PRESENT 0 |
44 | #define _PMD_PRESENT_MASK (PAGE_MASK) | 37 | #define _PMD_PRESENT_MASK (PAGE_MASK) |
45 | #define _PMD_BAD (~PAGE_MASK) | 38 | #define _PMD_BAD (~PAGE_MASK) |
diff --git a/arch/powerpc/include/asm/pte-hash32.h b/arch/powerpc/include/asm/pte-hash32.h index 16e571c7f9ef..4aad4132d0a8 100644 --- a/arch/powerpc/include/asm/pte-hash32.h +++ b/arch/powerpc/include/asm/pte-hash32.h | |||
@@ -26,7 +26,6 @@ | |||
26 | #define _PAGE_WRITETHRU 0x040 /* W: cache write-through */ | 26 | #define _PAGE_WRITETHRU 0x040 /* W: cache write-through */ |
27 | #define _PAGE_DIRTY 0x080 /* C: page changed */ | 27 | #define _PAGE_DIRTY 0x080 /* C: page changed */ |
28 | #define _PAGE_ACCESSED 0x100 /* R: page referenced */ | 28 | #define _PAGE_ACCESSED 0x100 /* R: page referenced */ |
29 | #define _PAGE_EXEC 0x200 /* software: i-cache coherency required */ | ||
30 | #define _PAGE_RW 0x400 /* software: user write access allowed */ | 29 | #define _PAGE_RW 0x400 /* software: user write access allowed */ |
31 | #define _PAGE_SPECIAL 0x800 /* software: Special page */ | 30 | #define _PAGE_SPECIAL 0x800 /* software: Special page */ |
32 | 31 | ||
diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index 1170267736d3..6315edc205d8 100644 --- a/arch/powerpc/include/asm/reg.h +++ b/arch/powerpc/include/asm/reg.h | |||
@@ -98,19 +98,15 @@ | |||
98 | #define MSR_RI __MASK(MSR_RI_LG) /* Recoverable Exception */ | 98 | #define MSR_RI __MASK(MSR_RI_LG) /* Recoverable Exception */ |
99 | #define MSR_LE __MASK(MSR_LE_LG) /* Little Endian */ | 99 | #define MSR_LE __MASK(MSR_LE_LG) /* Little Endian */ |
100 | 100 | ||
101 | #ifdef CONFIG_PPC64 | 101 | #if defined(CONFIG_PPC_BOOK3S_64) |
102 | /* Server variant */ | ||
102 | #define MSR_ MSR_ME | MSR_RI | MSR_IR | MSR_DR | MSR_ISF |MSR_HV | 103 | #define MSR_ MSR_ME | MSR_RI | MSR_IR | MSR_DR | MSR_ISF |MSR_HV |
103 | #define MSR_KERNEL MSR_ | MSR_SF | 104 | #define MSR_KERNEL MSR_ | MSR_SF |
104 | |||
105 | #define MSR_USER32 MSR_ | MSR_PR | MSR_EE | 105 | #define MSR_USER32 MSR_ | MSR_PR | MSR_EE |
106 | #define MSR_USER64 MSR_USER32 | MSR_SF | 106 | #define MSR_USER64 MSR_USER32 | MSR_SF |
107 | 107 | #elif defined(CONFIG_PPC_BOOK3S_32) || defined(CONFIG_8xx) | |
108 | #else /* 32-bit */ | ||
109 | /* Default MSR for kernel mode. */ | 108 | /* Default MSR for kernel mode. */ |
110 | #ifndef MSR_KERNEL /* reg_booke.h also defines this */ | ||
111 | #define MSR_KERNEL (MSR_ME|MSR_RI|MSR_IR|MSR_DR) | 109 | #define MSR_KERNEL (MSR_ME|MSR_RI|MSR_IR|MSR_DR) |
112 | #endif | ||
113 | |||
114 | #define MSR_USER (MSR_KERNEL|MSR_PR|MSR_EE) | 110 | #define MSR_USER (MSR_KERNEL|MSR_PR|MSR_EE) |
115 | #endif | 111 | #endif |
116 | 112 | ||
@@ -646,6 +642,137 @@ | |||
646 | #endif | 642 | #endif |
647 | 643 | ||
648 | /* | 644 | /* |
645 | * SPRG usage: | ||
646 | * | ||
647 | * All 64-bit: | ||
648 | * - SPRG1 stores PACA pointer | ||
649 | * | ||
650 | * 64-bit server: | ||
651 | * - SPRG0 unused (reserved for HV on Power4) | ||
652 | * - SPRG2 scratch for exception vectors | ||
653 | * - SPRG3 unused (user visible) | ||
654 | * | ||
655 | * 64-bit embedded | ||
656 | * - SPRG0 generic exception scratch | ||
657 | * - SPRG2 TLB exception stack | ||
658 | * - SPRG3 unused (user visible) | ||
659 | * - SPRG4 unused (user visible) | ||
660 | * - SPRG6 TLB miss scratch (user visible, sorry !) | ||
661 | * - SPRG7 critical exception scratch | ||
662 | * - SPRG8 machine check exception scratch | ||
663 | * - SPRG9 debug exception scratch | ||
664 | * | ||
665 | * All 32-bit: | ||
666 | * - SPRG3 current thread_info pointer | ||
667 | * (virtual on BookE, physical on others) | ||
668 | * | ||
669 | * 32-bit classic: | ||
670 | * - SPRG0 scratch for exception vectors | ||
671 | * - SPRG1 scratch for exception vectors | ||
672 | * - SPRG2 indicator that we are in RTAS | ||
673 | * - SPRG4 (603 only) pseudo TLB LRU data | ||
674 | * | ||
675 | * 32-bit 40x: | ||
676 | * - SPRG0 scratch for exception vectors | ||
677 | * - SPRG1 scratch for exception vectors | ||
678 | * - SPRG2 scratch for exception vectors | ||
679 | * - SPRG4 scratch for exception vectors (not 403) | ||
680 | * - SPRG5 scratch for exception vectors (not 403) | ||
681 | * - SPRG6 scratch for exception vectors (not 403) | ||
682 | * - SPRG7 scratch for exception vectors (not 403) | ||
683 | * | ||
684 | * 32-bit 440 and FSL BookE: | ||
685 | * - SPRG0 scratch for exception vectors | ||
686 | * - SPRG1 scratch for exception vectors (*) | ||
687 | * - SPRG2 scratch for crit interrupts handler | ||
688 | * - SPRG4 scratch for exception vectors | ||
689 | * - SPRG5 scratch for exception vectors | ||
690 | * - SPRG6 scratch for machine check handler | ||
691 | * - SPRG7 scratch for exception vectors | ||
692 | * - SPRG9 scratch for debug vectors (e500 only) | ||
693 | * | ||
694 | * Additionally, BookE separates "read" and "write" | ||
695 | * of those registers. That allows to use the userspace | ||
696 | * readable variant for reads, which can avoid a fault | ||
697 | * with KVM type virtualization. | ||
698 | * | ||
699 | * (*) Under KVM, the host SPRG1 is used to point to | ||
700 | * the current VCPU data structure | ||
701 | * | ||
702 | * 32-bit 8xx: | ||
703 | * - SPRG0 scratch for exception vectors | ||
704 | * - SPRG1 scratch for exception vectors | ||
705 | * - SPRG2 apparently unused but initialized | ||
706 | * | ||
707 | */ | ||
708 | #ifdef CONFIG_PPC64 | ||
709 | #define SPRN_SPRG_PACA SPRN_SPRG1 | ||
710 | #else | ||
711 | #define SPRN_SPRG_THREAD SPRN_SPRG3 | ||
712 | #endif | ||
713 | |||
714 | #ifdef CONFIG_PPC_BOOK3S_64 | ||
715 | #define SPRN_SPRG_SCRATCH0 SPRN_SPRG2 | ||
716 | #endif | ||
717 | |||
718 | #ifdef CONFIG_PPC_BOOK3E_64 | ||
719 | #define SPRN_SPRG_MC_SCRATCH SPRN_SPRG8 | ||
720 | #define SPRN_SPRG_CRIT_SCRATCH SPRN_SPRG7 | ||
721 | #define SPRN_SPRG_DBG_SCRATCH SPRN_SPRG9 | ||
722 | #define SPRN_SPRG_TLB_EXFRAME SPRN_SPRG2 | ||
723 | #define SPRN_SPRG_TLB_SCRATCH SPRN_SPRG6 | ||
724 | #define SPRN_SPRG_GEN_SCRATCH SPRN_SPRG0 | ||
725 | #endif | ||
726 | |||
727 | #ifdef CONFIG_PPC_BOOK3S_32 | ||
728 | #define SPRN_SPRG_SCRATCH0 SPRN_SPRG0 | ||
729 | #define SPRN_SPRG_SCRATCH1 SPRN_SPRG1 | ||
730 | #define SPRN_SPRG_RTAS SPRN_SPRG2 | ||
731 | #define SPRN_SPRG_603_LRU SPRN_SPRG4 | ||
732 | #endif | ||
733 | |||
734 | #ifdef CONFIG_40x | ||
735 | #define SPRN_SPRG_SCRATCH0 SPRN_SPRG0 | ||
736 | #define SPRN_SPRG_SCRATCH1 SPRN_SPRG1 | ||
737 | #define SPRN_SPRG_SCRATCH2 SPRN_SPRG2 | ||
738 | #define SPRN_SPRG_SCRATCH3 SPRN_SPRG4 | ||
739 | #define SPRN_SPRG_SCRATCH4 SPRN_SPRG5 | ||
740 | #define SPRN_SPRG_SCRATCH5 SPRN_SPRG6 | ||
741 | #define SPRN_SPRG_SCRATCH6 SPRN_SPRG7 | ||
742 | #endif | ||
743 | |||
744 | #ifdef CONFIG_BOOKE | ||
745 | #define SPRN_SPRG_RSCRATCH0 SPRN_SPRG0 | ||
746 | #define SPRN_SPRG_WSCRATCH0 SPRN_SPRG0 | ||
747 | #define SPRN_SPRG_RSCRATCH1 SPRN_SPRG1 | ||
748 | #define SPRN_SPRG_WSCRATCH1 SPRN_SPRG1 | ||
749 | #define SPRN_SPRG_RSCRATCH_CRIT SPRN_SPRG2 | ||
750 | #define SPRN_SPRG_WSCRATCH_CRIT SPRN_SPRG2 | ||
751 | #define SPRN_SPRG_RSCRATCH2 SPRN_SPRG4R | ||
752 | #define SPRN_SPRG_WSCRATCH2 SPRN_SPRG4W | ||
753 | #define SPRN_SPRG_RSCRATCH3 SPRN_SPRG5R | ||
754 | #define SPRN_SPRG_WSCRATCH3 SPRN_SPRG5W | ||
755 | #define SPRN_SPRG_RSCRATCH_MC SPRN_SPRG6R | ||
756 | #define SPRN_SPRG_WSCRATCH_MC SPRN_SPRG6W | ||
757 | #define SPRN_SPRG_RSCRATCH4 SPRN_SPRG7R | ||
758 | #define SPRN_SPRG_WSCRATCH4 SPRN_SPRG7W | ||
759 | #ifdef CONFIG_E200 | ||
760 | #define SPRN_SPRG_RSCRATCH_DBG SPRN_SPRG6R | ||
761 | #define SPRN_SPRG_WSCRATCH_DBG SPRN_SPRG6W | ||
762 | #else | ||
763 | #define SPRN_SPRG_RSCRATCH_DBG SPRN_SPRG9 | ||
764 | #define SPRN_SPRG_WSCRATCH_DBG SPRN_SPRG9 | ||
765 | #endif | ||
766 | #define SPRN_SPRG_RVCPU SPRN_SPRG1 | ||
767 | #define SPRN_SPRG_WVCPU SPRN_SPRG1 | ||
768 | #endif | ||
769 | |||
770 | #ifdef CONFIG_8xx | ||
771 | #define SPRN_SPRG_SCRATCH0 SPRN_SPRG0 | ||
772 | #define SPRN_SPRG_SCRATCH1 SPRN_SPRG1 | ||
773 | #endif | ||
774 | |||
775 | /* | ||
649 | * An mtfsf instruction with the L bit set. On CPUs that support this a | 776 | * An mtfsf instruction with the L bit set. On CPUs that support this a |
650 | * full 64bits of FPSCR is restored and on other CPUs the L bit is ignored. | 777 | * full 64bits of FPSCR is restored and on other CPUs the L bit is ignored. |
651 | * | 778 | * |
diff --git a/arch/powerpc/include/asm/reg_booke.h b/arch/powerpc/include/asm/reg_booke.h index 6bcf364cbb2f..3bf783505528 100644 --- a/arch/powerpc/include/asm/reg_booke.h +++ b/arch/powerpc/include/asm/reg_booke.h | |||
@@ -18,18 +18,26 @@ | |||
18 | #define MSR_IS MSR_IR /* Instruction Space */ | 18 | #define MSR_IS MSR_IR /* Instruction Space */ |
19 | #define MSR_DS MSR_DR /* Data Space */ | 19 | #define MSR_DS MSR_DR /* Data Space */ |
20 | #define MSR_PMM (1<<2) /* Performance monitor mark bit */ | 20 | #define MSR_PMM (1<<2) /* Performance monitor mark bit */ |
21 | #define MSR_CM (1<<31) /* Computation Mode (0=32-bit, 1=64-bit) */ | ||
21 | 22 | ||
22 | /* Default MSR for kernel mode. */ | 23 | #if defined(CONFIG_PPC_BOOK3E_64) |
23 | #if defined (CONFIG_40x) | 24 | #define MSR_ MSR_ME | MSR_CE |
25 | #define MSR_KERNEL MSR_ | MSR_CM | ||
26 | #define MSR_USER32 MSR_ | MSR_PR | MSR_EE | ||
27 | #define MSR_USER64 MSR_USER32 | MSR_CM | ||
28 | #elif defined (CONFIG_40x) | ||
24 | #define MSR_KERNEL (MSR_ME|MSR_RI|MSR_IR|MSR_DR|MSR_CE) | 29 | #define MSR_KERNEL (MSR_ME|MSR_RI|MSR_IR|MSR_DR|MSR_CE) |
25 | #elif defined(CONFIG_BOOKE) | 30 | #define MSR_USER (MSR_KERNEL|MSR_PR|MSR_EE) |
31 | #else | ||
26 | #define MSR_KERNEL (MSR_ME|MSR_RI|MSR_CE) | 32 | #define MSR_KERNEL (MSR_ME|MSR_RI|MSR_CE) |
33 | #define MSR_USER (MSR_KERNEL|MSR_PR|MSR_EE) | ||
27 | #endif | 34 | #endif |
28 | 35 | ||
29 | /* Special Purpose Registers (SPRNs)*/ | 36 | /* Special Purpose Registers (SPRNs)*/ |
30 | #define SPRN_DECAR 0x036 /* Decrementer Auto Reload Register */ | 37 | #define SPRN_DECAR 0x036 /* Decrementer Auto Reload Register */ |
31 | #define SPRN_IVPR 0x03F /* Interrupt Vector Prefix Register */ | 38 | #define SPRN_IVPR 0x03F /* Interrupt Vector Prefix Register */ |
32 | #define SPRN_USPRG0 0x100 /* User Special Purpose Register General 0 */ | 39 | #define SPRN_USPRG0 0x100 /* User Special Purpose Register General 0 */ |
40 | #define SPRN_SPRG3R 0x103 /* Special Purpose Register General 3 Read */ | ||
33 | #define SPRN_SPRG4R 0x104 /* Special Purpose Register General 4 Read */ | 41 | #define SPRN_SPRG4R 0x104 /* Special Purpose Register General 4 Read */ |
34 | #define SPRN_SPRG5R 0x105 /* Special Purpose Register General 5 Read */ | 42 | #define SPRN_SPRG5R 0x105 /* Special Purpose Register General 5 Read */ |
35 | #define SPRN_SPRG6R 0x106 /* Special Purpose Register General 6 Read */ | 43 | #define SPRN_SPRG6R 0x106 /* Special Purpose Register General 6 Read */ |
@@ -38,11 +46,18 @@ | |||
38 | #define SPRN_SPRG5W 0x115 /* Special Purpose Register General 5 Write */ | 46 | #define SPRN_SPRG5W 0x115 /* Special Purpose Register General 5 Write */ |
39 | #define SPRN_SPRG6W 0x116 /* Special Purpose Register General 6 Write */ | 47 | #define SPRN_SPRG6W 0x116 /* Special Purpose Register General 6 Write */ |
40 | #define SPRN_SPRG7W 0x117 /* Special Purpose Register General 7 Write */ | 48 | #define SPRN_SPRG7W 0x117 /* Special Purpose Register General 7 Write */ |
49 | #define SPRN_EPCR 0x133 /* Embedded Processor Control Register */ | ||
41 | #define SPRN_DBCR2 0x136 /* Debug Control Register 2 */ | 50 | #define SPRN_DBCR2 0x136 /* Debug Control Register 2 */ |
42 | #define SPRN_IAC3 0x13A /* Instruction Address Compare 3 */ | 51 | #define SPRN_IAC3 0x13A /* Instruction Address Compare 3 */ |
43 | #define SPRN_IAC4 0x13B /* Instruction Address Compare 4 */ | 52 | #define SPRN_IAC4 0x13B /* Instruction Address Compare 4 */ |
44 | #define SPRN_DVC1 0x13E /* Data Value Compare Register 1 */ | 53 | #define SPRN_DVC1 0x13E /* Data Value Compare Register 1 */ |
45 | #define SPRN_DVC2 0x13F /* Data Value Compare Register 2 */ | 54 | #define SPRN_DVC2 0x13F /* Data Value Compare Register 2 */ |
55 | #define SPRN_MAS8 0x155 /* MMU Assist Register 8 */ | ||
56 | #define SPRN_TLB0PS 0x158 /* TLB 0 Page Size Register */ | ||
57 | #define SPRN_MAS5_MAS6 0x15c /* MMU Assist Register 5 || 6 */ | ||
58 | #define SPRN_MAS8_MAS1 0x15d /* MMU Assist Register 8 || 1 */ | ||
59 | #define SPRN_MAS7_MAS3 0x174 /* MMU Assist Register 7 || 3 */ | ||
60 | #define SPRN_MAS0_MAS1 0x175 /* MMU Assist Register 0 || 1 */ | ||
46 | #define SPRN_IVOR0 0x190 /* Interrupt Vector Offset Register 0 */ | 61 | #define SPRN_IVOR0 0x190 /* Interrupt Vector Offset Register 0 */ |
47 | #define SPRN_IVOR1 0x191 /* Interrupt Vector Offset Register 1 */ | 62 | #define SPRN_IVOR1 0x191 /* Interrupt Vector Offset Register 1 */ |
48 | #define SPRN_IVOR2 0x192 /* Interrupt Vector Offset Register 2 */ | 63 | #define SPRN_IVOR2 0x192 /* Interrupt Vector Offset Register 2 */ |
@@ -93,6 +108,8 @@ | |||
93 | #define SPRN_PID2 0x27A /* Process ID Register 2 */ | 108 | #define SPRN_PID2 0x27A /* Process ID Register 2 */ |
94 | #define SPRN_TLB0CFG 0x2B0 /* TLB 0 Config Register */ | 109 | #define SPRN_TLB0CFG 0x2B0 /* TLB 0 Config Register */ |
95 | #define SPRN_TLB1CFG 0x2B1 /* TLB 1 Config Register */ | 110 | #define SPRN_TLB1CFG 0x2B1 /* TLB 1 Config Register */ |
111 | #define SPRN_TLB2CFG 0x2B2 /* TLB 2 Config Register */ | ||
112 | #define SPRN_TLB3CFG 0x2B3 /* TLB 3 Config Register */ | ||
96 | #define SPRN_EPR 0x2BE /* External Proxy Register */ | 113 | #define SPRN_EPR 0x2BE /* External Proxy Register */ |
97 | #define SPRN_CCR1 0x378 /* Core Configuration Register 1 */ | 114 | #define SPRN_CCR1 0x378 /* Core Configuration Register 1 */ |
98 | #define SPRN_ZPR 0x3B0 /* Zone Protection Register (40x) */ | 115 | #define SPRN_ZPR 0x3B0 /* Zone Protection Register (40x) */ |
@@ -415,16 +432,31 @@ | |||
415 | #define L2CSR0_L2LOA 0x00000080 /* L2 Cache Lock Overflow Allocate */ | 432 | #define L2CSR0_L2LOA 0x00000080 /* L2 Cache Lock Overflow Allocate */ |
416 | #define L2CSR0_L2LO 0x00000020 /* L2 Cache Lock Overflow */ | 433 | #define L2CSR0_L2LO 0x00000020 /* L2 Cache Lock Overflow */ |
417 | 434 | ||
418 | /* Bit definitions for MMUCSR0 */ | ||
419 | #define MMUCSR0_TLB1FI 0x00000002 /* TLB1 Flash invalidate */ | ||
420 | #define MMUCSR0_TLB0FI 0x00000004 /* TLB0 Flash invalidate */ | ||
421 | #define MMUCSR0_TLB2FI 0x00000040 /* TLB2 Flash invalidate */ | ||
422 | #define MMUCSR0_TLB3FI 0x00000020 /* TLB3 Flash invalidate */ | ||
423 | |||
424 | /* Bit definitions for SGR. */ | 435 | /* Bit definitions for SGR. */ |
425 | #define SGR_NORMAL 0 /* Speculative fetching allowed. */ | 436 | #define SGR_NORMAL 0 /* Speculative fetching allowed. */ |
426 | #define SGR_GUARDED 1 /* Speculative fetching disallowed. */ | 437 | #define SGR_GUARDED 1 /* Speculative fetching disallowed. */ |
427 | 438 | ||
439 | /* Bit definitions for EPCR */ | ||
440 | #define SPRN_EPCR_EXTGS 0x80000000 /* External Input interrupt | ||
441 | * directed to Guest state */ | ||
442 | #define SPRN_EPCR_DTLBGS 0x40000000 /* Data TLB Error interrupt | ||
443 | * directed to guest state */ | ||
444 | #define SPRN_EPCR_ITLBGS 0x20000000 /* Instr. TLB error interrupt | ||
445 | * directed to guest state */ | ||
446 | #define SPRN_EPCR_DSIGS 0x10000000 /* Data Storage interrupt | ||
447 | * directed to guest state */ | ||
448 | #define SPRN_EPCR_ISIGS 0x08000000 /* Instr. Storage interrupt | ||
449 | * directed to guest state */ | ||
450 | #define SPRN_EPCR_DUVD 0x04000000 /* Disable Hypervisor Debug */ | ||
451 | #define SPRN_EPCR_ICM 0x02000000 /* Interrupt computation mode | ||
452 | * (copied to MSR:CM on intr) */ | ||
453 | #define SPRN_EPCR_GICM 0x01000000 /* Guest Interrupt Comp. mode */ | ||
454 | #define SPRN_EPCR_DGTMI 0x00800000 /* Disable TLB Guest Management | ||
455 | * instructions */ | ||
456 | #define SPRN_EPCR_DMIUH 0x00400000 /* Disable MAS Interrupt updates | ||
457 | * for hypervisor */ | ||
458 | |||
459 | |||
428 | /* | 460 | /* |
429 | * The IBM-403 is an even more odd special case, as it is much | 461 | * The IBM-403 is an even more odd special case, as it is much |
430 | * older than the IBM-405 series. We put these down here incase someone | 462 | * older than the IBM-405 series. We put these down here incase someone |
diff --git a/arch/powerpc/include/asm/setup.h b/arch/powerpc/include/asm/setup.h index 817fac0a0714..dae19342f0b9 100644 --- a/arch/powerpc/include/asm/setup.h +++ b/arch/powerpc/include/asm/setup.h | |||
@@ -1,6 +1,6 @@ | |||
1 | #ifndef _ASM_POWERPC_SETUP_H | 1 | #ifndef _ASM_POWERPC_SETUP_H |
2 | #define _ASM_POWERPC_SETUP_H | 2 | #define _ASM_POWERPC_SETUP_H |
3 | 3 | ||
4 | #define COMMAND_LINE_SIZE 512 | 4 | #include <asm-generic/setup.h> |
5 | 5 | ||
6 | #endif /* _ASM_POWERPC_SETUP_H */ | 6 | #endif /* _ASM_POWERPC_SETUP_H */ |
diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h index c25f73d1d842..c0d3b8af9319 100644 --- a/arch/powerpc/include/asm/smp.h +++ b/arch/powerpc/include/asm/smp.h | |||
@@ -148,6 +148,16 @@ extern struct smp_ops_t *smp_ops; | |||
148 | extern void arch_send_call_function_single_ipi(int cpu); | 148 | extern void arch_send_call_function_single_ipi(int cpu); |
149 | extern void arch_send_call_function_ipi(cpumask_t mask); | 149 | extern void arch_send_call_function_ipi(cpumask_t mask); |
150 | 150 | ||
151 | /* Definitions relative to the secondary CPU spin loop | ||
152 | * and entry point. Not all of them exist on both 32 and | ||
153 | * 64-bit but defining them all here doesn't harm | ||
154 | */ | ||
155 | extern void generic_secondary_smp_init(void); | ||
156 | extern void generic_secondary_thread_init(void); | ||
157 | extern unsigned long __secondary_hold_spinloop; | ||
158 | extern unsigned long __secondary_hold_acknowledge; | ||
159 | extern char __secondary_hold; | ||
160 | |||
151 | #endif /* __ASSEMBLY__ */ | 161 | #endif /* __ASSEMBLY__ */ |
152 | 162 | ||
153 | #endif /* __KERNEL__ */ | 163 | #endif /* __KERNEL__ */ |
diff --git a/arch/powerpc/include/asm/swiotlb.h b/arch/powerpc/include/asm/swiotlb.h index 30891d6e2bc1..8979d4cd3d70 100644 --- a/arch/powerpc/include/asm/swiotlb.h +++ b/arch/powerpc/include/asm/swiotlb.h | |||
@@ -13,15 +13,13 @@ | |||
13 | 13 | ||
14 | #include <linux/swiotlb.h> | 14 | #include <linux/swiotlb.h> |
15 | 15 | ||
16 | extern struct dma_mapping_ops swiotlb_dma_ops; | 16 | extern struct dma_map_ops swiotlb_dma_ops; |
17 | extern struct dma_mapping_ops swiotlb_pci_dma_ops; | ||
18 | |||
19 | int swiotlb_arch_address_needs_mapping(struct device *, dma_addr_t, | ||
20 | size_t size); | ||
21 | 17 | ||
22 | static inline void dma_mark_clean(void *addr, size_t size) {} | 18 | static inline void dma_mark_clean(void *addr, size_t size) {} |
23 | 19 | ||
24 | extern unsigned int ppc_swiotlb_enable; | 20 | extern unsigned int ppc_swiotlb_enable; |
25 | int __init swiotlb_setup_bus_notifier(void); | 21 | int __init swiotlb_setup_bus_notifier(void); |
26 | 22 | ||
23 | extern void pci_dma_dev_setup_swiotlb(struct pci_dev *pdev); | ||
24 | |||
27 | #endif /* __ASM_SWIOTLB_H */ | 25 | #endif /* __ASM_SWIOTLB_H */ |
diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h index 370600ca2765..ed24bd92fe49 100644 --- a/arch/powerpc/include/asm/systbl.h +++ b/arch/powerpc/include/asm/systbl.h | |||
@@ -95,8 +95,8 @@ SYSCALL(reboot) | |||
95 | SYSX(sys_ni_syscall,compat_sys_old_readdir,sys_old_readdir) | 95 | SYSX(sys_ni_syscall,compat_sys_old_readdir,sys_old_readdir) |
96 | SYSCALL_SPU(mmap) | 96 | SYSCALL_SPU(mmap) |
97 | SYSCALL_SPU(munmap) | 97 | SYSCALL_SPU(munmap) |
98 | SYSCALL_SPU(truncate) | 98 | COMPAT_SYS_SPU(truncate) |
99 | SYSCALL_SPU(ftruncate) | 99 | COMPAT_SYS_SPU(ftruncate) |
100 | SYSCALL_SPU(fchmod) | 100 | SYSCALL_SPU(fchmod) |
101 | SYSCALL_SPU(fchown) | 101 | SYSCALL_SPU(fchown) |
102 | COMPAT_SYS_SPU(getpriority) | 102 | COMPAT_SYS_SPU(getpriority) |
diff --git a/arch/powerpc/include/asm/tlb.h b/arch/powerpc/include/asm/tlb.h index e20ff7541f36..e2b428b0f7ba 100644 --- a/arch/powerpc/include/asm/tlb.h +++ b/arch/powerpc/include/asm/tlb.h | |||
@@ -25,57 +25,25 @@ | |||
25 | 25 | ||
26 | #include <linux/pagemap.h> | 26 | #include <linux/pagemap.h> |
27 | 27 | ||
28 | struct mmu_gather; | ||
29 | |||
30 | #define tlb_start_vma(tlb, vma) do { } while (0) | 28 | #define tlb_start_vma(tlb, vma) do { } while (0) |
31 | #define tlb_end_vma(tlb, vma) do { } while (0) | 29 | #define tlb_end_vma(tlb, vma) do { } while (0) |
32 | 30 | ||
33 | #if !defined(CONFIG_PPC_STD_MMU) | ||
34 | |||
35 | #define tlb_flush(tlb) flush_tlb_mm((tlb)->mm) | ||
36 | |||
37 | #elif defined(__powerpc64__) | ||
38 | |||
39 | extern void pte_free_finish(void); | ||
40 | |||
41 | static inline void tlb_flush(struct mmu_gather *tlb) | ||
42 | { | ||
43 | struct ppc64_tlb_batch *tlbbatch = &__get_cpu_var(ppc64_tlb_batch); | ||
44 | |||
45 | /* If there's a TLB batch pending, then we must flush it because the | ||
46 | * pages are going to be freed and we really don't want to have a CPU | ||
47 | * access a freed page because it has a stale TLB | ||
48 | */ | ||
49 | if (tlbbatch->index) | ||
50 | __flush_tlb_pending(tlbbatch); | ||
51 | |||
52 | pte_free_finish(); | ||
53 | } | ||
54 | |||
55 | #else | ||
56 | |||
57 | extern void tlb_flush(struct mmu_gather *tlb); | 31 | extern void tlb_flush(struct mmu_gather *tlb); |
58 | 32 | ||
59 | #endif | ||
60 | |||
61 | /* Get the generic bits... */ | 33 | /* Get the generic bits... */ |
62 | #include <asm-generic/tlb.h> | 34 | #include <asm-generic/tlb.h> |
63 | 35 | ||
64 | #if !defined(CONFIG_PPC_STD_MMU) || defined(__powerpc64__) | ||
65 | |||
66 | #define __tlb_remove_tlb_entry(tlb, pte, address) do { } while (0) | ||
67 | |||
68 | #else | ||
69 | extern void flush_hash_entry(struct mm_struct *mm, pte_t *ptep, | 36 | extern void flush_hash_entry(struct mm_struct *mm, pte_t *ptep, |
70 | unsigned long address); | 37 | unsigned long address); |
71 | 38 | ||
72 | static inline void __tlb_remove_tlb_entry(struct mmu_gather *tlb, pte_t *ptep, | 39 | static inline void __tlb_remove_tlb_entry(struct mmu_gather *tlb, pte_t *ptep, |
73 | unsigned long address) | 40 | unsigned long address) |
74 | { | 41 | { |
42 | #ifdef CONFIG_PPC_STD_MMU_32 | ||
75 | if (pte_val(*ptep) & _PAGE_HASHPTE) | 43 | if (pte_val(*ptep) & _PAGE_HASHPTE) |
76 | flush_hash_entry(tlb->mm, ptep, address); | 44 | flush_hash_entry(tlb->mm, ptep, address); |
45 | #endif | ||
77 | } | 46 | } |
78 | 47 | ||
79 | #endif | ||
80 | #endif /* __KERNEL__ */ | 48 | #endif /* __KERNEL__ */ |
81 | #endif /* __ASM_POWERPC_TLB_H */ | 49 | #endif /* __ASM_POWERPC_TLB_H */ |
diff --git a/arch/powerpc/include/asm/tlbflush.h b/arch/powerpc/include/asm/tlbflush.h index abbe3419d1dd..d50a380b2b6f 100644 --- a/arch/powerpc/include/asm/tlbflush.h +++ b/arch/powerpc/include/asm/tlbflush.h | |||
@@ -6,7 +6,7 @@ | |||
6 | * | 6 | * |
7 | * - flush_tlb_mm(mm) flushes the specified mm context TLB's | 7 | * - flush_tlb_mm(mm) flushes the specified mm context TLB's |
8 | * - flush_tlb_page(vma, vmaddr) flushes one page | 8 | * - flush_tlb_page(vma, vmaddr) flushes one page |
9 | * - local_flush_tlb_mm(mm) flushes the specified mm context on | 9 | * - local_flush_tlb_mm(mm, full) flushes the specified mm context on |
10 | * the local processor | 10 | * the local processor |
11 | * - local_flush_tlb_page(vma, vmaddr) flushes one page on the local processor | 11 | * - local_flush_tlb_page(vma, vmaddr) flushes one page on the local processor |
12 | * - flush_tlb_page_nohash(vma, vmaddr) flushes one page if SW loaded TLB | 12 | * - flush_tlb_page_nohash(vma, vmaddr) flushes one page if SW loaded TLB |
@@ -29,7 +29,8 @@ | |||
29 | * specific tlbie's | 29 | * specific tlbie's |
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include <linux/mm.h> | 32 | struct vm_area_struct; |
33 | struct mm_struct; | ||
33 | 34 | ||
34 | #define MMU_NO_CONTEXT ((unsigned int)-1) | 35 | #define MMU_NO_CONTEXT ((unsigned int)-1) |
35 | 36 | ||
@@ -40,12 +41,18 @@ extern void flush_tlb_kernel_range(unsigned long start, unsigned long end); | |||
40 | extern void local_flush_tlb_mm(struct mm_struct *mm); | 41 | extern void local_flush_tlb_mm(struct mm_struct *mm); |
41 | extern void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr); | 42 | extern void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr); |
42 | 43 | ||
44 | extern void __local_flush_tlb_page(struct mm_struct *mm, unsigned long vmaddr, | ||
45 | int tsize, int ind); | ||
46 | |||
43 | #ifdef CONFIG_SMP | 47 | #ifdef CONFIG_SMP |
44 | extern void flush_tlb_mm(struct mm_struct *mm); | 48 | extern void flush_tlb_mm(struct mm_struct *mm); |
45 | extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr); | 49 | extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr); |
50 | extern void __flush_tlb_page(struct mm_struct *mm, unsigned long vmaddr, | ||
51 | int tsize, int ind); | ||
46 | #else | 52 | #else |
47 | #define flush_tlb_mm(mm) local_flush_tlb_mm(mm) | 53 | #define flush_tlb_mm(mm) local_flush_tlb_mm(mm) |
48 | #define flush_tlb_page(vma,addr) local_flush_tlb_page(vma,addr) | 54 | #define flush_tlb_page(vma,addr) local_flush_tlb_page(vma,addr) |
55 | #define __flush_tlb_page(mm,addr,p,i) __local_flush_tlb_page(mm,addr,p,i) | ||
49 | #endif | 56 | #endif |
50 | #define flush_tlb_page_nohash(vma,addr) flush_tlb_page(vma,addr) | 57 | #define flush_tlb_page_nohash(vma,addr) flush_tlb_page(vma,addr) |
51 | 58 | ||
diff --git a/arch/powerpc/include/asm/vdso.h b/arch/powerpc/include/asm/vdso.h index 26fc449bd989..dc0419b66f17 100644 --- a/arch/powerpc/include/asm/vdso.h +++ b/arch/powerpc/include/asm/vdso.h | |||
@@ -7,9 +7,8 @@ | |||
7 | #define VDSO32_LBASE 0x100000 | 7 | #define VDSO32_LBASE 0x100000 |
8 | #define VDSO64_LBASE 0x100000 | 8 | #define VDSO64_LBASE 0x100000 |
9 | 9 | ||
10 | /* Default map addresses */ | 10 | /* Default map addresses for 32bit vDSO */ |
11 | #define VDSO32_MBASE VDSO32_LBASE | 11 | #define VDSO32_MBASE VDSO32_LBASE |
12 | #define VDSO64_MBASE VDSO64_LBASE | ||
13 | 12 | ||
14 | #define VDSO_VERSION_STRING LINUX_2.6.15 | 13 | #define VDSO_VERSION_STRING LINUX_2.6.15 |
15 | 14 | ||
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index 9619285f64e8..569f79ccd310 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile | |||
@@ -33,10 +33,10 @@ obj-y := cputable.o ptrace.o syscalls.o \ | |||
33 | obj-y += vdso32/ | 33 | obj-y += vdso32/ |
34 | obj-$(CONFIG_PPC64) += setup_64.o sys_ppc32.o \ | 34 | obj-$(CONFIG_PPC64) += setup_64.o sys_ppc32.o \ |
35 | signal_64.o ptrace32.o \ | 35 | signal_64.o ptrace32.o \ |
36 | paca.o cpu_setup_ppc970.o \ | 36 | paca.o nvram_64.o firmware.o |
37 | cpu_setup_pa6t.o \ | 37 | obj-$(CONFIG_PPC_BOOK3S_64) += cpu_setup_ppc970.o cpu_setup_pa6t.o |
38 | firmware.o nvram_64.o | ||
39 | obj64-$(CONFIG_RELOCATABLE) += reloc_64.o | 38 | obj64-$(CONFIG_RELOCATABLE) += reloc_64.o |
39 | obj-$(CONFIG_PPC_BOOK3E_64) += exceptions-64e.o | ||
40 | obj-$(CONFIG_PPC64) += vdso64/ | 40 | obj-$(CONFIG_PPC64) += vdso64/ |
41 | obj-$(CONFIG_ALTIVEC) += vecemu.o | 41 | obj-$(CONFIG_ALTIVEC) += vecemu.o |
42 | obj-$(CONFIG_PPC_970_NAP) += idle_power4.o | 42 | obj-$(CONFIG_PPC_970_NAP) += idle_power4.o |
@@ -63,8 +63,8 @@ obj-$(CONFIG_MODULES) += module.o module_$(CONFIG_WORD_SIZE).o | |||
63 | obj-$(CONFIG_44x) += cpu_setup_44x.o | 63 | obj-$(CONFIG_44x) += cpu_setup_44x.o |
64 | obj-$(CONFIG_FSL_BOOKE) += cpu_setup_fsl_booke.o dbell.o | 64 | obj-$(CONFIG_FSL_BOOKE) += cpu_setup_fsl_booke.o dbell.o |
65 | 65 | ||
66 | extra-$(CONFIG_PPC_STD_MMU) := head_32.o | 66 | extra-y := head_$(CONFIG_WORD_SIZE).o |
67 | extra-$(CONFIG_PPC64) := head_64.o | 67 | extra-$(CONFIG_PPC_BOOK3E_32) := head_new_booke.o |
68 | extra-$(CONFIG_40x) := head_40x.o | 68 | extra-$(CONFIG_40x) := head_40x.o |
69 | extra-$(CONFIG_44x) := head_44x.o | 69 | extra-$(CONFIG_44x) := head_44x.o |
70 | extra-$(CONFIG_FSL_BOOKE) := head_fsl_booke.o | 70 | extra-$(CONFIG_FSL_BOOKE) := head_fsl_booke.o |
@@ -88,7 +88,7 @@ obj-$(CONFIG_SWIOTLB) += dma-swiotlb.o | |||
88 | 88 | ||
89 | pci64-$(CONFIG_PPC64) += pci_dn.o isa-bridge.o | 89 | pci64-$(CONFIG_PPC64) += pci_dn.o isa-bridge.o |
90 | obj-$(CONFIG_PCI) += pci_$(CONFIG_WORD_SIZE).o $(pci64-y) \ | 90 | obj-$(CONFIG_PCI) += pci_$(CONFIG_WORD_SIZE).o $(pci64-y) \ |
91 | pci-common.o | 91 | pci-common.o pci_of_scan.o |
92 | obj-$(CONFIG_PCI_MSI) += msi.o | 92 | obj-$(CONFIG_PCI_MSI) += msi.o |
93 | obj-$(CONFIG_KEXEC) += machine_kexec.o crash.o \ | 93 | obj-$(CONFIG_KEXEC) += machine_kexec.o crash.o \ |
94 | machine_kexec_$(CONFIG_WORD_SIZE).o | 94 | machine_kexec_$(CONFIG_WORD_SIZE).o |
@@ -115,6 +115,13 @@ ifneq ($(CONFIG_XMON)$(CONFIG_KEXEC),) | |||
115 | obj-y += ppc_save_regs.o | 115 | obj-y += ppc_save_regs.o |
116 | endif | 116 | endif |
117 | 117 | ||
118 | # Disable GCOV in odd or sensitive code | ||
119 | GCOV_PROFILE_prom_init.o := n | ||
120 | GCOV_PROFILE_ftrace.o := n | ||
121 | GCOV_PROFILE_machine_kexec_64.o := n | ||
122 | GCOV_PROFILE_machine_kexec_32.o := n | ||
123 | GCOV_PROFILE_kprobes.o := n | ||
124 | |||
118 | extra-$(CONFIG_PPC_FPU) += fpu.o | 125 | extra-$(CONFIG_PPC_FPU) += fpu.o |
119 | extra-$(CONFIG_ALTIVEC) += vector.o | 126 | extra-$(CONFIG_ALTIVEC) += vector.o |
120 | extra-$(CONFIG_PPC64) += entry_64.o | 127 | extra-$(CONFIG_PPC64) += entry_64.o |
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index 197b15646eeb..f0df285f0f87 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c | |||
@@ -52,9 +52,11 @@ | |||
52 | #include <linux/kvm_host.h> | 52 | #include <linux/kvm_host.h> |
53 | #endif | 53 | #endif |
54 | 54 | ||
55 | #ifdef CONFIG_PPC32 | ||
55 | #if defined(CONFIG_BOOKE) || defined(CONFIG_40x) | 56 | #if defined(CONFIG_BOOKE) || defined(CONFIG_40x) |
56 | #include "head_booke.h" | 57 | #include "head_booke.h" |
57 | #endif | 58 | #endif |
59 | #endif | ||
58 | 60 | ||
59 | #if defined(CONFIG_FSL_BOOKE) | 61 | #if defined(CONFIG_FSL_BOOKE) |
60 | #include "../mm/mmu_decl.h" | 62 | #include "../mm/mmu_decl.h" |
@@ -140,6 +142,20 @@ int main(void) | |||
140 | context.high_slices_psize)); | 142 | context.high_slices_psize)); |
141 | DEFINE(MMUPSIZEDEFSIZE, sizeof(struct mmu_psize_def)); | 143 | DEFINE(MMUPSIZEDEFSIZE, sizeof(struct mmu_psize_def)); |
142 | #endif /* CONFIG_PPC_MM_SLICES */ | 144 | #endif /* CONFIG_PPC_MM_SLICES */ |
145 | |||
146 | #ifdef CONFIG_PPC_BOOK3E | ||
147 | DEFINE(PACAPGD, offsetof(struct paca_struct, pgd)); | ||
148 | DEFINE(PACA_KERNELPGD, offsetof(struct paca_struct, kernel_pgd)); | ||
149 | DEFINE(PACA_EXGEN, offsetof(struct paca_struct, exgen)); | ||
150 | DEFINE(PACA_EXTLB, offsetof(struct paca_struct, extlb)); | ||
151 | DEFINE(PACA_EXMC, offsetof(struct paca_struct, exmc)); | ||
152 | DEFINE(PACA_EXCRIT, offsetof(struct paca_struct, excrit)); | ||
153 | DEFINE(PACA_EXDBG, offsetof(struct paca_struct, exdbg)); | ||
154 | DEFINE(PACA_MC_STACK, offsetof(struct paca_struct, mc_kstack)); | ||
155 | DEFINE(PACA_CRIT_STACK, offsetof(struct paca_struct, crit_kstack)); | ||
156 | DEFINE(PACA_DBG_STACK, offsetof(struct paca_struct, dbg_kstack)); | ||
157 | #endif /* CONFIG_PPC_BOOK3E */ | ||
158 | |||
143 | #ifdef CONFIG_PPC_STD_MMU_64 | 159 | #ifdef CONFIG_PPC_STD_MMU_64 |
144 | DEFINE(PACASTABREAL, offsetof(struct paca_struct, stab_real)); | 160 | DEFINE(PACASTABREAL, offsetof(struct paca_struct, stab_real)); |
145 | DEFINE(PACASTABVIRT, offsetof(struct paca_struct, stab_addr)); | 161 | DEFINE(PACASTABVIRT, offsetof(struct paca_struct, stab_addr)); |
@@ -262,6 +278,7 @@ int main(void) | |||
262 | DEFINE(_SRR1, STACK_FRAME_OVERHEAD+sizeof(struct pt_regs)+8); | 278 | DEFINE(_SRR1, STACK_FRAME_OVERHEAD+sizeof(struct pt_regs)+8); |
263 | #endif /* CONFIG_PPC64 */ | 279 | #endif /* CONFIG_PPC64 */ |
264 | 280 | ||
281 | #if defined(CONFIG_PPC32) | ||
265 | #if defined(CONFIG_BOOKE) || defined(CONFIG_40x) | 282 | #if defined(CONFIG_BOOKE) || defined(CONFIG_40x) |
266 | DEFINE(EXC_LVL_SIZE, STACK_EXC_LVL_FRAME_SIZE); | 283 | DEFINE(EXC_LVL_SIZE, STACK_EXC_LVL_FRAME_SIZE); |
267 | DEFINE(MAS0, STACK_INT_FRAME_SIZE+offsetof(struct exception_regs, mas0)); | 284 | DEFINE(MAS0, STACK_INT_FRAME_SIZE+offsetof(struct exception_regs, mas0)); |
@@ -280,7 +297,7 @@ int main(void) | |||
280 | DEFINE(_DSRR1, STACK_INT_FRAME_SIZE+offsetof(struct exception_regs, dsrr1)); | 297 | DEFINE(_DSRR1, STACK_INT_FRAME_SIZE+offsetof(struct exception_regs, dsrr1)); |
281 | DEFINE(SAVED_KSP_LIMIT, STACK_INT_FRAME_SIZE+offsetof(struct exception_regs, saved_ksp_limit)); | 298 | DEFINE(SAVED_KSP_LIMIT, STACK_INT_FRAME_SIZE+offsetof(struct exception_regs, saved_ksp_limit)); |
282 | #endif | 299 | #endif |
283 | 300 | #endif | |
284 | DEFINE(CLONE_VM, CLONE_VM); | 301 | DEFINE(CLONE_VM, CLONE_VM); |
285 | DEFINE(CLONE_UNTRACED, CLONE_UNTRACED); | 302 | DEFINE(CLONE_UNTRACED, CLONE_UNTRACED); |
286 | 303 | ||
diff --git a/arch/powerpc/kernel/cpu_setup_6xx.S b/arch/powerpc/kernel/cpu_setup_6xx.S index 1e9949e68856..55cba4a8a959 100644 --- a/arch/powerpc/kernel/cpu_setup_6xx.S +++ b/arch/powerpc/kernel/cpu_setup_6xx.S | |||
@@ -21,7 +21,7 @@ _GLOBAL(__setup_cpu_603) | |||
21 | mflr r4 | 21 | mflr r4 |
22 | BEGIN_MMU_FTR_SECTION | 22 | BEGIN_MMU_FTR_SECTION |
23 | li r10,0 | 23 | li r10,0 |
24 | mtspr SPRN_SPRG4,r10 /* init SW LRU tracking */ | 24 | mtspr SPRN_SPRG_603_LRU,r10 /* init SW LRU tracking */ |
25 | END_MMU_FTR_SECTION_IFSET(MMU_FTR_NEED_DTLB_SW_LRU) | 25 | END_MMU_FTR_SECTION_IFSET(MMU_FTR_NEED_DTLB_SW_LRU) |
26 | BEGIN_FTR_SECTION | 26 | BEGIN_FTR_SECTION |
27 | bl __init_fpu_registers | 27 | bl __init_fpu_registers |
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index 4a24a2fc4574..0b9c9135922e 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c | |||
@@ -89,11 +89,15 @@ extern void __restore_cpu_power7(void); | |||
89 | #define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\ | 89 | #define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\ |
90 | PPC_FEATURE_TRUE_LE | \ | 90 | PPC_FEATURE_TRUE_LE | \ |
91 | PPC_FEATURE_HAS_ALTIVEC_COMP) | 91 | PPC_FEATURE_HAS_ALTIVEC_COMP) |
92 | #ifdef CONFIG_PPC_BOOK3E_64 | ||
93 | #define COMMON_USER_BOOKE (COMMON_USER_PPC64 | PPC_FEATURE_BOOKE) | ||
94 | #else | ||
92 | #define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \ | 95 | #define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \ |
93 | PPC_FEATURE_BOOKE) | 96 | PPC_FEATURE_BOOKE) |
97 | #endif | ||
94 | 98 | ||
95 | static struct cpu_spec __initdata cpu_specs[] = { | 99 | static struct cpu_spec __initdata cpu_specs[] = { |
96 | #ifdef CONFIG_PPC64 | 100 | #ifdef CONFIG_PPC_BOOK3S_64 |
97 | { /* Power3 */ | 101 | { /* Power3 */ |
98 | .pvr_mask = 0xffff0000, | 102 | .pvr_mask = 0xffff0000, |
99 | .pvr_value = 0x00400000, | 103 | .pvr_value = 0x00400000, |
@@ -508,7 +512,8 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
508 | .machine_check = machine_check_generic, | 512 | .machine_check = machine_check_generic, |
509 | .platform = "power4", | 513 | .platform = "power4", |
510 | } | 514 | } |
511 | #endif /* CONFIG_PPC64 */ | 515 | #endif /* CONFIG_PPC_BOOK3S_64 */ |
516 | |||
512 | #ifdef CONFIG_PPC32 | 517 | #ifdef CONFIG_PPC32 |
513 | #if CLASSIC_PPC | 518 | #if CLASSIC_PPC |
514 | { /* 601 */ | 519 | { /* 601 */ |
@@ -1630,7 +1635,7 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
1630 | .platform = "ppc440", | 1635 | .platform = "ppc440", |
1631 | }, | 1636 | }, |
1632 | { /* 460EX */ | 1637 | { /* 460EX */ |
1633 | .pvr_mask = 0xffff0002, | 1638 | .pvr_mask = 0xffff0006, |
1634 | .pvr_value = 0x13020002, | 1639 | .pvr_value = 0x13020002, |
1635 | .cpu_name = "460EX", | 1640 | .cpu_name = "460EX", |
1636 | .cpu_features = CPU_FTRS_440x6, | 1641 | .cpu_features = CPU_FTRS_440x6, |
@@ -1642,8 +1647,21 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
1642 | .machine_check = machine_check_440A, | 1647 | .machine_check = machine_check_440A, |
1643 | .platform = "ppc440", | 1648 | .platform = "ppc440", |
1644 | }, | 1649 | }, |
1650 | { /* 460EX Rev B */ | ||
1651 | .pvr_mask = 0xffff0007, | ||
1652 | .pvr_value = 0x13020004, | ||
1653 | .cpu_name = "460EX Rev. B", | ||
1654 | .cpu_features = CPU_FTRS_440x6, | ||
1655 | .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, | ||
1656 | .mmu_features = MMU_FTR_TYPE_44x, | ||
1657 | .icache_bsize = 32, | ||
1658 | .dcache_bsize = 32, | ||
1659 | .cpu_setup = __setup_cpu_460ex, | ||
1660 | .machine_check = machine_check_440A, | ||
1661 | .platform = "ppc440", | ||
1662 | }, | ||
1645 | { /* 460GT */ | 1663 | { /* 460GT */ |
1646 | .pvr_mask = 0xffff0002, | 1664 | .pvr_mask = 0xffff0006, |
1647 | .pvr_value = 0x13020000, | 1665 | .pvr_value = 0x13020000, |
1648 | .cpu_name = "460GT", | 1666 | .cpu_name = "460GT", |
1649 | .cpu_features = CPU_FTRS_440x6, | 1667 | .cpu_features = CPU_FTRS_440x6, |
@@ -1655,6 +1673,19 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
1655 | .machine_check = machine_check_440A, | 1673 | .machine_check = machine_check_440A, |
1656 | .platform = "ppc440", | 1674 | .platform = "ppc440", |
1657 | }, | 1675 | }, |
1676 | { /* 460GT Rev B */ | ||
1677 | .pvr_mask = 0xffff0007, | ||
1678 | .pvr_value = 0x13020005, | ||
1679 | .cpu_name = "460GT Rev. B", | ||
1680 | .cpu_features = CPU_FTRS_440x6, | ||
1681 | .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, | ||
1682 | .mmu_features = MMU_FTR_TYPE_44x, | ||
1683 | .icache_bsize = 32, | ||
1684 | .dcache_bsize = 32, | ||
1685 | .cpu_setup = __setup_cpu_460gt, | ||
1686 | .machine_check = machine_check_440A, | ||
1687 | .platform = "ppc440", | ||
1688 | }, | ||
1658 | { /* 460SX */ | 1689 | { /* 460SX */ |
1659 | .pvr_mask = 0xffffff00, | 1690 | .pvr_mask = 0xffffff00, |
1660 | .pvr_value = 0x13541800, | 1691 | .pvr_value = 0x13541800, |
@@ -1797,6 +1828,29 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
1797 | } | 1828 | } |
1798 | #endif /* CONFIG_E500 */ | 1829 | #endif /* CONFIG_E500 */ |
1799 | #endif /* CONFIG_PPC32 */ | 1830 | #endif /* CONFIG_PPC32 */ |
1831 | |||
1832 | #ifdef CONFIG_PPC_BOOK3E_64 | ||
1833 | { /* This is a default entry to get going, to be replaced by | ||
1834 | * a real one at some stage | ||
1835 | */ | ||
1836 | #define CPU_FTRS_BASE_BOOK3E (CPU_FTR_USE_TB | \ | ||
1837 | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_SMT | \ | ||
1838 | CPU_FTR_NODSISRALIGN | CPU_FTR_NOEXECUTE) | ||
1839 | .pvr_mask = 0x00000000, | ||
1840 | .pvr_value = 0x00000000, | ||
1841 | .cpu_name = "Book3E", | ||
1842 | .cpu_features = CPU_FTRS_BASE_BOOK3E, | ||
1843 | .cpu_user_features = COMMON_USER_PPC64, | ||
1844 | .mmu_features = MMU_FTR_TYPE_3E | MMU_FTR_USE_TLBILX | | ||
1845 | MMU_FTR_USE_TLBIVAX_BCAST | | ||
1846 | MMU_FTR_LOCK_BCAST_INVAL, | ||
1847 | .icache_bsize = 64, | ||
1848 | .dcache_bsize = 64, | ||
1849 | .num_pmcs = 0, | ||
1850 | .machine_check = machine_check_generic, | ||
1851 | .platform = "power6", | ||
1852 | }, | ||
1853 | #endif | ||
1800 | }; | 1854 | }; |
1801 | 1855 | ||
1802 | static struct cpu_spec the_cpu_spec; | 1856 | static struct cpu_spec the_cpu_spec; |
diff --git a/arch/powerpc/kernel/dma-iommu.c b/arch/powerpc/kernel/dma-iommu.c index 2983adac8cc3..87ddb3fb948c 100644 --- a/arch/powerpc/kernel/dma-iommu.c +++ b/arch/powerpc/kernel/dma-iommu.c | |||
@@ -89,7 +89,7 @@ static int dma_iommu_dma_supported(struct device *dev, u64 mask) | |||
89 | return 1; | 89 | return 1; |
90 | } | 90 | } |
91 | 91 | ||
92 | struct dma_mapping_ops dma_iommu_ops = { | 92 | struct dma_map_ops dma_iommu_ops = { |
93 | .alloc_coherent = dma_iommu_alloc_coherent, | 93 | .alloc_coherent = dma_iommu_alloc_coherent, |
94 | .free_coherent = dma_iommu_free_coherent, | 94 | .free_coherent = dma_iommu_free_coherent, |
95 | .map_sg = dma_iommu_map_sg, | 95 | .map_sg = dma_iommu_map_sg, |
diff --git a/arch/powerpc/kernel/dma-swiotlb.c b/arch/powerpc/kernel/dma-swiotlb.c index e8a57de85bcf..e96cbbd9b449 100644 --- a/arch/powerpc/kernel/dma-swiotlb.c +++ b/arch/powerpc/kernel/dma-swiotlb.c | |||
@@ -25,33 +25,13 @@ int swiotlb __read_mostly; | |||
25 | unsigned int ppc_swiotlb_enable; | 25 | unsigned int ppc_swiotlb_enable; |
26 | 26 | ||
27 | /* | 27 | /* |
28 | * Determine if an address is reachable by a pci device, or if we must bounce. | ||
29 | */ | ||
30 | static int | ||
31 | swiotlb_pci_addr_needs_map(struct device *hwdev, dma_addr_t addr, size_t size) | ||
32 | { | ||
33 | dma_addr_t max; | ||
34 | struct pci_controller *hose; | ||
35 | struct pci_dev *pdev = to_pci_dev(hwdev); | ||
36 | |||
37 | hose = pci_bus_to_host(pdev->bus); | ||
38 | max = hose->dma_window_base_cur + hose->dma_window_size; | ||
39 | |||
40 | /* check that we're within mapped pci window space */ | ||
41 | if ((addr + size > max) | (addr < hose->dma_window_base_cur)) | ||
42 | return 1; | ||
43 | |||
44 | return 0; | ||
45 | } | ||
46 | |||
47 | /* | ||
48 | * At the moment, all platforms that use this code only require | 28 | * At the moment, all platforms that use this code only require |
49 | * swiotlb to be used if we're operating on HIGHMEM. Since | 29 | * swiotlb to be used if we're operating on HIGHMEM. Since |
50 | * we don't ever call anything other than map_sg, unmap_sg, | 30 | * we don't ever call anything other than map_sg, unmap_sg, |
51 | * map_page, and unmap_page on highmem, use normal dma_ops | 31 | * map_page, and unmap_page on highmem, use normal dma_ops |
52 | * for everything else. | 32 | * for everything else. |
53 | */ | 33 | */ |
54 | struct dma_mapping_ops swiotlb_dma_ops = { | 34 | struct dma_map_ops swiotlb_dma_ops = { |
55 | .alloc_coherent = dma_direct_alloc_coherent, | 35 | .alloc_coherent = dma_direct_alloc_coherent, |
56 | .free_coherent = dma_direct_free_coherent, | 36 | .free_coherent = dma_direct_free_coherent, |
57 | .map_sg = swiotlb_map_sg_attrs, | 37 | .map_sg = swiotlb_map_sg_attrs, |
@@ -62,33 +42,34 @@ struct dma_mapping_ops swiotlb_dma_ops = { | |||
62 | .sync_single_range_for_cpu = swiotlb_sync_single_range_for_cpu, | 42 | .sync_single_range_for_cpu = swiotlb_sync_single_range_for_cpu, |
63 | .sync_single_range_for_device = swiotlb_sync_single_range_for_device, | 43 | .sync_single_range_for_device = swiotlb_sync_single_range_for_device, |
64 | .sync_sg_for_cpu = swiotlb_sync_sg_for_cpu, | 44 | .sync_sg_for_cpu = swiotlb_sync_sg_for_cpu, |
65 | .sync_sg_for_device = swiotlb_sync_sg_for_device | 45 | .sync_sg_for_device = swiotlb_sync_sg_for_device, |
46 | .mapping_error = swiotlb_dma_mapping_error, | ||
66 | }; | 47 | }; |
67 | 48 | ||
68 | struct dma_mapping_ops swiotlb_pci_dma_ops = { | 49 | void pci_dma_dev_setup_swiotlb(struct pci_dev *pdev) |
69 | .alloc_coherent = dma_direct_alloc_coherent, | 50 | { |
70 | .free_coherent = dma_direct_free_coherent, | 51 | struct pci_controller *hose; |
71 | .map_sg = swiotlb_map_sg_attrs, | 52 | struct dev_archdata *sd; |
72 | .unmap_sg = swiotlb_unmap_sg_attrs, | 53 | |
73 | .dma_supported = swiotlb_dma_supported, | 54 | hose = pci_bus_to_host(pdev->bus); |
74 | .map_page = swiotlb_map_page, | 55 | sd = &pdev->dev.archdata; |
75 | .unmap_page = swiotlb_unmap_page, | 56 | sd->max_direct_dma_addr = |
76 | .addr_needs_map = swiotlb_pci_addr_needs_map, | 57 | hose->dma_window_base_cur + hose->dma_window_size; |
77 | .sync_single_range_for_cpu = swiotlb_sync_single_range_for_cpu, | 58 | } |
78 | .sync_single_range_for_device = swiotlb_sync_single_range_for_device, | ||
79 | .sync_sg_for_cpu = swiotlb_sync_sg_for_cpu, | ||
80 | .sync_sg_for_device = swiotlb_sync_sg_for_device | ||
81 | }; | ||
82 | 59 | ||
83 | static int ppc_swiotlb_bus_notify(struct notifier_block *nb, | 60 | static int ppc_swiotlb_bus_notify(struct notifier_block *nb, |
84 | unsigned long action, void *data) | 61 | unsigned long action, void *data) |
85 | { | 62 | { |
86 | struct device *dev = data; | 63 | struct device *dev = data; |
64 | struct dev_archdata *sd; | ||
87 | 65 | ||
88 | /* We are only intereted in device addition */ | 66 | /* We are only intereted in device addition */ |
89 | if (action != BUS_NOTIFY_ADD_DEVICE) | 67 | if (action != BUS_NOTIFY_ADD_DEVICE) |
90 | return 0; | 68 | return 0; |
91 | 69 | ||
70 | sd = &dev->archdata; | ||
71 | sd->max_direct_dma_addr = 0; | ||
72 | |||
92 | /* May need to bounce if the device can't address all of DRAM */ | 73 | /* May need to bounce if the device can't address all of DRAM */ |
93 | if (dma_get_mask(dev) < lmb_end_of_DRAM()) | 74 | if (dma_get_mask(dev) < lmb_end_of_DRAM()) |
94 | set_dma_ops(dev, &swiotlb_dma_ops); | 75 | set_dma_ops(dev, &swiotlb_dma_ops); |
diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c index ccf129d47d84..21b784d7e7d0 100644 --- a/arch/powerpc/kernel/dma.c +++ b/arch/powerpc/kernel/dma.c | |||
@@ -7,6 +7,7 @@ | |||
7 | 7 | ||
8 | #include <linux/device.h> | 8 | #include <linux/device.h> |
9 | #include <linux/dma-mapping.h> | 9 | #include <linux/dma-mapping.h> |
10 | #include <linux/dma-debug.h> | ||
10 | #include <linux/lmb.h> | 11 | #include <linux/lmb.h> |
11 | #include <asm/bug.h> | 12 | #include <asm/bug.h> |
12 | #include <asm/abs_addr.h> | 13 | #include <asm/abs_addr.h> |
@@ -140,7 +141,7 @@ static inline void dma_direct_sync_single_range(struct device *dev, | |||
140 | } | 141 | } |
141 | #endif | 142 | #endif |
142 | 143 | ||
143 | struct dma_mapping_ops dma_direct_ops = { | 144 | struct dma_map_ops dma_direct_ops = { |
144 | .alloc_coherent = dma_direct_alloc_coherent, | 145 | .alloc_coherent = dma_direct_alloc_coherent, |
145 | .free_coherent = dma_direct_free_coherent, | 146 | .free_coherent = dma_direct_free_coherent, |
146 | .map_sg = dma_direct_map_sg, | 147 | .map_sg = dma_direct_map_sg, |
@@ -156,3 +157,13 @@ struct dma_mapping_ops dma_direct_ops = { | |||
156 | #endif | 157 | #endif |
157 | }; | 158 | }; |
158 | EXPORT_SYMBOL(dma_direct_ops); | 159 | EXPORT_SYMBOL(dma_direct_ops); |
160 | |||
161 | #define PREALLOC_DMA_DEBUG_ENTRIES (1 << 16) | ||
162 | |||
163 | static int __init dma_init(void) | ||
164 | { | ||
165 | dma_debug_init(PREALLOC_DMA_DEBUG_ENTRIES); | ||
166 | |||
167 | return 0; | ||
168 | } | ||
169 | fs_initcall(dma_init); | ||
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S index 3cadba60a4b6..1175a8539e6c 100644 --- a/arch/powerpc/kernel/entry_32.S +++ b/arch/powerpc/kernel/entry_32.S | |||
@@ -88,7 +88,7 @@ crit_transfer_to_handler: | |||
88 | mfspr r0,SPRN_SRR1 | 88 | mfspr r0,SPRN_SRR1 |
89 | stw r0,_SRR1(r11) | 89 | stw r0,_SRR1(r11) |
90 | 90 | ||
91 | mfspr r8,SPRN_SPRG3 | 91 | mfspr r8,SPRN_SPRG_THREAD |
92 | lwz r0,KSP_LIMIT(r8) | 92 | lwz r0,KSP_LIMIT(r8) |
93 | stw r0,SAVED_KSP_LIMIT(r11) | 93 | stw r0,SAVED_KSP_LIMIT(r11) |
94 | rlwimi r0,r1,0,0,(31-THREAD_SHIFT) | 94 | rlwimi r0,r1,0,0,(31-THREAD_SHIFT) |
@@ -108,7 +108,7 @@ crit_transfer_to_handler: | |||
108 | mfspr r0,SPRN_SRR1 | 108 | mfspr r0,SPRN_SRR1 |
109 | stw r0,crit_srr1@l(0) | 109 | stw r0,crit_srr1@l(0) |
110 | 110 | ||
111 | mfspr r8,SPRN_SPRG3 | 111 | mfspr r8,SPRN_SPRG_THREAD |
112 | lwz r0,KSP_LIMIT(r8) | 112 | lwz r0,KSP_LIMIT(r8) |
113 | stw r0,saved_ksp_limit@l(0) | 113 | stw r0,saved_ksp_limit@l(0) |
114 | rlwimi r0,r1,0,0,(31-THREAD_SHIFT) | 114 | rlwimi r0,r1,0,0,(31-THREAD_SHIFT) |
@@ -138,7 +138,7 @@ transfer_to_handler: | |||
138 | mfspr r2,SPRN_XER | 138 | mfspr r2,SPRN_XER |
139 | stw r12,_CTR(r11) | 139 | stw r12,_CTR(r11) |
140 | stw r2,_XER(r11) | 140 | stw r2,_XER(r11) |
141 | mfspr r12,SPRN_SPRG3 | 141 | mfspr r12,SPRN_SPRG_THREAD |
142 | addi r2,r12,-THREAD | 142 | addi r2,r12,-THREAD |
143 | tovirt(r2,r2) /* set r2 to current */ | 143 | tovirt(r2,r2) /* set r2 to current */ |
144 | beq 2f /* if from user, fix up THREAD.regs */ | 144 | beq 2f /* if from user, fix up THREAD.regs */ |
@@ -680,7 +680,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_SPE) | |||
680 | 680 | ||
681 | tophys(r0,r4) | 681 | tophys(r0,r4) |
682 | CLR_TOP32(r0) | 682 | CLR_TOP32(r0) |
683 | mtspr SPRN_SPRG3,r0 /* Update current THREAD phys addr */ | 683 | mtspr SPRN_SPRG_THREAD,r0 /* Update current THREAD phys addr */ |
684 | lwz r1,KSP(r4) /* Load new stack pointer */ | 684 | lwz r1,KSP(r4) /* Load new stack pointer */ |
685 | 685 | ||
686 | /* save the old current 'last' for return value */ | 686 | /* save the old current 'last' for return value */ |
@@ -1057,7 +1057,7 @@ exc_exit_restart_end: | |||
1057 | #ifdef CONFIG_40x | 1057 | #ifdef CONFIG_40x |
1058 | .globl ret_from_crit_exc | 1058 | .globl ret_from_crit_exc |
1059 | ret_from_crit_exc: | 1059 | ret_from_crit_exc: |
1060 | mfspr r9,SPRN_SPRG3 | 1060 | mfspr r9,SPRN_SPRG_THREAD |
1061 | lis r10,saved_ksp_limit@ha; | 1061 | lis r10,saved_ksp_limit@ha; |
1062 | lwz r10,saved_ksp_limit@l(r10); | 1062 | lwz r10,saved_ksp_limit@l(r10); |
1063 | tovirt(r9,r9); | 1063 | tovirt(r9,r9); |
@@ -1074,7 +1074,7 @@ ret_from_crit_exc: | |||
1074 | #ifdef CONFIG_BOOKE | 1074 | #ifdef CONFIG_BOOKE |
1075 | .globl ret_from_crit_exc | 1075 | .globl ret_from_crit_exc |
1076 | ret_from_crit_exc: | 1076 | ret_from_crit_exc: |
1077 | mfspr r9,SPRN_SPRG3 | 1077 | mfspr r9,SPRN_SPRG_THREAD |
1078 | lwz r10,SAVED_KSP_LIMIT(r1) | 1078 | lwz r10,SAVED_KSP_LIMIT(r1) |
1079 | stw r10,KSP_LIMIT(r9) | 1079 | stw r10,KSP_LIMIT(r9) |
1080 | RESTORE_xSRR(SRR0,SRR1); | 1080 | RESTORE_xSRR(SRR0,SRR1); |
@@ -1083,7 +1083,7 @@ ret_from_crit_exc: | |||
1083 | 1083 | ||
1084 | .globl ret_from_debug_exc | 1084 | .globl ret_from_debug_exc |
1085 | ret_from_debug_exc: | 1085 | ret_from_debug_exc: |
1086 | mfspr r9,SPRN_SPRG3 | 1086 | mfspr r9,SPRN_SPRG_THREAD |
1087 | lwz r10,SAVED_KSP_LIMIT(r1) | 1087 | lwz r10,SAVED_KSP_LIMIT(r1) |
1088 | stw r10,KSP_LIMIT(r9) | 1088 | stw r10,KSP_LIMIT(r9) |
1089 | lwz r9,THREAD_INFO-THREAD(r9) | 1089 | lwz r9,THREAD_INFO-THREAD(r9) |
@@ -1097,7 +1097,7 @@ ret_from_debug_exc: | |||
1097 | 1097 | ||
1098 | .globl ret_from_mcheck_exc | 1098 | .globl ret_from_mcheck_exc |
1099 | ret_from_mcheck_exc: | 1099 | ret_from_mcheck_exc: |
1100 | mfspr r9,SPRN_SPRG3 | 1100 | mfspr r9,SPRN_SPRG_THREAD |
1101 | lwz r10,SAVED_KSP_LIMIT(r1) | 1101 | lwz r10,SAVED_KSP_LIMIT(r1) |
1102 | stw r10,KSP_LIMIT(r9) | 1102 | stw r10,KSP_LIMIT(r9) |
1103 | RESTORE_xSRR(SRR0,SRR1); | 1103 | RESTORE_xSRR(SRR0,SRR1); |
@@ -1255,7 +1255,7 @@ _GLOBAL(enter_rtas) | |||
1255 | MTMSRD(r0) /* don't get trashed */ | 1255 | MTMSRD(r0) /* don't get trashed */ |
1256 | li r9,MSR_KERNEL & ~(MSR_IR|MSR_DR) | 1256 | li r9,MSR_KERNEL & ~(MSR_IR|MSR_DR) |
1257 | mtlr r6 | 1257 | mtlr r6 |
1258 | mtspr SPRN_SPRG2,r7 | 1258 | mtspr SPRN_SPRG_RTAS,r7 |
1259 | mtspr SPRN_SRR0,r8 | 1259 | mtspr SPRN_SRR0,r8 |
1260 | mtspr SPRN_SRR1,r9 | 1260 | mtspr SPRN_SRR1,r9 |
1261 | RFI | 1261 | RFI |
@@ -1265,7 +1265,7 @@ _GLOBAL(enter_rtas) | |||
1265 | FIX_SRR1(r9,r0) | 1265 | FIX_SRR1(r9,r0) |
1266 | addi r1,r1,INT_FRAME_SIZE | 1266 | addi r1,r1,INT_FRAME_SIZE |
1267 | li r0,0 | 1267 | li r0,0 |
1268 | mtspr SPRN_SPRG2,r0 | 1268 | mtspr SPRN_SPRG_RTAS,r0 |
1269 | mtspr SPRN_SRR0,r8 | 1269 | mtspr SPRN_SRR0,r8 |
1270 | mtspr SPRN_SRR1,r9 | 1270 | mtspr SPRN_SRR1,r9 |
1271 | RFI /* return to caller */ | 1271 | RFI /* return to caller */ |
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index 43e073477c34..66bcda34a6bb 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S | |||
@@ -120,9 +120,15 @@ BEGIN_FW_FTR_SECTION | |||
120 | 2: | 120 | 2: |
121 | END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES) | 121 | END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES) |
122 | #endif /* CONFIG_PPC_ISERIES */ | 122 | #endif /* CONFIG_PPC_ISERIES */ |
123 | |||
124 | /* Hard enable interrupts */ | ||
125 | #ifdef CONFIG_PPC_BOOK3E | ||
126 | wrteei 1 | ||
127 | #else | ||
123 | mfmsr r11 | 128 | mfmsr r11 |
124 | ori r11,r11,MSR_EE | 129 | ori r11,r11,MSR_EE |
125 | mtmsrd r11,1 | 130 | mtmsrd r11,1 |
131 | #endif /* CONFIG_PPC_BOOK3E */ | ||
126 | 132 | ||
127 | #ifdef SHOW_SYSCALLS | 133 | #ifdef SHOW_SYSCALLS |
128 | bl .do_show_syscall | 134 | bl .do_show_syscall |
@@ -168,15 +174,25 @@ syscall_exit: | |||
168 | #endif | 174 | #endif |
169 | clrrdi r12,r1,THREAD_SHIFT | 175 | clrrdi r12,r1,THREAD_SHIFT |
170 | 176 | ||
171 | /* disable interrupts so current_thread_info()->flags can't change, | ||
172 | and so that we don't get interrupted after loading SRR0/1. */ | ||
173 | ld r8,_MSR(r1) | 177 | ld r8,_MSR(r1) |
178 | #ifdef CONFIG_PPC_BOOK3S | ||
179 | /* No MSR:RI on BookE */ | ||
174 | andi. r10,r8,MSR_RI | 180 | andi. r10,r8,MSR_RI |
175 | beq- unrecov_restore | 181 | beq- unrecov_restore |
182 | #endif | ||
183 | |||
184 | /* Disable interrupts so current_thread_info()->flags can't change, | ||
185 | * and so that we don't get interrupted after loading SRR0/1. | ||
186 | */ | ||
187 | #ifdef CONFIG_PPC_BOOK3E | ||
188 | wrteei 0 | ||
189 | #else | ||
176 | mfmsr r10 | 190 | mfmsr r10 |
177 | rldicl r10,r10,48,1 | 191 | rldicl r10,r10,48,1 |
178 | rotldi r10,r10,16 | 192 | rotldi r10,r10,16 |
179 | mtmsrd r10,1 | 193 | mtmsrd r10,1 |
194 | #endif /* CONFIG_PPC_BOOK3E */ | ||
195 | |||
180 | ld r9,TI_FLAGS(r12) | 196 | ld r9,TI_FLAGS(r12) |
181 | li r11,-_LAST_ERRNO | 197 | li r11,-_LAST_ERRNO |
182 | andi. r0,r9,(_TIF_SYSCALL_T_OR_A|_TIF_SINGLESTEP|_TIF_USER_WORK_MASK|_TIF_PERSYSCALL_MASK) | 198 | andi. r0,r9,(_TIF_SYSCALL_T_OR_A|_TIF_SINGLESTEP|_TIF_USER_WORK_MASK|_TIF_PERSYSCALL_MASK) |
@@ -194,9 +210,13 @@ syscall_error_cont: | |||
194 | * userspace and we take an exception after restoring r13, | 210 | * userspace and we take an exception after restoring r13, |
195 | * we end up corrupting the userspace r13 value. | 211 | * we end up corrupting the userspace r13 value. |
196 | */ | 212 | */ |
213 | #ifdef CONFIG_PPC_BOOK3S | ||
214 | /* No MSR:RI on BookE */ | ||
197 | li r12,MSR_RI | 215 | li r12,MSR_RI |
198 | andc r11,r10,r12 | 216 | andc r11,r10,r12 |
199 | mtmsrd r11,1 /* clear MSR.RI */ | 217 | mtmsrd r11,1 /* clear MSR.RI */ |
218 | #endif /* CONFIG_PPC_BOOK3S */ | ||
219 | |||
200 | beq- 1f | 220 | beq- 1f |
201 | ACCOUNT_CPU_USER_EXIT(r11, r12) | 221 | ACCOUNT_CPU_USER_EXIT(r11, r12) |
202 | ld r13,GPR13(r1) /* only restore r13 if returning to usermode */ | 222 | ld r13,GPR13(r1) /* only restore r13 if returning to usermode */ |
@@ -206,7 +226,7 @@ syscall_error_cont: | |||
206 | mtcr r5 | 226 | mtcr r5 |
207 | mtspr SPRN_SRR0,r7 | 227 | mtspr SPRN_SRR0,r7 |
208 | mtspr SPRN_SRR1,r8 | 228 | mtspr SPRN_SRR1,r8 |
209 | rfid | 229 | RFI |
210 | b . /* prevent speculative execution */ | 230 | b . /* prevent speculative execution */ |
211 | 231 | ||
212 | syscall_error: | 232 | syscall_error: |
@@ -276,9 +296,13 @@ syscall_exit_work: | |||
276 | beq .ret_from_except_lite | 296 | beq .ret_from_except_lite |
277 | 297 | ||
278 | /* Re-enable interrupts */ | 298 | /* Re-enable interrupts */ |
299 | #ifdef CONFIG_PPC_BOOK3E | ||
300 | wrteei 1 | ||
301 | #else | ||
279 | mfmsr r10 | 302 | mfmsr r10 |
280 | ori r10,r10,MSR_EE | 303 | ori r10,r10,MSR_EE |
281 | mtmsrd r10,1 | 304 | mtmsrd r10,1 |
305 | #endif /* CONFIG_PPC_BOOK3E */ | ||
282 | 306 | ||
283 | bl .save_nvgprs | 307 | bl .save_nvgprs |
284 | addi r3,r1,STACK_FRAME_OVERHEAD | 308 | addi r3,r1,STACK_FRAME_OVERHEAD |
@@ -380,7 +404,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) | |||
380 | and. r0,r0,r22 | 404 | and. r0,r0,r22 |
381 | beq+ 1f | 405 | beq+ 1f |
382 | andc r22,r22,r0 | 406 | andc r22,r22,r0 |
383 | mtmsrd r22 | 407 | MTMSRD(r22) |
384 | isync | 408 | isync |
385 | 1: std r20,_NIP(r1) | 409 | 1: std r20,_NIP(r1) |
386 | mfcr r23 | 410 | mfcr r23 |
@@ -399,6 +423,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) | |||
399 | std r6,PACACURRENT(r13) /* Set new 'current' */ | 423 | std r6,PACACURRENT(r13) /* Set new 'current' */ |
400 | 424 | ||
401 | ld r8,KSP(r4) /* new stack pointer */ | 425 | ld r8,KSP(r4) /* new stack pointer */ |
426 | #ifdef CONFIG_PPC_BOOK3S | ||
402 | BEGIN_FTR_SECTION | 427 | BEGIN_FTR_SECTION |
403 | BEGIN_FTR_SECTION_NESTED(95) | 428 | BEGIN_FTR_SECTION_NESTED(95) |
404 | clrrdi r6,r8,28 /* get its ESID */ | 429 | clrrdi r6,r8,28 /* get its ESID */ |
@@ -445,8 +470,9 @@ END_FTR_SECTION_IFSET(CPU_FTR_1T_SEGMENT) | |||
445 | slbie r6 /* Workaround POWER5 < DD2.1 issue */ | 470 | slbie r6 /* Workaround POWER5 < DD2.1 issue */ |
446 | slbmte r7,r0 | 471 | slbmte r7,r0 |
447 | isync | 472 | isync |
448 | |||
449 | 2: | 473 | 2: |
474 | #endif /* !CONFIG_PPC_BOOK3S */ | ||
475 | |||
450 | clrrdi r7,r8,THREAD_SHIFT /* base of new stack */ | 476 | clrrdi r7,r8,THREAD_SHIFT /* base of new stack */ |
451 | /* Note: this uses SWITCH_FRAME_SIZE rather than INT_FRAME_SIZE | 477 | /* Note: this uses SWITCH_FRAME_SIZE rather than INT_FRAME_SIZE |
452 | because we don't need to leave the 288-byte ABI gap at the | 478 | because we don't need to leave the 288-byte ABI gap at the |
@@ -490,10 +516,14 @@ _GLOBAL(ret_from_except_lite) | |||
490 | * can't change between when we test it and when we return | 516 | * can't change between when we test it and when we return |
491 | * from the interrupt. | 517 | * from the interrupt. |
492 | */ | 518 | */ |
519 | #ifdef CONFIG_PPC_BOOK3E | ||
520 | wrteei 0 | ||
521 | #else | ||
493 | mfmsr r10 /* Get current interrupt state */ | 522 | mfmsr r10 /* Get current interrupt state */ |
494 | rldicl r9,r10,48,1 /* clear MSR_EE */ | 523 | rldicl r9,r10,48,1 /* clear MSR_EE */ |
495 | rotldi r9,r9,16 | 524 | rotldi r9,r9,16 |
496 | mtmsrd r9,1 /* Update machine state */ | 525 | mtmsrd r9,1 /* Update machine state */ |
526 | #endif /* CONFIG_PPC_BOOK3E */ | ||
497 | 527 | ||
498 | #ifdef CONFIG_PREEMPT | 528 | #ifdef CONFIG_PREEMPT |
499 | clrrdi r9,r1,THREAD_SHIFT /* current_thread_info() */ | 529 | clrrdi r9,r1,THREAD_SHIFT /* current_thread_info() */ |
@@ -540,6 +570,9 @@ ALT_FW_FTR_SECTION_END_IFCLR(FW_FEATURE_ISERIES) | |||
540 | rldicl r4,r3,49,63 /* r0 = (r3 >> 15) & 1 */ | 570 | rldicl r4,r3,49,63 /* r0 = (r3 >> 15) & 1 */ |
541 | stb r4,PACAHARDIRQEN(r13) | 571 | stb r4,PACAHARDIRQEN(r13) |
542 | 572 | ||
573 | #ifdef CONFIG_PPC_BOOK3E | ||
574 | b .exception_return_book3e | ||
575 | #else | ||
543 | ld r4,_CTR(r1) | 576 | ld r4,_CTR(r1) |
544 | ld r0,_LINK(r1) | 577 | ld r0,_LINK(r1) |
545 | mtctr r4 | 578 | mtctr r4 |
@@ -588,6 +621,8 @@ ALT_FW_FTR_SECTION_END_IFCLR(FW_FEATURE_ISERIES) | |||
588 | rfid | 621 | rfid |
589 | b . /* prevent speculative execution */ | 622 | b . /* prevent speculative execution */ |
590 | 623 | ||
624 | #endif /* CONFIG_PPC_BOOK3E */ | ||
625 | |||
591 | iseries_check_pending_irqs: | 626 | iseries_check_pending_irqs: |
592 | #ifdef CONFIG_PPC_ISERIES | 627 | #ifdef CONFIG_PPC_ISERIES |
593 | ld r5,SOFTE(r1) | 628 | ld r5,SOFTE(r1) |
@@ -638,6 +673,11 @@ do_work: | |||
638 | li r0,1 | 673 | li r0,1 |
639 | stb r0,PACASOFTIRQEN(r13) | 674 | stb r0,PACASOFTIRQEN(r13) |
640 | stb r0,PACAHARDIRQEN(r13) | 675 | stb r0,PACAHARDIRQEN(r13) |
676 | #ifdef CONFIG_PPC_BOOK3E | ||
677 | wrteei 1 | ||
678 | bl .preempt_schedule | ||
679 | wrteei 0 | ||
680 | #else | ||
641 | ori r10,r10,MSR_EE | 681 | ori r10,r10,MSR_EE |
642 | mtmsrd r10,1 /* reenable interrupts */ | 682 | mtmsrd r10,1 /* reenable interrupts */ |
643 | bl .preempt_schedule | 683 | bl .preempt_schedule |
@@ -646,6 +686,7 @@ do_work: | |||
646 | rldicl r10,r10,48,1 /* disable interrupts again */ | 686 | rldicl r10,r10,48,1 /* disable interrupts again */ |
647 | rotldi r10,r10,16 | 687 | rotldi r10,r10,16 |
648 | mtmsrd r10,1 | 688 | mtmsrd r10,1 |
689 | #endif /* CONFIG_PPC_BOOK3E */ | ||
649 | ld r4,TI_FLAGS(r9) | 690 | ld r4,TI_FLAGS(r9) |
650 | andi. r0,r4,_TIF_NEED_RESCHED | 691 | andi. r0,r4,_TIF_NEED_RESCHED |
651 | bne 1b | 692 | bne 1b |
@@ -654,8 +695,12 @@ do_work: | |||
654 | user_work: | 695 | user_work: |
655 | #endif | 696 | #endif |
656 | /* Enable interrupts */ | 697 | /* Enable interrupts */ |
698 | #ifdef CONFIG_PPC_BOOK3E | ||
699 | wrteei 1 | ||
700 | #else | ||
657 | ori r10,r10,MSR_EE | 701 | ori r10,r10,MSR_EE |
658 | mtmsrd r10,1 | 702 | mtmsrd r10,1 |
703 | #endif /* CONFIG_PPC_BOOK3E */ | ||
659 | 704 | ||
660 | andi. r0,r4,_TIF_NEED_RESCHED | 705 | andi. r0,r4,_TIF_NEED_RESCHED |
661 | beq 1f | 706 | beq 1f |
@@ -762,7 +807,7 @@ _GLOBAL(enter_rtas) | |||
762 | 807 | ||
763 | _STATIC(rtas_return_loc) | 808 | _STATIC(rtas_return_loc) |
764 | /* relocation is off at this point */ | 809 | /* relocation is off at this point */ |
765 | mfspr r4,SPRN_SPRG3 /* Get PACA */ | 810 | mfspr r4,SPRN_SPRG_PACA /* Get PACA */ |
766 | clrldi r4,r4,2 /* convert to realmode address */ | 811 | clrldi r4,r4,2 /* convert to realmode address */ |
767 | 812 | ||
768 | bcl 20,31,$+4 | 813 | bcl 20,31,$+4 |
@@ -793,7 +838,7 @@ _STATIC(rtas_restore_regs) | |||
793 | REST_8GPRS(14, r1) /* Restore the non-volatiles */ | 838 | REST_8GPRS(14, r1) /* Restore the non-volatiles */ |
794 | REST_10GPRS(22, r1) /* ditto */ | 839 | REST_10GPRS(22, r1) /* ditto */ |
795 | 840 | ||
796 | mfspr r13,SPRN_SPRG3 | 841 | mfspr r13,SPRN_SPRG_PACA |
797 | 842 | ||
798 | ld r4,_CCR(r1) | 843 | ld r4,_CCR(r1) |
799 | mtcr r4 | 844 | mtcr r4 |
@@ -823,33 +868,24 @@ _GLOBAL(enter_prom) | |||
823 | * of all registers that it saves. We therefore save those registers | 868 | * of all registers that it saves. We therefore save those registers |
824 | * PROM might touch to the stack. (r0, r3-r13 are caller saved) | 869 | * PROM might touch to the stack. (r0, r3-r13 are caller saved) |
825 | */ | 870 | */ |
826 | SAVE_8GPRS(2, r1) | 871 | SAVE_GPR(2, r1) |
827 | SAVE_GPR(13, r1) | 872 | SAVE_GPR(13, r1) |
828 | SAVE_8GPRS(14, r1) | 873 | SAVE_8GPRS(14, r1) |
829 | SAVE_10GPRS(22, r1) | 874 | SAVE_10GPRS(22, r1) |
830 | mfcr r4 | 875 | mfcr r10 |
831 | std r4,_CCR(r1) | ||
832 | mfctr r5 | ||
833 | std r5,_CTR(r1) | ||
834 | mfspr r6,SPRN_XER | ||
835 | std r6,_XER(r1) | ||
836 | mfdar r7 | ||
837 | std r7,_DAR(r1) | ||
838 | mfdsisr r8 | ||
839 | std r8,_DSISR(r1) | ||
840 | mfsrr0 r9 | ||
841 | std r9,_SRR0(r1) | ||
842 | mfsrr1 r10 | ||
843 | std r10,_SRR1(r1) | ||
844 | mfmsr r11 | 876 | mfmsr r11 |
877 | std r10,_CCR(r1) | ||
845 | std r11,_MSR(r1) | 878 | std r11,_MSR(r1) |
846 | 879 | ||
847 | /* Get the PROM entrypoint */ | 880 | /* Get the PROM entrypoint */ |
848 | ld r0,GPR4(r1) | 881 | mtlr r4 |
849 | mtlr r0 | ||
850 | 882 | ||
851 | /* Switch MSR to 32 bits mode | 883 | /* Switch MSR to 32 bits mode |
852 | */ | 884 | */ |
885 | #ifdef CONFIG_PPC_BOOK3E | ||
886 | rlwinm r11,r11,0,1,31 | ||
887 | mtmsr r11 | ||
888 | #else /* CONFIG_PPC_BOOK3E */ | ||
853 | mfmsr r11 | 889 | mfmsr r11 |
854 | li r12,1 | 890 | li r12,1 |
855 | rldicr r12,r12,MSR_SF_LG,(63-MSR_SF_LG) | 891 | rldicr r12,r12,MSR_SF_LG,(63-MSR_SF_LG) |
@@ -858,10 +894,10 @@ _GLOBAL(enter_prom) | |||
858 | rldicr r12,r12,MSR_ISF_LG,(63-MSR_ISF_LG) | 894 | rldicr r12,r12,MSR_ISF_LG,(63-MSR_ISF_LG) |
859 | andc r11,r11,r12 | 895 | andc r11,r11,r12 |
860 | mtmsrd r11 | 896 | mtmsrd r11 |
897 | #endif /* CONFIG_PPC_BOOK3E */ | ||
861 | isync | 898 | isync |
862 | 899 | ||
863 | /* Restore arguments & enter PROM here... */ | 900 | /* Enter PROM here... */ |
864 | ld r3,GPR3(r1) | ||
865 | blrl | 901 | blrl |
866 | 902 | ||
867 | /* Just make sure that r1 top 32 bits didn't get | 903 | /* Just make sure that r1 top 32 bits didn't get |
@@ -871,7 +907,7 @@ _GLOBAL(enter_prom) | |||
871 | 907 | ||
872 | /* Restore the MSR (back to 64 bits) */ | 908 | /* Restore the MSR (back to 64 bits) */ |
873 | ld r0,_MSR(r1) | 909 | ld r0,_MSR(r1) |
874 | mtmsrd r0 | 910 | MTMSRD(r0) |
875 | isync | 911 | isync |
876 | 912 | ||
877 | /* Restore other registers */ | 913 | /* Restore other registers */ |
@@ -881,18 +917,6 @@ _GLOBAL(enter_prom) | |||
881 | REST_10GPRS(22, r1) | 917 | REST_10GPRS(22, r1) |
882 | ld r4,_CCR(r1) | 918 | ld r4,_CCR(r1) |
883 | mtcr r4 | 919 | mtcr r4 |
884 | ld r5,_CTR(r1) | ||
885 | mtctr r5 | ||
886 | ld r6,_XER(r1) | ||
887 | mtspr SPRN_XER,r6 | ||
888 | ld r7,_DAR(r1) | ||
889 | mtdar r7 | ||
890 | ld r8,_DSISR(r1) | ||
891 | mtdsisr r8 | ||
892 | ld r9,_SRR0(r1) | ||
893 | mtsrr0 r9 | ||
894 | ld r10,_SRR1(r1) | ||
895 | mtsrr1 r10 | ||
896 | 920 | ||
897 | addi r1,r1,PROM_FRAME_SIZE | 921 | addi r1,r1,PROM_FRAME_SIZE |
898 | ld r0,16(r1) | 922 | ld r0,16(r1) |
diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S new file mode 100644 index 000000000000..9048f96237f6 --- /dev/null +++ b/arch/powerpc/kernel/exceptions-64e.S | |||
@@ -0,0 +1,1001 @@ | |||
1 | /* | ||
2 | * Boot code and exception vectors for Book3E processors | ||
3 | * | ||
4 | * Copyright (C) 2007 Ben. Herrenschmidt (benh@kernel.crashing.org), IBM Corp. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the License, or (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #include <linux/threads.h> | ||
13 | #include <asm/reg.h> | ||
14 | #include <asm/page.h> | ||
15 | #include <asm/ppc_asm.h> | ||
16 | #include <asm/asm-offsets.h> | ||
17 | #include <asm/cputable.h> | ||
18 | #include <asm/setup.h> | ||
19 | #include <asm/thread_info.h> | ||
20 | #include <asm/reg.h> | ||
21 | #include <asm/exception-64e.h> | ||
22 | #include <asm/bug.h> | ||
23 | #include <asm/irqflags.h> | ||
24 | #include <asm/ptrace.h> | ||
25 | #include <asm/ppc-opcode.h> | ||
26 | #include <asm/mmu.h> | ||
27 | |||
28 | /* XXX This will ultimately add space for a special exception save | ||
29 | * structure used to save things like SRR0/SRR1, SPRGs, MAS, etc... | ||
30 | * when taking special interrupts. For now we don't support that, | ||
31 | * special interrupts from within a non-standard level will probably | ||
32 | * blow you up | ||
33 | */ | ||
34 | #define SPECIAL_EXC_FRAME_SIZE INT_FRAME_SIZE | ||
35 | |||
36 | /* Exception prolog code for all exceptions */ | ||
37 | #define EXCEPTION_PROLOG(n, type, addition) \ | ||
38 | mtspr SPRN_SPRG_##type##_SCRATCH,r13; /* get spare registers */ \ | ||
39 | mfspr r13,SPRN_SPRG_PACA; /* get PACA */ \ | ||
40 | std r10,PACA_EX##type+EX_R10(r13); \ | ||
41 | std r11,PACA_EX##type+EX_R11(r13); \ | ||
42 | mfcr r10; /* save CR */ \ | ||
43 | addition; /* additional code for that exc. */ \ | ||
44 | std r1,PACA_EX##type+EX_R1(r13); /* save old r1 in the PACA */ \ | ||
45 | stw r10,PACA_EX##type+EX_CR(r13); /* save old CR in the PACA */ \ | ||
46 | mfspr r11,SPRN_##type##_SRR1;/* what are we coming from */ \ | ||
47 | type##_SET_KSTACK; /* get special stack if necessary */\ | ||
48 | andi. r10,r11,MSR_PR; /* save stack pointer */ \ | ||
49 | beq 1f; /* branch around if supervisor */ \ | ||
50 | ld r1,PACAKSAVE(r13); /* get kernel stack coming from usr */\ | ||
51 | 1: cmpdi cr1,r1,0; /* check if SP makes sense */ \ | ||
52 | bge- cr1,exc_##n##_bad_stack;/* bad stack (TODO: out of line) */ \ | ||
53 | mfspr r10,SPRN_##type##_SRR0; /* read SRR0 before touching stack */ | ||
54 | |||
55 | /* Exception type-specific macros */ | ||
56 | #define GEN_SET_KSTACK \ | ||
57 | subi r1,r1,INT_FRAME_SIZE; /* alloc frame on kernel stack */ | ||
58 | #define SPRN_GEN_SRR0 SPRN_SRR0 | ||
59 | #define SPRN_GEN_SRR1 SPRN_SRR1 | ||
60 | |||
61 | #define CRIT_SET_KSTACK \ | ||
62 | ld r1,PACA_CRIT_STACK(r13); \ | ||
63 | subi r1,r1,SPECIAL_EXC_FRAME_SIZE; | ||
64 | #define SPRN_CRIT_SRR0 SPRN_CSRR0 | ||
65 | #define SPRN_CRIT_SRR1 SPRN_CSRR1 | ||
66 | |||
67 | #define DBG_SET_KSTACK \ | ||
68 | ld r1,PACA_DBG_STACK(r13); \ | ||
69 | subi r1,r1,SPECIAL_EXC_FRAME_SIZE; | ||
70 | #define SPRN_DBG_SRR0 SPRN_DSRR0 | ||
71 | #define SPRN_DBG_SRR1 SPRN_DSRR1 | ||
72 | |||
73 | #define MC_SET_KSTACK \ | ||
74 | ld r1,PACA_MC_STACK(r13); \ | ||
75 | subi r1,r1,SPECIAL_EXC_FRAME_SIZE; | ||
76 | #define SPRN_MC_SRR0 SPRN_MCSRR0 | ||
77 | #define SPRN_MC_SRR1 SPRN_MCSRR1 | ||
78 | |||
79 | #define NORMAL_EXCEPTION_PROLOG(n, addition) \ | ||
80 | EXCEPTION_PROLOG(n, GEN, addition##_GEN) | ||
81 | |||
82 | #define CRIT_EXCEPTION_PROLOG(n, addition) \ | ||
83 | EXCEPTION_PROLOG(n, CRIT, addition##_CRIT) | ||
84 | |||
85 | #define DBG_EXCEPTION_PROLOG(n, addition) \ | ||
86 | EXCEPTION_PROLOG(n, DBG, addition##_DBG) | ||
87 | |||
88 | #define MC_EXCEPTION_PROLOG(n, addition) \ | ||
89 | EXCEPTION_PROLOG(n, MC, addition##_MC) | ||
90 | |||
91 | |||
92 | /* Variants of the "addition" argument for the prolog | ||
93 | */ | ||
94 | #define PROLOG_ADDITION_NONE_GEN | ||
95 | #define PROLOG_ADDITION_NONE_CRIT | ||
96 | #define PROLOG_ADDITION_NONE_DBG | ||
97 | #define PROLOG_ADDITION_NONE_MC | ||
98 | |||
99 | #define PROLOG_ADDITION_MASKABLE_GEN \ | ||
100 | lbz r11,PACASOFTIRQEN(r13); /* are irqs soft-disabled ? */ \ | ||
101 | cmpwi cr0,r11,0; /* yes -> go out of line */ \ | ||
102 | beq masked_interrupt_book3e; | ||
103 | |||
104 | #define PROLOG_ADDITION_2REGS_GEN \ | ||
105 | std r14,PACA_EXGEN+EX_R14(r13); \ | ||
106 | std r15,PACA_EXGEN+EX_R15(r13) | ||
107 | |||
108 | #define PROLOG_ADDITION_1REG_GEN \ | ||
109 | std r14,PACA_EXGEN+EX_R14(r13); | ||
110 | |||
111 | #define PROLOG_ADDITION_2REGS_CRIT \ | ||
112 | std r14,PACA_EXCRIT+EX_R14(r13); \ | ||
113 | std r15,PACA_EXCRIT+EX_R15(r13) | ||
114 | |||
115 | #define PROLOG_ADDITION_2REGS_DBG \ | ||
116 | std r14,PACA_EXDBG+EX_R14(r13); \ | ||
117 | std r15,PACA_EXDBG+EX_R15(r13) | ||
118 | |||
119 | #define PROLOG_ADDITION_2REGS_MC \ | ||
120 | std r14,PACA_EXMC+EX_R14(r13); \ | ||
121 | std r15,PACA_EXMC+EX_R15(r13) | ||
122 | |||
123 | /* Core exception code for all exceptions except TLB misses. | ||
124 | * XXX: Needs to make SPRN_SPRG_GEN depend on exception type | ||
125 | */ | ||
126 | #define EXCEPTION_COMMON(n, excf, ints) \ | ||
127 | std r0,GPR0(r1); /* save r0 in stackframe */ \ | ||
128 | std r2,GPR2(r1); /* save r2 in stackframe */ \ | ||
129 | SAVE_4GPRS(3, r1); /* save r3 - r6 in stackframe */ \ | ||
130 | SAVE_2GPRS(7, r1); /* save r7, r8 in stackframe */ \ | ||
131 | std r9,GPR9(r1); /* save r9 in stackframe */ \ | ||
132 | std r10,_NIP(r1); /* save SRR0 to stackframe */ \ | ||
133 | std r11,_MSR(r1); /* save SRR1 to stackframe */ \ | ||
134 | ACCOUNT_CPU_USER_ENTRY(r10,r11);/* accounting (uses cr0+eq) */ \ | ||
135 | ld r3,excf+EX_R10(r13); /* get back r10 */ \ | ||
136 | ld r4,excf+EX_R11(r13); /* get back r11 */ \ | ||
137 | mfspr r5,SPRN_SPRG_GEN_SCRATCH;/* get back r13 */ \ | ||
138 | std r12,GPR12(r1); /* save r12 in stackframe */ \ | ||
139 | ld r2,PACATOC(r13); /* get kernel TOC into r2 */ \ | ||
140 | mflr r6; /* save LR in stackframe */ \ | ||
141 | mfctr r7; /* save CTR in stackframe */ \ | ||
142 | mfspr r8,SPRN_XER; /* save XER in stackframe */ \ | ||
143 | ld r9,excf+EX_R1(r13); /* load orig r1 back from PACA */ \ | ||
144 | lwz r10,excf+EX_CR(r13); /* load orig CR back from PACA */ \ | ||
145 | lbz r11,PACASOFTIRQEN(r13); /* get current IRQ softe */ \ | ||
146 | ld r12,exception_marker@toc(r2); \ | ||
147 | li r0,0; \ | ||
148 | std r3,GPR10(r1); /* save r10 to stackframe */ \ | ||
149 | std r4,GPR11(r1); /* save r11 to stackframe */ \ | ||
150 | std r5,GPR13(r1); /* save it to stackframe */ \ | ||
151 | std r6,_LINK(r1); \ | ||
152 | std r7,_CTR(r1); \ | ||
153 | std r8,_XER(r1); \ | ||
154 | li r3,(n)+1; /* indicate partial regs in trap */ \ | ||
155 | std r9,0(r1); /* store stack frame back link */ \ | ||
156 | std r10,_CCR(r1); /* store orig CR in stackframe */ \ | ||
157 | std r9,GPR1(r1); /* store stack frame back link */ \ | ||
158 | std r11,SOFTE(r1); /* and save it to stackframe */ \ | ||
159 | std r12,STACK_FRAME_OVERHEAD-16(r1); /* mark the frame */ \ | ||
160 | std r3,_TRAP(r1); /* set trap number */ \ | ||
161 | std r0,RESULT(r1); /* clear regs->result */ \ | ||
162 | ints; | ||
163 | |||
164 | /* Variants for the "ints" argument */ | ||
165 | #define INTS_KEEP | ||
166 | #define INTS_DISABLE_SOFT \ | ||
167 | stb r0,PACASOFTIRQEN(r13); /* mark interrupts soft-disabled */ \ | ||
168 | TRACE_DISABLE_INTS; | ||
169 | #define INTS_DISABLE_HARD \ | ||
170 | stb r0,PACAHARDIRQEN(r13); /* and hard disabled */ | ||
171 | #define INTS_DISABLE_ALL \ | ||
172 | INTS_DISABLE_SOFT \ | ||
173 | INTS_DISABLE_HARD | ||
174 | |||
175 | /* This is called by exceptions that used INTS_KEEP (that is did not clear | ||
176 | * neither soft nor hard IRQ indicators in the PACA. This will restore MSR:EE | ||
177 | * to it's previous value | ||
178 | * | ||
179 | * XXX In the long run, we may want to open-code it in order to separate the | ||
180 | * load from the wrtee, thus limiting the latency caused by the dependency | ||
181 | * but at this point, I'll favor code clarity until we have a near to final | ||
182 | * implementation | ||
183 | */ | ||
184 | #define INTS_RESTORE_HARD \ | ||
185 | ld r11,_MSR(r1); \ | ||
186 | wrtee r11; | ||
187 | |||
188 | /* XXX FIXME: Restore r14/r15 when necessary */ | ||
189 | #define BAD_STACK_TRAMPOLINE(n) \ | ||
190 | exc_##n##_bad_stack: \ | ||
191 | li r1,(n); /* get exception number */ \ | ||
192 | sth r1,PACA_TRAP_SAVE(r13); /* store trap */ \ | ||
193 | b bad_stack_book3e; /* bad stack error */ | ||
194 | |||
195 | #define EXCEPTION_STUB(loc, label) \ | ||
196 | . = interrupt_base_book3e + loc; \ | ||
197 | nop; /* To make debug interrupts happy */ \ | ||
198 | b exc_##label##_book3e; | ||
199 | |||
200 | #define ACK_NONE(r) | ||
201 | #define ACK_DEC(r) \ | ||
202 | lis r,TSR_DIS@h; \ | ||
203 | mtspr SPRN_TSR,r | ||
204 | #define ACK_FIT(r) \ | ||
205 | lis r,TSR_FIS@h; \ | ||
206 | mtspr SPRN_TSR,r | ||
207 | |||
208 | #define MASKABLE_EXCEPTION(trapnum, label, hdlr, ack) \ | ||
209 | START_EXCEPTION(label); \ | ||
210 | NORMAL_EXCEPTION_PROLOG(trapnum, PROLOG_ADDITION_MASKABLE) \ | ||
211 | EXCEPTION_COMMON(trapnum, PACA_EXGEN, INTS_DISABLE_ALL) \ | ||
212 | ack(r8); \ | ||
213 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | ||
214 | bl hdlr; \ | ||
215 | b .ret_from_except_lite; | ||
216 | |||
217 | /* This value is used to mark exception frames on the stack. */ | ||
218 | .section ".toc","aw" | ||
219 | exception_marker: | ||
220 | .tc ID_EXC_MARKER[TC],STACK_FRAME_REGS_MARKER | ||
221 | |||
222 | |||
223 | /* | ||
224 | * And here we have the exception vectors ! | ||
225 | */ | ||
226 | |||
227 | .text | ||
228 | .balign 0x1000 | ||
229 | .globl interrupt_base_book3e | ||
230 | interrupt_base_book3e: /* fake trap */ | ||
231 | /* Note: If real debug exceptions are supported by the HW, the vector | ||
232 | * below will have to be patched up to point to an appropriate handler | ||
233 | */ | ||
234 | EXCEPTION_STUB(0x000, machine_check) /* 0x0200 */ | ||
235 | EXCEPTION_STUB(0x020, critical_input) /* 0x0580 */ | ||
236 | EXCEPTION_STUB(0x040, debug_crit) /* 0x0d00 */ | ||
237 | EXCEPTION_STUB(0x060, data_storage) /* 0x0300 */ | ||
238 | EXCEPTION_STUB(0x080, instruction_storage) /* 0x0400 */ | ||
239 | EXCEPTION_STUB(0x0a0, external_input) /* 0x0500 */ | ||
240 | EXCEPTION_STUB(0x0c0, alignment) /* 0x0600 */ | ||
241 | EXCEPTION_STUB(0x0e0, program) /* 0x0700 */ | ||
242 | EXCEPTION_STUB(0x100, fp_unavailable) /* 0x0800 */ | ||
243 | EXCEPTION_STUB(0x120, system_call) /* 0x0c00 */ | ||
244 | EXCEPTION_STUB(0x140, ap_unavailable) /* 0x0f20 */ | ||
245 | EXCEPTION_STUB(0x160, decrementer) /* 0x0900 */ | ||
246 | EXCEPTION_STUB(0x180, fixed_interval) /* 0x0980 */ | ||
247 | EXCEPTION_STUB(0x1a0, watchdog) /* 0x09f0 */ | ||
248 | EXCEPTION_STUB(0x1c0, data_tlb_miss) | ||
249 | EXCEPTION_STUB(0x1e0, instruction_tlb_miss) | ||
250 | |||
251 | #if 0 | ||
252 | EXCEPTION_STUB(0x280, processor_doorbell) | ||
253 | EXCEPTION_STUB(0x220, processor_doorbell_crit) | ||
254 | #endif | ||
255 | .globl interrupt_end_book3e | ||
256 | interrupt_end_book3e: | ||
257 | |||
258 | /* Critical Input Interrupt */ | ||
259 | START_EXCEPTION(critical_input); | ||
260 | CRIT_EXCEPTION_PROLOG(0x100, PROLOG_ADDITION_NONE) | ||
261 | // EXCEPTION_COMMON(0x100, PACA_EXCRIT, INTS_DISABLE_ALL) | ||
262 | // bl special_reg_save_crit | ||
263 | // addi r3,r1,STACK_FRAME_OVERHEAD | ||
264 | // bl .critical_exception | ||
265 | // b ret_from_crit_except | ||
266 | b . | ||
267 | |||
268 | /* Machine Check Interrupt */ | ||
269 | START_EXCEPTION(machine_check); | ||
270 | CRIT_EXCEPTION_PROLOG(0x200, PROLOG_ADDITION_NONE) | ||
271 | // EXCEPTION_COMMON(0x200, PACA_EXMC, INTS_DISABLE_ALL) | ||
272 | // bl special_reg_save_mc | ||
273 | // addi r3,r1,STACK_FRAME_OVERHEAD | ||
274 | // bl .machine_check_exception | ||
275 | // b ret_from_mc_except | ||
276 | b . | ||
277 | |||
278 | /* Data Storage Interrupt */ | ||
279 | START_EXCEPTION(data_storage) | ||
280 | NORMAL_EXCEPTION_PROLOG(0x300, PROLOG_ADDITION_2REGS) | ||
281 | mfspr r14,SPRN_DEAR | ||
282 | mfspr r15,SPRN_ESR | ||
283 | EXCEPTION_COMMON(0x300, PACA_EXGEN, INTS_KEEP) | ||
284 | b storage_fault_common | ||
285 | |||
286 | /* Instruction Storage Interrupt */ | ||
287 | START_EXCEPTION(instruction_storage); | ||
288 | NORMAL_EXCEPTION_PROLOG(0x400, PROLOG_ADDITION_2REGS) | ||
289 | li r15,0 | ||
290 | mr r14,r10 | ||
291 | EXCEPTION_COMMON(0x400, PACA_EXGEN, INTS_KEEP) | ||
292 | b storage_fault_common | ||
293 | |||
294 | /* External Input Interrupt */ | ||
295 | MASKABLE_EXCEPTION(0x500, external_input, .do_IRQ, ACK_NONE) | ||
296 | |||
297 | /* Alignment */ | ||
298 | START_EXCEPTION(alignment); | ||
299 | NORMAL_EXCEPTION_PROLOG(0x600, PROLOG_ADDITION_2REGS) | ||
300 | mfspr r14,SPRN_DEAR | ||
301 | mfspr r15,SPRN_ESR | ||
302 | EXCEPTION_COMMON(0x600, PACA_EXGEN, INTS_KEEP) | ||
303 | b alignment_more /* no room, go out of line */ | ||
304 | |||
305 | /* Program Interrupt */ | ||
306 | START_EXCEPTION(program); | ||
307 | NORMAL_EXCEPTION_PROLOG(0x700, PROLOG_ADDITION_1REG) | ||
308 | mfspr r14,SPRN_ESR | ||
309 | EXCEPTION_COMMON(0x700, PACA_EXGEN, INTS_DISABLE_SOFT) | ||
310 | std r14,_DSISR(r1) | ||
311 | addi r3,r1,STACK_FRAME_OVERHEAD | ||
312 | ld r14,PACA_EXGEN+EX_R14(r13) | ||
313 | bl .save_nvgprs | ||
314 | INTS_RESTORE_HARD | ||
315 | bl .program_check_exception | ||
316 | b .ret_from_except | ||
317 | |||
318 | /* Floating Point Unavailable Interrupt */ | ||
319 | START_EXCEPTION(fp_unavailable); | ||
320 | NORMAL_EXCEPTION_PROLOG(0x800, PROLOG_ADDITION_NONE) | ||
321 | /* we can probably do a shorter exception entry for that one... */ | ||
322 | EXCEPTION_COMMON(0x800, PACA_EXGEN, INTS_KEEP) | ||
323 | bne 1f /* if from user, just load it up */ | ||
324 | bl .save_nvgprs | ||
325 | addi r3,r1,STACK_FRAME_OVERHEAD | ||
326 | INTS_RESTORE_HARD | ||
327 | bl .kernel_fp_unavailable_exception | ||
328 | BUG_OPCODE | ||
329 | 1: ld r12,_MSR(r1) | ||
330 | bl .load_up_fpu | ||
331 | b fast_exception_return | ||
332 | |||
333 | /* Decrementer Interrupt */ | ||
334 | MASKABLE_EXCEPTION(0x900, decrementer, .timer_interrupt, ACK_DEC) | ||
335 | |||
336 | /* Fixed Interval Timer Interrupt */ | ||
337 | MASKABLE_EXCEPTION(0x980, fixed_interval, .unknown_exception, ACK_FIT) | ||
338 | |||
339 | /* Watchdog Timer Interrupt */ | ||
340 | START_EXCEPTION(watchdog); | ||
341 | CRIT_EXCEPTION_PROLOG(0x9f0, PROLOG_ADDITION_NONE) | ||
342 | // EXCEPTION_COMMON(0x9f0, PACA_EXCRIT, INTS_DISABLE_ALL) | ||
343 | // bl special_reg_save_crit | ||
344 | // addi r3,r1,STACK_FRAME_OVERHEAD | ||
345 | // bl .unknown_exception | ||
346 | // b ret_from_crit_except | ||
347 | b . | ||
348 | |||
349 | /* System Call Interrupt */ | ||
350 | START_EXCEPTION(system_call) | ||
351 | mr r9,r13 /* keep a copy of userland r13 */ | ||
352 | mfspr r11,SPRN_SRR0 /* get return address */ | ||
353 | mfspr r12,SPRN_SRR1 /* get previous MSR */ | ||
354 | mfspr r13,SPRN_SPRG_PACA /* get our PACA */ | ||
355 | b system_call_common | ||
356 | |||
357 | /* Auxillary Processor Unavailable Interrupt */ | ||
358 | START_EXCEPTION(ap_unavailable); | ||
359 | NORMAL_EXCEPTION_PROLOG(0xf20, PROLOG_ADDITION_NONE) | ||
360 | EXCEPTION_COMMON(0xf20, PACA_EXGEN, INTS_KEEP) | ||
361 | addi r3,r1,STACK_FRAME_OVERHEAD | ||
362 | bl .save_nvgprs | ||
363 | INTS_RESTORE_HARD | ||
364 | bl .unknown_exception | ||
365 | b .ret_from_except | ||
366 | |||
367 | /* Debug exception as a critical interrupt*/ | ||
368 | START_EXCEPTION(debug_crit); | ||
369 | CRIT_EXCEPTION_PROLOG(0xd00, PROLOG_ADDITION_2REGS) | ||
370 | |||
371 | /* | ||
372 | * If there is a single step or branch-taken exception in an | ||
373 | * exception entry sequence, it was probably meant to apply to | ||
374 | * the code where the exception occurred (since exception entry | ||
375 | * doesn't turn off DE automatically). We simulate the effect | ||
376 | * of turning off DE on entry to an exception handler by turning | ||
377 | * off DE in the CSRR1 value and clearing the debug status. | ||
378 | */ | ||
379 | |||
380 | mfspr r14,SPRN_DBSR /* check single-step/branch taken */ | ||
381 | andis. r15,r14,DBSR_IC@h | ||
382 | beq+ 1f | ||
383 | |||
384 | LOAD_REG_IMMEDIATE(r14,interrupt_base_book3e) | ||
385 | LOAD_REG_IMMEDIATE(r15,interrupt_end_book3e) | ||
386 | cmpld cr0,r10,r14 | ||
387 | cmpld cr1,r10,r15 | ||
388 | blt+ cr0,1f | ||
389 | bge+ cr1,1f | ||
390 | |||
391 | /* here it looks like we got an inappropriate debug exception. */ | ||
392 | lis r14,DBSR_IC@h /* clear the IC event */ | ||
393 | rlwinm r11,r11,0,~MSR_DE /* clear DE in the CSRR1 value */ | ||
394 | mtspr SPRN_DBSR,r14 | ||
395 | mtspr SPRN_CSRR1,r11 | ||
396 | lwz r10,PACA_EXCRIT+EX_CR(r13) /* restore registers */ | ||
397 | ld r1,PACA_EXCRIT+EX_R1(r13) | ||
398 | ld r14,PACA_EXCRIT+EX_R14(r13) | ||
399 | ld r15,PACA_EXCRIT+EX_R15(r13) | ||
400 | mtcr r10 | ||
401 | ld r10,PACA_EXCRIT+EX_R10(r13) /* restore registers */ | ||
402 | ld r11,PACA_EXCRIT+EX_R11(r13) | ||
403 | mfspr r13,SPRN_SPRG_CRIT_SCRATCH | ||
404 | rfci | ||
405 | |||
406 | /* Normal debug exception */ | ||
407 | /* XXX We only handle coming from userspace for now since we can't | ||
408 | * quite save properly an interrupted kernel state yet | ||
409 | */ | ||
410 | 1: andi. r14,r11,MSR_PR; /* check for userspace again */ | ||
411 | beq kernel_dbg_exc; /* if from kernel mode */ | ||
412 | |||
413 | /* Now we mash up things to make it look like we are coming on a | ||
414 | * normal exception | ||
415 | */ | ||
416 | mfspr r15,SPRN_SPRG_CRIT_SCRATCH | ||
417 | mtspr SPRN_SPRG_GEN_SCRATCH,r15 | ||
418 | mfspr r14,SPRN_DBSR | ||
419 | EXCEPTION_COMMON(0xd00, PACA_EXCRIT, INTS_DISABLE_ALL) | ||
420 | std r14,_DSISR(r1) | ||
421 | addi r3,r1,STACK_FRAME_OVERHEAD | ||
422 | mr r4,r14 | ||
423 | ld r14,PACA_EXCRIT+EX_R14(r13) | ||
424 | ld r15,PACA_EXCRIT+EX_R15(r13) | ||
425 | bl .save_nvgprs | ||
426 | bl .DebugException | ||
427 | b .ret_from_except | ||
428 | |||
429 | kernel_dbg_exc: | ||
430 | b . /* NYI */ | ||
431 | |||
432 | |||
433 | /* | ||
434 | * An interrupt came in while soft-disabled; clear EE in SRR1, | ||
435 | * clear paca->hard_enabled and return. | ||
436 | */ | ||
437 | masked_interrupt_book3e: | ||
438 | mtcr r10 | ||
439 | stb r11,PACAHARDIRQEN(r13) | ||
440 | mfspr r10,SPRN_SRR1 | ||
441 | rldicl r11,r10,48,1 /* clear MSR_EE */ | ||
442 | rotldi r10,r11,16 | ||
443 | mtspr SPRN_SRR1,r10 | ||
444 | ld r10,PACA_EXGEN+EX_R10(r13); /* restore registers */ | ||
445 | ld r11,PACA_EXGEN+EX_R11(r13); | ||
446 | mfspr r13,SPRN_SPRG_GEN_SCRATCH; | ||
447 | rfi | ||
448 | b . | ||
449 | |||
450 | /* | ||
451 | * This is called from 0x300 and 0x400 handlers after the prologs with | ||
452 | * r14 and r15 containing the fault address and error code, with the | ||
453 | * original values stashed away in the PACA | ||
454 | */ | ||
455 | storage_fault_common: | ||
456 | std r14,_DAR(r1) | ||
457 | std r15,_DSISR(r1) | ||
458 | addi r3,r1,STACK_FRAME_OVERHEAD | ||
459 | mr r4,r14 | ||
460 | mr r5,r15 | ||
461 | ld r14,PACA_EXGEN+EX_R14(r13) | ||
462 | ld r15,PACA_EXGEN+EX_R15(r13) | ||
463 | INTS_RESTORE_HARD | ||
464 | bl .do_page_fault | ||
465 | cmpdi r3,0 | ||
466 | bne- 1f | ||
467 | b .ret_from_except_lite | ||
468 | 1: bl .save_nvgprs | ||
469 | mr r5,r3 | ||
470 | addi r3,r1,STACK_FRAME_OVERHEAD | ||
471 | ld r4,_DAR(r1) | ||
472 | bl .bad_page_fault | ||
473 | b .ret_from_except | ||
474 | |||
475 | /* | ||
476 | * Alignment exception doesn't fit entirely in the 0x100 bytes so it | ||
477 | * continues here. | ||
478 | */ | ||
479 | alignment_more: | ||
480 | std r14,_DAR(r1) | ||
481 | std r15,_DSISR(r1) | ||
482 | addi r3,r1,STACK_FRAME_OVERHEAD | ||
483 | ld r14,PACA_EXGEN+EX_R14(r13) | ||
484 | ld r15,PACA_EXGEN+EX_R15(r13) | ||
485 | bl .save_nvgprs | ||
486 | INTS_RESTORE_HARD | ||
487 | bl .alignment_exception | ||
488 | b .ret_from_except | ||
489 | |||
490 | /* | ||
491 | * We branch here from entry_64.S for the last stage of the exception | ||
492 | * return code path. MSR:EE is expected to be off at that point | ||
493 | */ | ||
494 | _GLOBAL(exception_return_book3e) | ||
495 | b 1f | ||
496 | |||
497 | /* This is the return from load_up_fpu fast path which could do with | ||
498 | * less GPR restores in fact, but for now we have a single return path | ||
499 | */ | ||
500 | .globl fast_exception_return | ||
501 | fast_exception_return: | ||
502 | wrteei 0 | ||
503 | 1: mr r0,r13 | ||
504 | ld r10,_MSR(r1) | ||
505 | REST_4GPRS(2, r1) | ||
506 | andi. r6,r10,MSR_PR | ||
507 | REST_2GPRS(6, r1) | ||
508 | beq 1f | ||
509 | ACCOUNT_CPU_USER_EXIT(r10, r11) | ||
510 | ld r0,GPR13(r1) | ||
511 | |||
512 | 1: stdcx. r0,0,r1 /* to clear the reservation */ | ||
513 | |||
514 | ld r8,_CCR(r1) | ||
515 | ld r9,_LINK(r1) | ||
516 | ld r10,_CTR(r1) | ||
517 | ld r11,_XER(r1) | ||
518 | mtcr r8 | ||
519 | mtlr r9 | ||
520 | mtctr r10 | ||
521 | mtxer r11 | ||
522 | REST_2GPRS(8, r1) | ||
523 | ld r10,GPR10(r1) | ||
524 | ld r11,GPR11(r1) | ||
525 | ld r12,GPR12(r1) | ||
526 | mtspr SPRN_SPRG_GEN_SCRATCH,r0 | ||
527 | |||
528 | std r10,PACA_EXGEN+EX_R10(r13); | ||
529 | std r11,PACA_EXGEN+EX_R11(r13); | ||
530 | ld r10,_NIP(r1) | ||
531 | ld r11,_MSR(r1) | ||
532 | ld r0,GPR0(r1) | ||
533 | ld r1,GPR1(r1) | ||
534 | mtspr SPRN_SRR0,r10 | ||
535 | mtspr SPRN_SRR1,r11 | ||
536 | ld r10,PACA_EXGEN+EX_R10(r13) | ||
537 | ld r11,PACA_EXGEN+EX_R11(r13) | ||
538 | mfspr r13,SPRN_SPRG_GEN_SCRATCH | ||
539 | rfi | ||
540 | |||
541 | /* | ||
542 | * Trampolines used when spotting a bad kernel stack pointer in | ||
543 | * the exception entry code. | ||
544 | * | ||
545 | * TODO: move some bits like SRR0 read to trampoline, pass PACA | ||
546 | * index around, etc... to handle crit & mcheck | ||
547 | */ | ||
548 | BAD_STACK_TRAMPOLINE(0x000) | ||
549 | BAD_STACK_TRAMPOLINE(0x100) | ||
550 | BAD_STACK_TRAMPOLINE(0x200) | ||
551 | BAD_STACK_TRAMPOLINE(0x300) | ||
552 | BAD_STACK_TRAMPOLINE(0x400) | ||
553 | BAD_STACK_TRAMPOLINE(0x500) | ||
554 | BAD_STACK_TRAMPOLINE(0x600) | ||
555 | BAD_STACK_TRAMPOLINE(0x700) | ||
556 | BAD_STACK_TRAMPOLINE(0x800) | ||
557 | BAD_STACK_TRAMPOLINE(0x900) | ||
558 | BAD_STACK_TRAMPOLINE(0x980) | ||
559 | BAD_STACK_TRAMPOLINE(0x9f0) | ||
560 | BAD_STACK_TRAMPOLINE(0xa00) | ||
561 | BAD_STACK_TRAMPOLINE(0xb00) | ||
562 | BAD_STACK_TRAMPOLINE(0xc00) | ||
563 | BAD_STACK_TRAMPOLINE(0xd00) | ||
564 | BAD_STACK_TRAMPOLINE(0xe00) | ||
565 | BAD_STACK_TRAMPOLINE(0xf00) | ||
566 | BAD_STACK_TRAMPOLINE(0xf20) | ||
567 | |||
568 | .globl bad_stack_book3e | ||
569 | bad_stack_book3e: | ||
570 | /* XXX: Needs to make SPRN_SPRG_GEN depend on exception type */ | ||
571 | mfspr r10,SPRN_SRR0; /* read SRR0 before touching stack */ | ||
572 | ld r1,PACAEMERGSP(r13) | ||
573 | subi r1,r1,64+INT_FRAME_SIZE | ||
574 | std r10,_NIP(r1) | ||
575 | std r11,_MSR(r1) | ||
576 | ld r10,PACA_EXGEN+EX_R1(r13) /* FIXME for crit & mcheck */ | ||
577 | lwz r11,PACA_EXGEN+EX_CR(r13) /* FIXME for crit & mcheck */ | ||
578 | std r10,GPR1(r1) | ||
579 | std r11,_CCR(r1) | ||
580 | mfspr r10,SPRN_DEAR | ||
581 | mfspr r11,SPRN_ESR | ||
582 | std r10,_DAR(r1) | ||
583 | std r11,_DSISR(r1) | ||
584 | std r0,GPR0(r1); /* save r0 in stackframe */ \ | ||
585 | std r2,GPR2(r1); /* save r2 in stackframe */ \ | ||
586 | SAVE_4GPRS(3, r1); /* save r3 - r6 in stackframe */ \ | ||
587 | SAVE_2GPRS(7, r1); /* save r7, r8 in stackframe */ \ | ||
588 | std r9,GPR9(r1); /* save r9 in stackframe */ \ | ||
589 | ld r3,PACA_EXGEN+EX_R10(r13);/* get back r10 */ \ | ||
590 | ld r4,PACA_EXGEN+EX_R11(r13);/* get back r11 */ \ | ||
591 | mfspr r5,SPRN_SPRG_GEN_SCRATCH;/* get back r13 XXX can be wrong */ \ | ||
592 | std r3,GPR10(r1); /* save r10 to stackframe */ \ | ||
593 | std r4,GPR11(r1); /* save r11 to stackframe */ \ | ||
594 | std r12,GPR12(r1); /* save r12 in stackframe */ \ | ||
595 | std r5,GPR13(r1); /* save it to stackframe */ \ | ||
596 | mflr r10 | ||
597 | mfctr r11 | ||
598 | mfxer r12 | ||
599 | std r10,_LINK(r1) | ||
600 | std r11,_CTR(r1) | ||
601 | std r12,_XER(r1) | ||
602 | SAVE_10GPRS(14,r1) | ||
603 | SAVE_8GPRS(24,r1) | ||
604 | lhz r12,PACA_TRAP_SAVE(r13) | ||
605 | std r12,_TRAP(r1) | ||
606 | addi r11,r1,INT_FRAME_SIZE | ||
607 | std r11,0(r1) | ||
608 | li r12,0 | ||
609 | std r12,0(r11) | ||
610 | ld r2,PACATOC(r13) | ||
611 | 1: addi r3,r1,STACK_FRAME_OVERHEAD | ||
612 | bl .kernel_bad_stack | ||
613 | b 1b | ||
614 | |||
615 | /* | ||
616 | * Setup the initial TLB for a core. This current implementation | ||
617 | * assume that whatever we are running off will not conflict with | ||
618 | * the new mapping at PAGE_OFFSET. | ||
619 | */ | ||
620 | _GLOBAL(initial_tlb_book3e) | ||
621 | |||
622 | /* Look for the first TLB with IPROT set */ | ||
623 | mfspr r4,SPRN_TLB0CFG | ||
624 | andi. r3,r4,TLBnCFG_IPROT | ||
625 | lis r3,MAS0_TLBSEL(0)@h | ||
626 | bne found_iprot | ||
627 | |||
628 | mfspr r4,SPRN_TLB1CFG | ||
629 | andi. r3,r4,TLBnCFG_IPROT | ||
630 | lis r3,MAS0_TLBSEL(1)@h | ||
631 | bne found_iprot | ||
632 | |||
633 | mfspr r4,SPRN_TLB2CFG | ||
634 | andi. r3,r4,TLBnCFG_IPROT | ||
635 | lis r3,MAS0_TLBSEL(2)@h | ||
636 | bne found_iprot | ||
637 | |||
638 | lis r3,MAS0_TLBSEL(3)@h | ||
639 | mfspr r4,SPRN_TLB3CFG | ||
640 | /* fall through */ | ||
641 | |||
642 | found_iprot: | ||
643 | andi. r5,r4,TLBnCFG_HES | ||
644 | bne have_hes | ||
645 | |||
646 | mflr r8 /* save LR */ | ||
647 | /* 1. Find the index of the entry we're executing in | ||
648 | * | ||
649 | * r3 = MAS0_TLBSEL (for the iprot array) | ||
650 | * r4 = SPRN_TLBnCFG | ||
651 | */ | ||
652 | bl invstr /* Find our address */ | ||
653 | invstr: mflr r6 /* Make it accessible */ | ||
654 | mfmsr r7 | ||
655 | rlwinm r5,r7,27,31,31 /* extract MSR[IS] */ | ||
656 | mfspr r7,SPRN_PID | ||
657 | slwi r7,r7,16 | ||
658 | or r7,r7,r5 | ||
659 | mtspr SPRN_MAS6,r7 | ||
660 | tlbsx 0,r6 /* search MSR[IS], SPID=PID */ | ||
661 | |||
662 | mfspr r3,SPRN_MAS0 | ||
663 | rlwinm r5,r3,16,20,31 /* Extract MAS0(Entry) */ | ||
664 | |||
665 | mfspr r7,SPRN_MAS1 /* Insure IPROT set */ | ||
666 | oris r7,r7,MAS1_IPROT@h | ||
667 | mtspr SPRN_MAS1,r7 | ||
668 | tlbwe | ||
669 | |||
670 | /* 2. Invalidate all entries except the entry we're executing in | ||
671 | * | ||
672 | * r3 = MAS0 w/TLBSEL & ESEL for the entry we are running in | ||
673 | * r4 = SPRN_TLBnCFG | ||
674 | * r5 = ESEL of entry we are running in | ||
675 | */ | ||
676 | andi. r4,r4,TLBnCFG_N_ENTRY /* Extract # entries */ | ||
677 | li r6,0 /* Set Entry counter to 0 */ | ||
678 | 1: mr r7,r3 /* Set MAS0(TLBSEL) */ | ||
679 | rlwimi r7,r6,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r6) */ | ||
680 | mtspr SPRN_MAS0,r7 | ||
681 | tlbre | ||
682 | mfspr r7,SPRN_MAS1 | ||
683 | rlwinm r7,r7,0,2,31 /* Clear MAS1 Valid and IPROT */ | ||
684 | cmpw r5,r6 | ||
685 | beq skpinv /* Dont update the current execution TLB */ | ||
686 | mtspr SPRN_MAS1,r7 | ||
687 | tlbwe | ||
688 | isync | ||
689 | skpinv: addi r6,r6,1 /* Increment */ | ||
690 | cmpw r6,r4 /* Are we done? */ | ||
691 | bne 1b /* If not, repeat */ | ||
692 | |||
693 | /* Invalidate all TLBs */ | ||
694 | PPC_TLBILX_ALL(0,0) | ||
695 | sync | ||
696 | isync | ||
697 | |||
698 | /* 3. Setup a temp mapping and jump to it | ||
699 | * | ||
700 | * r3 = MAS0 w/TLBSEL & ESEL for the entry we are running in | ||
701 | * r5 = ESEL of entry we are running in | ||
702 | */ | ||
703 | andi. r7,r5,0x1 /* Find an entry not used and is non-zero */ | ||
704 | addi r7,r7,0x1 | ||
705 | mr r4,r3 /* Set MAS0(TLBSEL) = 1 */ | ||
706 | mtspr SPRN_MAS0,r4 | ||
707 | tlbre | ||
708 | |||
709 | rlwimi r4,r7,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r7) */ | ||
710 | mtspr SPRN_MAS0,r4 | ||
711 | |||
712 | mfspr r7,SPRN_MAS1 | ||
713 | xori r6,r7,MAS1_TS /* Setup TMP mapping in the other Address space */ | ||
714 | mtspr SPRN_MAS1,r6 | ||
715 | |||
716 | tlbwe | ||
717 | |||
718 | mfmsr r6 | ||
719 | xori r6,r6,MSR_IS | ||
720 | mtspr SPRN_SRR1,r6 | ||
721 | bl 1f /* Find our address */ | ||
722 | 1: mflr r6 | ||
723 | addi r6,r6,(2f - 1b) | ||
724 | mtspr SPRN_SRR0,r6 | ||
725 | rfi | ||
726 | 2: | ||
727 | |||
728 | /* 4. Clear out PIDs & Search info | ||
729 | * | ||
730 | * r3 = MAS0 w/TLBSEL & ESEL for the entry we started in | ||
731 | * r4 = MAS0 w/TLBSEL & ESEL for the temp mapping | ||
732 | * r5 = MAS3 | ||
733 | */ | ||
734 | li r6,0 | ||
735 | mtspr SPRN_MAS6,r6 | ||
736 | mtspr SPRN_PID,r6 | ||
737 | |||
738 | /* 5. Invalidate mapping we started in | ||
739 | * | ||
740 | * r3 = MAS0 w/TLBSEL & ESEL for the entry we started in | ||
741 | * r4 = MAS0 w/TLBSEL & ESEL for the temp mapping | ||
742 | * r5 = MAS3 | ||
743 | */ | ||
744 | mtspr SPRN_MAS0,r3 | ||
745 | tlbre | ||
746 | mfspr r6,SPRN_MAS1 | ||
747 | rlwinm r6,r6,0,2,0 /* clear IPROT */ | ||
748 | mtspr SPRN_MAS1,r6 | ||
749 | tlbwe | ||
750 | |||
751 | /* Invalidate TLB1 */ | ||
752 | PPC_TLBILX_ALL(0,0) | ||
753 | sync | ||
754 | isync | ||
755 | |||
756 | /* The mapping only needs to be cache-coherent on SMP */ | ||
757 | #ifdef CONFIG_SMP | ||
758 | #define M_IF_SMP MAS2_M | ||
759 | #else | ||
760 | #define M_IF_SMP 0 | ||
761 | #endif | ||
762 | |||
763 | /* 6. Setup KERNELBASE mapping in TLB[0] | ||
764 | * | ||
765 | * r3 = MAS0 w/TLBSEL & ESEL for the entry we started in | ||
766 | * r4 = MAS0 w/TLBSEL & ESEL for the temp mapping | ||
767 | * r5 = MAS3 | ||
768 | */ | ||
769 | rlwinm r3,r3,0,16,3 /* clear ESEL */ | ||
770 | mtspr SPRN_MAS0,r3 | ||
771 | lis r6,(MAS1_VALID|MAS1_IPROT)@h | ||
772 | ori r6,r6,(MAS1_TSIZE(BOOK3E_PAGESZ_1GB))@l | ||
773 | mtspr SPRN_MAS1,r6 | ||
774 | |||
775 | LOAD_REG_IMMEDIATE(r6, PAGE_OFFSET | M_IF_SMP) | ||
776 | mtspr SPRN_MAS2,r6 | ||
777 | |||
778 | rlwinm r5,r5,0,0,25 | ||
779 | ori r5,r5,MAS3_SR | MAS3_SW | MAS3_SX | ||
780 | mtspr SPRN_MAS3,r5 | ||
781 | li r5,-1 | ||
782 | rlwinm r5,r5,0,0,25 | ||
783 | |||
784 | tlbwe | ||
785 | |||
786 | /* 7. Jump to KERNELBASE mapping | ||
787 | * | ||
788 | * r4 = MAS0 w/TLBSEL & ESEL for the temp mapping | ||
789 | */ | ||
790 | /* Now we branch the new virtual address mapped by this entry */ | ||
791 | LOAD_REG_IMMEDIATE(r6,2f) | ||
792 | lis r7,MSR_KERNEL@h | ||
793 | ori r7,r7,MSR_KERNEL@l | ||
794 | mtspr SPRN_SRR0,r6 | ||
795 | mtspr SPRN_SRR1,r7 | ||
796 | rfi /* start execution out of TLB1[0] entry */ | ||
797 | 2: | ||
798 | |||
799 | /* 8. Clear out the temp mapping | ||
800 | * | ||
801 | * r4 = MAS0 w/TLBSEL & ESEL for the entry we are running in | ||
802 | */ | ||
803 | mtspr SPRN_MAS0,r4 | ||
804 | tlbre | ||
805 | mfspr r5,SPRN_MAS1 | ||
806 | rlwinm r5,r5,0,2,0 /* clear IPROT */ | ||
807 | mtspr SPRN_MAS1,r5 | ||
808 | tlbwe | ||
809 | |||
810 | /* Invalidate TLB1 */ | ||
811 | PPC_TLBILX_ALL(0,0) | ||
812 | sync | ||
813 | isync | ||
814 | |||
815 | /* We translate LR and return */ | ||
816 | tovirt(r8,r8) | ||
817 | mtlr r8 | ||
818 | blr | ||
819 | |||
820 | have_hes: | ||
821 | /* Setup MAS 0,1,2,3 and 7 for tlbwe of a 1G entry that maps the | ||
822 | * kernel linear mapping. We also set MAS8 once for all here though | ||
823 | * that will have to be made dependent on whether we are running under | ||
824 | * a hypervisor I suppose. | ||
825 | */ | ||
826 | ori r3,r3,MAS0_HES | MAS0_WQ_ALLWAYS | ||
827 | mtspr SPRN_MAS0,r3 | ||
828 | lis r3,(MAS1_VALID | MAS1_IPROT)@h | ||
829 | ori r3,r3,BOOK3E_PAGESZ_1GB << MAS1_TSIZE_SHIFT | ||
830 | mtspr SPRN_MAS1,r3 | ||
831 | LOAD_REG_IMMEDIATE(r3, PAGE_OFFSET | MAS2_M) | ||
832 | mtspr SPRN_MAS2,r3 | ||
833 | li r3,MAS3_SR | MAS3_SW | MAS3_SX | ||
834 | mtspr SPRN_MAS7_MAS3,r3 | ||
835 | li r3,0 | ||
836 | mtspr SPRN_MAS8,r3 | ||
837 | |||
838 | /* Write the TLB entry */ | ||
839 | tlbwe | ||
840 | |||
841 | /* Now we branch the new virtual address mapped by this entry */ | ||
842 | LOAD_REG_IMMEDIATE(r3,1f) | ||
843 | mtctr r3 | ||
844 | bctr | ||
845 | |||
846 | 1: /* We are now running at PAGE_OFFSET, clean the TLB of everything | ||
847 | * else (XXX we should scan for bolted crap from the firmware too) | ||
848 | */ | ||
849 | PPC_TLBILX(0,0,0) | ||
850 | sync | ||
851 | isync | ||
852 | |||
853 | /* We translate LR and return */ | ||
854 | mflr r3 | ||
855 | tovirt(r3,r3) | ||
856 | mtlr r3 | ||
857 | blr | ||
858 | |||
859 | /* | ||
860 | * Main entry (boot CPU, thread 0) | ||
861 | * | ||
862 | * We enter here from head_64.S, possibly after the prom_init trampoline | ||
863 | * with r3 and r4 already saved to r31 and 30 respectively and in 64 bits | ||
864 | * mode. Anything else is as it was left by the bootloader | ||
865 | * | ||
866 | * Initial requirements of this port: | ||
867 | * | ||
868 | * - Kernel loaded at 0 physical | ||
869 | * - A good lump of memory mapped 0:0 by UTLB entry 0 | ||
870 | * - MSR:IS & MSR:DS set to 0 | ||
871 | * | ||
872 | * Note that some of the above requirements will be relaxed in the future | ||
873 | * as the kernel becomes smarter at dealing with different initial conditions | ||
874 | * but for now you have to be careful | ||
875 | */ | ||
876 | _GLOBAL(start_initialization_book3e) | ||
877 | mflr r28 | ||
878 | |||
879 | /* First, we need to setup some initial TLBs to map the kernel | ||
880 | * text, data and bss at PAGE_OFFSET. We don't have a real mode | ||
881 | * and always use AS 0, so we just set it up to match our link | ||
882 | * address and never use 0 based addresses. | ||
883 | */ | ||
884 | bl .initial_tlb_book3e | ||
885 | |||
886 | /* Init global core bits */ | ||
887 | bl .init_core_book3e | ||
888 | |||
889 | /* Init per-thread bits */ | ||
890 | bl .init_thread_book3e | ||
891 | |||
892 | /* Return to common init code */ | ||
893 | tovirt(r28,r28) | ||
894 | mtlr r28 | ||
895 | blr | ||
896 | |||
897 | |||
898 | /* | ||
899 | * Secondary core/processor entry | ||
900 | * | ||
901 | * This is entered for thread 0 of a secondary core, all other threads | ||
902 | * are expected to be stopped. It's similar to start_initialization_book3e | ||
903 | * except that it's generally entered from the holding loop in head_64.S | ||
904 | * after CPUs have been gathered by Open Firmware. | ||
905 | * | ||
906 | * We assume we are in 32 bits mode running with whatever TLB entry was | ||
907 | * set for us by the firmware or POR engine. | ||
908 | */ | ||
909 | _GLOBAL(book3e_secondary_core_init_tlb_set) | ||
910 | li r4,1 | ||
911 | b .generic_secondary_smp_init | ||
912 | |||
913 | _GLOBAL(book3e_secondary_core_init) | ||
914 | mflr r28 | ||
915 | |||
916 | /* Do we need to setup initial TLB entry ? */ | ||
917 | cmplwi r4,0 | ||
918 | bne 2f | ||
919 | |||
920 | /* Setup TLB for this core */ | ||
921 | bl .initial_tlb_book3e | ||
922 | |||
923 | /* We can return from the above running at a different | ||
924 | * address, so recalculate r2 (TOC) | ||
925 | */ | ||
926 | bl .relative_toc | ||
927 | |||
928 | /* Init global core bits */ | ||
929 | 2: bl .init_core_book3e | ||
930 | |||
931 | /* Init per-thread bits */ | ||
932 | 3: bl .init_thread_book3e | ||
933 | |||
934 | /* Return to common init code at proper virtual address. | ||
935 | * | ||
936 | * Due to various previous assumptions, we know we entered this | ||
937 | * function at either the final PAGE_OFFSET mapping or using a | ||
938 | * 1:1 mapping at 0, so we don't bother doing a complicated check | ||
939 | * here, we just ensure the return address has the right top bits. | ||
940 | * | ||
941 | * Note that if we ever want to be smarter about where we can be | ||
942 | * started from, we have to be careful that by the time we reach | ||
943 | * the code below we may already be running at a different location | ||
944 | * than the one we were called from since initial_tlb_book3e can | ||
945 | * have moved us already. | ||
946 | */ | ||
947 | cmpdi cr0,r28,0 | ||
948 | blt 1f | ||
949 | lis r3,PAGE_OFFSET@highest | ||
950 | sldi r3,r3,32 | ||
951 | or r28,r28,r3 | ||
952 | 1: mtlr r28 | ||
953 | blr | ||
954 | |||
955 | _GLOBAL(book3e_secondary_thread_init) | ||
956 | mflr r28 | ||
957 | b 3b | ||
958 | |||
959 | _STATIC(init_core_book3e) | ||
960 | /* Establish the interrupt vector base */ | ||
961 | LOAD_REG_IMMEDIATE(r3, interrupt_base_book3e) | ||
962 | mtspr SPRN_IVPR,r3 | ||
963 | sync | ||
964 | blr | ||
965 | |||
966 | _STATIC(init_thread_book3e) | ||
967 | lis r3,(SPRN_EPCR_ICM | SPRN_EPCR_GICM)@h | ||
968 | mtspr SPRN_EPCR,r3 | ||
969 | |||
970 | /* Make sure interrupts are off */ | ||
971 | wrteei 0 | ||
972 | |||
973 | /* disable all timers and clear out status */ | ||
974 | li r3,0 | ||
975 | mtspr SPRN_TCR,r3 | ||
976 | mfspr r3,SPRN_TSR | ||
977 | mtspr SPRN_TSR,r3 | ||
978 | |||
979 | blr | ||
980 | |||
981 | _GLOBAL(__setup_base_ivors) | ||
982 | SET_IVOR(0, 0x020) /* Critical Input */ | ||
983 | SET_IVOR(1, 0x000) /* Machine Check */ | ||
984 | SET_IVOR(2, 0x060) /* Data Storage */ | ||
985 | SET_IVOR(3, 0x080) /* Instruction Storage */ | ||
986 | SET_IVOR(4, 0x0a0) /* External Input */ | ||
987 | SET_IVOR(5, 0x0c0) /* Alignment */ | ||
988 | SET_IVOR(6, 0x0e0) /* Program */ | ||
989 | SET_IVOR(7, 0x100) /* FP Unavailable */ | ||
990 | SET_IVOR(8, 0x120) /* System Call */ | ||
991 | SET_IVOR(9, 0x140) /* Auxiliary Processor Unavailable */ | ||
992 | SET_IVOR(10, 0x160) /* Decrementer */ | ||
993 | SET_IVOR(11, 0x180) /* Fixed Interval Timer */ | ||
994 | SET_IVOR(12, 0x1a0) /* Watchdog Timer */ | ||
995 | SET_IVOR(13, 0x1c0) /* Data TLB Error */ | ||
996 | SET_IVOR(14, 0x1e0) /* Instruction TLB Error */ | ||
997 | SET_IVOR(15, 0x040) /* Debug */ | ||
998 | |||
999 | sync | ||
1000 | |||
1001 | blr | ||
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S index 8ac85e08ffae..1808876edcc9 100644 --- a/arch/powerpc/kernel/exceptions-64s.S +++ b/arch/powerpc/kernel/exceptions-64s.S | |||
@@ -12,6 +12,8 @@ | |||
12 | * | 12 | * |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <asm/exception-64s.h> | ||
16 | |||
15 | /* | 17 | /* |
16 | * We layout physical memory as follows: | 18 | * We layout physical memory as follows: |
17 | * 0x0000 - 0x00ff : Secondary processor spin code | 19 | * 0x0000 - 0x00ff : Secondary processor spin code |
@@ -22,18 +24,6 @@ | |||
22 | * 0x8000 - : Early init and support code | 24 | * 0x8000 - : Early init and support code |
23 | */ | 25 | */ |
24 | 26 | ||
25 | |||
26 | /* | ||
27 | * SPRG Usage | ||
28 | * | ||
29 | * Register Definition | ||
30 | * | ||
31 | * SPRG0 reserved for hypervisor | ||
32 | * SPRG1 temp - used to save gpr | ||
33 | * SPRG2 temp - used to save gpr | ||
34 | * SPRG3 virt addr of paca | ||
35 | */ | ||
36 | |||
37 | /* | 27 | /* |
38 | * This is the start of the interrupt handlers for pSeries | 28 | * This is the start of the interrupt handlers for pSeries |
39 | * This code runs with relocation off. | 29 | * This code runs with relocation off. |
@@ -51,34 +41,44 @@ __start_interrupts: | |||
51 | . = 0x200 | 41 | . = 0x200 |
52 | _machine_check_pSeries: | 42 | _machine_check_pSeries: |
53 | HMT_MEDIUM | 43 | HMT_MEDIUM |
54 | mtspr SPRN_SPRG1,r13 /* save r13 */ | 44 | mtspr SPRN_SPRG_SCRATCH0,r13 /* save r13 */ |
55 | EXCEPTION_PROLOG_PSERIES(PACA_EXMC, machine_check_common) | 45 | EXCEPTION_PROLOG_PSERIES(PACA_EXMC, machine_check_common) |
56 | 46 | ||
57 | . = 0x300 | 47 | . = 0x300 |
58 | .globl data_access_pSeries | 48 | .globl data_access_pSeries |
59 | data_access_pSeries: | 49 | data_access_pSeries: |
60 | HMT_MEDIUM | 50 | HMT_MEDIUM |
61 | mtspr SPRN_SPRG1,r13 | 51 | mtspr SPRN_SPRG_SCRATCH0,r13 |
62 | BEGIN_FTR_SECTION | 52 | BEGIN_FTR_SECTION |
63 | mtspr SPRN_SPRG2,r12 | 53 | mfspr r13,SPRN_SPRG_PACA |
64 | mfspr r13,SPRN_DAR | 54 | std r9,PACA_EXSLB+EX_R9(r13) |
65 | mfspr r12,SPRN_DSISR | 55 | std r10,PACA_EXSLB+EX_R10(r13) |
66 | srdi r13,r13,60 | 56 | mfspr r10,SPRN_DAR |
67 | rlwimi r13,r12,16,0x20 | 57 | mfspr r9,SPRN_DSISR |
68 | mfcr r12 | 58 | srdi r10,r10,60 |
69 | cmpwi r13,0x2c | 59 | rlwimi r10,r9,16,0x20 |
60 | mfcr r9 | ||
61 | cmpwi r10,0x2c | ||
70 | beq do_stab_bolted_pSeries | 62 | beq do_stab_bolted_pSeries |
71 | mtcrf 0x80,r12 | 63 | ld r10,PACA_EXSLB+EX_R10(r13) |
72 | mfspr r12,SPRN_SPRG2 | 64 | std r11,PACA_EXGEN+EX_R11(r13) |
73 | END_FTR_SECTION_IFCLR(CPU_FTR_SLB) | 65 | ld r11,PACA_EXSLB+EX_R9(r13) |
66 | std r12,PACA_EXGEN+EX_R12(r13) | ||
67 | mfspr r12,SPRN_SPRG_SCRATCH0 | ||
68 | std r10,PACA_EXGEN+EX_R10(r13) | ||
69 | std r11,PACA_EXGEN+EX_R9(r13) | ||
70 | std r12,PACA_EXGEN+EX_R13(r13) | ||
71 | EXCEPTION_PROLOG_PSERIES_1(data_access_common) | ||
72 | FTR_SECTION_ELSE | ||
74 | EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, data_access_common) | 73 | EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, data_access_common) |
74 | ALT_FTR_SECTION_END_IFCLR(CPU_FTR_SLB) | ||
75 | 75 | ||
76 | . = 0x380 | 76 | . = 0x380 |
77 | .globl data_access_slb_pSeries | 77 | .globl data_access_slb_pSeries |
78 | data_access_slb_pSeries: | 78 | data_access_slb_pSeries: |
79 | HMT_MEDIUM | 79 | HMT_MEDIUM |
80 | mtspr SPRN_SPRG1,r13 | 80 | mtspr SPRN_SPRG_SCRATCH0,r13 |
81 | mfspr r13,SPRN_SPRG3 /* get paca address into r13 */ | 81 | mfspr r13,SPRN_SPRG_PACA /* get paca address into r13 */ |
82 | std r3,PACA_EXSLB+EX_R3(r13) | 82 | std r3,PACA_EXSLB+EX_R3(r13) |
83 | mfspr r3,SPRN_DAR | 83 | mfspr r3,SPRN_DAR |
84 | std r9,PACA_EXSLB+EX_R9(r13) /* save r9 - r12 */ | 84 | std r9,PACA_EXSLB+EX_R9(r13) /* save r9 - r12 */ |
@@ -91,7 +91,7 @@ data_access_slb_pSeries: | |||
91 | std r10,PACA_EXSLB+EX_R10(r13) | 91 | std r10,PACA_EXSLB+EX_R10(r13) |
92 | std r11,PACA_EXSLB+EX_R11(r13) | 92 | std r11,PACA_EXSLB+EX_R11(r13) |
93 | std r12,PACA_EXSLB+EX_R12(r13) | 93 | std r12,PACA_EXSLB+EX_R12(r13) |
94 | mfspr r10,SPRN_SPRG1 | 94 | mfspr r10,SPRN_SPRG_SCRATCH0 |
95 | std r10,PACA_EXSLB+EX_R13(r13) | 95 | std r10,PACA_EXSLB+EX_R13(r13) |
96 | mfspr r12,SPRN_SRR1 /* and SRR1 */ | 96 | mfspr r12,SPRN_SRR1 /* and SRR1 */ |
97 | #ifndef CONFIG_RELOCATABLE | 97 | #ifndef CONFIG_RELOCATABLE |
@@ -115,8 +115,8 @@ data_access_slb_pSeries: | |||
115 | .globl instruction_access_slb_pSeries | 115 | .globl instruction_access_slb_pSeries |
116 | instruction_access_slb_pSeries: | 116 | instruction_access_slb_pSeries: |
117 | HMT_MEDIUM | 117 | HMT_MEDIUM |
118 | mtspr SPRN_SPRG1,r13 | 118 | mtspr SPRN_SPRG_SCRATCH0,r13 |
119 | mfspr r13,SPRN_SPRG3 /* get paca address into r13 */ | 119 | mfspr r13,SPRN_SPRG_PACA /* get paca address into r13 */ |
120 | std r3,PACA_EXSLB+EX_R3(r13) | 120 | std r3,PACA_EXSLB+EX_R3(r13) |
121 | mfspr r3,SPRN_SRR0 /* SRR0 is faulting address */ | 121 | mfspr r3,SPRN_SRR0 /* SRR0 is faulting address */ |
122 | std r9,PACA_EXSLB+EX_R9(r13) /* save r9 - r12 */ | 122 | std r9,PACA_EXSLB+EX_R9(r13) /* save r9 - r12 */ |
@@ -129,7 +129,7 @@ instruction_access_slb_pSeries: | |||
129 | std r10,PACA_EXSLB+EX_R10(r13) | 129 | std r10,PACA_EXSLB+EX_R10(r13) |
130 | std r11,PACA_EXSLB+EX_R11(r13) | 130 | std r11,PACA_EXSLB+EX_R11(r13) |
131 | std r12,PACA_EXSLB+EX_R12(r13) | 131 | std r12,PACA_EXSLB+EX_R12(r13) |
132 | mfspr r10,SPRN_SPRG1 | 132 | mfspr r10,SPRN_SPRG_SCRATCH0 |
133 | std r10,PACA_EXSLB+EX_R13(r13) | 133 | std r10,PACA_EXSLB+EX_R13(r13) |
134 | mfspr r12,SPRN_SRR1 /* and SRR1 */ | 134 | mfspr r12,SPRN_SRR1 /* and SRR1 */ |
135 | #ifndef CONFIG_RELOCATABLE | 135 | #ifndef CONFIG_RELOCATABLE |
@@ -159,7 +159,7 @@ BEGIN_FTR_SECTION | |||
159 | beq- 1f | 159 | beq- 1f |
160 | END_FTR_SECTION_IFSET(CPU_FTR_REAL_LE) | 160 | END_FTR_SECTION_IFSET(CPU_FTR_REAL_LE) |
161 | mr r9,r13 | 161 | mr r9,r13 |
162 | mfspr r13,SPRN_SPRG3 | 162 | mfspr r13,SPRN_SPRG_PACA |
163 | mfspr r11,SPRN_SRR0 | 163 | mfspr r11,SPRN_SRR0 |
164 | ld r12,PACAKBASE(r13) | 164 | ld r12,PACAKBASE(r13) |
165 | ld r10,PACAKMSR(r13) | 165 | ld r10,PACAKMSR(r13) |
@@ -228,15 +228,17 @@ masked_interrupt: | |||
228 | rotldi r10,r10,16 | 228 | rotldi r10,r10,16 |
229 | mtspr SPRN_SRR1,r10 | 229 | mtspr SPRN_SRR1,r10 |
230 | ld r10,PACA_EXGEN+EX_R10(r13) | 230 | ld r10,PACA_EXGEN+EX_R10(r13) |
231 | mfspr r13,SPRN_SPRG1 | 231 | mfspr r13,SPRN_SPRG_SCRATCH0 |
232 | rfid | 232 | rfid |
233 | b . | 233 | b . |
234 | 234 | ||
235 | .align 7 | 235 | .align 7 |
236 | do_stab_bolted_pSeries: | 236 | do_stab_bolted_pSeries: |
237 | mtcrf 0x80,r12 | 237 | std r11,PACA_EXSLB+EX_R11(r13) |
238 | mfspr r12,SPRN_SPRG2 | 238 | std r12,PACA_EXSLB+EX_R12(r13) |
239 | EXCEPTION_PROLOG_PSERIES(PACA_EXSLB, .do_stab_bolted) | 239 | mfspr r10,SPRN_SPRG_SCRATCH0 |
240 | std r10,PACA_EXSLB+EX_R13(r13) | ||
241 | EXCEPTION_PROLOG_PSERIES_1(.do_stab_bolted) | ||
240 | 242 | ||
241 | #ifdef CONFIG_PPC_PSERIES | 243 | #ifdef CONFIG_PPC_PSERIES |
242 | /* | 244 | /* |
@@ -246,14 +248,14 @@ do_stab_bolted_pSeries: | |||
246 | .align 7 | 248 | .align 7 |
247 | system_reset_fwnmi: | 249 | system_reset_fwnmi: |
248 | HMT_MEDIUM | 250 | HMT_MEDIUM |
249 | mtspr SPRN_SPRG1,r13 /* save r13 */ | 251 | mtspr SPRN_SPRG_SCRATCH0,r13 /* save r13 */ |
250 | EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, system_reset_common) | 252 | EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, system_reset_common) |
251 | 253 | ||
252 | .globl machine_check_fwnmi | 254 | .globl machine_check_fwnmi |
253 | .align 7 | 255 | .align 7 |
254 | machine_check_fwnmi: | 256 | machine_check_fwnmi: |
255 | HMT_MEDIUM | 257 | HMT_MEDIUM |
256 | mtspr SPRN_SPRG1,r13 /* save r13 */ | 258 | mtspr SPRN_SPRG_SCRATCH0,r13 /* save r13 */ |
257 | EXCEPTION_PROLOG_PSERIES(PACA_EXMC, machine_check_common) | 259 | EXCEPTION_PROLOG_PSERIES(PACA_EXMC, machine_check_common) |
258 | 260 | ||
259 | #endif /* CONFIG_PPC_PSERIES */ | 261 | #endif /* CONFIG_PPC_PSERIES */ |
@@ -268,7 +270,7 @@ slb_miss_user_pseries: | |||
268 | std r10,PACA_EXGEN+EX_R10(r13) | 270 | std r10,PACA_EXGEN+EX_R10(r13) |
269 | std r11,PACA_EXGEN+EX_R11(r13) | 271 | std r11,PACA_EXGEN+EX_R11(r13) |
270 | std r12,PACA_EXGEN+EX_R12(r13) | 272 | std r12,PACA_EXGEN+EX_R12(r13) |
271 | mfspr r10,SPRG1 | 273 | mfspr r10,SPRG_SCRATCH0 |
272 | ld r11,PACA_EXSLB+EX_R9(r13) | 274 | ld r11,PACA_EXSLB+EX_R9(r13) |
273 | ld r12,PACA_EXSLB+EX_R3(r13) | 275 | ld r12,PACA_EXSLB+EX_R3(r13) |
274 | std r10,PACA_EXGEN+EX_R13(r13) | 276 | std r10,PACA_EXGEN+EX_R13(r13) |
diff --git a/arch/powerpc/kernel/fpu.S b/arch/powerpc/kernel/fpu.S index 2436df33c6f4..fc8f5b14019c 100644 --- a/arch/powerpc/kernel/fpu.S +++ b/arch/powerpc/kernel/fpu.S | |||
@@ -91,7 +91,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_VSX) | |||
91 | #endif /* CONFIG_SMP */ | 91 | #endif /* CONFIG_SMP */ |
92 | /* enable use of FP after return */ | 92 | /* enable use of FP after return */ |
93 | #ifdef CONFIG_PPC32 | 93 | #ifdef CONFIG_PPC32 |
94 | mfspr r5,SPRN_SPRG3 /* current task's THREAD (phys) */ | 94 | mfspr r5,SPRN_SPRG_THREAD /* current task's THREAD (phys) */ |
95 | lwz r4,THREAD_FPEXC_MODE(r5) | 95 | lwz r4,THREAD_FPEXC_MODE(r5) |
96 | ori r9,r9,MSR_FP /* enable FP for current */ | 96 | ori r9,r9,MSR_FP /* enable FP for current */ |
97 | or r9,r9,r4 | 97 | or r9,r9,r4 |
diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S index fc2132942754..829c3fe7c5a2 100644 --- a/arch/powerpc/kernel/head_32.S +++ b/arch/powerpc/kernel/head_32.S | |||
@@ -244,8 +244,8 @@ __secondary_hold_acknowledge: | |||
244 | * task's thread_struct. | 244 | * task's thread_struct. |
245 | */ | 245 | */ |
246 | #define EXCEPTION_PROLOG \ | 246 | #define EXCEPTION_PROLOG \ |
247 | mtspr SPRN_SPRG0,r10; \ | 247 | mtspr SPRN_SPRG_SCRATCH0,r10; \ |
248 | mtspr SPRN_SPRG1,r11; \ | 248 | mtspr SPRN_SPRG_SCRATCH1,r11; \ |
249 | mfcr r10; \ | 249 | mfcr r10; \ |
250 | EXCEPTION_PROLOG_1; \ | 250 | EXCEPTION_PROLOG_1; \ |
251 | EXCEPTION_PROLOG_2 | 251 | EXCEPTION_PROLOG_2 |
@@ -255,7 +255,7 @@ __secondary_hold_acknowledge: | |||
255 | andi. r11,r11,MSR_PR; \ | 255 | andi. r11,r11,MSR_PR; \ |
256 | tophys(r11,r1); /* use tophys(r1) if kernel */ \ | 256 | tophys(r11,r1); /* use tophys(r1) if kernel */ \ |
257 | beq 1f; \ | 257 | beq 1f; \ |
258 | mfspr r11,SPRN_SPRG3; \ | 258 | mfspr r11,SPRN_SPRG_THREAD; \ |
259 | lwz r11,THREAD_INFO-THREAD(r11); \ | 259 | lwz r11,THREAD_INFO-THREAD(r11); \ |
260 | addi r11,r11,THREAD_SIZE; \ | 260 | addi r11,r11,THREAD_SIZE; \ |
261 | tophys(r11,r11); \ | 261 | tophys(r11,r11); \ |
@@ -267,9 +267,9 @@ __secondary_hold_acknowledge: | |||
267 | stw r10,_CCR(r11); /* save registers */ \ | 267 | stw r10,_CCR(r11); /* save registers */ \ |
268 | stw r12,GPR12(r11); \ | 268 | stw r12,GPR12(r11); \ |
269 | stw r9,GPR9(r11); \ | 269 | stw r9,GPR9(r11); \ |
270 | mfspr r10,SPRN_SPRG0; \ | 270 | mfspr r10,SPRN_SPRG_SCRATCH0; \ |
271 | stw r10,GPR10(r11); \ | 271 | stw r10,GPR10(r11); \ |
272 | mfspr r12,SPRN_SPRG1; \ | 272 | mfspr r12,SPRN_SPRG_SCRATCH1; \ |
273 | stw r12,GPR11(r11); \ | 273 | stw r12,GPR11(r11); \ |
274 | mflr r10; \ | 274 | mflr r10; \ |
275 | stw r10,_LINK(r11); \ | 275 | stw r10,_LINK(r11); \ |
@@ -355,11 +355,11 @@ i##n: \ | |||
355 | * -- paulus. | 355 | * -- paulus. |
356 | */ | 356 | */ |
357 | . = 0x200 | 357 | . = 0x200 |
358 | mtspr SPRN_SPRG0,r10 | 358 | mtspr SPRN_SPRG_SCRATCH0,r10 |
359 | mtspr SPRN_SPRG1,r11 | 359 | mtspr SPRN_SPRG_SCRATCH1,r11 |
360 | mfcr r10 | 360 | mfcr r10 |
361 | #ifdef CONFIG_PPC_CHRP | 361 | #ifdef CONFIG_PPC_CHRP |
362 | mfspr r11,SPRN_SPRG2 | 362 | mfspr r11,SPRN_SPRG_RTAS |
363 | cmpwi 0,r11,0 | 363 | cmpwi 0,r11,0 |
364 | bne 7f | 364 | bne 7f |
365 | #endif /* CONFIG_PPC_CHRP */ | 365 | #endif /* CONFIG_PPC_CHRP */ |
@@ -367,7 +367,7 @@ i##n: \ | |||
367 | 7: EXCEPTION_PROLOG_2 | 367 | 7: EXCEPTION_PROLOG_2 |
368 | addi r3,r1,STACK_FRAME_OVERHEAD | 368 | addi r3,r1,STACK_FRAME_OVERHEAD |
369 | #ifdef CONFIG_PPC_CHRP | 369 | #ifdef CONFIG_PPC_CHRP |
370 | mfspr r4,SPRN_SPRG2 | 370 | mfspr r4,SPRN_SPRG_RTAS |
371 | cmpwi cr1,r4,0 | 371 | cmpwi cr1,r4,0 |
372 | bne cr1,1f | 372 | bne cr1,1f |
373 | #endif | 373 | #endif |
@@ -485,7 +485,7 @@ InstructionTLBMiss: | |||
485 | mfspr r3,SPRN_IMISS | 485 | mfspr r3,SPRN_IMISS |
486 | lis r1,PAGE_OFFSET@h /* check if kernel address */ | 486 | lis r1,PAGE_OFFSET@h /* check if kernel address */ |
487 | cmplw 0,r1,r3 | 487 | cmplw 0,r1,r3 |
488 | mfspr r2,SPRN_SPRG3 | 488 | mfspr r2,SPRN_SPRG_THREAD |
489 | li r1,_PAGE_USER|_PAGE_PRESENT /* low addresses tested as user */ | 489 | li r1,_PAGE_USER|_PAGE_PRESENT /* low addresses tested as user */ |
490 | lwz r2,PGDIR(r2) | 490 | lwz r2,PGDIR(r2) |
491 | bge- 112f | 491 | bge- 112f |
@@ -559,7 +559,7 @@ DataLoadTLBMiss: | |||
559 | mfspr r3,SPRN_DMISS | 559 | mfspr r3,SPRN_DMISS |
560 | lis r1,PAGE_OFFSET@h /* check if kernel address */ | 560 | lis r1,PAGE_OFFSET@h /* check if kernel address */ |
561 | cmplw 0,r1,r3 | 561 | cmplw 0,r1,r3 |
562 | mfspr r2,SPRN_SPRG3 | 562 | mfspr r2,SPRN_SPRG_THREAD |
563 | li r1,_PAGE_USER|_PAGE_PRESENT /* low addresses tested as user */ | 563 | li r1,_PAGE_USER|_PAGE_PRESENT /* low addresses tested as user */ |
564 | lwz r2,PGDIR(r2) | 564 | lwz r2,PGDIR(r2) |
565 | bge- 112f | 565 | bge- 112f |
@@ -598,12 +598,12 @@ END_FTR_SECTION_IFCLR(CPU_FTR_NEED_COHERENT) | |||
598 | mtcrf 0x80,r2 | 598 | mtcrf 0x80,r2 |
599 | BEGIN_MMU_FTR_SECTION | 599 | BEGIN_MMU_FTR_SECTION |
600 | li r0,1 | 600 | li r0,1 |
601 | mfspr r1,SPRN_SPRG4 | 601 | mfspr r1,SPRN_SPRG_603_LRU |
602 | rlwinm r2,r3,20,27,31 /* Get Address bits 15:19 */ | 602 | rlwinm r2,r3,20,27,31 /* Get Address bits 15:19 */ |
603 | slw r0,r0,r2 | 603 | slw r0,r0,r2 |
604 | xor r1,r0,r1 | 604 | xor r1,r0,r1 |
605 | srw r0,r1,r2 | 605 | srw r0,r1,r2 |
606 | mtspr SPRN_SPRG4,r1 | 606 | mtspr SPRN_SPRG_603_LRU,r1 |
607 | mfspr r2,SPRN_SRR1 | 607 | mfspr r2,SPRN_SRR1 |
608 | rlwimi r2,r0,31-14,14,14 | 608 | rlwimi r2,r0,31-14,14,14 |
609 | mtspr SPRN_SRR1,r2 | 609 | mtspr SPRN_SRR1,r2 |
@@ -643,7 +643,7 @@ DataStoreTLBMiss: | |||
643 | mfspr r3,SPRN_DMISS | 643 | mfspr r3,SPRN_DMISS |
644 | lis r1,PAGE_OFFSET@h /* check if kernel address */ | 644 | lis r1,PAGE_OFFSET@h /* check if kernel address */ |
645 | cmplw 0,r1,r3 | 645 | cmplw 0,r1,r3 |
646 | mfspr r2,SPRN_SPRG3 | 646 | mfspr r2,SPRN_SPRG_THREAD |
647 | li r1,_PAGE_RW|_PAGE_USER|_PAGE_PRESENT /* access flags */ | 647 | li r1,_PAGE_RW|_PAGE_USER|_PAGE_PRESENT /* access flags */ |
648 | lwz r2,PGDIR(r2) | 648 | lwz r2,PGDIR(r2) |
649 | bge- 112f | 649 | bge- 112f |
@@ -678,12 +678,12 @@ END_FTR_SECTION_IFCLR(CPU_FTR_NEED_COHERENT) | |||
678 | mtcrf 0x80,r2 | 678 | mtcrf 0x80,r2 |
679 | BEGIN_MMU_FTR_SECTION | 679 | BEGIN_MMU_FTR_SECTION |
680 | li r0,1 | 680 | li r0,1 |
681 | mfspr r1,SPRN_SPRG4 | 681 | mfspr r1,SPRN_SPRG_603_LRU |
682 | rlwinm r2,r3,20,27,31 /* Get Address bits 15:19 */ | 682 | rlwinm r2,r3,20,27,31 /* Get Address bits 15:19 */ |
683 | slw r0,r0,r2 | 683 | slw r0,r0,r2 |
684 | xor r1,r0,r1 | 684 | xor r1,r0,r1 |
685 | srw r0,r1,r2 | 685 | srw r0,r1,r2 |
686 | mtspr SPRN_SPRG4,r1 | 686 | mtspr SPRN_SPRG_603_LRU,r1 |
687 | mfspr r2,SPRN_SRR1 | 687 | mfspr r2,SPRN_SRR1 |
688 | rlwimi r2,r0,31-14,14,14 | 688 | rlwimi r2,r0,31-14,14,14 |
689 | mtspr SPRN_SRR1,r2 | 689 | mtspr SPRN_SRR1,r2 |
@@ -864,9 +864,9 @@ __secondary_start: | |||
864 | tophys(r4,r2) | 864 | tophys(r4,r2) |
865 | addi r4,r4,THREAD /* phys address of our thread_struct */ | 865 | addi r4,r4,THREAD /* phys address of our thread_struct */ |
866 | CLR_TOP32(r4) | 866 | CLR_TOP32(r4) |
867 | mtspr SPRN_SPRG3,r4 | 867 | mtspr SPRN_SPRG_THREAD,r4 |
868 | li r3,0 | 868 | li r3,0 |
869 | mtspr SPRN_SPRG2,r3 /* 0 => not in RTAS */ | 869 | mtspr SPRN_SPRG_RTAS,r3 /* 0 => not in RTAS */ |
870 | 870 | ||
871 | /* enable MMU and jump to start_secondary */ | 871 | /* enable MMU and jump to start_secondary */ |
872 | li r4,MSR_KERNEL | 872 | li r4,MSR_KERNEL |
@@ -947,9 +947,9 @@ start_here: | |||
947 | tophys(r4,r2) | 947 | tophys(r4,r2) |
948 | addi r4,r4,THREAD /* init task's THREAD */ | 948 | addi r4,r4,THREAD /* init task's THREAD */ |
949 | CLR_TOP32(r4) | 949 | CLR_TOP32(r4) |
950 | mtspr SPRN_SPRG3,r4 | 950 | mtspr SPRN_SPRG_THREAD,r4 |
951 | li r3,0 | 951 | li r3,0 |
952 | mtspr SPRN_SPRG2,r3 /* 0 => not in RTAS */ | 952 | mtspr SPRN_SPRG_RTAS,r3 /* 0 => not in RTAS */ |
953 | 953 | ||
954 | /* stack */ | 954 | /* stack */ |
955 | lis r1,init_thread_union@ha | 955 | lis r1,init_thread_union@ha |
diff --git a/arch/powerpc/kernel/head_40x.S b/arch/powerpc/kernel/head_40x.S index 0c96911d4299..a90625f9b485 100644 --- a/arch/powerpc/kernel/head_40x.S +++ b/arch/powerpc/kernel/head_40x.S | |||
@@ -103,21 +103,21 @@ _ENTRY(saved_ksp_limit) | |||
103 | 103 | ||
104 | /* | 104 | /* |
105 | * Exception vector entry code. This code runs with address translation | 105 | * Exception vector entry code. This code runs with address translation |
106 | * turned off (i.e. using physical addresses). We assume SPRG3 has the | 106 | * turned off (i.e. using physical addresses). We assume SPRG_THREAD has |
107 | * physical address of the current task thread_struct. | 107 | * the physical address of the current task thread_struct. |
108 | * Note that we have to have decremented r1 before we write to any fields | 108 | * Note that we have to have decremented r1 before we write to any fields |
109 | * of the exception frame, since a critical interrupt could occur at any | 109 | * of the exception frame, since a critical interrupt could occur at any |
110 | * time, and it will write to the area immediately below the current r1. | 110 | * time, and it will write to the area immediately below the current r1. |
111 | */ | 111 | */ |
112 | #define NORMAL_EXCEPTION_PROLOG \ | 112 | #define NORMAL_EXCEPTION_PROLOG \ |
113 | mtspr SPRN_SPRG0,r10; /* save two registers to work with */\ | 113 | mtspr SPRN_SPRG_SCRATCH0,r10; /* save two registers to work with */\ |
114 | mtspr SPRN_SPRG1,r11; \ | 114 | mtspr SPRN_SPRG_SCRATCH1,r11; \ |
115 | mtspr SPRN_SPRG2,r1; \ | 115 | mtspr SPRN_SPRG_SCRATCH2,r1; \ |
116 | mfcr r10; /* save CR in r10 for now */\ | 116 | mfcr r10; /* save CR in r10 for now */\ |
117 | mfspr r11,SPRN_SRR1; /* check whether user or kernel */\ | 117 | mfspr r11,SPRN_SRR1; /* check whether user or kernel */\ |
118 | andi. r11,r11,MSR_PR; \ | 118 | andi. r11,r11,MSR_PR; \ |
119 | beq 1f; \ | 119 | beq 1f; \ |
120 | mfspr r1,SPRN_SPRG3; /* if from user, start at top of */\ | 120 | mfspr r1,SPRN_SPRG_THREAD; /* if from user, start at top of */\ |
121 | lwz r1,THREAD_INFO-THREAD(r1); /* this thread's kernel stack */\ | 121 | lwz r1,THREAD_INFO-THREAD(r1); /* this thread's kernel stack */\ |
122 | addi r1,r1,THREAD_SIZE; \ | 122 | addi r1,r1,THREAD_SIZE; \ |
123 | 1: subi r1,r1,INT_FRAME_SIZE; /* Allocate an exception frame */\ | 123 | 1: subi r1,r1,INT_FRAME_SIZE; /* Allocate an exception frame */\ |
@@ -125,13 +125,13 @@ _ENTRY(saved_ksp_limit) | |||
125 | stw r10,_CCR(r11); /* save various registers */\ | 125 | stw r10,_CCR(r11); /* save various registers */\ |
126 | stw r12,GPR12(r11); \ | 126 | stw r12,GPR12(r11); \ |
127 | stw r9,GPR9(r11); \ | 127 | stw r9,GPR9(r11); \ |
128 | mfspr r10,SPRN_SPRG0; \ | 128 | mfspr r10,SPRN_SPRG_SCRATCH0; \ |
129 | stw r10,GPR10(r11); \ | 129 | stw r10,GPR10(r11); \ |
130 | mfspr r12,SPRN_SPRG1; \ | 130 | mfspr r12,SPRN_SPRG_SCRATCH1; \ |
131 | stw r12,GPR11(r11); \ | 131 | stw r12,GPR11(r11); \ |
132 | mflr r10; \ | 132 | mflr r10; \ |
133 | stw r10,_LINK(r11); \ | 133 | stw r10,_LINK(r11); \ |
134 | mfspr r10,SPRN_SPRG2; \ | 134 | mfspr r10,SPRN_SPRG_SCRATCH2; \ |
135 | mfspr r12,SPRN_SRR0; \ | 135 | mfspr r12,SPRN_SRR0; \ |
136 | stw r10,GPR1(r11); \ | 136 | stw r10,GPR1(r11); \ |
137 | mfspr r9,SPRN_SRR1; \ | 137 | mfspr r9,SPRN_SRR1; \ |
@@ -160,7 +160,7 @@ _ENTRY(saved_ksp_limit) | |||
160 | lwz r11,critirq_ctx@l(r11); \ | 160 | lwz r11,critirq_ctx@l(r11); \ |
161 | beq 1f; \ | 161 | beq 1f; \ |
162 | /* COMING FROM USER MODE */ \ | 162 | /* COMING FROM USER MODE */ \ |
163 | mfspr r11,SPRN_SPRG3; /* if from user, start at top of */\ | 163 | mfspr r11,SPRN_SPRG_THREAD; /* if from user, start at top of */\ |
164 | lwz r11,THREAD_INFO-THREAD(r11); /* this thread's kernel stack */\ | 164 | lwz r11,THREAD_INFO-THREAD(r11); /* this thread's kernel stack */\ |
165 | 1: addi r11,r11,THREAD_SIZE-INT_FRAME_SIZE; /* Alloc an excpt frm */\ | 165 | 1: addi r11,r11,THREAD_SIZE-INT_FRAME_SIZE; /* Alloc an excpt frm */\ |
166 | tophys(r11,r11); \ | 166 | tophys(r11,r11); \ |
@@ -265,8 +265,8 @@ label: | |||
265 | * and exit. Otherwise, we call heavywight functions to do the work. | 265 | * and exit. Otherwise, we call heavywight functions to do the work. |
266 | */ | 266 | */ |
267 | START_EXCEPTION(0x0300, DataStorage) | 267 | START_EXCEPTION(0x0300, DataStorage) |
268 | mtspr SPRN_SPRG0, r10 /* Save some working registers */ | 268 | mtspr SPRN_SPRG_SCRATCH0, r10 /* Save some working registers */ |
269 | mtspr SPRN_SPRG1, r11 | 269 | mtspr SPRN_SPRG_SCRATCH1, r11 |
270 | #ifdef CONFIG_403GCX | 270 | #ifdef CONFIG_403GCX |
271 | stw r12, 0(r0) | 271 | stw r12, 0(r0) |
272 | stw r9, 4(r0) | 272 | stw r9, 4(r0) |
@@ -275,12 +275,12 @@ label: | |||
275 | stw r11, 8(r0) | 275 | stw r11, 8(r0) |
276 | stw r12, 12(r0) | 276 | stw r12, 12(r0) |
277 | #else | 277 | #else |
278 | mtspr SPRN_SPRG4, r12 | 278 | mtspr SPRN_SPRG_SCRATCH3, r12 |
279 | mtspr SPRN_SPRG5, r9 | 279 | mtspr SPRN_SPRG_SCRATCH4, r9 |
280 | mfcr r11 | 280 | mfcr r11 |
281 | mfspr r12, SPRN_PID | 281 | mfspr r12, SPRN_PID |
282 | mtspr SPRN_SPRG7, r11 | 282 | mtspr SPRN_SPRG_SCRATCH6, r11 |
283 | mtspr SPRN_SPRG6, r12 | 283 | mtspr SPRN_SPRG_SCRATCH5, r12 |
284 | #endif | 284 | #endif |
285 | 285 | ||
286 | /* First, check if it was a zone fault (which means a user | 286 | /* First, check if it was a zone fault (which means a user |
@@ -308,7 +308,7 @@ label: | |||
308 | /* Get the PGD for the current thread. | 308 | /* Get the PGD for the current thread. |
309 | */ | 309 | */ |
310 | 3: | 310 | 3: |
311 | mfspr r11,SPRN_SPRG3 | 311 | mfspr r11,SPRN_SPRG_THREAD |
312 | lwz r11,PGDIR(r11) | 312 | lwz r11,PGDIR(r11) |
313 | 4: | 313 | 4: |
314 | tophys(r11, r11) | 314 | tophys(r11, r11) |
@@ -355,15 +355,15 @@ label: | |||
355 | lwz r9, 4(r0) | 355 | lwz r9, 4(r0) |
356 | lwz r12, 0(r0) | 356 | lwz r12, 0(r0) |
357 | #else | 357 | #else |
358 | mfspr r12, SPRN_SPRG6 | 358 | mfspr r12, SPRN_SPRG_SCRATCH5 |
359 | mfspr r11, SPRN_SPRG7 | 359 | mfspr r11, SPRN_SPRG_SCRATCH6 |
360 | mtspr SPRN_PID, r12 | 360 | mtspr SPRN_PID, r12 |
361 | mtcr r11 | 361 | mtcr r11 |
362 | mfspr r9, SPRN_SPRG5 | 362 | mfspr r9, SPRN_SPRG_SCRATCH4 |
363 | mfspr r12, SPRN_SPRG4 | 363 | mfspr r12, SPRN_SPRG_SCRATCH3 |
364 | #endif | 364 | #endif |
365 | mfspr r11, SPRN_SPRG1 | 365 | mfspr r11, SPRN_SPRG_SCRATCH1 |
366 | mfspr r10, SPRN_SPRG0 | 366 | mfspr r10, SPRN_SPRG_SCRATCH0 |
367 | PPC405_ERR77_SYNC | 367 | PPC405_ERR77_SYNC |
368 | rfi /* Should sync shadow TLBs */ | 368 | rfi /* Should sync shadow TLBs */ |
369 | b . /* prevent prefetch past rfi */ | 369 | b . /* prevent prefetch past rfi */ |
@@ -380,15 +380,15 @@ label: | |||
380 | lwz r9, 4(r0) | 380 | lwz r9, 4(r0) |
381 | lwz r12, 0(r0) | 381 | lwz r12, 0(r0) |
382 | #else | 382 | #else |
383 | mfspr r12, SPRN_SPRG6 | 383 | mfspr r12, SPRN_SPRG_SCRATCH5 |
384 | mfspr r11, SPRN_SPRG7 | 384 | mfspr r11, SPRN_SPRG_SCRATCH6 |
385 | mtspr SPRN_PID, r12 | 385 | mtspr SPRN_PID, r12 |
386 | mtcr r11 | 386 | mtcr r11 |
387 | mfspr r9, SPRN_SPRG5 | 387 | mfspr r9, SPRN_SPRG_SCRATCH4 |
388 | mfspr r12, SPRN_SPRG4 | 388 | mfspr r12, SPRN_SPRG_SCRATCH3 |
389 | #endif | 389 | #endif |
390 | mfspr r11, SPRN_SPRG1 | 390 | mfspr r11, SPRN_SPRG_SCRATCH1 |
391 | mfspr r10, SPRN_SPRG0 | 391 | mfspr r10, SPRN_SPRG_SCRATCH0 |
392 | b DataAccess | 392 | b DataAccess |
393 | 393 | ||
394 | /* | 394 | /* |
@@ -466,8 +466,8 @@ label: | |||
466 | * load TLB entries from the page table if they exist. | 466 | * load TLB entries from the page table if they exist. |
467 | */ | 467 | */ |
468 | START_EXCEPTION(0x1100, DTLBMiss) | 468 | START_EXCEPTION(0x1100, DTLBMiss) |
469 | mtspr SPRN_SPRG0, r10 /* Save some working registers */ | 469 | mtspr SPRN_SPRG_SCRATCH0, r10 /* Save some working registers */ |
470 | mtspr SPRN_SPRG1, r11 | 470 | mtspr SPRN_SPRG_SCRATCH1, r11 |
471 | #ifdef CONFIG_403GCX | 471 | #ifdef CONFIG_403GCX |
472 | stw r12, 0(r0) | 472 | stw r12, 0(r0) |
473 | stw r9, 4(r0) | 473 | stw r9, 4(r0) |
@@ -476,12 +476,12 @@ label: | |||
476 | stw r11, 8(r0) | 476 | stw r11, 8(r0) |
477 | stw r12, 12(r0) | 477 | stw r12, 12(r0) |
478 | #else | 478 | #else |
479 | mtspr SPRN_SPRG4, r12 | 479 | mtspr SPRN_SPRG_SCRATCH3, r12 |
480 | mtspr SPRN_SPRG5, r9 | 480 | mtspr SPRN_SPRG_SCRATCH4, r9 |
481 | mfcr r11 | 481 | mfcr r11 |
482 | mfspr r12, SPRN_PID | 482 | mfspr r12, SPRN_PID |
483 | mtspr SPRN_SPRG7, r11 | 483 | mtspr SPRN_SPRG_SCRATCH6, r11 |
484 | mtspr SPRN_SPRG6, r12 | 484 | mtspr SPRN_SPRG_SCRATCH5, r12 |
485 | #endif | 485 | #endif |
486 | mfspr r10, SPRN_DEAR /* Get faulting address */ | 486 | mfspr r10, SPRN_DEAR /* Get faulting address */ |
487 | 487 | ||
@@ -500,7 +500,7 @@ label: | |||
500 | /* Get the PGD for the current thread. | 500 | /* Get the PGD for the current thread. |
501 | */ | 501 | */ |
502 | 3: | 502 | 3: |
503 | mfspr r11,SPRN_SPRG3 | 503 | mfspr r11,SPRN_SPRG_THREAD |
504 | lwz r11,PGDIR(r11) | 504 | lwz r11,PGDIR(r11) |
505 | 4: | 505 | 4: |
506 | tophys(r11, r11) | 506 | tophys(r11, r11) |
@@ -550,15 +550,15 @@ label: | |||
550 | lwz r9, 4(r0) | 550 | lwz r9, 4(r0) |
551 | lwz r12, 0(r0) | 551 | lwz r12, 0(r0) |
552 | #else | 552 | #else |
553 | mfspr r12, SPRN_SPRG6 | 553 | mfspr r12, SPRN_SPRG_SCRATCH5 |
554 | mfspr r11, SPRN_SPRG7 | 554 | mfspr r11, SPRN_SPRG_SCRATCH6 |
555 | mtspr SPRN_PID, r12 | 555 | mtspr SPRN_PID, r12 |
556 | mtcr r11 | 556 | mtcr r11 |
557 | mfspr r9, SPRN_SPRG5 | 557 | mfspr r9, SPRN_SPRG_SCRATCH4 |
558 | mfspr r12, SPRN_SPRG4 | 558 | mfspr r12, SPRN_SPRG_SCRATCH3 |
559 | #endif | 559 | #endif |
560 | mfspr r11, SPRN_SPRG1 | 560 | mfspr r11, SPRN_SPRG_SCRATCH1 |
561 | mfspr r10, SPRN_SPRG0 | 561 | mfspr r10, SPRN_SPRG_SCRATCH0 |
562 | b DataAccess | 562 | b DataAccess |
563 | 563 | ||
564 | /* 0x1200 - Instruction TLB Miss Exception | 564 | /* 0x1200 - Instruction TLB Miss Exception |
@@ -566,8 +566,8 @@ label: | |||
566 | * registers and bailout to a different point. | 566 | * registers and bailout to a different point. |
567 | */ | 567 | */ |
568 | START_EXCEPTION(0x1200, ITLBMiss) | 568 | START_EXCEPTION(0x1200, ITLBMiss) |
569 | mtspr SPRN_SPRG0, r10 /* Save some working registers */ | 569 | mtspr SPRN_SPRG_SCRATCH0, r10 /* Save some working registers */ |
570 | mtspr SPRN_SPRG1, r11 | 570 | mtspr SPRN_SPRG_SCRATCH1, r11 |
571 | #ifdef CONFIG_403GCX | 571 | #ifdef CONFIG_403GCX |
572 | stw r12, 0(r0) | 572 | stw r12, 0(r0) |
573 | stw r9, 4(r0) | 573 | stw r9, 4(r0) |
@@ -576,12 +576,12 @@ label: | |||
576 | stw r11, 8(r0) | 576 | stw r11, 8(r0) |
577 | stw r12, 12(r0) | 577 | stw r12, 12(r0) |
578 | #else | 578 | #else |
579 | mtspr SPRN_SPRG4, r12 | 579 | mtspr SPRN_SPRG_SCRATCH3, r12 |
580 | mtspr SPRN_SPRG5, r9 | 580 | mtspr SPRN_SPRG_SCRATCH4, r9 |
581 | mfcr r11 | 581 | mfcr r11 |
582 | mfspr r12, SPRN_PID | 582 | mfspr r12, SPRN_PID |
583 | mtspr SPRN_SPRG7, r11 | 583 | mtspr SPRN_SPRG_SCRATCH6, r11 |
584 | mtspr SPRN_SPRG6, r12 | 584 | mtspr SPRN_SPRG_SCRATCH5, r12 |
585 | #endif | 585 | #endif |
586 | mfspr r10, SPRN_SRR0 /* Get faulting address */ | 586 | mfspr r10, SPRN_SRR0 /* Get faulting address */ |
587 | 587 | ||
@@ -600,7 +600,7 @@ label: | |||
600 | /* Get the PGD for the current thread. | 600 | /* Get the PGD for the current thread. |
601 | */ | 601 | */ |
602 | 3: | 602 | 3: |
603 | mfspr r11,SPRN_SPRG3 | 603 | mfspr r11,SPRN_SPRG_THREAD |
604 | lwz r11,PGDIR(r11) | 604 | lwz r11,PGDIR(r11) |
605 | 4: | 605 | 4: |
606 | tophys(r11, r11) | 606 | tophys(r11, r11) |
@@ -650,15 +650,15 @@ label: | |||
650 | lwz r9, 4(r0) | 650 | lwz r9, 4(r0) |
651 | lwz r12, 0(r0) | 651 | lwz r12, 0(r0) |
652 | #else | 652 | #else |
653 | mfspr r12, SPRN_SPRG6 | 653 | mfspr r12, SPRN_SPRG_SCRATCH5 |
654 | mfspr r11, SPRN_SPRG7 | 654 | mfspr r11, SPRN_SPRG_SCRATCH6 |
655 | mtspr SPRN_PID, r12 | 655 | mtspr SPRN_PID, r12 |
656 | mtcr r11 | 656 | mtcr r11 |
657 | mfspr r9, SPRN_SPRG5 | 657 | mfspr r9, SPRN_SPRG_SCRATCH4 |
658 | mfspr r12, SPRN_SPRG4 | 658 | mfspr r12, SPRN_SPRG_SCRATCH3 |
659 | #endif | 659 | #endif |
660 | mfspr r11, SPRN_SPRG1 | 660 | mfspr r11, SPRN_SPRG_SCRATCH1 |
661 | mfspr r10, SPRN_SPRG0 | 661 | mfspr r10, SPRN_SPRG_SCRATCH0 |
662 | b InstructionAccess | 662 | b InstructionAccess |
663 | 663 | ||
664 | EXCEPTION(0x1300, Trap_13, unknown_exception, EXC_XFER_EE) | 664 | EXCEPTION(0x1300, Trap_13, unknown_exception, EXC_XFER_EE) |
@@ -803,15 +803,15 @@ finish_tlb_load: | |||
803 | lwz r9, 4(r0) | 803 | lwz r9, 4(r0) |
804 | lwz r12, 0(r0) | 804 | lwz r12, 0(r0) |
805 | #else | 805 | #else |
806 | mfspr r12, SPRN_SPRG6 | 806 | mfspr r12, SPRN_SPRG_SCRATCH5 |
807 | mfspr r11, SPRN_SPRG7 | 807 | mfspr r11, SPRN_SPRG_SCRATCH6 |
808 | mtspr SPRN_PID, r12 | 808 | mtspr SPRN_PID, r12 |
809 | mtcr r11 | 809 | mtcr r11 |
810 | mfspr r9, SPRN_SPRG5 | 810 | mfspr r9, SPRN_SPRG_SCRATCH4 |
811 | mfspr r12, SPRN_SPRG4 | 811 | mfspr r12, SPRN_SPRG_SCRATCH3 |
812 | #endif | 812 | #endif |
813 | mfspr r11, SPRN_SPRG1 | 813 | mfspr r11, SPRN_SPRG_SCRATCH1 |
814 | mfspr r10, SPRN_SPRG0 | 814 | mfspr r10, SPRN_SPRG_SCRATCH0 |
815 | PPC405_ERR77_SYNC | 815 | PPC405_ERR77_SYNC |
816 | rfi /* Should sync shadow TLBs */ | 816 | rfi /* Should sync shadow TLBs */ |
817 | b . /* prevent prefetch past rfi */ | 817 | b . /* prevent prefetch past rfi */ |
@@ -835,7 +835,7 @@ start_here: | |||
835 | /* ptr to phys current thread */ | 835 | /* ptr to phys current thread */ |
836 | tophys(r4,r2) | 836 | tophys(r4,r2) |
837 | addi r4,r4,THREAD /* init task's THREAD */ | 837 | addi r4,r4,THREAD /* init task's THREAD */ |
838 | mtspr SPRN_SPRG3,r4 | 838 | mtspr SPRN_SPRG_THREAD,r4 |
839 | 839 | ||
840 | /* stack */ | 840 | /* stack */ |
841 | lis r1,init_thread_union@ha | 841 | lis r1,init_thread_union@ha |
diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S index 18d8a1677c4d..711368b993f2 100644 --- a/arch/powerpc/kernel/head_44x.S +++ b/arch/powerpc/kernel/head_44x.S | |||
@@ -239,7 +239,7 @@ skpinv: addi r4,r4,1 /* Increment */ | |||
239 | 239 | ||
240 | /* ptr to current thread */ | 240 | /* ptr to current thread */ |
241 | addi r4,r2,THREAD /* init task's THREAD */ | 241 | addi r4,r2,THREAD /* init task's THREAD */ |
242 | mtspr SPRN_SPRG3,r4 | 242 | mtspr SPRN_SPRG_THREAD,r4 |
243 | 243 | ||
244 | /* stack */ | 244 | /* stack */ |
245 | lis r1,init_thread_union@h | 245 | lis r1,init_thread_union@h |
@@ -350,12 +350,12 @@ interrupt_base: | |||
350 | 350 | ||
351 | /* Data TLB Error Interrupt */ | 351 | /* Data TLB Error Interrupt */ |
352 | START_EXCEPTION(DataTLBError) | 352 | START_EXCEPTION(DataTLBError) |
353 | mtspr SPRN_SPRG0, r10 /* Save some working registers */ | 353 | mtspr SPRN_SPRG_WSCRATCH0, r10 /* Save some working registers */ |
354 | mtspr SPRN_SPRG1, r11 | 354 | mtspr SPRN_SPRG_WSCRATCH1, r11 |
355 | mtspr SPRN_SPRG4W, r12 | 355 | mtspr SPRN_SPRG_WSCRATCH2, r12 |
356 | mtspr SPRN_SPRG5W, r13 | 356 | mtspr SPRN_SPRG_WSCRATCH3, r13 |
357 | mfcr r11 | 357 | mfcr r11 |
358 | mtspr SPRN_SPRG7W, r11 | 358 | mtspr SPRN_SPRG_WSCRATCH4, r11 |
359 | mfspr r10, SPRN_DEAR /* Get faulting address */ | 359 | mfspr r10, SPRN_DEAR /* Get faulting address */ |
360 | 360 | ||
361 | /* If we are faulting a kernel address, we have to use the | 361 | /* If we are faulting a kernel address, we have to use the |
@@ -374,7 +374,7 @@ interrupt_base: | |||
374 | 374 | ||
375 | /* Get the PGD for the current thread */ | 375 | /* Get the PGD for the current thread */ |
376 | 3: | 376 | 3: |
377 | mfspr r11,SPRN_SPRG3 | 377 | mfspr r11,SPRN_SPRG_THREAD |
378 | lwz r11,PGDIR(r11) | 378 | lwz r11,PGDIR(r11) |
379 | 379 | ||
380 | /* Load PID into MMUCR TID */ | 380 | /* Load PID into MMUCR TID */ |
@@ -446,12 +446,12 @@ tlb_44x_patch_hwater_D: | |||
446 | /* The bailout. Restore registers to pre-exception conditions | 446 | /* The bailout. Restore registers to pre-exception conditions |
447 | * and call the heavyweights to help us out. | 447 | * and call the heavyweights to help us out. |
448 | */ | 448 | */ |
449 | mfspr r11, SPRN_SPRG7R | 449 | mfspr r11, SPRN_SPRG_RSCRATCH4 |
450 | mtcr r11 | 450 | mtcr r11 |
451 | mfspr r13, SPRN_SPRG5R | 451 | mfspr r13, SPRN_SPRG_RSCRATCH3 |
452 | mfspr r12, SPRN_SPRG4R | 452 | mfspr r12, SPRN_SPRG_RSCRATCH2 |
453 | mfspr r11, SPRN_SPRG1 | 453 | mfspr r11, SPRN_SPRG_RSCRATCH1 |
454 | mfspr r10, SPRN_SPRG0 | 454 | mfspr r10, SPRN_SPRG_RSCRATCH0 |
455 | b DataStorage | 455 | b DataStorage |
456 | 456 | ||
457 | /* Instruction TLB Error Interrupt */ | 457 | /* Instruction TLB Error Interrupt */ |
@@ -461,12 +461,12 @@ tlb_44x_patch_hwater_D: | |||
461 | * to a different point. | 461 | * to a different point. |
462 | */ | 462 | */ |
463 | START_EXCEPTION(InstructionTLBError) | 463 | START_EXCEPTION(InstructionTLBError) |
464 | mtspr SPRN_SPRG0, r10 /* Save some working registers */ | 464 | mtspr SPRN_SPRG_WSCRATCH0, r10 /* Save some working registers */ |
465 | mtspr SPRN_SPRG1, r11 | 465 | mtspr SPRN_SPRG_WSCRATCH1, r11 |
466 | mtspr SPRN_SPRG4W, r12 | 466 | mtspr SPRN_SPRG_WSCRATCH2, r12 |
467 | mtspr SPRN_SPRG5W, r13 | 467 | mtspr SPRN_SPRG_WSCRATCH3, r13 |
468 | mfcr r11 | 468 | mfcr r11 |
469 | mtspr SPRN_SPRG7W, r11 | 469 | mtspr SPRN_SPRG_WSCRATCH4, r11 |
470 | mfspr r10, SPRN_SRR0 /* Get faulting address */ | 470 | mfspr r10, SPRN_SRR0 /* Get faulting address */ |
471 | 471 | ||
472 | /* If we are faulting a kernel address, we have to use the | 472 | /* If we are faulting a kernel address, we have to use the |
@@ -485,7 +485,7 @@ tlb_44x_patch_hwater_D: | |||
485 | 485 | ||
486 | /* Get the PGD for the current thread */ | 486 | /* Get the PGD for the current thread */ |
487 | 3: | 487 | 3: |
488 | mfspr r11,SPRN_SPRG3 | 488 | mfspr r11,SPRN_SPRG_THREAD |
489 | lwz r11,PGDIR(r11) | 489 | lwz r11,PGDIR(r11) |
490 | 490 | ||
491 | /* Load PID into MMUCR TID */ | 491 | /* Load PID into MMUCR TID */ |
@@ -497,7 +497,7 @@ tlb_44x_patch_hwater_D: | |||
497 | mtspr SPRN_MMUCR,r12 | 497 | mtspr SPRN_MMUCR,r12 |
498 | 498 | ||
499 | /* Make up the required permissions */ | 499 | /* Make up the required permissions */ |
500 | li r13,_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_HWEXEC | 500 | li r13,_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_EXEC |
501 | 501 | ||
502 | /* Compute pgdir/pmd offset */ | 502 | /* Compute pgdir/pmd offset */ |
503 | rlwinm r12, r10, PPC44x_PGD_OFF_SHIFT, PPC44x_PGD_OFF_MASK_BIT, 29 | 503 | rlwinm r12, r10, PPC44x_PGD_OFF_SHIFT, PPC44x_PGD_OFF_MASK_BIT, 29 |
@@ -542,12 +542,12 @@ tlb_44x_patch_hwater_I: | |||
542 | /* The bailout. Restore registers to pre-exception conditions | 542 | /* The bailout. Restore registers to pre-exception conditions |
543 | * and call the heavyweights to help us out. | 543 | * and call the heavyweights to help us out. |
544 | */ | 544 | */ |
545 | mfspr r11, SPRN_SPRG7R | 545 | mfspr r11, SPRN_SPRG_RSCRATCH4 |
546 | mtcr r11 | 546 | mtcr r11 |
547 | mfspr r13, SPRN_SPRG5R | 547 | mfspr r13, SPRN_SPRG_RSCRATCH3 |
548 | mfspr r12, SPRN_SPRG4R | 548 | mfspr r12, SPRN_SPRG_RSCRATCH2 |
549 | mfspr r11, SPRN_SPRG1 | 549 | mfspr r11, SPRN_SPRG_RSCRATCH1 |
550 | mfspr r10, SPRN_SPRG0 | 550 | mfspr r10, SPRN_SPRG_RSCRATCH0 |
551 | b InstructionStorage | 551 | b InstructionStorage |
552 | 552 | ||
553 | /* Debug Interrupt */ | 553 | /* Debug Interrupt */ |
@@ -593,12 +593,12 @@ finish_tlb_load: | |||
593 | 593 | ||
594 | /* Done...restore registers and get out of here. | 594 | /* Done...restore registers and get out of here. |
595 | */ | 595 | */ |
596 | mfspr r11, SPRN_SPRG7R | 596 | mfspr r11, SPRN_SPRG_RSCRATCH4 |
597 | mtcr r11 | 597 | mtcr r11 |
598 | mfspr r13, SPRN_SPRG5R | 598 | mfspr r13, SPRN_SPRG_RSCRATCH3 |
599 | mfspr r12, SPRN_SPRG4R | 599 | mfspr r12, SPRN_SPRG_RSCRATCH2 |
600 | mfspr r11, SPRN_SPRG1 | 600 | mfspr r11, SPRN_SPRG_RSCRATCH1 |
601 | mfspr r10, SPRN_SPRG0 | 601 | mfspr r10, SPRN_SPRG_RSCRATCH0 |
602 | rfi /* Force context change */ | 602 | rfi /* Force context change */ |
603 | 603 | ||
604 | /* | 604 | /* |
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index 012505ebd9f9..c38afdb45d7b 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <asm/thread_info.h> | 36 | #include <asm/thread_info.h> |
37 | #include <asm/firmware.h> | 37 | #include <asm/firmware.h> |
38 | #include <asm/page_64.h> | 38 | #include <asm/page_64.h> |
39 | #include <asm/exception.h> | ||
40 | #include <asm/irqflags.h> | 39 | #include <asm/irqflags.h> |
41 | 40 | ||
42 | /* The physical memory is layed out such that the secondary processor | 41 | /* The physical memory is layed out such that the secondary processor |
@@ -122,10 +121,11 @@ __run_at_load: | |||
122 | */ | 121 | */ |
123 | .globl __secondary_hold | 122 | .globl __secondary_hold |
124 | __secondary_hold: | 123 | __secondary_hold: |
124 | #ifndef CONFIG_PPC_BOOK3E | ||
125 | mfmsr r24 | 125 | mfmsr r24 |
126 | ori r24,r24,MSR_RI | 126 | ori r24,r24,MSR_RI |
127 | mtmsrd r24 /* RI on */ | 127 | mtmsrd r24 /* RI on */ |
128 | 128 | #endif | |
129 | /* Grab our physical cpu number */ | 129 | /* Grab our physical cpu number */ |
130 | mr r24,r3 | 130 | mr r24,r3 |
131 | 131 | ||
@@ -144,6 +144,7 @@ __secondary_hold: | |||
144 | ld r4,0(r4) /* deref function descriptor */ | 144 | ld r4,0(r4) /* deref function descriptor */ |
145 | mtctr r4 | 145 | mtctr r4 |
146 | mr r3,r24 | 146 | mr r3,r24 |
147 | li r4,0 | ||
147 | bctr | 148 | bctr |
148 | #else | 149 | #else |
149 | BUG_OPCODE | 150 | BUG_OPCODE |
@@ -164,21 +165,49 @@ exception_marker: | |||
164 | #include "exceptions-64s.S" | 165 | #include "exceptions-64s.S" |
165 | #endif | 166 | #endif |
166 | 167 | ||
168 | _GLOBAL(generic_secondary_thread_init) | ||
169 | mr r24,r3 | ||
170 | |||
171 | /* turn on 64-bit mode */ | ||
172 | bl .enable_64b_mode | ||
173 | |||
174 | /* get a valid TOC pointer, wherever we're mapped at */ | ||
175 | bl .relative_toc | ||
176 | |||
177 | #ifdef CONFIG_PPC_BOOK3E | ||
178 | /* Book3E initialization */ | ||
179 | mr r3,r24 | ||
180 | bl .book3e_secondary_thread_init | ||
181 | #endif | ||
182 | b generic_secondary_common_init | ||
167 | 183 | ||
168 | /* | 184 | /* |
169 | * On pSeries and most other platforms, secondary processors spin | 185 | * On pSeries and most other platforms, secondary processors spin |
170 | * in the following code. | 186 | * in the following code. |
171 | * At entry, r3 = this processor's number (physical cpu id) | 187 | * At entry, r3 = this processor's number (physical cpu id) |
188 | * | ||
189 | * On Book3E, r4 = 1 to indicate that the initial TLB entry for | ||
190 | * this core already exists (setup via some other mechanism such | ||
191 | * as SCOM before entry). | ||
172 | */ | 192 | */ |
173 | _GLOBAL(generic_secondary_smp_init) | 193 | _GLOBAL(generic_secondary_smp_init) |
174 | mr r24,r3 | 194 | mr r24,r3 |
175 | 195 | mr r25,r4 | |
196 | |||
176 | /* turn on 64-bit mode */ | 197 | /* turn on 64-bit mode */ |
177 | bl .enable_64b_mode | 198 | bl .enable_64b_mode |
178 | 199 | ||
179 | /* get the TOC pointer (real address) */ | 200 | /* get a valid TOC pointer, wherever we're mapped at */ |
180 | bl .relative_toc | 201 | bl .relative_toc |
181 | 202 | ||
203 | #ifdef CONFIG_PPC_BOOK3E | ||
204 | /* Book3E initialization */ | ||
205 | mr r3,r24 | ||
206 | mr r4,r25 | ||
207 | bl .book3e_secondary_core_init | ||
208 | #endif | ||
209 | |||
210 | generic_secondary_common_init: | ||
182 | /* Set up a paca value for this processor. Since we have the | 211 | /* Set up a paca value for this processor. Since we have the |
183 | * physical cpu id in r24, we need to search the pacas to find | 212 | * physical cpu id in r24, we need to search the pacas to find |
184 | * which logical id maps to our physical one. | 213 | * which logical id maps to our physical one. |
@@ -196,7 +225,12 @@ _GLOBAL(generic_secondary_smp_init) | |||
196 | mr r3,r24 /* not found, copy phys to r3 */ | 225 | mr r3,r24 /* not found, copy phys to r3 */ |
197 | b .kexec_wait /* next kernel might do better */ | 226 | b .kexec_wait /* next kernel might do better */ |
198 | 227 | ||
199 | 2: mtspr SPRN_SPRG3,r13 /* Save vaddr of paca in SPRG3 */ | 228 | 2: mtspr SPRN_SPRG_PACA,r13 /* Save vaddr of paca in an SPRG */ |
229 | #ifdef CONFIG_PPC_BOOK3E | ||
230 | addi r12,r13,PACA_EXTLB /* and TLB exc frame in another */ | ||
231 | mtspr SPRN_SPRG_TLB_EXFRAME,r12 | ||
232 | #endif | ||
233 | |||
200 | /* From now on, r24 is expected to be logical cpuid */ | 234 | /* From now on, r24 is expected to be logical cpuid */ |
201 | mr r24,r5 | 235 | mr r24,r5 |
202 | 3: HMT_LOW | 236 | 3: HMT_LOW |
@@ -232,6 +266,7 @@ _GLOBAL(generic_secondary_smp_init) | |||
232 | * Turn the MMU off. | 266 | * Turn the MMU off. |
233 | * Assumes we're mapped EA == RA if the MMU is on. | 267 | * Assumes we're mapped EA == RA if the MMU is on. |
234 | */ | 268 | */ |
269 | #ifdef CONFIG_PPC_BOOK3S | ||
235 | _STATIC(__mmu_off) | 270 | _STATIC(__mmu_off) |
236 | mfmsr r3 | 271 | mfmsr r3 |
237 | andi. r0,r3,MSR_IR|MSR_DR | 272 | andi. r0,r3,MSR_IR|MSR_DR |
@@ -243,6 +278,7 @@ _STATIC(__mmu_off) | |||
243 | sync | 278 | sync |
244 | rfid | 279 | rfid |
245 | b . /* prevent speculative execution */ | 280 | b . /* prevent speculative execution */ |
281 | #endif | ||
246 | 282 | ||
247 | 283 | ||
248 | /* | 284 | /* |
@@ -280,6 +316,10 @@ _GLOBAL(__start_initialization_multiplatform) | |||
280 | mr r31,r3 | 316 | mr r31,r3 |
281 | mr r30,r4 | 317 | mr r30,r4 |
282 | 318 | ||
319 | #ifdef CONFIG_PPC_BOOK3E | ||
320 | bl .start_initialization_book3e | ||
321 | b .__after_prom_start | ||
322 | #else | ||
283 | /* Setup some critical 970 SPRs before switching MMU off */ | 323 | /* Setup some critical 970 SPRs before switching MMU off */ |
284 | mfspr r0,SPRN_PVR | 324 | mfspr r0,SPRN_PVR |
285 | srwi r0,r0,16 | 325 | srwi r0,r0,16 |
@@ -297,6 +337,7 @@ _GLOBAL(__start_initialization_multiplatform) | |||
297 | /* Switch off MMU if not already off */ | 337 | /* Switch off MMU if not already off */ |
298 | bl .__mmu_off | 338 | bl .__mmu_off |
299 | b .__after_prom_start | 339 | b .__after_prom_start |
340 | #endif /* CONFIG_PPC_BOOK3E */ | ||
300 | 341 | ||
301 | _INIT_STATIC(__boot_from_prom) | 342 | _INIT_STATIC(__boot_from_prom) |
302 | #ifdef CONFIG_PPC_OF_BOOT_TRAMPOLINE | 343 | #ifdef CONFIG_PPC_OF_BOOT_TRAMPOLINE |
@@ -359,10 +400,16 @@ _STATIC(__after_prom_start) | |||
359 | * Note: This process overwrites the OF exception vectors. | 400 | * Note: This process overwrites the OF exception vectors. |
360 | */ | 401 | */ |
361 | li r3,0 /* target addr */ | 402 | li r3,0 /* target addr */ |
403 | #ifdef CONFIG_PPC_BOOK3E | ||
404 | tovirt(r3,r3) /* on booke, we already run at PAGE_OFFSET */ | ||
405 | #endif | ||
362 | mr. r4,r26 /* In some cases the loader may */ | 406 | mr. r4,r26 /* In some cases the loader may */ |
363 | beq 9f /* have already put us at zero */ | 407 | beq 9f /* have already put us at zero */ |
364 | li r6,0x100 /* Start offset, the first 0x100 */ | 408 | li r6,0x100 /* Start offset, the first 0x100 */ |
365 | /* bytes were copied earlier. */ | 409 | /* bytes were copied earlier. */ |
410 | #ifdef CONFIG_PPC_BOOK3E | ||
411 | tovirt(r6,r6) /* on booke, we already run at PAGE_OFFSET */ | ||
412 | #endif | ||
366 | 413 | ||
367 | #ifdef CONFIG_CRASH_DUMP | 414 | #ifdef CONFIG_CRASH_DUMP |
368 | /* | 415 | /* |
@@ -485,7 +532,7 @@ _GLOBAL(pmac_secondary_start) | |||
485 | LOAD_REG_ADDR(r4,paca) /* Get base vaddr of paca array */ | 532 | LOAD_REG_ADDR(r4,paca) /* Get base vaddr of paca array */ |
486 | mulli r13,r24,PACA_SIZE /* Calculate vaddr of right paca */ | 533 | mulli r13,r24,PACA_SIZE /* Calculate vaddr of right paca */ |
487 | add r13,r13,r4 /* for this processor. */ | 534 | add r13,r13,r4 /* for this processor. */ |
488 | mtspr SPRN_SPRG3,r13 /* Save vaddr of paca in SPRG3 */ | 535 | mtspr SPRN_SPRG_PACA,r13 /* Save vaddr of paca in an SPRG*/ |
489 | 536 | ||
490 | /* Create a temp kernel stack for use before relocation is on. */ | 537 | /* Create a temp kernel stack for use before relocation is on. */ |
491 | ld r1,PACAEMERGSP(r13) | 538 | ld r1,PACAEMERGSP(r13) |
@@ -503,11 +550,14 @@ _GLOBAL(pmac_secondary_start) | |||
503 | * 1. Processor number | 550 | * 1. Processor number |
504 | * 2. Segment table pointer (virtual address) | 551 | * 2. Segment table pointer (virtual address) |
505 | * On entry the following are set: | 552 | * On entry the following are set: |
506 | * r1 = stack pointer. vaddr for iSeries, raddr (temp stack) for pSeries | 553 | * r1 = stack pointer. vaddr for iSeries, raddr (temp stack) for pSeries |
507 | * r24 = cpu# (in Linux terms) | 554 | * r24 = cpu# (in Linux terms) |
508 | * r13 = paca virtual address | 555 | * r13 = paca virtual address |
509 | * SPRG3 = paca virtual address | 556 | * SPRG_PACA = paca virtual address |
510 | */ | 557 | */ |
558 | .section ".text"; | ||
559 | .align 2 ; | ||
560 | |||
511 | .globl __secondary_start | 561 | .globl __secondary_start |
512 | __secondary_start: | 562 | __secondary_start: |
513 | /* Set thread priority to MEDIUM */ | 563 | /* Set thread priority to MEDIUM */ |
@@ -544,7 +594,7 @@ END_FW_FTR_SECTION_IFCLR(FW_FEATURE_ISERIES) | |||
544 | 594 | ||
545 | mtspr SPRN_SRR0,r3 | 595 | mtspr SPRN_SRR0,r3 |
546 | mtspr SPRN_SRR1,r4 | 596 | mtspr SPRN_SRR1,r4 |
547 | rfid | 597 | RFI |
548 | b . /* prevent speculative execution */ | 598 | b . /* prevent speculative execution */ |
549 | 599 | ||
550 | /* | 600 | /* |
@@ -565,11 +615,16 @@ _GLOBAL(start_secondary_prolog) | |||
565 | */ | 615 | */ |
566 | _GLOBAL(enable_64b_mode) | 616 | _GLOBAL(enable_64b_mode) |
567 | mfmsr r11 /* grab the current MSR */ | 617 | mfmsr r11 /* grab the current MSR */ |
618 | #ifdef CONFIG_PPC_BOOK3E | ||
619 | oris r11,r11,0x8000 /* CM bit set, we'll set ICM later */ | ||
620 | mtmsr r11 | ||
621 | #else /* CONFIG_PPC_BOOK3E */ | ||
568 | li r12,(MSR_SF | MSR_ISF)@highest | 622 | li r12,(MSR_SF | MSR_ISF)@highest |
569 | sldi r12,r12,48 | 623 | sldi r12,r12,48 |
570 | or r11,r11,r12 | 624 | or r11,r11,r12 |
571 | mtmsrd r11 | 625 | mtmsrd r11 |
572 | isync | 626 | isync |
627 | #endif | ||
573 | blr | 628 | blr |
574 | 629 | ||
575 | /* | 630 | /* |
@@ -613,9 +668,11 @@ _INIT_STATIC(start_here_multiplatform) | |||
613 | bdnz 3b | 668 | bdnz 3b |
614 | 4: | 669 | 4: |
615 | 670 | ||
671 | #ifndef CONFIG_PPC_BOOK3E | ||
616 | mfmsr r6 | 672 | mfmsr r6 |
617 | ori r6,r6,MSR_RI | 673 | ori r6,r6,MSR_RI |
618 | mtmsrd r6 /* RI on */ | 674 | mtmsrd r6 /* RI on */ |
675 | #endif | ||
619 | 676 | ||
620 | #ifdef CONFIG_RELOCATABLE | 677 | #ifdef CONFIG_RELOCATABLE |
621 | /* Save the physical address we're running at in kernstart_addr */ | 678 | /* Save the physical address we're running at in kernstart_addr */ |
@@ -642,13 +699,13 @@ _INIT_STATIC(start_here_multiplatform) | |||
642 | 699 | ||
643 | /* Restore parameters passed from prom_init/kexec */ | 700 | /* Restore parameters passed from prom_init/kexec */ |
644 | mr r3,r31 | 701 | mr r3,r31 |
645 | bl .early_setup /* also sets r13 and SPRG3 */ | 702 | bl .early_setup /* also sets r13 and SPRG_PACA */ |
646 | 703 | ||
647 | LOAD_REG_ADDR(r3, .start_here_common) | 704 | LOAD_REG_ADDR(r3, .start_here_common) |
648 | ld r4,PACAKMSR(r13) | 705 | ld r4,PACAKMSR(r13) |
649 | mtspr SPRN_SRR0,r3 | 706 | mtspr SPRN_SRR0,r3 |
650 | mtspr SPRN_SRR1,r4 | 707 | mtspr SPRN_SRR1,r4 |
651 | rfid | 708 | RFI |
652 | b . /* prevent speculative execution */ | 709 | b . /* prevent speculative execution */ |
653 | 710 | ||
654 | /* This is where all platforms converge execution */ | 711 | /* This is where all platforms converge execution */ |
diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S index 52ff8c53b93c..6ded19d01891 100644 --- a/arch/powerpc/kernel/head_8xx.S +++ b/arch/powerpc/kernel/head_8xx.S | |||
@@ -110,8 +110,8 @@ turn_on_mmu: | |||
110 | * task's thread_struct. | 110 | * task's thread_struct. |
111 | */ | 111 | */ |
112 | #define EXCEPTION_PROLOG \ | 112 | #define EXCEPTION_PROLOG \ |
113 | mtspr SPRN_SPRG0,r10; \ | 113 | mtspr SPRN_SPRG_SCRATCH0,r10; \ |
114 | mtspr SPRN_SPRG1,r11; \ | 114 | mtspr SPRN_SPRG_SCRATCH1,r11; \ |
115 | mfcr r10; \ | 115 | mfcr r10; \ |
116 | EXCEPTION_PROLOG_1; \ | 116 | EXCEPTION_PROLOG_1; \ |
117 | EXCEPTION_PROLOG_2 | 117 | EXCEPTION_PROLOG_2 |
@@ -121,7 +121,7 @@ turn_on_mmu: | |||
121 | andi. r11,r11,MSR_PR; \ | 121 | andi. r11,r11,MSR_PR; \ |
122 | tophys(r11,r1); /* use tophys(r1) if kernel */ \ | 122 | tophys(r11,r1); /* use tophys(r1) if kernel */ \ |
123 | beq 1f; \ | 123 | beq 1f; \ |
124 | mfspr r11,SPRN_SPRG3; \ | 124 | mfspr r11,SPRN_SPRG_THREAD; \ |
125 | lwz r11,THREAD_INFO-THREAD(r11); \ | 125 | lwz r11,THREAD_INFO-THREAD(r11); \ |
126 | addi r11,r11,THREAD_SIZE; \ | 126 | addi r11,r11,THREAD_SIZE; \ |
127 | tophys(r11,r11); \ | 127 | tophys(r11,r11); \ |
@@ -133,9 +133,9 @@ turn_on_mmu: | |||
133 | stw r10,_CCR(r11); /* save registers */ \ | 133 | stw r10,_CCR(r11); /* save registers */ \ |
134 | stw r12,GPR12(r11); \ | 134 | stw r12,GPR12(r11); \ |
135 | stw r9,GPR9(r11); \ | 135 | stw r9,GPR9(r11); \ |
136 | mfspr r10,SPRN_SPRG0; \ | 136 | mfspr r10,SPRN_SPRG_SCRATCH0; \ |
137 | stw r10,GPR10(r11); \ | 137 | stw r10,GPR10(r11); \ |
138 | mfspr r12,SPRN_SPRG1; \ | 138 | mfspr r12,SPRN_SPRG_SCRATCH1; \ |
139 | stw r12,GPR11(r11); \ | 139 | stw r12,GPR11(r11); \ |
140 | mflr r10; \ | 140 | mflr r10; \ |
141 | stw r10,_LINK(r11); \ | 141 | stw r10,_LINK(r11); \ |
@@ -603,8 +603,9 @@ start_here: | |||
603 | /* ptr to phys current thread */ | 603 | /* ptr to phys current thread */ |
604 | tophys(r4,r2) | 604 | tophys(r4,r2) |
605 | addi r4,r4,THREAD /* init task's THREAD */ | 605 | addi r4,r4,THREAD /* init task's THREAD */ |
606 | mtspr SPRN_SPRG3,r4 | 606 | mtspr SPRN_SPRG_THREAD,r4 |
607 | li r3,0 | 607 | li r3,0 |
608 | /* XXX What is that for ? SPRG2 appears otherwise unused on 8xx */ | ||
608 | mtspr SPRN_SPRG2,r3 /* 0 => r1 has kernel sp */ | 609 | mtspr SPRN_SPRG2,r3 /* 0 => r1 has kernel sp */ |
609 | 610 | ||
610 | /* stack */ | 611 | /* stack */ |
diff --git a/arch/powerpc/kernel/head_booke.h b/arch/powerpc/kernel/head_booke.h index 5f9febc8d143..50504ae39cb7 100644 --- a/arch/powerpc/kernel/head_booke.h +++ b/arch/powerpc/kernel/head_booke.h | |||
@@ -20,14 +20,14 @@ | |||
20 | #endif | 20 | #endif |
21 | 21 | ||
22 | #define NORMAL_EXCEPTION_PROLOG \ | 22 | #define NORMAL_EXCEPTION_PROLOG \ |
23 | mtspr SPRN_SPRG0,r10; /* save two registers to work with */\ | 23 | mtspr SPRN_SPRG_WSCRATCH0,r10;/* save two registers to work with */\ |
24 | mtspr SPRN_SPRG1,r11; \ | 24 | mtspr SPRN_SPRG_WSCRATCH1,r11; \ |
25 | mtspr SPRN_SPRG4W,r1; \ | 25 | mtspr SPRN_SPRG_WSCRATCH2,r1; \ |
26 | mfcr r10; /* save CR in r10 for now */\ | 26 | mfcr r10; /* save CR in r10 for now */\ |
27 | mfspr r11,SPRN_SRR1; /* check whether user or kernel */\ | 27 | mfspr r11,SPRN_SRR1; /* check whether user or kernel */\ |
28 | andi. r11,r11,MSR_PR; \ | 28 | andi. r11,r11,MSR_PR; \ |
29 | beq 1f; \ | 29 | beq 1f; \ |
30 | mfspr r1,SPRN_SPRG3; /* if from user, start at top of */\ | 30 | mfspr r1,SPRN_SPRG_THREAD; /* if from user, start at top of */\ |
31 | lwz r1,THREAD_INFO-THREAD(r1); /* this thread's kernel stack */\ | 31 | lwz r1,THREAD_INFO-THREAD(r1); /* this thread's kernel stack */\ |
32 | ALLOC_STACK_FRAME(r1, THREAD_SIZE); \ | 32 | ALLOC_STACK_FRAME(r1, THREAD_SIZE); \ |
33 | 1: subi r1,r1,INT_FRAME_SIZE; /* Allocate an exception frame */\ | 33 | 1: subi r1,r1,INT_FRAME_SIZE; /* Allocate an exception frame */\ |
@@ -35,13 +35,13 @@ | |||
35 | stw r10,_CCR(r11); /* save various registers */\ | 35 | stw r10,_CCR(r11); /* save various registers */\ |
36 | stw r12,GPR12(r11); \ | 36 | stw r12,GPR12(r11); \ |
37 | stw r9,GPR9(r11); \ | 37 | stw r9,GPR9(r11); \ |
38 | mfspr r10,SPRN_SPRG0; \ | 38 | mfspr r10,SPRN_SPRG_RSCRATCH0; \ |
39 | stw r10,GPR10(r11); \ | 39 | stw r10,GPR10(r11); \ |
40 | mfspr r12,SPRN_SPRG1; \ | 40 | mfspr r12,SPRN_SPRG_RSCRATCH1; \ |
41 | stw r12,GPR11(r11); \ | 41 | stw r12,GPR11(r11); \ |
42 | mflr r10; \ | 42 | mflr r10; \ |
43 | stw r10,_LINK(r11); \ | 43 | stw r10,_LINK(r11); \ |
44 | mfspr r10,SPRN_SPRG4R; \ | 44 | mfspr r10,SPRN_SPRG_RSCRATCH2; \ |
45 | mfspr r12,SPRN_SRR0; \ | 45 | mfspr r12,SPRN_SRR0; \ |
46 | stw r10,GPR1(r11); \ | 46 | stw r10,GPR1(r11); \ |
47 | mfspr r9,SPRN_SRR1; \ | 47 | mfspr r9,SPRN_SRR1; \ |
@@ -69,21 +69,11 @@ | |||
69 | * providing configurations that micro-optimize space usage. | 69 | * providing configurations that micro-optimize space usage. |
70 | */ | 70 | */ |
71 | 71 | ||
72 | /* CRIT_SPRG only used in critical exception handling */ | 72 | #define MC_STACK_BASE mcheckirq_ctx |
73 | #define CRIT_SPRG SPRN_SPRG2 | ||
74 | /* MCHECK_SPRG only used in machine check exception handling */ | ||
75 | #define MCHECK_SPRG SPRN_SPRG6W | ||
76 | |||
77 | #define MCHECK_STACK_BASE mcheckirq_ctx | ||
78 | #define CRIT_STACK_BASE critirq_ctx | 73 | #define CRIT_STACK_BASE critirq_ctx |
79 | 74 | ||
80 | /* only on e500mc/e200 */ | 75 | /* only on e500mc/e200 */ |
81 | #define DEBUG_STACK_BASE dbgirq_ctx | 76 | #define DBG_STACK_BASE dbgirq_ctx |
82 | #ifdef CONFIG_E200 | ||
83 | #define DEBUG_SPRG SPRN_SPRG6W | ||
84 | #else | ||
85 | #define DEBUG_SPRG SPRN_SPRG9 | ||
86 | #endif | ||
87 | 77 | ||
88 | #define EXC_LVL_FRAME_OVERHEAD (THREAD_SIZE - INT_FRAME_SIZE - EXC_LVL_SIZE) | 78 | #define EXC_LVL_FRAME_OVERHEAD (THREAD_SIZE - INT_FRAME_SIZE - EXC_LVL_SIZE) |
89 | 79 | ||
@@ -110,7 +100,7 @@ | |||
110 | * critical/machine check exception stack at low physical addresses. | 100 | * critical/machine check exception stack at low physical addresses. |
111 | */ | 101 | */ |
112 | #define EXC_LEVEL_EXCEPTION_PROLOG(exc_level, exc_level_srr0, exc_level_srr1) \ | 102 | #define EXC_LEVEL_EXCEPTION_PROLOG(exc_level, exc_level_srr0, exc_level_srr1) \ |
113 | mtspr exc_level##_SPRG,r8; \ | 103 | mtspr SPRN_SPRG_WSCRATCH_##exc_level,r8; \ |
114 | BOOKE_LOAD_EXC_LEVEL_STACK(exc_level);/* r8 points to the exc_level stack*/ \ | 104 | BOOKE_LOAD_EXC_LEVEL_STACK(exc_level);/* r8 points to the exc_level stack*/ \ |
115 | stw r9,GPR9(r8); /* save various registers */\ | 105 | stw r9,GPR9(r8); /* save various registers */\ |
116 | mfcr r9; /* save CR in r9 for now */\ | 106 | mfcr r9; /* save CR in r9 for now */\ |
@@ -119,7 +109,7 @@ | |||
119 | stw r9,_CCR(r8); /* save CR on stack */\ | 109 | stw r9,_CCR(r8); /* save CR on stack */\ |
120 | mfspr r10,exc_level_srr1; /* check whether user or kernel */\ | 110 | mfspr r10,exc_level_srr1; /* check whether user or kernel */\ |
121 | andi. r10,r10,MSR_PR; \ | 111 | andi. r10,r10,MSR_PR; \ |
122 | mfspr r11,SPRN_SPRG3; /* if from user, start at top of */\ | 112 | mfspr r11,SPRN_SPRG_THREAD; /* if from user, start at top of */\ |
123 | lwz r11,THREAD_INFO-THREAD(r11); /* this thread's kernel stack */\ | 113 | lwz r11,THREAD_INFO-THREAD(r11); /* this thread's kernel stack */\ |
124 | addi r11,r11,EXC_LVL_FRAME_OVERHEAD; /* allocate stack frame */\ | 114 | addi r11,r11,EXC_LVL_FRAME_OVERHEAD; /* allocate stack frame */\ |
125 | beq 1f; \ | 115 | beq 1f; \ |
@@ -140,7 +130,7 @@ | |||
140 | lwz r9,TI_TASK-EXC_LVL_FRAME_OVERHEAD(r11); \ | 130 | lwz r9,TI_TASK-EXC_LVL_FRAME_OVERHEAD(r11); \ |
141 | stw r9,TI_TASK-EXC_LVL_FRAME_OVERHEAD(r8); \ | 131 | stw r9,TI_TASK-EXC_LVL_FRAME_OVERHEAD(r8); \ |
142 | mr r11,r8; \ | 132 | mr r11,r8; \ |
143 | 2: mfspr r8,exc_level##_SPRG; \ | 133 | 2: mfspr r8,SPRN_SPRG_RSCRATCH_##exc_level; \ |
144 | stw r12,GPR12(r11); /* save various registers */\ | 134 | stw r12,GPR12(r11); /* save various registers */\ |
145 | mflr r10; \ | 135 | mflr r10; \ |
146 | stw r10,_LINK(r11); \ | 136 | stw r10,_LINK(r11); \ |
@@ -161,9 +151,9 @@ | |||
161 | #define CRITICAL_EXCEPTION_PROLOG \ | 151 | #define CRITICAL_EXCEPTION_PROLOG \ |
162 | EXC_LEVEL_EXCEPTION_PROLOG(CRIT, SPRN_CSRR0, SPRN_CSRR1) | 152 | EXC_LEVEL_EXCEPTION_PROLOG(CRIT, SPRN_CSRR0, SPRN_CSRR1) |
163 | #define DEBUG_EXCEPTION_PROLOG \ | 153 | #define DEBUG_EXCEPTION_PROLOG \ |
164 | EXC_LEVEL_EXCEPTION_PROLOG(DEBUG, SPRN_DSRR0, SPRN_DSRR1) | 154 | EXC_LEVEL_EXCEPTION_PROLOG(DBG, SPRN_DSRR0, SPRN_DSRR1) |
165 | #define MCHECK_EXCEPTION_PROLOG \ | 155 | #define MCHECK_EXCEPTION_PROLOG \ |
166 | EXC_LEVEL_EXCEPTION_PROLOG(MCHECK, SPRN_MCSRR0, SPRN_MCSRR1) | 156 | EXC_LEVEL_EXCEPTION_PROLOG(MC, SPRN_MCSRR0, SPRN_MCSRR1) |
167 | 157 | ||
168 | /* | 158 | /* |
169 | * Exception vectors. | 159 | * Exception vectors. |
@@ -282,13 +272,13 @@ label: | |||
282 | mtspr SPRN_DSRR1,r9; \ | 272 | mtspr SPRN_DSRR1,r9; \ |
283 | lwz r9,GPR9(r11); \ | 273 | lwz r9,GPR9(r11); \ |
284 | lwz r12,GPR12(r11); \ | 274 | lwz r12,GPR12(r11); \ |
285 | mtspr DEBUG_SPRG,r8; \ | 275 | mtspr SPRN_SPRG_WSCRATCH_DBG,r8; \ |
286 | BOOKE_LOAD_EXC_LEVEL_STACK(DEBUG); /* r8 points to the debug stack */ \ | 276 | BOOKE_LOAD_EXC_LEVEL_STACK(DBG); /* r8 points to the debug stack */ \ |
287 | lwz r10,GPR10(r8); \ | 277 | lwz r10,GPR10(r8); \ |
288 | lwz r11,GPR11(r8); \ | 278 | lwz r11,GPR11(r8); \ |
289 | mfspr r8,DEBUG_SPRG; \ | 279 | mfspr r8,SPRN_SPRG_RSCRATCH_DBG; \ |
290 | \ | 280 | \ |
291 | PPC_RFDI; \ | 281 | PPC_RFDI; \ |
292 | b .; \ | 282 | b .; \ |
293 | \ | 283 | \ |
294 | /* continue normal handling for a debug exception... */ \ | 284 | /* continue normal handling for a debug exception... */ \ |
@@ -335,11 +325,11 @@ label: | |||
335 | mtspr SPRN_CSRR1,r9; \ | 325 | mtspr SPRN_CSRR1,r9; \ |
336 | lwz r9,GPR9(r11); \ | 326 | lwz r9,GPR9(r11); \ |
337 | lwz r12,GPR12(r11); \ | 327 | lwz r12,GPR12(r11); \ |
338 | mtspr CRIT_SPRG,r8; \ | 328 | mtspr SPRN_SPRG_WSCRATCH_CRIT,r8; \ |
339 | BOOKE_LOAD_EXC_LEVEL_STACK(CRIT); /* r8 points to the debug stack */ \ | 329 | BOOKE_LOAD_EXC_LEVEL_STACK(CRIT); /* r8 points to the debug stack */ \ |
340 | lwz r10,GPR10(r8); \ | 330 | lwz r10,GPR10(r8); \ |
341 | lwz r11,GPR11(r8); \ | 331 | lwz r11,GPR11(r8); \ |
342 | mfspr r8,CRIT_SPRG; \ | 332 | mfspr r8,SPRN_SPRG_RSCRATCH_CRIT; \ |
343 | \ | 333 | \ |
344 | rfci; \ | 334 | rfci; \ |
345 | b .; \ | 335 | b .; \ |
diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S index 5bdcc06d294c..975788ca05d2 100644 --- a/arch/powerpc/kernel/head_fsl_booke.S +++ b/arch/powerpc/kernel/head_fsl_booke.S | |||
@@ -361,7 +361,7 @@ skpinv: addi r6,r6,1 /* Increment */ | |||
361 | 361 | ||
362 | /* ptr to current thread */ | 362 | /* ptr to current thread */ |
363 | addi r4,r2,THREAD /* init task's THREAD */ | 363 | addi r4,r2,THREAD /* init task's THREAD */ |
364 | mtspr SPRN_SPRG3,r4 | 364 | mtspr SPRN_SPRG_THREAD,r4 |
365 | 365 | ||
366 | /* stack */ | 366 | /* stack */ |
367 | lis r1,init_thread_union@h | 367 | lis r1,init_thread_union@h |
@@ -532,12 +532,12 @@ interrupt_base: | |||
532 | 532 | ||
533 | /* Data TLB Error Interrupt */ | 533 | /* Data TLB Error Interrupt */ |
534 | START_EXCEPTION(DataTLBError) | 534 | START_EXCEPTION(DataTLBError) |
535 | mtspr SPRN_SPRG0, r10 /* Save some working registers */ | 535 | mtspr SPRN_SPRG_WSCRATCH0, r10 /* Save some working registers */ |
536 | mtspr SPRN_SPRG1, r11 | 536 | mtspr SPRN_SPRG_WSCRATCH1, r11 |
537 | mtspr SPRN_SPRG4W, r12 | 537 | mtspr SPRN_SPRG_WSCRATCH2, r12 |
538 | mtspr SPRN_SPRG5W, r13 | 538 | mtspr SPRN_SPRG_WSCRATCH3, r13 |
539 | mfcr r11 | 539 | mfcr r11 |
540 | mtspr SPRN_SPRG7W, r11 | 540 | mtspr SPRN_SPRG_WSCRATCH4, r11 |
541 | mfspr r10, SPRN_DEAR /* Get faulting address */ | 541 | mfspr r10, SPRN_DEAR /* Get faulting address */ |
542 | 542 | ||
543 | /* If we are faulting a kernel address, we have to use the | 543 | /* If we are faulting a kernel address, we have to use the |
@@ -557,7 +557,7 @@ interrupt_base: | |||
557 | 557 | ||
558 | /* Get the PGD for the current thread */ | 558 | /* Get the PGD for the current thread */ |
559 | 3: | 559 | 3: |
560 | mfspr r11,SPRN_SPRG3 | 560 | mfspr r11,SPRN_SPRG_THREAD |
561 | lwz r11,PGDIR(r11) | 561 | lwz r11,PGDIR(r11) |
562 | 562 | ||
563 | 4: | 563 | 4: |
@@ -575,7 +575,12 @@ interrupt_base: | |||
575 | * place or can we save a couple of instructions here ? | 575 | * place or can we save a couple of instructions here ? |
576 | */ | 576 | */ |
577 | mfspr r12,SPRN_ESR | 577 | mfspr r12,SPRN_ESR |
578 | #ifdef CONFIG_PTE_64BIT | ||
579 | li r13,_PAGE_PRESENT | ||
580 | oris r13,r13,_PAGE_ACCESSED@h | ||
581 | #else | ||
578 | li r13,_PAGE_PRESENT|_PAGE_ACCESSED | 582 | li r13,_PAGE_PRESENT|_PAGE_ACCESSED |
583 | #endif | ||
579 | rlwimi r13,r12,11,29,29 | 584 | rlwimi r13,r12,11,29,29 |
580 | 585 | ||
581 | FIND_PTE | 586 | FIND_PTE |
@@ -598,12 +603,12 @@ interrupt_base: | |||
598 | /* The bailout. Restore registers to pre-exception conditions | 603 | /* The bailout. Restore registers to pre-exception conditions |
599 | * and call the heavyweights to help us out. | 604 | * and call the heavyweights to help us out. |
600 | */ | 605 | */ |
601 | mfspr r11, SPRN_SPRG7R | 606 | mfspr r11, SPRN_SPRG_RSCRATCH4 |
602 | mtcr r11 | 607 | mtcr r11 |
603 | mfspr r13, SPRN_SPRG5R | 608 | mfspr r13, SPRN_SPRG_RSCRATCH3 |
604 | mfspr r12, SPRN_SPRG4R | 609 | mfspr r12, SPRN_SPRG_RSCRATCH2 |
605 | mfspr r11, SPRN_SPRG1 | 610 | mfspr r11, SPRN_SPRG_RSCRATCH1 |
606 | mfspr r10, SPRN_SPRG0 | 611 | mfspr r10, SPRN_SPRG_RSCRATCH0 |
607 | b DataStorage | 612 | b DataStorage |
608 | 613 | ||
609 | /* Instruction TLB Error Interrupt */ | 614 | /* Instruction TLB Error Interrupt */ |
@@ -613,12 +618,12 @@ interrupt_base: | |||
613 | * to a different point. | 618 | * to a different point. |
614 | */ | 619 | */ |
615 | START_EXCEPTION(InstructionTLBError) | 620 | START_EXCEPTION(InstructionTLBError) |
616 | mtspr SPRN_SPRG0, r10 /* Save some working registers */ | 621 | mtspr SPRN_SPRG_WSCRATCH0, r10 /* Save some working registers */ |
617 | mtspr SPRN_SPRG1, r11 | 622 | mtspr SPRN_SPRG_WSCRATCH1, r11 |
618 | mtspr SPRN_SPRG4W, r12 | 623 | mtspr SPRN_SPRG_WSCRATCH2, r12 |
619 | mtspr SPRN_SPRG5W, r13 | 624 | mtspr SPRN_SPRG_WSCRATCH3, r13 |
620 | mfcr r11 | 625 | mfcr r11 |
621 | mtspr SPRN_SPRG7W, r11 | 626 | mtspr SPRN_SPRG_WSCRATCH4, r11 |
622 | mfspr r10, SPRN_SRR0 /* Get faulting address */ | 627 | mfspr r10, SPRN_SRR0 /* Get faulting address */ |
623 | 628 | ||
624 | /* If we are faulting a kernel address, we have to use the | 629 | /* If we are faulting a kernel address, we have to use the |
@@ -638,12 +643,17 @@ interrupt_base: | |||
638 | 643 | ||
639 | /* Get the PGD for the current thread */ | 644 | /* Get the PGD for the current thread */ |
640 | 3: | 645 | 3: |
641 | mfspr r11,SPRN_SPRG3 | 646 | mfspr r11,SPRN_SPRG_THREAD |
642 | lwz r11,PGDIR(r11) | 647 | lwz r11,PGDIR(r11) |
643 | 648 | ||
644 | 4: | 649 | 4: |
645 | /* Make up the required permissions */ | 650 | /* Make up the required permissions */ |
646 | li r13,_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_HWEXEC | 651 | #ifdef CONFIG_PTE_64BIT |
652 | li r13,_PAGE_PRESENT | _PAGE_EXEC | ||
653 | oris r13,r13,_PAGE_ACCESSED@h | ||
654 | #else | ||
655 | li r13,_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_EXEC | ||
656 | #endif | ||
647 | 657 | ||
648 | FIND_PTE | 658 | FIND_PTE |
649 | andc. r13,r13,r11 /* Check permission */ | 659 | andc. r13,r13,r11 /* Check permission */ |
@@ -666,12 +676,12 @@ interrupt_base: | |||
666 | /* The bailout. Restore registers to pre-exception conditions | 676 | /* The bailout. Restore registers to pre-exception conditions |
667 | * and call the heavyweights to help us out. | 677 | * and call the heavyweights to help us out. |
668 | */ | 678 | */ |
669 | mfspr r11, SPRN_SPRG7R | 679 | mfspr r11, SPRN_SPRG_RSCRATCH4 |
670 | mtcr r11 | 680 | mtcr r11 |
671 | mfspr r13, SPRN_SPRG5R | 681 | mfspr r13, SPRN_SPRG_RSCRATCH3 |
672 | mfspr r12, SPRN_SPRG4R | 682 | mfspr r12, SPRN_SPRG_RSCRATCH2 |
673 | mfspr r11, SPRN_SPRG1 | 683 | mfspr r11, SPRN_SPRG_RSCRATCH1 |
674 | mfspr r10, SPRN_SPRG0 | 684 | mfspr r10, SPRN_SPRG_RSCRATCH0 |
675 | b InstructionStorage | 685 | b InstructionStorage |
676 | 686 | ||
677 | #ifdef CONFIG_SPE | 687 | #ifdef CONFIG_SPE |
@@ -733,7 +743,7 @@ finish_tlb_load: | |||
733 | 743 | ||
734 | mfspr r12, SPRN_MAS2 | 744 | mfspr r12, SPRN_MAS2 |
735 | #ifdef CONFIG_PTE_64BIT | 745 | #ifdef CONFIG_PTE_64BIT |
736 | rlwimi r12, r11, 26, 24, 31 /* extract ...WIMGE from pte */ | 746 | rlwimi r12, r11, 32-19, 27, 31 /* extract WIMGE from pte */ |
737 | #else | 747 | #else |
738 | rlwimi r12, r11, 26, 27, 31 /* extract WIMGE from pte */ | 748 | rlwimi r12, r11, 26, 27, 31 /* extract WIMGE from pte */ |
739 | #endif | 749 | #endif |
@@ -742,23 +752,27 @@ finish_tlb_load: | |||
742 | #endif | 752 | #endif |
743 | mtspr SPRN_MAS2, r12 | 753 | mtspr SPRN_MAS2, r12 |
744 | 754 | ||
745 | li r10, (_PAGE_HWEXEC | _PAGE_PRESENT) | ||
746 | rlwimi r10, r11, 31, 29, 29 /* extract _PAGE_DIRTY into SW */ | ||
747 | and r12, r11, r10 | ||
748 | andi. r10, r11, _PAGE_USER /* Test for _PAGE_USER */ | ||
749 | slwi r10, r12, 1 | ||
750 | or r10, r10, r12 | ||
751 | iseleq r12, r12, r10 | ||
752 | |||
753 | #ifdef CONFIG_PTE_64BIT | 755 | #ifdef CONFIG_PTE_64BIT |
754 | rlwimi r12, r13, 24, 0, 7 /* grab RPN[32:39] */ | 756 | rlwinm r12, r11, 32-2, 26, 31 /* Move in perm bits */ |
755 | rlwimi r12, r11, 24, 8, 19 /* grab RPN[40:51] */ | 757 | andi. r10, r11, _PAGE_DIRTY |
758 | bne 1f | ||
759 | li r10, MAS3_SW | MAS3_UW | ||
760 | andc r12, r12, r10 | ||
761 | 1: rlwimi r12, r13, 20, 0, 11 /* grab RPN[32:43] */ | ||
762 | rlwimi r12, r11, 20, 12, 19 /* grab RPN[44:51] */ | ||
756 | mtspr SPRN_MAS3, r12 | 763 | mtspr SPRN_MAS3, r12 |
757 | BEGIN_MMU_FTR_SECTION | 764 | BEGIN_MMU_FTR_SECTION |
758 | srwi r10, r13, 8 /* grab RPN[8:31] */ | 765 | srwi r10, r13, 12 /* grab RPN[12:31] */ |
759 | mtspr SPRN_MAS7, r10 | 766 | mtspr SPRN_MAS7, r10 |
760 | END_MMU_FTR_SECTION_IFSET(MMU_FTR_BIG_PHYS) | 767 | END_MMU_FTR_SECTION_IFSET(MMU_FTR_BIG_PHYS) |
761 | #else | 768 | #else |
769 | li r10, (_PAGE_EXEC | _PAGE_PRESENT) | ||
770 | rlwimi r10, r11, 31, 29, 29 /* extract _PAGE_DIRTY into SW */ | ||
771 | and r12, r11, r10 | ||
772 | andi. r10, r11, _PAGE_USER /* Test for _PAGE_USER */ | ||
773 | slwi r10, r12, 1 | ||
774 | or r10, r10, r12 | ||
775 | iseleq r12, r12, r10 | ||
762 | rlwimi r11, r12, 0, 20, 31 /* Extract RPN from PTE and merge with perms */ | 776 | rlwimi r11, r12, 0, 20, 31 /* Extract RPN from PTE and merge with perms */ |
763 | mtspr SPRN_MAS3, r11 | 777 | mtspr SPRN_MAS3, r11 |
764 | #endif | 778 | #endif |
@@ -790,12 +804,12 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_BIG_PHYS) | |||
790 | tlbwe | 804 | tlbwe |
791 | 805 | ||
792 | /* Done...restore registers and get out of here. */ | 806 | /* Done...restore registers and get out of here. */ |
793 | mfspr r11, SPRN_SPRG7R | 807 | mfspr r11, SPRN_SPRG_RSCRATCH4 |
794 | mtcr r11 | 808 | mtcr r11 |
795 | mfspr r13, SPRN_SPRG5R | 809 | mfspr r13, SPRN_SPRG_RSCRATCH3 |
796 | mfspr r12, SPRN_SPRG4R | 810 | mfspr r12, SPRN_SPRG_RSCRATCH2 |
797 | mfspr r11, SPRN_SPRG1 | 811 | mfspr r11, SPRN_SPRG_RSCRATCH1 |
798 | mfspr r10, SPRN_SPRG0 | 812 | mfspr r10, SPRN_SPRG_RSCRATCH0 |
799 | rfi /* Force context change */ | 813 | rfi /* Force context change */ |
800 | 814 | ||
801 | #ifdef CONFIG_SPE | 815 | #ifdef CONFIG_SPE |
@@ -839,7 +853,7 @@ load_up_spe: | |||
839 | #endif /* !CONFIG_SMP */ | 853 | #endif /* !CONFIG_SMP */ |
840 | /* enable use of SPE after return */ | 854 | /* enable use of SPE after return */ |
841 | oris r9,r9,MSR_SPE@h | 855 | oris r9,r9,MSR_SPE@h |
842 | mfspr r5,SPRN_SPRG3 /* current task's THREAD (phys) */ | 856 | mfspr r5,SPRN_SPRG_THREAD /* current task's THREAD (phys) */ |
843 | li r4,1 | 857 | li r4,1 |
844 | li r10,THREAD_ACC | 858 | li r10,THREAD_ACC |
845 | stw r4,THREAD_USED_SPE(r5) | 859 | stw r4,THREAD_USED_SPE(r5) |
@@ -1118,7 +1132,7 @@ __secondary_start: | |||
1118 | 1132 | ||
1119 | /* ptr to current thread */ | 1133 | /* ptr to current thread */ |
1120 | addi r4,r2,THREAD /* address of our thread_struct */ | 1134 | addi r4,r2,THREAD /* address of our thread_struct */ |
1121 | mtspr SPRN_SPRG3,r4 | 1135 | mtspr SPRN_SPRG_THREAD,r4 |
1122 | 1136 | ||
1123 | /* Setup the defaults for TLB entries */ | 1137 | /* Setup the defaults for TLB entries */ |
1124 | li r4,(MAS4_TSIZED(BOOK3E_PAGESZ_4K))@l | 1138 | li r4,(MAS4_TSIZED(BOOK3E_PAGESZ_4K))@l |
diff --git a/arch/powerpc/kernel/ibmebus.c b/arch/powerpc/kernel/ibmebus.c index 6e3f62493659..a4c8b38b0ba1 100644 --- a/arch/powerpc/kernel/ibmebus.c +++ b/arch/powerpc/kernel/ibmebus.c | |||
@@ -127,7 +127,7 @@ static int ibmebus_dma_supported(struct device *dev, u64 mask) | |||
127 | return 1; | 127 | return 1; |
128 | } | 128 | } |
129 | 129 | ||
130 | static struct dma_mapping_ops ibmebus_dma_ops = { | 130 | static struct dma_map_ops ibmebus_dma_ops = { |
131 | .alloc_coherent = ibmebus_alloc_coherent, | 131 | .alloc_coherent = ibmebus_alloc_coherent, |
132 | .free_coherent = ibmebus_free_coherent, | 132 | .free_coherent = ibmebus_free_coherent, |
133 | .map_sg = ibmebus_map_sg, | 133 | .map_sg = ibmebus_map_sg, |
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c index 2419cc706ff1..ed0ac4e4b8d8 100644 --- a/arch/powerpc/kernel/lparcfg.c +++ b/arch/powerpc/kernel/lparcfg.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <asm/prom.h> | 35 | #include <asm/prom.h> |
36 | #include <asm/vdso_datapage.h> | 36 | #include <asm/vdso_datapage.h> |
37 | #include <asm/vio.h> | 37 | #include <asm/vio.h> |
38 | #include <asm/mmu.h> | ||
38 | 39 | ||
39 | #define MODULE_VERS "1.8" | 40 | #define MODULE_VERS "1.8" |
40 | #define MODULE_NAME "lparcfg" | 41 | #define MODULE_NAME "lparcfg" |
@@ -537,6 +538,8 @@ static int pseries_lparcfg_data(struct seq_file *m, void *v) | |||
537 | 538 | ||
538 | seq_printf(m, "shared_processor_mode=%d\n", lppaca[0].shared_proc); | 539 | seq_printf(m, "shared_processor_mode=%d\n", lppaca[0].shared_proc); |
539 | 540 | ||
541 | seq_printf(m, "slb_size=%d\n", mmu_slb_size); | ||
542 | |||
540 | return 0; | 543 | return 0; |
541 | } | 544 | } |
542 | 545 | ||
diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S index 15f28e0de78d..da9c0c4c10f3 100644 --- a/arch/powerpc/kernel/misc_32.S +++ b/arch/powerpc/kernel/misc_32.S | |||
@@ -342,10 +342,17 @@ END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE) | |||
342 | addi r3,r3,L1_CACHE_BYTES | 342 | addi r3,r3,L1_CACHE_BYTES |
343 | bdnz 1b | 343 | bdnz 1b |
344 | sync /* wait for dcbst's to get to ram */ | 344 | sync /* wait for dcbst's to get to ram */ |
345 | #ifndef CONFIG_44x | ||
345 | mtctr r4 | 346 | mtctr r4 |
346 | 2: icbi 0,r6 | 347 | 2: icbi 0,r6 |
347 | addi r6,r6,L1_CACHE_BYTES | 348 | addi r6,r6,L1_CACHE_BYTES |
348 | bdnz 2b | 349 | bdnz 2b |
350 | #else | ||
351 | /* Flash invalidate on 44x because we are passed kmapped addresses and | ||
352 | this doesn't work for userspace pages due to the virtually tagged | ||
353 | icache. Sigh. */ | ||
354 | iccci 0, r0 | ||
355 | #endif | ||
349 | sync /* additional sync needed on g4 */ | 356 | sync /* additional sync needed on g4 */ |
350 | isync | 357 | isync |
351 | blr | 358 | blr |
diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c index 87df428e3588..1a4fc0d11a03 100644 --- a/arch/powerpc/kernel/of_platform.c +++ b/arch/powerpc/kernel/of_platform.c | |||
@@ -276,7 +276,7 @@ static int __devinit of_pci_phb_probe(struct of_device *dev, | |||
276 | #endif /* CONFIG_EEH */ | 276 | #endif /* CONFIG_EEH */ |
277 | 277 | ||
278 | /* Scan the bus */ | 278 | /* Scan the bus */ |
279 | scan_phb(phb); | 279 | pcibios_scan_phb(phb, dev->node); |
280 | if (phb->bus == NULL) | 280 | if (phb->bus == NULL) |
281 | return -ENXIO; | 281 | return -ENXIO; |
282 | 282 | ||
diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c index e9962c7f8a09..d16b1ea55d44 100644 --- a/arch/powerpc/kernel/paca.c +++ b/arch/powerpc/kernel/paca.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <asm/lppaca.h> | 13 | #include <asm/lppaca.h> |
14 | #include <asm/paca.h> | 14 | #include <asm/paca.h> |
15 | #include <asm/sections.h> | 15 | #include <asm/sections.h> |
16 | #include <asm/pgtable.h> | ||
16 | 17 | ||
17 | /* This symbol is provided by the linker - let it fill in the paca | 18 | /* This symbol is provided by the linker - let it fill in the paca |
18 | * field correctly */ | 19 | * field correctly */ |
@@ -87,6 +88,8 @@ void __init initialise_pacas(void) | |||
87 | 88 | ||
88 | #ifdef CONFIG_PPC_BOOK3S | 89 | #ifdef CONFIG_PPC_BOOK3S |
89 | new_paca->lppaca_ptr = &lppaca[cpu]; | 90 | new_paca->lppaca_ptr = &lppaca[cpu]; |
91 | #else | ||
92 | new_paca->kernel_pgd = swapper_pg_dir; | ||
90 | #endif | 93 | #endif |
91 | new_paca->lock_token = 0x8000; | 94 | new_paca->lock_token = 0x8000; |
92 | new_paca->paca_index = cpu; | 95 | new_paca->paca_index = cpu; |
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index 5a56e97c5ac0..e9f4840096b3 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c | |||
@@ -50,14 +50,14 @@ resource_size_t isa_mem_base; | |||
50 | unsigned int ppc_pci_flags = 0; | 50 | unsigned int ppc_pci_flags = 0; |
51 | 51 | ||
52 | 52 | ||
53 | static struct dma_mapping_ops *pci_dma_ops = &dma_direct_ops; | 53 | static struct dma_map_ops *pci_dma_ops = &dma_direct_ops; |
54 | 54 | ||
55 | void set_pci_dma_ops(struct dma_mapping_ops *dma_ops) | 55 | void set_pci_dma_ops(struct dma_map_ops *dma_ops) |
56 | { | 56 | { |
57 | pci_dma_ops = dma_ops; | 57 | pci_dma_ops = dma_ops; |
58 | } | 58 | } |
59 | 59 | ||
60 | struct dma_mapping_ops *get_pci_dma_ops(void) | 60 | struct dma_map_ops *get_pci_dma_ops(void) |
61 | { | 61 | { |
62 | return pci_dma_ops; | 62 | return pci_dma_ops; |
63 | } | 63 | } |
@@ -176,8 +176,6 @@ int pci_domain_nr(struct pci_bus *bus) | |||
176 | } | 176 | } |
177 | EXPORT_SYMBOL(pci_domain_nr); | 177 | EXPORT_SYMBOL(pci_domain_nr); |
178 | 178 | ||
179 | #ifdef CONFIG_PPC_OF | ||
180 | |||
181 | /* This routine is meant to be used early during boot, when the | 179 | /* This routine is meant to be used early during boot, when the |
182 | * PCI bus numbers have not yet been assigned, and you need to | 180 | * PCI bus numbers have not yet been assigned, and you need to |
183 | * issue PCI config cycles to an OF device. | 181 | * issue PCI config cycles to an OF device. |
@@ -210,17 +208,11 @@ static ssize_t pci_show_devspec(struct device *dev, | |||
210 | return sprintf(buf, "%s", np->full_name); | 208 | return sprintf(buf, "%s", np->full_name); |
211 | } | 209 | } |
212 | static DEVICE_ATTR(devspec, S_IRUGO, pci_show_devspec, NULL); | 210 | static DEVICE_ATTR(devspec, S_IRUGO, pci_show_devspec, NULL); |
213 | #endif /* CONFIG_PPC_OF */ | ||
214 | 211 | ||
215 | /* Add sysfs properties */ | 212 | /* Add sysfs properties */ |
216 | int pcibios_add_platform_entries(struct pci_dev *pdev) | 213 | int pcibios_add_platform_entries(struct pci_dev *pdev) |
217 | { | 214 | { |
218 | #ifdef CONFIG_PPC_OF | ||
219 | return device_create_file(&pdev->dev, &dev_attr_devspec); | 215 | return device_create_file(&pdev->dev, &dev_attr_devspec); |
220 | #else | ||
221 | return 0; | ||
222 | #endif /* CONFIG_PPC_OF */ | ||
223 | |||
224 | } | 216 | } |
225 | 217 | ||
226 | char __devinit *pcibios_setup(char *str) | 218 | char __devinit *pcibios_setup(char *str) |
@@ -1626,3 +1618,122 @@ void __devinit pcibios_setup_phb_resources(struct pci_controller *hose) | |||
1626 | 1618 | ||
1627 | } | 1619 | } |
1628 | 1620 | ||
1621 | /* | ||
1622 | * Null PCI config access functions, for the case when we can't | ||
1623 | * find a hose. | ||
1624 | */ | ||
1625 | #define NULL_PCI_OP(rw, size, type) \ | ||
1626 | static int \ | ||
1627 | null_##rw##_config_##size(struct pci_dev *dev, int offset, type val) \ | ||
1628 | { \ | ||
1629 | return PCIBIOS_DEVICE_NOT_FOUND; \ | ||
1630 | } | ||
1631 | |||
1632 | static int | ||
1633 | null_read_config(struct pci_bus *bus, unsigned int devfn, int offset, | ||
1634 | int len, u32 *val) | ||
1635 | { | ||
1636 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
1637 | } | ||
1638 | |||
1639 | static int | ||
1640 | null_write_config(struct pci_bus *bus, unsigned int devfn, int offset, | ||
1641 | int len, u32 val) | ||
1642 | { | ||
1643 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
1644 | } | ||
1645 | |||
1646 | static struct pci_ops null_pci_ops = | ||
1647 | { | ||
1648 | .read = null_read_config, | ||
1649 | .write = null_write_config, | ||
1650 | }; | ||
1651 | |||
1652 | /* | ||
1653 | * These functions are used early on before PCI scanning is done | ||
1654 | * and all of the pci_dev and pci_bus structures have been created. | ||
1655 | */ | ||
1656 | static struct pci_bus * | ||
1657 | fake_pci_bus(struct pci_controller *hose, int busnr) | ||
1658 | { | ||
1659 | static struct pci_bus bus; | ||
1660 | |||
1661 | if (hose == 0) { | ||
1662 | printk(KERN_ERR "Can't find hose for PCI bus %d!\n", busnr); | ||
1663 | } | ||
1664 | bus.number = busnr; | ||
1665 | bus.sysdata = hose; | ||
1666 | bus.ops = hose? hose->ops: &null_pci_ops; | ||
1667 | return &bus; | ||
1668 | } | ||
1669 | |||
1670 | #define EARLY_PCI_OP(rw, size, type) \ | ||
1671 | int early_##rw##_config_##size(struct pci_controller *hose, int bus, \ | ||
1672 | int devfn, int offset, type value) \ | ||
1673 | { \ | ||
1674 | return pci_bus_##rw##_config_##size(fake_pci_bus(hose, bus), \ | ||
1675 | devfn, offset, value); \ | ||
1676 | } | ||
1677 | |||
1678 | EARLY_PCI_OP(read, byte, u8 *) | ||
1679 | EARLY_PCI_OP(read, word, u16 *) | ||
1680 | EARLY_PCI_OP(read, dword, u32 *) | ||
1681 | EARLY_PCI_OP(write, byte, u8) | ||
1682 | EARLY_PCI_OP(write, word, u16) | ||
1683 | EARLY_PCI_OP(write, dword, u32) | ||
1684 | |||
1685 | extern int pci_bus_find_capability (struct pci_bus *bus, unsigned int devfn, int cap); | ||
1686 | int early_find_capability(struct pci_controller *hose, int bus, int devfn, | ||
1687 | int cap) | ||
1688 | { | ||
1689 | return pci_bus_find_capability(fake_pci_bus(hose, bus), devfn, cap); | ||
1690 | } | ||
1691 | |||
1692 | /** | ||
1693 | * pci_scan_phb - Given a pci_controller, setup and scan the PCI bus | ||
1694 | * @hose: Pointer to the PCI host controller instance structure | ||
1695 | * @sysdata: value to use for sysdata pointer. ppc32 and ppc64 differ here | ||
1696 | * | ||
1697 | * Note: the 'data' pointer is a temporary measure. As 32 and 64 bit | ||
1698 | * pci code gets merged, this parameter should become unnecessary because | ||
1699 | * both will use the same value. | ||
1700 | */ | ||
1701 | void __devinit pcibios_scan_phb(struct pci_controller *hose, void *sysdata) | ||
1702 | { | ||
1703 | struct pci_bus *bus; | ||
1704 | struct device_node *node = hose->dn; | ||
1705 | int mode; | ||
1706 | |||
1707 | pr_debug("PCI: Scanning PHB %s\n", | ||
1708 | node ? node->full_name : "<NO NAME>"); | ||
1709 | |||
1710 | /* Create an empty bus for the toplevel */ | ||
1711 | bus = pci_create_bus(hose->parent, hose->first_busno, hose->ops, | ||
1712 | sysdata); | ||
1713 | if (bus == NULL) { | ||
1714 | pr_err("Failed to create bus for PCI domain %04x\n", | ||
1715 | hose->global_number); | ||
1716 | return; | ||
1717 | } | ||
1718 | bus->secondary = hose->first_busno; | ||
1719 | hose->bus = bus; | ||
1720 | |||
1721 | /* Get some IO space for the new PHB */ | ||
1722 | pcibios_setup_phb_io_space(hose); | ||
1723 | |||
1724 | /* Wire up PHB bus resources */ | ||
1725 | pcibios_setup_phb_resources(hose); | ||
1726 | |||
1727 | /* Get probe mode and perform scan */ | ||
1728 | mode = PCI_PROBE_NORMAL; | ||
1729 | if (node && ppc_md.pci_probe_mode) | ||
1730 | mode = ppc_md.pci_probe_mode(bus); | ||
1731 | pr_debug(" probe mode: %d\n", mode); | ||
1732 | if (mode == PCI_PROBE_DEVTREE) { | ||
1733 | bus->subordinate = hose->last_busno; | ||
1734 | of_scan_bus(node, bus); | ||
1735 | } | ||
1736 | |||
1737 | if (mode == PCI_PROBE_NORMAL) | ||
1738 | hose->last_busno = bus->subordinate = pci_scan_child_bus(bus); | ||
1739 | } | ||
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c index 3ae1c666ff92..c13668cf36d9 100644 --- a/arch/powerpc/kernel/pci_32.c +++ b/arch/powerpc/kernel/pci_32.c | |||
@@ -34,9 +34,7 @@ int pcibios_assign_bus_offset = 1; | |||
34 | void pcibios_make_OF_bus_map(void); | 34 | void pcibios_make_OF_bus_map(void); |
35 | 35 | ||
36 | static void fixup_cpc710_pci64(struct pci_dev* dev); | 36 | static void fixup_cpc710_pci64(struct pci_dev* dev); |
37 | #ifdef CONFIG_PPC_OF | ||
38 | static u8* pci_to_OF_bus_map; | 37 | static u8* pci_to_OF_bus_map; |
39 | #endif | ||
40 | 38 | ||
41 | /* By default, we don't re-assign bus numbers. We do this only on | 39 | /* By default, we don't re-assign bus numbers. We do this only on |
42 | * some pmacs | 40 | * some pmacs |
@@ -83,7 +81,6 @@ fixup_cpc710_pci64(struct pci_dev* dev) | |||
83 | } | 81 | } |
84 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CPC710_PCI64, fixup_cpc710_pci64); | 82 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CPC710_PCI64, fixup_cpc710_pci64); |
85 | 83 | ||
86 | #ifdef CONFIG_PPC_OF | ||
87 | /* | 84 | /* |
88 | * Functions below are used on OpenFirmware machines. | 85 | * Functions below are used on OpenFirmware machines. |
89 | */ | 86 | */ |
@@ -357,42 +354,15 @@ pci_create_OF_bus_map(void) | |||
357 | } | 354 | } |
358 | } | 355 | } |
359 | 356 | ||
360 | #else /* CONFIG_PPC_OF */ | 357 | void __devinit pcibios_setup_phb_io_space(struct pci_controller *hose) |
361 | void pcibios_make_OF_bus_map(void) | ||
362 | { | 358 | { |
363 | } | ||
364 | #endif /* CONFIG_PPC_OF */ | ||
365 | |||
366 | static void __devinit pcibios_scan_phb(struct pci_controller *hose) | ||
367 | { | ||
368 | struct pci_bus *bus; | ||
369 | struct device_node *node = hose->dn; | ||
370 | unsigned long io_offset; | 359 | unsigned long io_offset; |
371 | struct resource *res = &hose->io_resource; | 360 | struct resource *res = &hose->io_resource; |
372 | 361 | ||
373 | pr_debug("PCI: Scanning PHB %s\n", | ||
374 | node ? node->full_name : "<NO NAME>"); | ||
375 | |||
376 | /* Create an empty bus for the toplevel */ | ||
377 | bus = pci_create_bus(hose->parent, hose->first_busno, hose->ops, hose); | ||
378 | if (bus == NULL) { | ||
379 | printk(KERN_ERR "Failed to create bus for PCI domain %04x\n", | ||
380 | hose->global_number); | ||
381 | return; | ||
382 | } | ||
383 | bus->secondary = hose->first_busno; | ||
384 | hose->bus = bus; | ||
385 | |||
386 | /* Fixup IO space offset */ | 362 | /* Fixup IO space offset */ |
387 | io_offset = (unsigned long)hose->io_base_virt - isa_io_base; | 363 | io_offset = (unsigned long)hose->io_base_virt - isa_io_base; |
388 | res->start = (res->start + io_offset) & 0xffffffffu; | 364 | res->start = (res->start + io_offset) & 0xffffffffu; |
389 | res->end = (res->end + io_offset) & 0xffffffffu; | 365 | res->end = (res->end + io_offset) & 0xffffffffu; |
390 | |||
391 | /* Wire up PHB bus resources */ | ||
392 | pcibios_setup_phb_resources(hose); | ||
393 | |||
394 | /* Scan children */ | ||
395 | hose->last_busno = bus->subordinate = pci_scan_child_bus(bus); | ||
396 | } | 366 | } |
397 | 367 | ||
398 | static int __init pcibios_init(void) | 368 | static int __init pcibios_init(void) |
@@ -410,7 +380,7 @@ static int __init pcibios_init(void) | |||
410 | if (pci_assign_all_buses) | 380 | if (pci_assign_all_buses) |
411 | hose->first_busno = next_busno; | 381 | hose->first_busno = next_busno; |
412 | hose->last_busno = 0xff; | 382 | hose->last_busno = 0xff; |
413 | pcibios_scan_phb(hose); | 383 | pcibios_scan_phb(hose, hose); |
414 | pci_bus_add_devices(hose->bus); | 384 | pci_bus_add_devices(hose->bus); |
415 | if (pci_assign_all_buses || next_busno <= hose->last_busno) | 385 | if (pci_assign_all_buses || next_busno <= hose->last_busno) |
416 | next_busno = hose->last_busno + pcibios_assign_bus_offset; | 386 | next_busno = hose->last_busno + pcibios_assign_bus_offset; |
@@ -478,75 +448,4 @@ long sys_pciconfig_iobase(long which, unsigned long bus, unsigned long devfn) | |||
478 | return result; | 448 | return result; |
479 | } | 449 | } |
480 | 450 | ||
481 | /* | ||
482 | * Null PCI config access functions, for the case when we can't | ||
483 | * find a hose. | ||
484 | */ | ||
485 | #define NULL_PCI_OP(rw, size, type) \ | ||
486 | static int \ | ||
487 | null_##rw##_config_##size(struct pci_dev *dev, int offset, type val) \ | ||
488 | { \ | ||
489 | return PCIBIOS_DEVICE_NOT_FOUND; \ | ||
490 | } | ||
491 | 451 | ||
492 | static int | ||
493 | null_read_config(struct pci_bus *bus, unsigned int devfn, int offset, | ||
494 | int len, u32 *val) | ||
495 | { | ||
496 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
497 | } | ||
498 | |||
499 | static int | ||
500 | null_write_config(struct pci_bus *bus, unsigned int devfn, int offset, | ||
501 | int len, u32 val) | ||
502 | { | ||
503 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
504 | } | ||
505 | |||
506 | static struct pci_ops null_pci_ops = | ||
507 | { | ||
508 | .read = null_read_config, | ||
509 | .write = null_write_config, | ||
510 | }; | ||
511 | |||
512 | /* | ||
513 | * These functions are used early on before PCI scanning is done | ||
514 | * and all of the pci_dev and pci_bus structures have been created. | ||
515 | */ | ||
516 | static struct pci_bus * | ||
517 | fake_pci_bus(struct pci_controller *hose, int busnr) | ||
518 | { | ||
519 | static struct pci_bus bus; | ||
520 | |||
521 | if (hose == 0) { | ||
522 | hose = pci_bus_to_hose(busnr); | ||
523 | if (hose == 0) | ||
524 | printk(KERN_ERR "Can't find hose for PCI bus %d!\n", busnr); | ||
525 | } | ||
526 | bus.number = busnr; | ||
527 | bus.sysdata = hose; | ||
528 | bus.ops = hose? hose->ops: &null_pci_ops; | ||
529 | return &bus; | ||
530 | } | ||
531 | |||
532 | #define EARLY_PCI_OP(rw, size, type) \ | ||
533 | int early_##rw##_config_##size(struct pci_controller *hose, int bus, \ | ||
534 | int devfn, int offset, type value) \ | ||
535 | { \ | ||
536 | return pci_bus_##rw##_config_##size(fake_pci_bus(hose, bus), \ | ||
537 | devfn, offset, value); \ | ||
538 | } | ||
539 | |||
540 | EARLY_PCI_OP(read, byte, u8 *) | ||
541 | EARLY_PCI_OP(read, word, u16 *) | ||
542 | EARLY_PCI_OP(read, dword, u32 *) | ||
543 | EARLY_PCI_OP(write, byte, u8) | ||
544 | EARLY_PCI_OP(write, word, u16) | ||
545 | EARLY_PCI_OP(write, dword, u32) | ||
546 | |||
547 | extern int pci_bus_find_capability (struct pci_bus *bus, unsigned int devfn, int cap); | ||
548 | int early_find_capability(struct pci_controller *hose, int bus, int devfn, | ||
549 | int cap) | ||
550 | { | ||
551 | return pci_bus_find_capability(fake_pci_bus(hose, bus), devfn, cap); | ||
552 | } | ||
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index 9e8902fa14c7..ba949a2c93ac 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c | |||
@@ -43,334 +43,6 @@ unsigned long pci_probe_only = 1; | |||
43 | unsigned long pci_io_base = ISA_IO_BASE; | 43 | unsigned long pci_io_base = ISA_IO_BASE; |
44 | EXPORT_SYMBOL(pci_io_base); | 44 | EXPORT_SYMBOL(pci_io_base); |
45 | 45 | ||
46 | static u32 get_int_prop(struct device_node *np, const char *name, u32 def) | ||
47 | { | ||
48 | const u32 *prop; | ||
49 | int len; | ||
50 | |||
51 | prop = of_get_property(np, name, &len); | ||
52 | if (prop && len >= 4) | ||
53 | return *prop; | ||
54 | return def; | ||
55 | } | ||
56 | |||
57 | static unsigned int pci_parse_of_flags(u32 addr0, int bridge) | ||
58 | { | ||
59 | unsigned int flags = 0; | ||
60 | |||
61 | if (addr0 & 0x02000000) { | ||
62 | flags = IORESOURCE_MEM | PCI_BASE_ADDRESS_SPACE_MEMORY; | ||
63 | flags |= (addr0 >> 22) & PCI_BASE_ADDRESS_MEM_TYPE_64; | ||
64 | flags |= (addr0 >> 28) & PCI_BASE_ADDRESS_MEM_TYPE_1M; | ||
65 | if (addr0 & 0x40000000) | ||
66 | flags |= IORESOURCE_PREFETCH | ||
67 | | PCI_BASE_ADDRESS_MEM_PREFETCH; | ||
68 | /* Note: We don't know whether the ROM has been left enabled | ||
69 | * by the firmware or not. We mark it as disabled (ie, we do | ||
70 | * not set the IORESOURCE_ROM_ENABLE flag) for now rather than | ||
71 | * do a config space read, it will be force-enabled if needed | ||
72 | */ | ||
73 | if (!bridge && (addr0 & 0xff) == 0x30) | ||
74 | flags |= IORESOURCE_READONLY; | ||
75 | } else if (addr0 & 0x01000000) | ||
76 | flags = IORESOURCE_IO | PCI_BASE_ADDRESS_SPACE_IO; | ||
77 | if (flags) | ||
78 | flags |= IORESOURCE_SIZEALIGN; | ||
79 | return flags; | ||
80 | } | ||
81 | |||
82 | |||
83 | static void pci_parse_of_addrs(struct device_node *node, struct pci_dev *dev) | ||
84 | { | ||
85 | u64 base, size; | ||
86 | unsigned int flags; | ||
87 | struct resource *res; | ||
88 | const u32 *addrs; | ||
89 | u32 i; | ||
90 | int proplen; | ||
91 | |||
92 | addrs = of_get_property(node, "assigned-addresses", &proplen); | ||
93 | if (!addrs) | ||
94 | return; | ||
95 | pr_debug(" parse addresses (%d bytes) @ %p\n", proplen, addrs); | ||
96 | for (; proplen >= 20; proplen -= 20, addrs += 5) { | ||
97 | flags = pci_parse_of_flags(addrs[0], 0); | ||
98 | if (!flags) | ||
99 | continue; | ||
100 | base = of_read_number(&addrs[1], 2); | ||
101 | size = of_read_number(&addrs[3], 2); | ||
102 | if (!size) | ||
103 | continue; | ||
104 | i = addrs[0] & 0xff; | ||
105 | pr_debug(" base: %llx, size: %llx, i: %x\n", | ||
106 | (unsigned long long)base, | ||
107 | (unsigned long long)size, i); | ||
108 | |||
109 | if (PCI_BASE_ADDRESS_0 <= i && i <= PCI_BASE_ADDRESS_5) { | ||
110 | res = &dev->resource[(i - PCI_BASE_ADDRESS_0) >> 2]; | ||
111 | } else if (i == dev->rom_base_reg) { | ||
112 | res = &dev->resource[PCI_ROM_RESOURCE]; | ||
113 | flags |= IORESOURCE_READONLY | IORESOURCE_CACHEABLE; | ||
114 | } else { | ||
115 | printk(KERN_ERR "PCI: bad cfg reg num 0x%x\n", i); | ||
116 | continue; | ||
117 | } | ||
118 | res->start = base; | ||
119 | res->end = base + size - 1; | ||
120 | res->flags = flags; | ||
121 | res->name = pci_name(dev); | ||
122 | } | ||
123 | } | ||
124 | |||
125 | struct pci_dev *of_create_pci_dev(struct device_node *node, | ||
126 | struct pci_bus *bus, int devfn) | ||
127 | { | ||
128 | struct pci_dev *dev; | ||
129 | const char *type; | ||
130 | |||
131 | dev = alloc_pci_dev(); | ||
132 | if (!dev) | ||
133 | return NULL; | ||
134 | type = of_get_property(node, "device_type", NULL); | ||
135 | if (type == NULL) | ||
136 | type = ""; | ||
137 | |||
138 | pr_debug(" create device, devfn: %x, type: %s\n", devfn, type); | ||
139 | |||
140 | dev->bus = bus; | ||
141 | dev->sysdata = node; | ||
142 | dev->dev.parent = bus->bridge; | ||
143 | dev->dev.bus = &pci_bus_type; | ||
144 | dev->devfn = devfn; | ||
145 | dev->multifunction = 0; /* maybe a lie? */ | ||
146 | |||
147 | dev->vendor = get_int_prop(node, "vendor-id", 0xffff); | ||
148 | dev->device = get_int_prop(node, "device-id", 0xffff); | ||
149 | dev->subsystem_vendor = get_int_prop(node, "subsystem-vendor-id", 0); | ||
150 | dev->subsystem_device = get_int_prop(node, "subsystem-id", 0); | ||
151 | |||
152 | dev->cfg_size = pci_cfg_space_size(dev); | ||
153 | |||
154 | dev_set_name(&dev->dev, "%04x:%02x:%02x.%d", pci_domain_nr(bus), | ||
155 | dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); | ||
156 | dev->class = get_int_prop(node, "class-code", 0); | ||
157 | dev->revision = get_int_prop(node, "revision-id", 0); | ||
158 | |||
159 | pr_debug(" class: 0x%x\n", dev->class); | ||
160 | pr_debug(" revision: 0x%x\n", dev->revision); | ||
161 | |||
162 | dev->current_state = 4; /* unknown power state */ | ||
163 | dev->error_state = pci_channel_io_normal; | ||
164 | dev->dma_mask = 0xffffffff; | ||
165 | |||
166 | if (!strcmp(type, "pci") || !strcmp(type, "pciex")) { | ||
167 | /* a PCI-PCI bridge */ | ||
168 | dev->hdr_type = PCI_HEADER_TYPE_BRIDGE; | ||
169 | dev->rom_base_reg = PCI_ROM_ADDRESS1; | ||
170 | } else if (!strcmp(type, "cardbus")) { | ||
171 | dev->hdr_type = PCI_HEADER_TYPE_CARDBUS; | ||
172 | } else { | ||
173 | dev->hdr_type = PCI_HEADER_TYPE_NORMAL; | ||
174 | dev->rom_base_reg = PCI_ROM_ADDRESS; | ||
175 | /* Maybe do a default OF mapping here */ | ||
176 | dev->irq = NO_IRQ; | ||
177 | } | ||
178 | |||
179 | pci_parse_of_addrs(node, dev); | ||
180 | |||
181 | pr_debug(" adding to system ...\n"); | ||
182 | |||
183 | pci_device_add(dev, bus); | ||
184 | |||
185 | return dev; | ||
186 | } | ||
187 | EXPORT_SYMBOL(of_create_pci_dev); | ||
188 | |||
189 | static void __devinit __of_scan_bus(struct device_node *node, | ||
190 | struct pci_bus *bus, int rescan_existing) | ||
191 | { | ||
192 | struct device_node *child; | ||
193 | const u32 *reg; | ||
194 | int reglen, devfn; | ||
195 | struct pci_dev *dev; | ||
196 | |||
197 | pr_debug("of_scan_bus(%s) bus no %d... \n", | ||
198 | node->full_name, bus->number); | ||
199 | |||
200 | /* Scan direct children */ | ||
201 | for_each_child_of_node(node, child) { | ||
202 | pr_debug(" * %s\n", child->full_name); | ||
203 | reg = of_get_property(child, "reg", ®len); | ||
204 | if (reg == NULL || reglen < 20) | ||
205 | continue; | ||
206 | devfn = (reg[0] >> 8) & 0xff; | ||
207 | |||
208 | /* create a new pci_dev for this device */ | ||
209 | dev = of_create_pci_dev(child, bus, devfn); | ||
210 | if (!dev) | ||
211 | continue; | ||
212 | pr_debug(" dev header type: %x\n", dev->hdr_type); | ||
213 | } | ||
214 | |||
215 | /* Apply all fixups necessary. We don't fixup the bus "self" | ||
216 | * for an existing bridge that is being rescanned | ||
217 | */ | ||
218 | if (!rescan_existing) | ||
219 | pcibios_setup_bus_self(bus); | ||
220 | pcibios_setup_bus_devices(bus); | ||
221 | |||
222 | /* Now scan child busses */ | ||
223 | list_for_each_entry(dev, &bus->devices, bus_list) { | ||
224 | if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE || | ||
225 | dev->hdr_type == PCI_HEADER_TYPE_CARDBUS) { | ||
226 | struct device_node *child = pci_device_to_OF_node(dev); | ||
227 | if (dev) | ||
228 | of_scan_pci_bridge(child, dev); | ||
229 | } | ||
230 | } | ||
231 | } | ||
232 | |||
233 | void __devinit of_scan_bus(struct device_node *node, | ||
234 | struct pci_bus *bus) | ||
235 | { | ||
236 | __of_scan_bus(node, bus, 0); | ||
237 | } | ||
238 | EXPORT_SYMBOL_GPL(of_scan_bus); | ||
239 | |||
240 | void __devinit of_rescan_bus(struct device_node *node, | ||
241 | struct pci_bus *bus) | ||
242 | { | ||
243 | __of_scan_bus(node, bus, 1); | ||
244 | } | ||
245 | EXPORT_SYMBOL_GPL(of_rescan_bus); | ||
246 | |||
247 | void __devinit of_scan_pci_bridge(struct device_node *node, | ||
248 | struct pci_dev *dev) | ||
249 | { | ||
250 | struct pci_bus *bus; | ||
251 | const u32 *busrange, *ranges; | ||
252 | int len, i, mode; | ||
253 | struct resource *res; | ||
254 | unsigned int flags; | ||
255 | u64 size; | ||
256 | |||
257 | pr_debug("of_scan_pci_bridge(%s)\n", node->full_name); | ||
258 | |||
259 | /* parse bus-range property */ | ||
260 | busrange = of_get_property(node, "bus-range", &len); | ||
261 | if (busrange == NULL || len != 8) { | ||
262 | printk(KERN_DEBUG "Can't get bus-range for PCI-PCI bridge %s\n", | ||
263 | node->full_name); | ||
264 | return; | ||
265 | } | ||
266 | ranges = of_get_property(node, "ranges", &len); | ||
267 | if (ranges == NULL) { | ||
268 | printk(KERN_DEBUG "Can't get ranges for PCI-PCI bridge %s\n", | ||
269 | node->full_name); | ||
270 | return; | ||
271 | } | ||
272 | |||
273 | bus = pci_add_new_bus(dev->bus, dev, busrange[0]); | ||
274 | if (!bus) { | ||
275 | printk(KERN_ERR "Failed to create pci bus for %s\n", | ||
276 | node->full_name); | ||
277 | return; | ||
278 | } | ||
279 | |||
280 | bus->primary = dev->bus->number; | ||
281 | bus->subordinate = busrange[1]; | ||
282 | bus->bridge_ctl = 0; | ||
283 | bus->sysdata = node; | ||
284 | |||
285 | /* parse ranges property */ | ||
286 | /* PCI #address-cells == 3 and #size-cells == 2 always */ | ||
287 | res = &dev->resource[PCI_BRIDGE_RESOURCES]; | ||
288 | for (i = 0; i < PCI_NUM_RESOURCES - PCI_BRIDGE_RESOURCES; ++i) { | ||
289 | res->flags = 0; | ||
290 | bus->resource[i] = res; | ||
291 | ++res; | ||
292 | } | ||
293 | i = 1; | ||
294 | for (; len >= 32; len -= 32, ranges += 8) { | ||
295 | flags = pci_parse_of_flags(ranges[0], 1); | ||
296 | size = of_read_number(&ranges[6], 2); | ||
297 | if (flags == 0 || size == 0) | ||
298 | continue; | ||
299 | if (flags & IORESOURCE_IO) { | ||
300 | res = bus->resource[0]; | ||
301 | if (res->flags) { | ||
302 | printk(KERN_ERR "PCI: ignoring extra I/O range" | ||
303 | " for bridge %s\n", node->full_name); | ||
304 | continue; | ||
305 | } | ||
306 | } else { | ||
307 | if (i >= PCI_NUM_RESOURCES - PCI_BRIDGE_RESOURCES) { | ||
308 | printk(KERN_ERR "PCI: too many memory ranges" | ||
309 | " for bridge %s\n", node->full_name); | ||
310 | continue; | ||
311 | } | ||
312 | res = bus->resource[i]; | ||
313 | ++i; | ||
314 | } | ||
315 | res->start = of_read_number(&ranges[1], 2); | ||
316 | res->end = res->start + size - 1; | ||
317 | res->flags = flags; | ||
318 | } | ||
319 | sprintf(bus->name, "PCI Bus %04x:%02x", pci_domain_nr(bus), | ||
320 | bus->number); | ||
321 | pr_debug(" bus name: %s\n", bus->name); | ||
322 | |||
323 | mode = PCI_PROBE_NORMAL; | ||
324 | if (ppc_md.pci_probe_mode) | ||
325 | mode = ppc_md.pci_probe_mode(bus); | ||
326 | pr_debug(" probe mode: %d\n", mode); | ||
327 | |||
328 | if (mode == PCI_PROBE_DEVTREE) | ||
329 | of_scan_bus(node, bus); | ||
330 | else if (mode == PCI_PROBE_NORMAL) | ||
331 | pci_scan_child_bus(bus); | ||
332 | } | ||
333 | EXPORT_SYMBOL(of_scan_pci_bridge); | ||
334 | |||
335 | void __devinit scan_phb(struct pci_controller *hose) | ||
336 | { | ||
337 | struct pci_bus *bus; | ||
338 | struct device_node *node = hose->dn; | ||
339 | int mode; | ||
340 | |||
341 | pr_debug("PCI: Scanning PHB %s\n", | ||
342 | node ? node->full_name : "<NO NAME>"); | ||
343 | |||
344 | /* Create an empty bus for the toplevel */ | ||
345 | bus = pci_create_bus(hose->parent, hose->first_busno, hose->ops, node); | ||
346 | if (bus == NULL) { | ||
347 | printk(KERN_ERR "Failed to create bus for PCI domain %04x\n", | ||
348 | hose->global_number); | ||
349 | return; | ||
350 | } | ||
351 | bus->secondary = hose->first_busno; | ||
352 | hose->bus = bus; | ||
353 | |||
354 | /* Get some IO space for the new PHB */ | ||
355 | pcibios_map_io_space(bus); | ||
356 | |||
357 | /* Wire up PHB bus resources */ | ||
358 | pcibios_setup_phb_resources(hose); | ||
359 | |||
360 | /* Get probe mode and perform scan */ | ||
361 | mode = PCI_PROBE_NORMAL; | ||
362 | if (node && ppc_md.pci_probe_mode) | ||
363 | mode = ppc_md.pci_probe_mode(bus); | ||
364 | pr_debug(" probe mode: %d\n", mode); | ||
365 | if (mode == PCI_PROBE_DEVTREE) { | ||
366 | bus->subordinate = hose->last_busno; | ||
367 | of_scan_bus(node, bus); | ||
368 | } | ||
369 | |||
370 | if (mode == PCI_PROBE_NORMAL) | ||
371 | hose->last_busno = bus->subordinate = pci_scan_child_bus(bus); | ||
372 | } | ||
373 | |||
374 | static int __init pcibios_init(void) | 46 | static int __init pcibios_init(void) |
375 | { | 47 | { |
376 | struct pci_controller *hose, *tmp; | 48 | struct pci_controller *hose, *tmp; |
@@ -392,7 +64,7 @@ static int __init pcibios_init(void) | |||
392 | 64 | ||
393 | /* Scan all of the recorded PCI controllers. */ | 65 | /* Scan all of the recorded PCI controllers. */ |
394 | list_for_each_entry_safe(hose, tmp, &hose_list, list_node) { | 66 | list_for_each_entry_safe(hose, tmp, &hose_list, list_node) { |
395 | scan_phb(hose); | 67 | pcibios_scan_phb(hose, hose->dn); |
396 | pci_bus_add_devices(hose->bus); | 68 | pci_bus_add_devices(hose->bus); |
397 | } | 69 | } |
398 | 70 | ||
@@ -526,6 +198,11 @@ int __devinit pcibios_map_io_space(struct pci_bus *bus) | |||
526 | } | 198 | } |
527 | EXPORT_SYMBOL_GPL(pcibios_map_io_space); | 199 | EXPORT_SYMBOL_GPL(pcibios_map_io_space); |
528 | 200 | ||
201 | void __devinit pcibios_setup_phb_io_space(struct pci_controller *hose) | ||
202 | { | ||
203 | pcibios_map_io_space(hose->bus); | ||
204 | } | ||
205 | |||
529 | #define IOBASE_BRIDGE_NUMBER 0 | 206 | #define IOBASE_BRIDGE_NUMBER 0 |
530 | #define IOBASE_MEMORY 1 | 207 | #define IOBASE_MEMORY 1 |
531 | #define IOBASE_IO 2 | 208 | #define IOBASE_IO 2 |
diff --git a/arch/powerpc/kernel/pci_of_scan.c b/arch/powerpc/kernel/pci_of_scan.c new file mode 100644 index 000000000000..72c31bcb7aa4 --- /dev/null +++ b/arch/powerpc/kernel/pci_of_scan.c | |||
@@ -0,0 +1,358 @@ | |||
1 | /* | ||
2 | * Helper routines to scan the device tree for PCI devices and busses | ||
3 | * | ||
4 | * Migrated out of PowerPC architecture pci_64.c file by Grant Likely | ||
5 | * <grant.likely@secretlab.ca> so that these routines are available for | ||
6 | * 32 bit also. | ||
7 | * | ||
8 | * Copyright (C) 2003 Anton Blanchard <anton@au.ibm.com>, IBM | ||
9 | * Rework, based on alpha PCI code. | ||
10 | * Copyright (c) 2009 Secret Lab Technologies Ltd. | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * version 2 as published by the Free Software Foundation. | ||
15 | */ | ||
16 | |||
17 | #include <linux/pci.h> | ||
18 | #include <asm/pci-bridge.h> | ||
19 | #include <asm/prom.h> | ||
20 | |||
21 | /** | ||
22 | * get_int_prop - Decode a u32 from a device tree property | ||
23 | */ | ||
24 | static u32 get_int_prop(struct device_node *np, const char *name, u32 def) | ||
25 | { | ||
26 | const u32 *prop; | ||
27 | int len; | ||
28 | |||
29 | prop = of_get_property(np, name, &len); | ||
30 | if (prop && len >= 4) | ||
31 | return *prop; | ||
32 | return def; | ||
33 | } | ||
34 | |||
35 | /** | ||
36 | * pci_parse_of_flags - Parse the flags cell of a device tree PCI address | ||
37 | * @addr0: value of 1st cell of a device tree PCI address. | ||
38 | * @bridge: Set this flag if the address is from a bridge 'ranges' property | ||
39 | */ | ||
40 | unsigned int pci_parse_of_flags(u32 addr0, int bridge) | ||
41 | { | ||
42 | unsigned int flags = 0; | ||
43 | |||
44 | if (addr0 & 0x02000000) { | ||
45 | flags = IORESOURCE_MEM | PCI_BASE_ADDRESS_SPACE_MEMORY; | ||
46 | flags |= (addr0 >> 22) & PCI_BASE_ADDRESS_MEM_TYPE_64; | ||
47 | flags |= (addr0 >> 28) & PCI_BASE_ADDRESS_MEM_TYPE_1M; | ||
48 | if (addr0 & 0x40000000) | ||
49 | flags |= IORESOURCE_PREFETCH | ||
50 | | PCI_BASE_ADDRESS_MEM_PREFETCH; | ||
51 | /* Note: We don't know whether the ROM has been left enabled | ||
52 | * by the firmware or not. We mark it as disabled (ie, we do | ||
53 | * not set the IORESOURCE_ROM_ENABLE flag) for now rather than | ||
54 | * do a config space read, it will be force-enabled if needed | ||
55 | */ | ||
56 | if (!bridge && (addr0 & 0xff) == 0x30) | ||
57 | flags |= IORESOURCE_READONLY; | ||
58 | } else if (addr0 & 0x01000000) | ||
59 | flags = IORESOURCE_IO | PCI_BASE_ADDRESS_SPACE_IO; | ||
60 | if (flags) | ||
61 | flags |= IORESOURCE_SIZEALIGN; | ||
62 | return flags; | ||
63 | } | ||
64 | |||
65 | /** | ||
66 | * of_pci_parse_addrs - Parse PCI addresses assigned in the device tree node | ||
67 | * @node: device tree node for the PCI device | ||
68 | * @dev: pci_dev structure for the device | ||
69 | * | ||
70 | * This function parses the 'assigned-addresses' property of a PCI devices' | ||
71 | * device tree node and writes them into the associated pci_dev structure. | ||
72 | */ | ||
73 | static void of_pci_parse_addrs(struct device_node *node, struct pci_dev *dev) | ||
74 | { | ||
75 | u64 base, size; | ||
76 | unsigned int flags; | ||
77 | struct resource *res; | ||
78 | const u32 *addrs; | ||
79 | u32 i; | ||
80 | int proplen; | ||
81 | |||
82 | addrs = of_get_property(node, "assigned-addresses", &proplen); | ||
83 | if (!addrs) | ||
84 | return; | ||
85 | pr_debug(" parse addresses (%d bytes) @ %p\n", proplen, addrs); | ||
86 | for (; proplen >= 20; proplen -= 20, addrs += 5) { | ||
87 | flags = pci_parse_of_flags(addrs[0], 0); | ||
88 | if (!flags) | ||
89 | continue; | ||
90 | base = of_read_number(&addrs[1], 2); | ||
91 | size = of_read_number(&addrs[3], 2); | ||
92 | if (!size) | ||
93 | continue; | ||
94 | i = addrs[0] & 0xff; | ||
95 | pr_debug(" base: %llx, size: %llx, i: %x\n", | ||
96 | (unsigned long long)base, | ||
97 | (unsigned long long)size, i); | ||
98 | |||
99 | if (PCI_BASE_ADDRESS_0 <= i && i <= PCI_BASE_ADDRESS_5) { | ||
100 | res = &dev->resource[(i - PCI_BASE_ADDRESS_0) >> 2]; | ||
101 | } else if (i == dev->rom_base_reg) { | ||
102 | res = &dev->resource[PCI_ROM_RESOURCE]; | ||
103 | flags |= IORESOURCE_READONLY | IORESOURCE_CACHEABLE; | ||
104 | } else { | ||
105 | printk(KERN_ERR "PCI: bad cfg reg num 0x%x\n", i); | ||
106 | continue; | ||
107 | } | ||
108 | res->start = base; | ||
109 | res->end = base + size - 1; | ||
110 | res->flags = flags; | ||
111 | res->name = pci_name(dev); | ||
112 | } | ||
113 | } | ||
114 | |||
115 | /** | ||
116 | * of_create_pci_dev - Given a device tree node on a pci bus, create a pci_dev | ||
117 | * @node: device tree node pointer | ||
118 | * @bus: bus the device is sitting on | ||
119 | * @devfn: PCI function number, extracted from device tree by caller. | ||
120 | */ | ||
121 | struct pci_dev *of_create_pci_dev(struct device_node *node, | ||
122 | struct pci_bus *bus, int devfn) | ||
123 | { | ||
124 | struct pci_dev *dev; | ||
125 | const char *type; | ||
126 | |||
127 | dev = alloc_pci_dev(); | ||
128 | if (!dev) | ||
129 | return NULL; | ||
130 | type = of_get_property(node, "device_type", NULL); | ||
131 | if (type == NULL) | ||
132 | type = ""; | ||
133 | |||
134 | pr_debug(" create device, devfn: %x, type: %s\n", devfn, type); | ||
135 | |||
136 | dev->bus = bus; | ||
137 | dev->sysdata = node; | ||
138 | dev->dev.parent = bus->bridge; | ||
139 | dev->dev.bus = &pci_bus_type; | ||
140 | dev->devfn = devfn; | ||
141 | dev->multifunction = 0; /* maybe a lie? */ | ||
142 | |||
143 | dev->vendor = get_int_prop(node, "vendor-id", 0xffff); | ||
144 | dev->device = get_int_prop(node, "device-id", 0xffff); | ||
145 | dev->subsystem_vendor = get_int_prop(node, "subsystem-vendor-id", 0); | ||
146 | dev->subsystem_device = get_int_prop(node, "subsystem-id", 0); | ||
147 | |||
148 | dev->cfg_size = pci_cfg_space_size(dev); | ||
149 | |||
150 | dev_set_name(&dev->dev, "%04x:%02x:%02x.%d", pci_domain_nr(bus), | ||
151 | dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); | ||
152 | dev->class = get_int_prop(node, "class-code", 0); | ||
153 | dev->revision = get_int_prop(node, "revision-id", 0); | ||
154 | |||
155 | pr_debug(" class: 0x%x\n", dev->class); | ||
156 | pr_debug(" revision: 0x%x\n", dev->revision); | ||
157 | |||
158 | dev->current_state = 4; /* unknown power state */ | ||
159 | dev->error_state = pci_channel_io_normal; | ||
160 | dev->dma_mask = 0xffffffff; | ||
161 | |||
162 | if (!strcmp(type, "pci") || !strcmp(type, "pciex")) { | ||
163 | /* a PCI-PCI bridge */ | ||
164 | dev->hdr_type = PCI_HEADER_TYPE_BRIDGE; | ||
165 | dev->rom_base_reg = PCI_ROM_ADDRESS1; | ||
166 | } else if (!strcmp(type, "cardbus")) { | ||
167 | dev->hdr_type = PCI_HEADER_TYPE_CARDBUS; | ||
168 | } else { | ||
169 | dev->hdr_type = PCI_HEADER_TYPE_NORMAL; | ||
170 | dev->rom_base_reg = PCI_ROM_ADDRESS; | ||
171 | /* Maybe do a default OF mapping here */ | ||
172 | dev->irq = NO_IRQ; | ||
173 | } | ||
174 | |||
175 | of_pci_parse_addrs(node, dev); | ||
176 | |||
177 | pr_debug(" adding to system ...\n"); | ||
178 | |||
179 | pci_device_add(dev, bus); | ||
180 | |||
181 | return dev; | ||
182 | } | ||
183 | EXPORT_SYMBOL(of_create_pci_dev); | ||
184 | |||
185 | /** | ||
186 | * of_scan_pci_bridge - Set up a PCI bridge and scan for child nodes | ||
187 | * @node: device tree node of bridge | ||
188 | * @dev: pci_dev structure for the bridge | ||
189 | * | ||
190 | * of_scan_bus() calls this routine for each PCI bridge that it finds, and | ||
191 | * this routine in turn call of_scan_bus() recusively to scan for more child | ||
192 | * devices. | ||
193 | */ | ||
194 | void __devinit of_scan_pci_bridge(struct device_node *node, | ||
195 | struct pci_dev *dev) | ||
196 | { | ||
197 | struct pci_bus *bus; | ||
198 | const u32 *busrange, *ranges; | ||
199 | int len, i, mode; | ||
200 | struct resource *res; | ||
201 | unsigned int flags; | ||
202 | u64 size; | ||
203 | |||
204 | pr_debug("of_scan_pci_bridge(%s)\n", node->full_name); | ||
205 | |||
206 | /* parse bus-range property */ | ||
207 | busrange = of_get_property(node, "bus-range", &len); | ||
208 | if (busrange == NULL || len != 8) { | ||
209 | printk(KERN_DEBUG "Can't get bus-range for PCI-PCI bridge %s\n", | ||
210 | node->full_name); | ||
211 | return; | ||
212 | } | ||
213 | ranges = of_get_property(node, "ranges", &len); | ||
214 | if (ranges == NULL) { | ||
215 | printk(KERN_DEBUG "Can't get ranges for PCI-PCI bridge %s\n", | ||
216 | node->full_name); | ||
217 | return; | ||
218 | } | ||
219 | |||
220 | bus = pci_add_new_bus(dev->bus, dev, busrange[0]); | ||
221 | if (!bus) { | ||
222 | printk(KERN_ERR "Failed to create pci bus for %s\n", | ||
223 | node->full_name); | ||
224 | return; | ||
225 | } | ||
226 | |||
227 | bus->primary = dev->bus->number; | ||
228 | bus->subordinate = busrange[1]; | ||
229 | bus->bridge_ctl = 0; | ||
230 | bus->sysdata = node; | ||
231 | |||
232 | /* parse ranges property */ | ||
233 | /* PCI #address-cells == 3 and #size-cells == 2 always */ | ||
234 | res = &dev->resource[PCI_BRIDGE_RESOURCES]; | ||
235 | for (i = 0; i < PCI_NUM_RESOURCES - PCI_BRIDGE_RESOURCES; ++i) { | ||
236 | res->flags = 0; | ||
237 | bus->resource[i] = res; | ||
238 | ++res; | ||
239 | } | ||
240 | i = 1; | ||
241 | for (; len >= 32; len -= 32, ranges += 8) { | ||
242 | flags = pci_parse_of_flags(ranges[0], 1); | ||
243 | size = of_read_number(&ranges[6], 2); | ||
244 | if (flags == 0 || size == 0) | ||
245 | continue; | ||
246 | if (flags & IORESOURCE_IO) { | ||
247 | res = bus->resource[0]; | ||
248 | if (res->flags) { | ||
249 | printk(KERN_ERR "PCI: ignoring extra I/O range" | ||
250 | " for bridge %s\n", node->full_name); | ||
251 | continue; | ||
252 | } | ||
253 | } else { | ||
254 | if (i >= PCI_NUM_RESOURCES - PCI_BRIDGE_RESOURCES) { | ||
255 | printk(KERN_ERR "PCI: too many memory ranges" | ||
256 | " for bridge %s\n", node->full_name); | ||
257 | continue; | ||
258 | } | ||
259 | res = bus->resource[i]; | ||
260 | ++i; | ||
261 | } | ||
262 | res->start = of_read_number(&ranges[1], 2); | ||
263 | res->end = res->start + size - 1; | ||
264 | res->flags = flags; | ||
265 | } | ||
266 | sprintf(bus->name, "PCI Bus %04x:%02x", pci_domain_nr(bus), | ||
267 | bus->number); | ||
268 | pr_debug(" bus name: %s\n", bus->name); | ||
269 | |||
270 | mode = PCI_PROBE_NORMAL; | ||
271 | if (ppc_md.pci_probe_mode) | ||
272 | mode = ppc_md.pci_probe_mode(bus); | ||
273 | pr_debug(" probe mode: %d\n", mode); | ||
274 | |||
275 | if (mode == PCI_PROBE_DEVTREE) | ||
276 | of_scan_bus(node, bus); | ||
277 | else if (mode == PCI_PROBE_NORMAL) | ||
278 | pci_scan_child_bus(bus); | ||
279 | } | ||
280 | EXPORT_SYMBOL(of_scan_pci_bridge); | ||
281 | |||
282 | /** | ||
283 | * __of_scan_bus - given a PCI bus node, setup bus and scan for child devices | ||
284 | * @node: device tree node for the PCI bus | ||
285 | * @bus: pci_bus structure for the PCI bus | ||
286 | * @rescan_existing: Flag indicating bus has already been set up | ||
287 | */ | ||
288 | static void __devinit __of_scan_bus(struct device_node *node, | ||
289 | struct pci_bus *bus, int rescan_existing) | ||
290 | { | ||
291 | struct device_node *child; | ||
292 | const u32 *reg; | ||
293 | int reglen, devfn; | ||
294 | struct pci_dev *dev; | ||
295 | |||
296 | pr_debug("of_scan_bus(%s) bus no %d... \n", | ||
297 | node->full_name, bus->number); | ||
298 | |||
299 | /* Scan direct children */ | ||
300 | for_each_child_of_node(node, child) { | ||
301 | pr_debug(" * %s\n", child->full_name); | ||
302 | reg = of_get_property(child, "reg", ®len); | ||
303 | if (reg == NULL || reglen < 20) | ||
304 | continue; | ||
305 | devfn = (reg[0] >> 8) & 0xff; | ||
306 | |||
307 | /* create a new pci_dev for this device */ | ||
308 | dev = of_create_pci_dev(child, bus, devfn); | ||
309 | if (!dev) | ||
310 | continue; | ||
311 | pr_debug(" dev header type: %x\n", dev->hdr_type); | ||
312 | } | ||
313 | |||
314 | /* Apply all fixups necessary. We don't fixup the bus "self" | ||
315 | * for an existing bridge that is being rescanned | ||
316 | */ | ||
317 | if (!rescan_existing) | ||
318 | pcibios_setup_bus_self(bus); | ||
319 | pcibios_setup_bus_devices(bus); | ||
320 | |||
321 | /* Now scan child busses */ | ||
322 | list_for_each_entry(dev, &bus->devices, bus_list) { | ||
323 | if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE || | ||
324 | dev->hdr_type == PCI_HEADER_TYPE_CARDBUS) { | ||
325 | struct device_node *child = pci_device_to_OF_node(dev); | ||
326 | if (dev) | ||
327 | of_scan_pci_bridge(child, dev); | ||
328 | } | ||
329 | } | ||
330 | } | ||
331 | |||
332 | /** | ||
333 | * of_scan_bus - given a PCI bus node, setup bus and scan for child devices | ||
334 | * @node: device tree node for the PCI bus | ||
335 | * @bus: pci_bus structure for the PCI bus | ||
336 | */ | ||
337 | void __devinit of_scan_bus(struct device_node *node, | ||
338 | struct pci_bus *bus) | ||
339 | { | ||
340 | __of_scan_bus(node, bus, 0); | ||
341 | } | ||
342 | EXPORT_SYMBOL_GPL(of_scan_bus); | ||
343 | |||
344 | /** | ||
345 | * of_rescan_bus - given a PCI bus node, scan for child devices | ||
346 | * @node: device tree node for the PCI bus | ||
347 | * @bus: pci_bus structure for the PCI bus | ||
348 | * | ||
349 | * Same as of_scan_bus, but for a pci_bus structure that has already been | ||
350 | * setup. | ||
351 | */ | ||
352 | void __devinit of_rescan_bus(struct device_node *node, | ||
353 | struct pci_bus *bus) | ||
354 | { | ||
355 | __of_scan_bus(node, bus, 1); | ||
356 | } | ||
357 | EXPORT_SYMBOL_GPL(of_rescan_bus); | ||
358 | |||
diff --git a/arch/powerpc/kernel/perf_counter.c b/arch/powerpc/kernel/perf_counter.c index 70e1f57f7dd8..7ceefaf3a7f5 100644 --- a/arch/powerpc/kernel/perf_counter.c +++ b/arch/powerpc/kernel/perf_counter.c | |||
@@ -32,6 +32,9 @@ struct cpu_hw_counters { | |||
32 | unsigned long mmcr[3]; | 32 | unsigned long mmcr[3]; |
33 | struct perf_counter *limited_counter[MAX_LIMITED_HWCOUNTERS]; | 33 | struct perf_counter *limited_counter[MAX_LIMITED_HWCOUNTERS]; |
34 | u8 limited_hwidx[MAX_LIMITED_HWCOUNTERS]; | 34 | u8 limited_hwidx[MAX_LIMITED_HWCOUNTERS]; |
35 | u64 alternatives[MAX_HWCOUNTERS][MAX_EVENT_ALTERNATIVES]; | ||
36 | unsigned long amasks[MAX_HWCOUNTERS][MAX_EVENT_ALTERNATIVES]; | ||
37 | unsigned long avalues[MAX_HWCOUNTERS][MAX_EVENT_ALTERNATIVES]; | ||
35 | }; | 38 | }; |
36 | DEFINE_PER_CPU(struct cpu_hw_counters, cpu_hw_counters); | 39 | DEFINE_PER_CPU(struct cpu_hw_counters, cpu_hw_counters); |
37 | 40 | ||
@@ -62,7 +65,6 @@ static inline unsigned long perf_ip_adjust(struct pt_regs *regs) | |||
62 | { | 65 | { |
63 | return 0; | 66 | return 0; |
64 | } | 67 | } |
65 | static inline void perf_set_pmu_inuse(int inuse) { } | ||
66 | static inline void perf_get_data_addr(struct pt_regs *regs, u64 *addrp) { } | 68 | static inline void perf_get_data_addr(struct pt_regs *regs, u64 *addrp) { } |
67 | static inline u32 perf_get_misc_flags(struct pt_regs *regs) | 69 | static inline u32 perf_get_misc_flags(struct pt_regs *regs) |
68 | { | 70 | { |
@@ -93,11 +95,6 @@ static inline unsigned long perf_ip_adjust(struct pt_regs *regs) | |||
93 | return 0; | 95 | return 0; |
94 | } | 96 | } |
95 | 97 | ||
96 | static inline void perf_set_pmu_inuse(int inuse) | ||
97 | { | ||
98 | get_lppaca()->pmcregs_in_use = inuse; | ||
99 | } | ||
100 | |||
101 | /* | 98 | /* |
102 | * The user wants a data address recorded. | 99 | * The user wants a data address recorded. |
103 | * If we're not doing instruction sampling, give them the SDAR | 100 | * If we're not doing instruction sampling, give them the SDAR |
@@ -245,13 +242,11 @@ static void write_pmc(int idx, unsigned long val) | |||
245 | * and see if any combination of alternative codes is feasible. | 242 | * and see if any combination of alternative codes is feasible. |
246 | * The feasible set is returned in event[]. | 243 | * The feasible set is returned in event[]. |
247 | */ | 244 | */ |
248 | static int power_check_constraints(u64 event[], unsigned int cflags[], | 245 | static int power_check_constraints(struct cpu_hw_counters *cpuhw, |
246 | u64 event[], unsigned int cflags[], | ||
249 | int n_ev) | 247 | int n_ev) |
250 | { | 248 | { |
251 | unsigned long mask, value, nv; | 249 | unsigned long mask, value, nv; |
252 | u64 alternatives[MAX_HWCOUNTERS][MAX_EVENT_ALTERNATIVES]; | ||
253 | unsigned long amasks[MAX_HWCOUNTERS][MAX_EVENT_ALTERNATIVES]; | ||
254 | unsigned long avalues[MAX_HWCOUNTERS][MAX_EVENT_ALTERNATIVES]; | ||
255 | unsigned long smasks[MAX_HWCOUNTERS], svalues[MAX_HWCOUNTERS]; | 250 | unsigned long smasks[MAX_HWCOUNTERS], svalues[MAX_HWCOUNTERS]; |
256 | int n_alt[MAX_HWCOUNTERS], choice[MAX_HWCOUNTERS]; | 251 | int n_alt[MAX_HWCOUNTERS], choice[MAX_HWCOUNTERS]; |
257 | int i, j; | 252 | int i, j; |
@@ -266,21 +261,23 @@ static int power_check_constraints(u64 event[], unsigned int cflags[], | |||
266 | if ((cflags[i] & PPMU_LIMITED_PMC_REQD) | 261 | if ((cflags[i] & PPMU_LIMITED_PMC_REQD) |
267 | && !ppmu->limited_pmc_event(event[i])) { | 262 | && !ppmu->limited_pmc_event(event[i])) { |
268 | ppmu->get_alternatives(event[i], cflags[i], | 263 | ppmu->get_alternatives(event[i], cflags[i], |
269 | alternatives[i]); | 264 | cpuhw->alternatives[i]); |
270 | event[i] = alternatives[i][0]; | 265 | event[i] = cpuhw->alternatives[i][0]; |
271 | } | 266 | } |
272 | if (ppmu->get_constraint(event[i], &amasks[i][0], | 267 | if (ppmu->get_constraint(event[i], &cpuhw->amasks[i][0], |
273 | &avalues[i][0])) | 268 | &cpuhw->avalues[i][0])) |
274 | return -1; | 269 | return -1; |
275 | } | 270 | } |
276 | value = mask = 0; | 271 | value = mask = 0; |
277 | for (i = 0; i < n_ev; ++i) { | 272 | for (i = 0; i < n_ev; ++i) { |
278 | nv = (value | avalues[i][0]) + (value & avalues[i][0] & addf); | 273 | nv = (value | cpuhw->avalues[i][0]) + |
274 | (value & cpuhw->avalues[i][0] & addf); | ||
279 | if ((((nv + tadd) ^ value) & mask) != 0 || | 275 | if ((((nv + tadd) ^ value) & mask) != 0 || |
280 | (((nv + tadd) ^ avalues[i][0]) & amasks[i][0]) != 0) | 276 | (((nv + tadd) ^ cpuhw->avalues[i][0]) & |
277 | cpuhw->amasks[i][0]) != 0) | ||
281 | break; | 278 | break; |
282 | value = nv; | 279 | value = nv; |
283 | mask |= amasks[i][0]; | 280 | mask |= cpuhw->amasks[i][0]; |
284 | } | 281 | } |
285 | if (i == n_ev) | 282 | if (i == n_ev) |
286 | return 0; /* all OK */ | 283 | return 0; /* all OK */ |
@@ -291,10 +288,11 @@ static int power_check_constraints(u64 event[], unsigned int cflags[], | |||
291 | for (i = 0; i < n_ev; ++i) { | 288 | for (i = 0; i < n_ev; ++i) { |
292 | choice[i] = 0; | 289 | choice[i] = 0; |
293 | n_alt[i] = ppmu->get_alternatives(event[i], cflags[i], | 290 | n_alt[i] = ppmu->get_alternatives(event[i], cflags[i], |
294 | alternatives[i]); | 291 | cpuhw->alternatives[i]); |
295 | for (j = 1; j < n_alt[i]; ++j) | 292 | for (j = 1; j < n_alt[i]; ++j) |
296 | ppmu->get_constraint(alternatives[i][j], | 293 | ppmu->get_constraint(cpuhw->alternatives[i][j], |
297 | &amasks[i][j], &avalues[i][j]); | 294 | &cpuhw->amasks[i][j], |
295 | &cpuhw->avalues[i][j]); | ||
298 | } | 296 | } |
299 | 297 | ||
300 | /* enumerate all possibilities and see if any will work */ | 298 | /* enumerate all possibilities and see if any will work */ |
@@ -313,11 +311,11 @@ static int power_check_constraints(u64 event[], unsigned int cflags[], | |||
313 | * where k > j, will satisfy the constraints. | 311 | * where k > j, will satisfy the constraints. |
314 | */ | 312 | */ |
315 | while (++j < n_alt[i]) { | 313 | while (++j < n_alt[i]) { |
316 | nv = (value | avalues[i][j]) + | 314 | nv = (value | cpuhw->avalues[i][j]) + |
317 | (value & avalues[i][j] & addf); | 315 | (value & cpuhw->avalues[i][j] & addf); |
318 | if ((((nv + tadd) ^ value) & mask) == 0 && | 316 | if ((((nv + tadd) ^ value) & mask) == 0 && |
319 | (((nv + tadd) ^ avalues[i][j]) | 317 | (((nv + tadd) ^ cpuhw->avalues[i][j]) |
320 | & amasks[i][j]) == 0) | 318 | & cpuhw->amasks[i][j]) == 0) |
321 | break; | 319 | break; |
322 | } | 320 | } |
323 | if (j >= n_alt[i]) { | 321 | if (j >= n_alt[i]) { |
@@ -339,7 +337,7 @@ static int power_check_constraints(u64 event[], unsigned int cflags[], | |||
339 | svalues[i] = value; | 337 | svalues[i] = value; |
340 | smasks[i] = mask; | 338 | smasks[i] = mask; |
341 | value = nv; | 339 | value = nv; |
342 | mask |= amasks[i][j]; | 340 | mask |= cpuhw->amasks[i][j]; |
343 | ++i; | 341 | ++i; |
344 | j = -1; | 342 | j = -1; |
345 | } | 343 | } |
@@ -347,7 +345,7 @@ static int power_check_constraints(u64 event[], unsigned int cflags[], | |||
347 | 345 | ||
348 | /* OK, we have a feasible combination, tell the caller the solution */ | 346 | /* OK, we have a feasible combination, tell the caller the solution */ |
349 | for (i = 0; i < n_ev; ++i) | 347 | for (i = 0; i < n_ev; ++i) |
350 | event[i] = alternatives[i][choice[i]]; | 348 | event[i] = cpuhw->alternatives[i][choice[i]]; |
351 | return 0; | 349 | return 0; |
352 | } | 350 | } |
353 | 351 | ||
@@ -531,8 +529,7 @@ void hw_perf_disable(void) | |||
531 | * Check if we ever enabled the PMU on this cpu. | 529 | * Check if we ever enabled the PMU on this cpu. |
532 | */ | 530 | */ |
533 | if (!cpuhw->pmcs_enabled) { | 531 | if (!cpuhw->pmcs_enabled) { |
534 | if (ppc_md.enable_pmcs) | 532 | ppc_enable_pmcs(); |
535 | ppc_md.enable_pmcs(); | ||
536 | cpuhw->pmcs_enabled = 1; | 533 | cpuhw->pmcs_enabled = 1; |
537 | } | 534 | } |
538 | 535 | ||
@@ -594,7 +591,7 @@ void hw_perf_enable(void) | |||
594 | mtspr(SPRN_MMCRA, cpuhw->mmcr[2] & ~MMCRA_SAMPLE_ENABLE); | 591 | mtspr(SPRN_MMCRA, cpuhw->mmcr[2] & ~MMCRA_SAMPLE_ENABLE); |
595 | mtspr(SPRN_MMCR1, cpuhw->mmcr[1]); | 592 | mtspr(SPRN_MMCR1, cpuhw->mmcr[1]); |
596 | if (cpuhw->n_counters == 0) | 593 | if (cpuhw->n_counters == 0) |
597 | perf_set_pmu_inuse(0); | 594 | ppc_set_pmu_inuse(0); |
598 | goto out_enable; | 595 | goto out_enable; |
599 | } | 596 | } |
600 | 597 | ||
@@ -627,7 +624,7 @@ void hw_perf_enable(void) | |||
627 | * bit set and set the hardware counters to their initial values. | 624 | * bit set and set the hardware counters to their initial values. |
628 | * Then unfreeze the counters. | 625 | * Then unfreeze the counters. |
629 | */ | 626 | */ |
630 | perf_set_pmu_inuse(1); | 627 | ppc_set_pmu_inuse(1); |
631 | mtspr(SPRN_MMCRA, cpuhw->mmcr[2] & ~MMCRA_SAMPLE_ENABLE); | 628 | mtspr(SPRN_MMCRA, cpuhw->mmcr[2] & ~MMCRA_SAMPLE_ENABLE); |
632 | mtspr(SPRN_MMCR1, cpuhw->mmcr[1]); | 629 | mtspr(SPRN_MMCR1, cpuhw->mmcr[1]); |
633 | mtspr(SPRN_MMCR0, (cpuhw->mmcr[0] & ~(MMCR0_PMC1CE | MMCR0_PMCjCE)) | 630 | mtspr(SPRN_MMCR0, (cpuhw->mmcr[0] & ~(MMCR0_PMC1CE | MMCR0_PMCjCE)) |
@@ -752,7 +749,7 @@ int hw_perf_group_sched_in(struct perf_counter *group_leader, | |||
752 | return -EAGAIN; | 749 | return -EAGAIN; |
753 | if (check_excludes(cpuhw->counter, cpuhw->flags, n0, n)) | 750 | if (check_excludes(cpuhw->counter, cpuhw->flags, n0, n)) |
754 | return -EAGAIN; | 751 | return -EAGAIN; |
755 | i = power_check_constraints(cpuhw->events, cpuhw->flags, n + n0); | 752 | i = power_check_constraints(cpuhw, cpuhw->events, cpuhw->flags, n + n0); |
756 | if (i < 0) | 753 | if (i < 0) |
757 | return -EAGAIN; | 754 | return -EAGAIN; |
758 | cpuhw->n_counters = n0 + n; | 755 | cpuhw->n_counters = n0 + n; |
@@ -807,7 +804,7 @@ static int power_pmu_enable(struct perf_counter *counter) | |||
807 | cpuhw->flags[n0] = counter->hw.counter_base; | 804 | cpuhw->flags[n0] = counter->hw.counter_base; |
808 | if (check_excludes(cpuhw->counter, cpuhw->flags, n0, 1)) | 805 | if (check_excludes(cpuhw->counter, cpuhw->flags, n0, 1)) |
809 | goto out; | 806 | goto out; |
810 | if (power_check_constraints(cpuhw->events, cpuhw->flags, n0 + 1)) | 807 | if (power_check_constraints(cpuhw, cpuhw->events, cpuhw->flags, n0 + 1)) |
811 | goto out; | 808 | goto out; |
812 | 809 | ||
813 | counter->hw.config = cpuhw->events[n0]; | 810 | counter->hw.config = cpuhw->events[n0]; |
@@ -1012,6 +1009,7 @@ const struct pmu *hw_perf_counter_init(struct perf_counter *counter) | |||
1012 | unsigned int cflags[MAX_HWCOUNTERS]; | 1009 | unsigned int cflags[MAX_HWCOUNTERS]; |
1013 | int n; | 1010 | int n; |
1014 | int err; | 1011 | int err; |
1012 | struct cpu_hw_counters *cpuhw; | ||
1015 | 1013 | ||
1016 | if (!ppmu) | 1014 | if (!ppmu) |
1017 | return ERR_PTR(-ENXIO); | 1015 | return ERR_PTR(-ENXIO); |
@@ -1090,7 +1088,11 @@ const struct pmu *hw_perf_counter_init(struct perf_counter *counter) | |||
1090 | cflags[n] = flags; | 1088 | cflags[n] = flags; |
1091 | if (check_excludes(ctrs, cflags, n, 1)) | 1089 | if (check_excludes(ctrs, cflags, n, 1)) |
1092 | return ERR_PTR(-EINVAL); | 1090 | return ERR_PTR(-EINVAL); |
1093 | if (power_check_constraints(events, cflags, n + 1)) | 1091 | |
1092 | cpuhw = &get_cpu_var(cpu_hw_counters); | ||
1093 | err = power_check_constraints(cpuhw, events, cflags, n + 1); | ||
1094 | put_cpu_var(cpu_hw_counters); | ||
1095 | if (err) | ||
1094 | return ERR_PTR(-EINVAL); | 1096 | return ERR_PTR(-EINVAL); |
1095 | 1097 | ||
1096 | counter->hw.config = events[n]; | 1098 | counter->hw.config = events[n]; |
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 892a9f2e6d76..0a3216433051 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -284,14 +284,13 @@ int set_dabr(unsigned long dabr) | |||
284 | return ppc_md.set_dabr(dabr); | 284 | return ppc_md.set_dabr(dabr); |
285 | 285 | ||
286 | /* XXX should we have a CPU_FTR_HAS_DABR ? */ | 286 | /* XXX should we have a CPU_FTR_HAS_DABR ? */ |
287 | #if defined(CONFIG_PPC64) || defined(CONFIG_6xx) | ||
288 | mtspr(SPRN_DABR, dabr); | ||
289 | #endif | ||
290 | |||
291 | #if defined(CONFIG_BOOKE) | 287 | #if defined(CONFIG_BOOKE) |
292 | mtspr(SPRN_DAC1, dabr); | 288 | mtspr(SPRN_DAC1, dabr); |
289 | #elif defined(CONFIG_PPC_BOOK3S) | ||
290 | mtspr(SPRN_DABR, dabr); | ||
293 | #endif | 291 | #endif |
294 | 292 | ||
293 | |||
295 | return 0; | 294 | return 0; |
296 | } | 295 | } |
297 | 296 | ||
@@ -372,15 +371,16 @@ struct task_struct *__switch_to(struct task_struct *prev, | |||
372 | 371 | ||
373 | #endif /* CONFIG_SMP */ | 372 | #endif /* CONFIG_SMP */ |
374 | 373 | ||
375 | if (unlikely(__get_cpu_var(current_dabr) != new->thread.dabr)) | ||
376 | set_dabr(new->thread.dabr); | ||
377 | |||
378 | #if defined(CONFIG_BOOKE) | 374 | #if defined(CONFIG_BOOKE) |
379 | /* If new thread DAC (HW breakpoint) is the same then leave it */ | 375 | /* If new thread DAC (HW breakpoint) is the same then leave it */ |
380 | if (new->thread.dabr) | 376 | if (new->thread.dabr) |
381 | set_dabr(new->thread.dabr); | 377 | set_dabr(new->thread.dabr); |
378 | #else | ||
379 | if (unlikely(__get_cpu_var(current_dabr) != new->thread.dabr)) | ||
380 | set_dabr(new->thread.dabr); | ||
382 | #endif | 381 | #endif |
383 | 382 | ||
383 | |||
384 | new_thread = &new->thread; | 384 | new_thread = &new->thread; |
385 | old_thread = ¤t->thread; | 385 | old_thread = ¤t->thread; |
386 | 386 | ||
@@ -664,6 +664,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, | |||
664 | sp_vsid |= SLB_VSID_KERNEL | llp; | 664 | sp_vsid |= SLB_VSID_KERNEL | llp; |
665 | p->thread.ksp_vsid = sp_vsid; | 665 | p->thread.ksp_vsid = sp_vsid; |
666 | } | 666 | } |
667 | #endif /* CONFIG_PPC_STD_MMU_64 */ | ||
667 | 668 | ||
668 | /* | 669 | /* |
669 | * The PPC64 ABI makes use of a TOC to contain function | 670 | * The PPC64 ABI makes use of a TOC to contain function |
@@ -671,6 +672,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, | |||
671 | * to the TOC entry. The first entry is a pointer to the actual | 672 | * to the TOC entry. The first entry is a pointer to the actual |
672 | * function. | 673 | * function. |
673 | */ | 674 | */ |
675 | #ifdef CONFIG_PPC64 | ||
674 | kregs->nip = *((unsigned long *)ret_from_fork); | 676 | kregs->nip = *((unsigned long *)ret_from_fork); |
675 | #else | 677 | #else |
676 | kregs->nip = (unsigned long)ret_from_fork; | 678 | kregs->nip = (unsigned long)ret_from_fork; |
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index a538824616fd..864334b337a3 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -190,6 +190,8 @@ static int __initdata of_platform; | |||
190 | 190 | ||
191 | static char __initdata prom_cmd_line[COMMAND_LINE_SIZE]; | 191 | static char __initdata prom_cmd_line[COMMAND_LINE_SIZE]; |
192 | 192 | ||
193 | static unsigned long __initdata prom_memory_limit; | ||
194 | |||
193 | static unsigned long __initdata alloc_top; | 195 | static unsigned long __initdata alloc_top; |
194 | static unsigned long __initdata alloc_top_high; | 196 | static unsigned long __initdata alloc_top_high; |
195 | static unsigned long __initdata alloc_bottom; | 197 | static unsigned long __initdata alloc_bottom; |
@@ -484,6 +486,67 @@ static int __init prom_setprop(phandle node, const char *nodename, | |||
484 | return call_prom("interpret", 1, 1, (u32)(unsigned long) cmd); | 486 | return call_prom("interpret", 1, 1, (u32)(unsigned long) cmd); |
485 | } | 487 | } |
486 | 488 | ||
489 | /* We can't use the standard versions because of RELOC headaches. */ | ||
490 | #define isxdigit(c) (('0' <= (c) && (c) <= '9') \ | ||
491 | || ('a' <= (c) && (c) <= 'f') \ | ||
492 | || ('A' <= (c) && (c) <= 'F')) | ||
493 | |||
494 | #define isdigit(c) ('0' <= (c) && (c) <= '9') | ||
495 | #define islower(c) ('a' <= (c) && (c) <= 'z') | ||
496 | #define toupper(c) (islower(c) ? ((c) - 'a' + 'A') : (c)) | ||
497 | |||
498 | unsigned long prom_strtoul(const char *cp, const char **endp) | ||
499 | { | ||
500 | unsigned long result = 0, base = 10, value; | ||
501 | |||
502 | if (*cp == '0') { | ||
503 | base = 8; | ||
504 | cp++; | ||
505 | if (toupper(*cp) == 'X') { | ||
506 | cp++; | ||
507 | base = 16; | ||
508 | } | ||
509 | } | ||
510 | |||
511 | while (isxdigit(*cp) && | ||
512 | (value = isdigit(*cp) ? *cp - '0' : toupper(*cp) - 'A' + 10) < base) { | ||
513 | result = result * base + value; | ||
514 | cp++; | ||
515 | } | ||
516 | |||
517 | if (endp) | ||
518 | *endp = cp; | ||
519 | |||
520 | return result; | ||
521 | } | ||
522 | |||
523 | unsigned long prom_memparse(const char *ptr, const char **retptr) | ||
524 | { | ||
525 | unsigned long ret = prom_strtoul(ptr, retptr); | ||
526 | int shift = 0; | ||
527 | |||
528 | /* | ||
529 | * We can't use a switch here because GCC *may* generate a | ||
530 | * jump table which won't work, because we're not running at | ||
531 | * the address we're linked at. | ||
532 | */ | ||
533 | if ('G' == **retptr || 'g' == **retptr) | ||
534 | shift = 30; | ||
535 | |||
536 | if ('M' == **retptr || 'm' == **retptr) | ||
537 | shift = 20; | ||
538 | |||
539 | if ('K' == **retptr || 'k' == **retptr) | ||
540 | shift = 10; | ||
541 | |||
542 | if (shift) { | ||
543 | ret <<= shift; | ||
544 | (*retptr)++; | ||
545 | } | ||
546 | |||
547 | return ret; | ||
548 | } | ||
549 | |||
487 | /* | 550 | /* |
488 | * Early parsing of the command line passed to the kernel, used for | 551 | * Early parsing of the command line passed to the kernel, used for |
489 | * "mem=x" and the options that affect the iommu | 552 | * "mem=x" and the options that affect the iommu |
@@ -491,9 +554,8 @@ static int __init prom_setprop(phandle node, const char *nodename, | |||
491 | static void __init early_cmdline_parse(void) | 554 | static void __init early_cmdline_parse(void) |
492 | { | 555 | { |
493 | struct prom_t *_prom = &RELOC(prom); | 556 | struct prom_t *_prom = &RELOC(prom); |
494 | #ifdef CONFIG_PPC64 | ||
495 | const char *opt; | 557 | const char *opt; |
496 | #endif | 558 | |
497 | char *p; | 559 | char *p; |
498 | int l = 0; | 560 | int l = 0; |
499 | 561 | ||
@@ -521,6 +583,15 @@ static void __init early_cmdline_parse(void) | |||
521 | RELOC(prom_iommu_force_on) = 1; | 583 | RELOC(prom_iommu_force_on) = 1; |
522 | } | 584 | } |
523 | #endif | 585 | #endif |
586 | opt = strstr(RELOC(prom_cmd_line), RELOC("mem=")); | ||
587 | if (opt) { | ||
588 | opt += 4; | ||
589 | RELOC(prom_memory_limit) = prom_memparse(opt, (const char **)&opt); | ||
590 | #ifdef CONFIG_PPC64 | ||
591 | /* Align to 16 MB == size of ppc64 large page */ | ||
592 | RELOC(prom_memory_limit) = ALIGN(RELOC(prom_memory_limit), 0x1000000); | ||
593 | #endif | ||
594 | } | ||
524 | } | 595 | } |
525 | 596 | ||
526 | #ifdef CONFIG_PPC_PSERIES | 597 | #ifdef CONFIG_PPC_PSERIES |
@@ -1027,6 +1098,29 @@ static void __init prom_init_mem(void) | |||
1027 | } | 1098 | } |
1028 | 1099 | ||
1029 | /* | 1100 | /* |
1101 | * If prom_memory_limit is set we reduce the upper limits *except* for | ||
1102 | * alloc_top_high. This must be the real top of RAM so we can put | ||
1103 | * TCE's up there. | ||
1104 | */ | ||
1105 | |||
1106 | RELOC(alloc_top_high) = RELOC(ram_top); | ||
1107 | |||
1108 | if (RELOC(prom_memory_limit)) { | ||
1109 | if (RELOC(prom_memory_limit) <= RELOC(alloc_bottom)) { | ||
1110 | prom_printf("Ignoring mem=%x <= alloc_bottom.\n", | ||
1111 | RELOC(prom_memory_limit)); | ||
1112 | RELOC(prom_memory_limit) = 0; | ||
1113 | } else if (RELOC(prom_memory_limit) >= RELOC(ram_top)) { | ||
1114 | prom_printf("Ignoring mem=%x >= ram_top.\n", | ||
1115 | RELOC(prom_memory_limit)); | ||
1116 | RELOC(prom_memory_limit) = 0; | ||
1117 | } else { | ||
1118 | RELOC(ram_top) = RELOC(prom_memory_limit); | ||
1119 | RELOC(rmo_top) = min(RELOC(rmo_top), RELOC(prom_memory_limit)); | ||
1120 | } | ||
1121 | } | ||
1122 | |||
1123 | /* | ||
1030 | * Setup our top alloc point, that is top of RMO or top of | 1124 | * Setup our top alloc point, that is top of RMO or top of |
1031 | * segment 0 when running non-LPAR. | 1125 | * segment 0 when running non-LPAR. |
1032 | * Some RS64 machines have buggy firmware where claims up at | 1126 | * Some RS64 machines have buggy firmware where claims up at |
@@ -1041,6 +1135,7 @@ static void __init prom_init_mem(void) | |||
1041 | RELOC(alloc_top_high) = RELOC(ram_top); | 1135 | RELOC(alloc_top_high) = RELOC(ram_top); |
1042 | 1136 | ||
1043 | prom_printf("memory layout at init:\n"); | 1137 | prom_printf("memory layout at init:\n"); |
1138 | prom_printf(" memory_limit : %x (16 MB aligned)\n", RELOC(prom_memory_limit)); | ||
1044 | prom_printf(" alloc_bottom : %x\n", RELOC(alloc_bottom)); | 1139 | prom_printf(" alloc_bottom : %x\n", RELOC(alloc_bottom)); |
1045 | prom_printf(" alloc_top : %x\n", RELOC(alloc_top)); | 1140 | prom_printf(" alloc_top : %x\n", RELOC(alloc_top)); |
1046 | prom_printf(" alloc_top_hi : %x\n", RELOC(alloc_top_high)); | 1141 | prom_printf(" alloc_top_hi : %x\n", RELOC(alloc_top_high)); |
@@ -1259,10 +1354,6 @@ static void __init prom_initialize_tce_table(void) | |||
1259 | * | 1354 | * |
1260 | * -- Cort | 1355 | * -- Cort |
1261 | */ | 1356 | */ |
1262 | extern char __secondary_hold; | ||
1263 | extern unsigned long __secondary_hold_spinloop; | ||
1264 | extern unsigned long __secondary_hold_acknowledge; | ||
1265 | |||
1266 | /* | 1357 | /* |
1267 | * We want to reference the copy of __secondary_hold_* in the | 1358 | * We want to reference the copy of __secondary_hold_* in the |
1268 | * 0 - 0x100 address range | 1359 | * 0 - 0x100 address range |
@@ -2399,6 +2490,10 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4, | |||
2399 | /* | 2490 | /* |
2400 | * Fill in some infos for use by the kernel later on | 2491 | * Fill in some infos for use by the kernel later on |
2401 | */ | 2492 | */ |
2493 | if (RELOC(prom_memory_limit)) | ||
2494 | prom_setprop(_prom->chosen, "/chosen", "linux,memory-limit", | ||
2495 | &RELOC(prom_memory_limit), | ||
2496 | sizeof(prom_memory_limit)); | ||
2402 | #ifdef CONFIG_PPC64 | 2497 | #ifdef CONFIG_PPC64 |
2403 | if (RELOC(prom_iommu_off)) | 2498 | if (RELOC(prom_iommu_off)) |
2404 | prom_setprop(_prom->chosen, "/chosen", "linux,iommu-off", | 2499 | prom_setprop(_prom->chosen, "/chosen", "linux,iommu-off", |
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c index c434823b8c83..bf90361bb70f 100644 --- a/arch/powerpc/kernel/rtas.c +++ b/arch/powerpc/kernel/rtas.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <asm/smp.h> | 39 | #include <asm/smp.h> |
40 | #include <asm/atomic.h> | 40 | #include <asm/atomic.h> |
41 | #include <asm/time.h> | 41 | #include <asm/time.h> |
42 | #include <asm/mmu.h> | ||
42 | 43 | ||
43 | struct rtas_t rtas = { | 44 | struct rtas_t rtas = { |
44 | .lock = __RAW_SPIN_LOCK_UNLOCKED | 45 | .lock = __RAW_SPIN_LOCK_UNLOCKED |
@@ -713,6 +714,7 @@ static void rtas_percpu_suspend_me(void *info) | |||
713 | { | 714 | { |
714 | long rc = H_SUCCESS; | 715 | long rc = H_SUCCESS; |
715 | unsigned long msr_save; | 716 | unsigned long msr_save; |
717 | u16 slb_size = mmu_slb_size; | ||
716 | int cpu; | 718 | int cpu; |
717 | struct rtas_suspend_me_data *data = | 719 | struct rtas_suspend_me_data *data = |
718 | (struct rtas_suspend_me_data *)info; | 720 | (struct rtas_suspend_me_data *)info; |
@@ -735,13 +737,16 @@ static void rtas_percpu_suspend_me(void *info) | |||
735 | /* All other cpus are in H_JOIN, this cpu does | 737 | /* All other cpus are in H_JOIN, this cpu does |
736 | * the suspend. | 738 | * the suspend. |
737 | */ | 739 | */ |
740 | slb_set_size(SLB_MIN_SIZE); | ||
738 | printk(KERN_DEBUG "calling ibm,suspend-me on cpu %i\n", | 741 | printk(KERN_DEBUG "calling ibm,suspend-me on cpu %i\n", |
739 | smp_processor_id()); | 742 | smp_processor_id()); |
740 | data->error = rtas_call(data->token, 0, 1, NULL); | 743 | data->error = rtas_call(data->token, 0, 1, NULL); |
741 | 744 | ||
742 | if (data->error) | 745 | if (data->error) { |
743 | printk(KERN_DEBUG "ibm,suspend-me returned %d\n", | 746 | printk(KERN_DEBUG "ibm,suspend-me returned %d\n", |
744 | data->error); | 747 | data->error); |
748 | slb_set_size(slb_size); | ||
749 | } | ||
745 | } else { | 750 | } else { |
746 | printk(KERN_ERR "H_JOIN on cpu %i failed with rc = %ld\n", | 751 | printk(KERN_ERR "H_JOIN on cpu %i failed with rc = %ld\n", |
747 | smp_processor_id(), rc); | 752 | smp_processor_id(), rc); |
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index e1e3059cf34b..53bcf3d792db 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c | |||
@@ -210,6 +210,14 @@ void nvram_write_byte(unsigned char val, int addr) | |||
210 | } | 210 | } |
211 | EXPORT_SYMBOL(nvram_write_byte); | 211 | EXPORT_SYMBOL(nvram_write_byte); |
212 | 212 | ||
213 | ssize_t nvram_get_size(void) | ||
214 | { | ||
215 | if (ppc_md.nvram_size) | ||
216 | return ppc_md.nvram_size(); | ||
217 | return -1; | ||
218 | } | ||
219 | EXPORT_SYMBOL(nvram_get_size); | ||
220 | |||
213 | void nvram_sync(void) | 221 | void nvram_sync(void) |
214 | { | 222 | { |
215 | if (ppc_md.nvram_sync) | 223 | if (ppc_md.nvram_sync) |
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index aa6e4500635f..797ea95aae2e 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c | |||
@@ -63,6 +63,7 @@ | |||
63 | #include <asm/udbg.h> | 63 | #include <asm/udbg.h> |
64 | #include <asm/kexec.h> | 64 | #include <asm/kexec.h> |
65 | #include <asm/swiotlb.h> | 65 | #include <asm/swiotlb.h> |
66 | #include <asm/mmu_context.h> | ||
66 | 67 | ||
67 | #include "setup.h" | 68 | #include "setup.h" |
68 | 69 | ||
@@ -143,11 +144,14 @@ early_param("smt-enabled", early_smt_enabled); | |||
143 | #define check_smt_enabled() | 144 | #define check_smt_enabled() |
144 | #endif /* CONFIG_SMP */ | 145 | #endif /* CONFIG_SMP */ |
145 | 146 | ||
146 | /* Put the paca pointer into r13 and SPRG3 */ | 147 | /* Put the paca pointer into r13 and SPRG_PACA */ |
147 | void __init setup_paca(int cpu) | 148 | void __init setup_paca(int cpu) |
148 | { | 149 | { |
149 | local_paca = &paca[cpu]; | 150 | local_paca = &paca[cpu]; |
150 | mtspr(SPRN_SPRG3, local_paca); | 151 | mtspr(SPRN_SPRG_PACA, local_paca); |
152 | #ifdef CONFIG_PPC_BOOK3E | ||
153 | mtspr(SPRN_SPRG_TLB_EXFRAME, local_paca->extlb); | ||
154 | #endif | ||
151 | } | 155 | } |
152 | 156 | ||
153 | /* | 157 | /* |
@@ -231,9 +235,6 @@ void early_setup_secondary(void) | |||
231 | #endif /* CONFIG_SMP */ | 235 | #endif /* CONFIG_SMP */ |
232 | 236 | ||
233 | #if defined(CONFIG_SMP) || defined(CONFIG_KEXEC) | 237 | #if defined(CONFIG_SMP) || defined(CONFIG_KEXEC) |
234 | extern unsigned long __secondary_hold_spinloop; | ||
235 | extern void generic_secondary_smp_init(void); | ||
236 | |||
237 | void smp_release_cpus(void) | 238 | void smp_release_cpus(void) |
238 | { | 239 | { |
239 | unsigned long *ptr; | 240 | unsigned long *ptr; |
@@ -454,6 +455,24 @@ static void __init irqstack_early_init(void) | |||
454 | #define irqstack_early_init() | 455 | #define irqstack_early_init() |
455 | #endif | 456 | #endif |
456 | 457 | ||
458 | #ifdef CONFIG_PPC_BOOK3E | ||
459 | static void __init exc_lvl_early_init(void) | ||
460 | { | ||
461 | unsigned int i; | ||
462 | |||
463 | for_each_possible_cpu(i) { | ||
464 | critirq_ctx[i] = (struct thread_info *) | ||
465 | __va(lmb_alloc(THREAD_SIZE, THREAD_SIZE)); | ||
466 | dbgirq_ctx[i] = (struct thread_info *) | ||
467 | __va(lmb_alloc(THREAD_SIZE, THREAD_SIZE)); | ||
468 | mcheckirq_ctx[i] = (struct thread_info *) | ||
469 | __va(lmb_alloc(THREAD_SIZE, THREAD_SIZE)); | ||
470 | } | ||
471 | } | ||
472 | #else | ||
473 | #define exc_lvl_early_init() | ||
474 | #endif | ||
475 | |||
457 | /* | 476 | /* |
458 | * Stack space used when we detect a bad kernel stack pointer, and | 477 | * Stack space used when we detect a bad kernel stack pointer, and |
459 | * early in SMP boots before relocation is enabled. | 478 | * early in SMP boots before relocation is enabled. |
@@ -513,6 +532,7 @@ void __init setup_arch(char **cmdline_p) | |||
513 | init_mm.brk = klimit; | 532 | init_mm.brk = klimit; |
514 | 533 | ||
515 | irqstack_early_init(); | 534 | irqstack_early_init(); |
535 | exc_lvl_early_init(); | ||
516 | emergency_stack_init(); | 536 | emergency_stack_init(); |
517 | 537 | ||
518 | #ifdef CONFIG_PPC_STD_MMU_64 | 538 | #ifdef CONFIG_PPC_STD_MMU_64 |
@@ -535,6 +555,10 @@ void __init setup_arch(char **cmdline_p) | |||
535 | #endif | 555 | #endif |
536 | 556 | ||
537 | paging_init(); | 557 | paging_init(); |
558 | |||
559 | /* Initialize the MMU context management stuff */ | ||
560 | mmu_context_init(); | ||
561 | |||
538 | ppc64_boot_msg(0x15, "Setup Done"); | 562 | ppc64_boot_msg(0x15, "Setup Done"); |
539 | } | 563 | } |
540 | 564 | ||
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index 0b47de07302d..d387b3937ccc 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c | |||
@@ -269,7 +269,10 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
269 | cpu_callin_map[boot_cpuid] = 1; | 269 | cpu_callin_map[boot_cpuid] = 1; |
270 | 270 | ||
271 | if (smp_ops) | 271 | if (smp_ops) |
272 | max_cpus = smp_ops->probe(); | 272 | if (smp_ops->probe) |
273 | max_cpus = smp_ops->probe(); | ||
274 | else | ||
275 | max_cpus = NR_CPUS; | ||
273 | else | 276 | else |
274 | max_cpus = 1; | 277 | max_cpus = 1; |
275 | 278 | ||
@@ -412,9 +415,8 @@ int __cpuinit __cpu_up(unsigned int cpu) | |||
412 | * CPUs can take much longer to come up in the | 415 | * CPUs can take much longer to come up in the |
413 | * hotplug case. Wait five seconds. | 416 | * hotplug case. Wait five seconds. |
414 | */ | 417 | */ |
415 | for (c = 25; c && !cpu_callin_map[cpu]; c--) { | 418 | for (c = 5000; c && !cpu_callin_map[cpu]; c--) |
416 | msleep(200); | 419 | msleep(1); |
417 | } | ||
418 | #endif | 420 | #endif |
419 | 421 | ||
420 | if (!cpu_callin_map[cpu]) { | 422 | if (!cpu_callin_map[cpu]) { |
@@ -494,7 +496,8 @@ int __devinit start_secondary(void *unused) | |||
494 | preempt_disable(); | 496 | preempt_disable(); |
495 | cpu_callin_map[cpu] = 1; | 497 | cpu_callin_map[cpu] = 1; |
496 | 498 | ||
497 | smp_ops->setup_cpu(cpu); | 499 | if (smp_ops->setup_cpu) |
500 | smp_ops->setup_cpu(cpu); | ||
498 | if (smp_ops->take_timebase) | 501 | if (smp_ops->take_timebase) |
499 | smp_ops->take_timebase(); | 502 | smp_ops->take_timebase(); |
500 | 503 | ||
@@ -557,7 +560,7 @@ void __init smp_cpus_done(unsigned int max_cpus) | |||
557 | old_mask = current->cpus_allowed; | 560 | old_mask = current->cpus_allowed; |
558 | set_cpus_allowed(current, cpumask_of_cpu(boot_cpuid)); | 561 | set_cpus_allowed(current, cpumask_of_cpu(boot_cpuid)); |
559 | 562 | ||
560 | if (smp_ops) | 563 | if (smp_ops && smp_ops->setup_cpu) |
561 | smp_ops->setup_cpu(boot_cpuid); | 564 | smp_ops->setup_cpu(boot_cpuid); |
562 | 565 | ||
563 | set_cpus_allowed(current, old_mask); | 566 | set_cpus_allowed(current, old_mask); |
diff --git a/arch/powerpc/kernel/sys_ppc32.c b/arch/powerpc/kernel/sys_ppc32.c index bb1cfcfdbbbb..1cc5e9e5da96 100644 --- a/arch/powerpc/kernel/sys_ppc32.c +++ b/arch/powerpc/kernel/sys_ppc32.c | |||
@@ -343,6 +343,18 @@ off_t ppc32_lseek(unsigned int fd, u32 offset, unsigned int origin) | |||
343 | return sys_lseek(fd, (int)offset, origin); | 343 | return sys_lseek(fd, (int)offset, origin); |
344 | } | 344 | } |
345 | 345 | ||
346 | long compat_sys_truncate(const char __user * path, u32 length) | ||
347 | { | ||
348 | /* sign extend length */ | ||
349 | return sys_truncate(path, (int)length); | ||
350 | } | ||
351 | |||
352 | long compat_sys_ftruncate(int fd, u32 length) | ||
353 | { | ||
354 | /* sign extend length */ | ||
355 | return sys_ftruncate(fd, (int)length); | ||
356 | } | ||
357 | |||
346 | /* Note: it is necessary to treat bufsiz as an unsigned int, | 358 | /* Note: it is necessary to treat bufsiz as an unsigned int, |
347 | * with the corresponding cast to a signed int to insure that the | 359 | * with the corresponding cast to a signed int to insure that the |
348 | * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode) | 360 | * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode) |
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c index f41aec85aa49..956ab33fd73f 100644 --- a/arch/powerpc/kernel/sysfs.c +++ b/arch/powerpc/kernel/sysfs.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <asm/prom.h> | 17 | #include <asm/prom.h> |
18 | #include <asm/machdep.h> | 18 | #include <asm/machdep.h> |
19 | #include <asm/smp.h> | 19 | #include <asm/smp.h> |
20 | #include <asm/pmc.h> | ||
20 | 21 | ||
21 | #include "cacheinfo.h" | 22 | #include "cacheinfo.h" |
22 | 23 | ||
@@ -123,6 +124,8 @@ static DEFINE_PER_CPU(char, pmcs_enabled); | |||
123 | 124 | ||
124 | void ppc_enable_pmcs(void) | 125 | void ppc_enable_pmcs(void) |
125 | { | 126 | { |
127 | ppc_set_pmu_inuse(1); | ||
128 | |||
126 | /* Only need to enable them once */ | 129 | /* Only need to enable them once */ |
127 | if (__get_cpu_var(pmcs_enabled)) | 130 | if (__get_cpu_var(pmcs_enabled)) |
128 | return; | 131 | return; |
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index eae4511ceeac..a180b4f9a4f6 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -479,7 +479,8 @@ static int __init iSeries_tb_recal(void) | |||
479 | unsigned long tb_ticks = tb - iSeries_recal_tb; | 479 | unsigned long tb_ticks = tb - iSeries_recal_tb; |
480 | unsigned long titan_usec = (titan - iSeries_recal_titan) >> 12; | 480 | unsigned long titan_usec = (titan - iSeries_recal_titan) >> 12; |
481 | unsigned long new_tb_ticks_per_sec = (tb_ticks * USEC_PER_SEC)/titan_usec; | 481 | unsigned long new_tb_ticks_per_sec = (tb_ticks * USEC_PER_SEC)/titan_usec; |
482 | unsigned long new_tb_ticks_per_jiffy = (new_tb_ticks_per_sec+(HZ/2))/HZ; | 482 | unsigned long new_tb_ticks_per_jiffy = |
483 | DIV_ROUND_CLOSEST(new_tb_ticks_per_sec, HZ); | ||
483 | long tick_diff = new_tb_ticks_per_jiffy - tb_ticks_per_jiffy; | 484 | long tick_diff = new_tb_ticks_per_jiffy - tb_ticks_per_jiffy; |
484 | char sign = '+'; | 485 | char sign = '+'; |
485 | /* make sure tb_ticks_per_sec and tb_ticks_per_jiffy are consistent */ | 486 | /* make sure tb_ticks_per_sec and tb_ticks_per_jiffy are consistent */ |
@@ -726,6 +727,18 @@ static int __init get_freq(char *name, int cells, unsigned long *val) | |||
726 | return found; | 727 | return found; |
727 | } | 728 | } |
728 | 729 | ||
730 | /* should become __cpuinit when secondary_cpu_time_init also is */ | ||
731 | void start_cpu_decrementer(void) | ||
732 | { | ||
733 | #if defined(CONFIG_BOOKE) || defined(CONFIG_40x) | ||
734 | /* Clear any pending timer interrupts */ | ||
735 | mtspr(SPRN_TSR, TSR_ENW | TSR_WIS | TSR_DIS | TSR_FIS); | ||
736 | |||
737 | /* Enable decrementer interrupt */ | ||
738 | mtspr(SPRN_TCR, TCR_DIE); | ||
739 | #endif /* defined(CONFIG_BOOKE) || defined(CONFIG_40x) */ | ||
740 | } | ||
741 | |||
729 | void __init generic_calibrate_decr(void) | 742 | void __init generic_calibrate_decr(void) |
730 | { | 743 | { |
731 | ppc_tb_freq = DEFAULT_TB_FREQ; /* hardcoded default */ | 744 | ppc_tb_freq = DEFAULT_TB_FREQ; /* hardcoded default */ |
@@ -745,14 +758,6 @@ void __init generic_calibrate_decr(void) | |||
745 | printk(KERN_ERR "WARNING: Estimating processor frequency " | 758 | printk(KERN_ERR "WARNING: Estimating processor frequency " |
746 | "(not found)\n"); | 759 | "(not found)\n"); |
747 | } | 760 | } |
748 | |||
749 | #if defined(CONFIG_BOOKE) || defined(CONFIG_40x) | ||
750 | /* Clear any pending timer interrupts */ | ||
751 | mtspr(SPRN_TSR, TSR_ENW | TSR_WIS | TSR_DIS | TSR_FIS); | ||
752 | |||
753 | /* Enable decrementer interrupt */ | ||
754 | mtspr(SPRN_TCR, TCR_DIE); | ||
755 | #endif | ||
756 | } | 761 | } |
757 | 762 | ||
758 | int update_persistent_clock(struct timespec now) | 763 | int update_persistent_clock(struct timespec now) |
@@ -913,6 +918,11 @@ static void __init init_decrementer_clockevent(void) | |||
913 | 918 | ||
914 | void secondary_cpu_time_init(void) | 919 | void secondary_cpu_time_init(void) |
915 | { | 920 | { |
921 | /* Start the decrementer on CPUs that have manual control | ||
922 | * such as BookE | ||
923 | */ | ||
924 | start_cpu_decrementer(); | ||
925 | |||
916 | /* FIME: Should make unrelatred change to move snapshot_timebase | 926 | /* FIME: Should make unrelatred change to move snapshot_timebase |
917 | * call here ! */ | 927 | * call here ! */ |
918 | register_decrementer_clockevent(smp_processor_id()); | 928 | register_decrementer_clockevent(smp_processor_id()); |
@@ -1016,6 +1026,11 @@ void __init time_init(void) | |||
1016 | 1026 | ||
1017 | write_sequnlock_irqrestore(&xtime_lock, flags); | 1027 | write_sequnlock_irqrestore(&xtime_lock, flags); |
1018 | 1028 | ||
1029 | /* Start the decrementer on CPUs that have manual control | ||
1030 | * such as BookE | ||
1031 | */ | ||
1032 | start_cpu_decrementer(); | ||
1033 | |||
1019 | /* Register the clocksource, if we're not running on iSeries */ | 1034 | /* Register the clocksource, if we're not running on iSeries */ |
1020 | if (!firmware_has_feature(FW_FEATURE_ISERIES)) | 1035 | if (!firmware_has_feature(FW_FEATURE_ISERIES)) |
1021 | clocksource_init(); | 1036 | clocksource_init(); |
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c index ad06d5c75b15..a0abce251d0a 100644 --- a/arch/powerpc/kernel/vdso.c +++ b/arch/powerpc/kernel/vdso.c | |||
@@ -203,7 +203,12 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) | |||
203 | } else { | 203 | } else { |
204 | vdso_pagelist = vdso64_pagelist; | 204 | vdso_pagelist = vdso64_pagelist; |
205 | vdso_pages = vdso64_pages; | 205 | vdso_pages = vdso64_pages; |
206 | vdso_base = VDSO64_MBASE; | 206 | /* |
207 | * On 64bit we don't have a preferred map address. This | ||
208 | * allows get_unmapped_area to find an area near other mmaps | ||
209 | * and most likely share a SLB entry. | ||
210 | */ | ||
211 | vdso_base = 0; | ||
207 | } | 212 | } |
208 | #else | 213 | #else |
209 | vdso_pagelist = vdso32_pagelist; | 214 | vdso_pagelist = vdso32_pagelist; |
diff --git a/arch/powerpc/kernel/vdso32/Makefile b/arch/powerpc/kernel/vdso32/Makefile index c3d57bd01a88..b54b81688132 100644 --- a/arch/powerpc/kernel/vdso32/Makefile +++ b/arch/powerpc/kernel/vdso32/Makefile | |||
@@ -12,6 +12,7 @@ endif | |||
12 | targets := $(obj-vdso32) vdso32.so vdso32.so.dbg | 12 | targets := $(obj-vdso32) vdso32.so vdso32.so.dbg |
13 | obj-vdso32 := $(addprefix $(obj)/, $(obj-vdso32)) | 13 | obj-vdso32 := $(addprefix $(obj)/, $(obj-vdso32)) |
14 | 14 | ||
15 | GCOV_PROFILE := n | ||
15 | 16 | ||
16 | EXTRA_CFLAGS := -shared -fno-common -fno-builtin | 17 | EXTRA_CFLAGS := -shared -fno-common -fno-builtin |
17 | EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso32.so.1 \ | 18 | EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso32.so.1 \ |
diff --git a/arch/powerpc/kernel/vdso64/Makefile b/arch/powerpc/kernel/vdso64/Makefile index fa7f1b8f3e50..dd0c8e936775 100644 --- a/arch/powerpc/kernel/vdso64/Makefile +++ b/arch/powerpc/kernel/vdso64/Makefile | |||
@@ -7,6 +7,8 @@ obj-vdso64 = sigtramp.o gettimeofday.o datapage.o cacheflush.o note.o | |||
7 | targets := $(obj-vdso64) vdso64.so vdso64.so.dbg | 7 | targets := $(obj-vdso64) vdso64.so vdso64.so.dbg |
8 | obj-vdso64 := $(addprefix $(obj)/, $(obj-vdso64)) | 8 | obj-vdso64 := $(addprefix $(obj)/, $(obj-vdso64)) |
9 | 9 | ||
10 | GCOV_PROFILE := n | ||
11 | |||
10 | EXTRA_CFLAGS := -shared -fno-common -fno-builtin | 12 | EXTRA_CFLAGS := -shared -fno-common -fno-builtin |
11 | EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso64.so.1 \ | 13 | EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso64.so.1 \ |
12 | $(call ld-option, -Wl$(comma)--hash-style=sysv) | 14 | $(call ld-option, -Wl$(comma)--hash-style=sysv) |
diff --git a/arch/powerpc/kernel/vector.S b/arch/powerpc/kernel/vector.S index ea4d64644d02..67b6916f0e94 100644 --- a/arch/powerpc/kernel/vector.S +++ b/arch/powerpc/kernel/vector.S | |||
@@ -65,7 +65,7 @@ _GLOBAL(load_up_altivec) | |||
65 | 1: | 65 | 1: |
66 | /* enable use of VMX after return */ | 66 | /* enable use of VMX after return */ |
67 | #ifdef CONFIG_PPC32 | 67 | #ifdef CONFIG_PPC32 |
68 | mfspr r5,SPRN_SPRG3 /* current task's THREAD (phys) */ | 68 | mfspr r5,SPRN_SPRG_THREAD /* current task's THREAD (phys) */ |
69 | oris r9,r9,MSR_VEC@h | 69 | oris r9,r9,MSR_VEC@h |
70 | #else | 70 | #else |
71 | ld r4,PACACURRENT(r13) | 71 | ld r4,PACACURRENT(r13) |
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c index 819e59f6f7c7..bc7b41edbdfc 100644 --- a/arch/powerpc/kernel/vio.c +++ b/arch/powerpc/kernel/vio.c | |||
@@ -601,7 +601,7 @@ static void vio_dma_iommu_unmap_sg(struct device *dev, | |||
601 | vio_cmo_dealloc(viodev, alloc_size); | 601 | vio_cmo_dealloc(viodev, alloc_size); |
602 | } | 602 | } |
603 | 603 | ||
604 | struct dma_mapping_ops vio_dma_mapping_ops = { | 604 | struct dma_map_ops vio_dma_mapping_ops = { |
605 | .alloc_coherent = vio_dma_iommu_alloc_coherent, | 605 | .alloc_coherent = vio_dma_iommu_alloc_coherent, |
606 | .free_coherent = vio_dma_iommu_free_coherent, | 606 | .free_coherent = vio_dma_iommu_free_coherent, |
607 | .map_sg = vio_dma_iommu_map_sg, | 607 | .map_sg = vio_dma_iommu_map_sg, |
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S index 244e3658983c..58da4070723d 100644 --- a/arch/powerpc/kernel/vmlinux.lds.S +++ b/arch/powerpc/kernel/vmlinux.lds.S | |||
@@ -239,10 +239,6 @@ SECTIONS | |||
239 | } | 239 | } |
240 | #endif | 240 | #endif |
241 | 241 | ||
242 | . = ALIGN(PAGE_SIZE); | ||
243 | _edata = .; | ||
244 | PROVIDE32 (edata = .); | ||
245 | |||
246 | /* The initial task and kernel stack */ | 242 | /* The initial task and kernel stack */ |
247 | #ifdef CONFIG_PPC32 | 243 | #ifdef CONFIG_PPC32 |
248 | . = ALIGN(8192); | 244 | . = ALIGN(8192); |
@@ -276,6 +272,10 @@ SECTIONS | |||
276 | __nosave_end = .; | 272 | __nosave_end = .; |
277 | } | 273 | } |
278 | 274 | ||
275 | . = ALIGN(PAGE_SIZE); | ||
276 | _edata = .; | ||
277 | PROVIDE32 (edata = .); | ||
278 | |||
279 | /* | 279 | /* |
280 | * And finally the bss | 280 | * And finally the bss |
281 | */ | 281 | */ |
diff --git a/arch/powerpc/kvm/booke_interrupts.S b/arch/powerpc/kvm/booke_interrupts.S index d0c6f841bbd1..380a78cf484d 100644 --- a/arch/powerpc/kvm/booke_interrupts.S +++ b/arch/powerpc/kvm/booke_interrupts.S | |||
@@ -56,8 +56,8 @@ | |||
56 | .macro KVM_HANDLER ivor_nr | 56 | .macro KVM_HANDLER ivor_nr |
57 | _GLOBAL(kvmppc_handler_\ivor_nr) | 57 | _GLOBAL(kvmppc_handler_\ivor_nr) |
58 | /* Get pointer to vcpu and record exit number. */ | 58 | /* Get pointer to vcpu and record exit number. */ |
59 | mtspr SPRN_SPRG0, r4 | 59 | mtspr SPRN_SPRG_WSCRATCH0, r4 |
60 | mfspr r4, SPRN_SPRG1 | 60 | mfspr r4, SPRN_SPRG_RVCPU |
61 | stw r5, VCPU_GPR(r5)(r4) | 61 | stw r5, VCPU_GPR(r5)(r4) |
62 | stw r6, VCPU_GPR(r6)(r4) | 62 | stw r6, VCPU_GPR(r6)(r4) |
63 | mfctr r5 | 63 | mfctr r5 |
@@ -95,7 +95,7 @@ _GLOBAL(kvmppc_handler_len) | |||
95 | 95 | ||
96 | 96 | ||
97 | /* Registers: | 97 | /* Registers: |
98 | * SPRG0: guest r4 | 98 | * SPRG_SCRATCH0: guest r4 |
99 | * r4: vcpu pointer | 99 | * r4: vcpu pointer |
100 | * r5: KVM exit number | 100 | * r5: KVM exit number |
101 | */ | 101 | */ |
@@ -181,7 +181,7 @@ _GLOBAL(kvmppc_resume_host) | |||
181 | stw r3, VCPU_LR(r4) | 181 | stw r3, VCPU_LR(r4) |
182 | mfxer r3 | 182 | mfxer r3 |
183 | stw r3, VCPU_XER(r4) | 183 | stw r3, VCPU_XER(r4) |
184 | mfspr r3, SPRN_SPRG0 | 184 | mfspr r3, SPRN_SPRG_RSCRATCH0 |
185 | stw r3, VCPU_GPR(r4)(r4) | 185 | stw r3, VCPU_GPR(r4)(r4) |
186 | mfspr r3, SPRN_SRR0 | 186 | mfspr r3, SPRN_SRR0 |
187 | stw r3, VCPU_PC(r4) | 187 | stw r3, VCPU_PC(r4) |
@@ -374,7 +374,7 @@ lightweight_exit: | |||
374 | mtspr SPRN_IVPR, r8 | 374 | mtspr SPRN_IVPR, r8 |
375 | 375 | ||
376 | /* Save vcpu pointer for the exception handlers. */ | 376 | /* Save vcpu pointer for the exception handlers. */ |
377 | mtspr SPRN_SPRG1, r4 | 377 | mtspr SPRN_SPRG_WVCPU, r4 |
378 | 378 | ||
379 | /* Can't switch the stack pointer until after IVPR is switched, | 379 | /* Can't switch the stack pointer until after IVPR is switched, |
380 | * because host interrupt handlers would get confused. */ | 380 | * because host interrupt handlers would get confused. */ |
@@ -384,13 +384,13 @@ lightweight_exit: | |||
384 | /* Host interrupt handlers may have clobbered these guest-readable | 384 | /* Host interrupt handlers may have clobbered these guest-readable |
385 | * SPRGs, so we need to reload them here with the guest's values. */ | 385 | * SPRGs, so we need to reload them here with the guest's values. */ |
386 | lwz r3, VCPU_SPRG4(r4) | 386 | lwz r3, VCPU_SPRG4(r4) |
387 | mtspr SPRN_SPRG4, r3 | 387 | mtspr SPRN_SPRG4W, r3 |
388 | lwz r3, VCPU_SPRG5(r4) | 388 | lwz r3, VCPU_SPRG5(r4) |
389 | mtspr SPRN_SPRG5, r3 | 389 | mtspr SPRN_SPRG5W, r3 |
390 | lwz r3, VCPU_SPRG6(r4) | 390 | lwz r3, VCPU_SPRG6(r4) |
391 | mtspr SPRN_SPRG6, r3 | 391 | mtspr SPRN_SPRG6W, r3 |
392 | lwz r3, VCPU_SPRG7(r4) | 392 | lwz r3, VCPU_SPRG7(r4) |
393 | mtspr SPRN_SPRG7, r3 | 393 | mtspr SPRN_SPRG7W, r3 |
394 | 394 | ||
395 | #ifdef CONFIG_KVM_EXIT_TIMING | 395 | #ifdef CONFIG_KVM_EXIT_TIMING |
396 | /* save enter time */ | 396 | /* save enter time */ |
diff --git a/arch/powerpc/mm/40x_mmu.c b/arch/powerpc/mm/40x_mmu.c index 29954dc28942..f5e7b9ce63dd 100644 --- a/arch/powerpc/mm/40x_mmu.c +++ b/arch/powerpc/mm/40x_mmu.c | |||
@@ -105,7 +105,7 @@ unsigned long __init mmu_mapin_ram(void) | |||
105 | 105 | ||
106 | while (s >= LARGE_PAGE_SIZE_16M) { | 106 | while (s >= LARGE_PAGE_SIZE_16M) { |
107 | pmd_t *pmdp; | 107 | pmd_t *pmdp; |
108 | unsigned long val = p | _PMD_SIZE_16M | _PAGE_HWEXEC | _PAGE_HWWRITE; | 108 | unsigned long val = p | _PMD_SIZE_16M | _PAGE_EXEC | _PAGE_HWWRITE; |
109 | 109 | ||
110 | pmdp = pmd_offset(pud_offset(pgd_offset_k(v), v), v); | 110 | pmdp = pmd_offset(pud_offset(pgd_offset_k(v), v), v); |
111 | pmd_val(*pmdp++) = val; | 111 | pmd_val(*pmdp++) = val; |
@@ -120,7 +120,7 @@ unsigned long __init mmu_mapin_ram(void) | |||
120 | 120 | ||
121 | while (s >= LARGE_PAGE_SIZE_4M) { | 121 | while (s >= LARGE_PAGE_SIZE_4M) { |
122 | pmd_t *pmdp; | 122 | pmd_t *pmdp; |
123 | unsigned long val = p | _PMD_SIZE_4M | _PAGE_HWEXEC | _PAGE_HWWRITE; | 123 | unsigned long val = p | _PMD_SIZE_4M | _PAGE_EXEC | _PAGE_HWWRITE; |
124 | 124 | ||
125 | pmdp = pmd_offset(pud_offset(pgd_offset_k(v), v), v); | 125 | pmdp = pmd_offset(pud_offset(pgd_offset_k(v), v), v); |
126 | pmd_val(*pmdp) = val; | 126 | pmd_val(*pmdp) = val; |
diff --git a/arch/powerpc/mm/Makefile b/arch/powerpc/mm/Makefile index 3e68363405b7..6fb8fc8d2fea 100644 --- a/arch/powerpc/mm/Makefile +++ b/arch/powerpc/mm/Makefile | |||
@@ -13,6 +13,7 @@ obj-y := fault.o mem.o pgtable.o gup.o \ | |||
13 | pgtable_$(CONFIG_WORD_SIZE).o | 13 | pgtable_$(CONFIG_WORD_SIZE).o |
14 | obj-$(CONFIG_PPC_MMU_NOHASH) += mmu_context_nohash.o tlb_nohash.o \ | 14 | obj-$(CONFIG_PPC_MMU_NOHASH) += mmu_context_nohash.o tlb_nohash.o \ |
15 | tlb_nohash_low.o | 15 | tlb_nohash_low.o |
16 | obj-$(CONFIG_PPC_BOOK3E) += tlb_low_$(CONFIG_WORD_SIZE)e.o | ||
16 | obj-$(CONFIG_PPC64) += mmap_64.o | 17 | obj-$(CONFIG_PPC64) += mmap_64.o |
17 | hash64-$(CONFIG_PPC_NATIVE) := hash_native_64.o | 18 | hash64-$(CONFIG_PPC_NATIVE) := hash_native_64.o |
18 | obj-$(CONFIG_PPC_STD_MMU_64) += hash_utils_64.o \ | 19 | obj-$(CONFIG_PPC_STD_MMU_64) += hash_utils_64.o \ |
diff --git a/arch/powerpc/mm/fsl_booke_mmu.c b/arch/powerpc/mm/fsl_booke_mmu.c index bb3d65998e6b..dc93e95b256e 100644 --- a/arch/powerpc/mm/fsl_booke_mmu.c +++ b/arch/powerpc/mm/fsl_booke_mmu.c | |||
@@ -161,7 +161,7 @@ unsigned long __init mmu_mapin_ram(void) | |||
161 | unsigned long virt = PAGE_OFFSET; | 161 | unsigned long virt = PAGE_OFFSET; |
162 | phys_addr_t phys = memstart_addr; | 162 | phys_addr_t phys = memstart_addr; |
163 | 163 | ||
164 | while (cam[tlbcam_index] && tlbcam_index < ARRAY_SIZE(cam)) { | 164 | while (tlbcam_index < ARRAY_SIZE(cam) && cam[tlbcam_index]) { |
165 | settlbcam(tlbcam_index, virt, phys, cam[tlbcam_index], PAGE_KERNEL_X, 0); | 165 | settlbcam(tlbcam_index, virt, phys, cam[tlbcam_index], PAGE_KERNEL_X, 0); |
166 | virt += cam[tlbcam_index]; | 166 | virt += cam[tlbcam_index]; |
167 | phys += cam[tlbcam_index]; | 167 | phys += cam[tlbcam_index]; |
diff --git a/arch/powerpc/mm/hash_low_32.S b/arch/powerpc/mm/hash_low_32.S index 14af8cedab70..b13d58932bf6 100644 --- a/arch/powerpc/mm/hash_low_32.S +++ b/arch/powerpc/mm/hash_low_32.S | |||
@@ -40,7 +40,7 @@ mmu_hash_lock: | |||
40 | * The address is in r4, and r3 contains an access flag: | 40 | * The address is in r4, and r3 contains an access flag: |
41 | * _PAGE_RW (0x400) if a write. | 41 | * _PAGE_RW (0x400) if a write. |
42 | * r9 contains the SRR1 value, from which we use the MSR_PR bit. | 42 | * r9 contains the SRR1 value, from which we use the MSR_PR bit. |
43 | * SPRG3 contains the physical address of the current task's thread. | 43 | * SPRG_THREAD contains the physical address of the current task's thread. |
44 | * | 44 | * |
45 | * Returns to the caller if the access is illegal or there is no | 45 | * Returns to the caller if the access is illegal or there is no |
46 | * mapping for the address. Otherwise it places an appropriate PTE | 46 | * mapping for the address. Otherwise it places an appropriate PTE |
@@ -68,7 +68,7 @@ _GLOBAL(hash_page) | |||
68 | /* Get PTE (linux-style) and check access */ | 68 | /* Get PTE (linux-style) and check access */ |
69 | lis r0,KERNELBASE@h /* check if kernel address */ | 69 | lis r0,KERNELBASE@h /* check if kernel address */ |
70 | cmplw 0,r4,r0 | 70 | cmplw 0,r4,r0 |
71 | mfspr r8,SPRN_SPRG3 /* current task's THREAD (phys) */ | 71 | mfspr r8,SPRN_SPRG_THREAD /* current task's THREAD (phys) */ |
72 | ori r3,r3,_PAGE_USER|_PAGE_PRESENT /* test low addresses as user */ | 72 | ori r3,r3,_PAGE_USER|_PAGE_PRESENT /* test low addresses as user */ |
73 | lwz r5,PGDIR(r8) /* virt page-table root */ | 73 | lwz r5,PGDIR(r8) /* virt page-table root */ |
74 | blt+ 112f /* assume user more likely */ | 74 | blt+ 112f /* assume user more likely */ |
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index c46ef2ffa3d9..90df6ffe3a43 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c | |||
@@ -57,8 +57,10 @@ unsigned int mmu_huge_psizes[MMU_PAGE_COUNT] = { }; /* initialize all to 0 */ | |||
57 | #define HUGEPTE_CACHE_NAME(psize) (huge_pgtable_cache_name[psize]) | 57 | #define HUGEPTE_CACHE_NAME(psize) (huge_pgtable_cache_name[psize]) |
58 | 58 | ||
59 | static const char *huge_pgtable_cache_name[MMU_PAGE_COUNT] = { | 59 | static const char *huge_pgtable_cache_name[MMU_PAGE_COUNT] = { |
60 | "unused_4K", "hugepte_cache_64K", "unused_64K_AP", | 60 | [MMU_PAGE_64K] = "hugepte_cache_64K", |
61 | "hugepte_cache_1M", "hugepte_cache_16M", "hugepte_cache_16G" | 61 | [MMU_PAGE_1M] = "hugepte_cache_1M", |
62 | [MMU_PAGE_16M] = "hugepte_cache_16M", | ||
63 | [MMU_PAGE_16G] = "hugepte_cache_16G", | ||
62 | }; | 64 | }; |
63 | 65 | ||
64 | /* Flag to mark huge PD pointers. This means pmd_bad() and pud_bad() | 66 | /* Flag to mark huge PD pointers. This means pmd_bad() and pud_bad() |
@@ -700,6 +702,8 @@ static void __init set_huge_psize(int psize) | |||
700 | if (mmu_huge_psizes[psize] || | 702 | if (mmu_huge_psizes[psize] || |
701 | mmu_psize_defs[psize].shift == PAGE_SHIFT) | 703 | mmu_psize_defs[psize].shift == PAGE_SHIFT) |
702 | return; | 704 | return; |
705 | if (WARN_ON(HUGEPTE_CACHE_NAME(psize) == NULL)) | ||
706 | return; | ||
703 | hugetlb_add_hstate(mmu_psize_defs[psize].shift - PAGE_SHIFT); | 707 | hugetlb_add_hstate(mmu_psize_defs[psize].shift - PAGE_SHIFT); |
704 | 708 | ||
705 | switch (mmu_psize_defs[psize].shift) { | 709 | switch (mmu_psize_defs[psize].shift) { |
diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c index 3de6a0d93824..3ef5084b90ca 100644 --- a/arch/powerpc/mm/init_32.c +++ b/arch/powerpc/mm/init_32.c | |||
@@ -54,8 +54,6 @@ | |||
54 | #endif | 54 | #endif |
55 | #define MAX_LOW_MEM CONFIG_LOWMEM_SIZE | 55 | #define MAX_LOW_MEM CONFIG_LOWMEM_SIZE |
56 | 56 | ||
57 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); | ||
58 | |||
59 | phys_addr_t total_memory; | 57 | phys_addr_t total_memory; |
60 | phys_addr_t total_lowmem; | 58 | phys_addr_t total_lowmem; |
61 | 59 | ||
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c index 68a821add28d..31582329cd67 100644 --- a/arch/powerpc/mm/init_64.c +++ b/arch/powerpc/mm/init_64.c | |||
@@ -205,6 +205,47 @@ static int __meminit vmemmap_populated(unsigned long start, int page_size) | |||
205 | return 0; | 205 | return 0; |
206 | } | 206 | } |
207 | 207 | ||
208 | /* On hash-based CPUs, the vmemmap is bolted in the hash table. | ||
209 | * | ||
210 | * On Book3E CPUs, the vmemmap is currently mapped in the top half of | ||
211 | * the vmalloc space using normal page tables, though the size of | ||
212 | * pages encoded in the PTEs can be different | ||
213 | */ | ||
214 | |||
215 | #ifdef CONFIG_PPC_BOOK3E | ||
216 | static void __meminit vmemmap_create_mapping(unsigned long start, | ||
217 | unsigned long page_size, | ||
218 | unsigned long phys) | ||
219 | { | ||
220 | /* Create a PTE encoding without page size */ | ||
221 | unsigned long i, flags = _PAGE_PRESENT | _PAGE_ACCESSED | | ||
222 | _PAGE_KERNEL_RW; | ||
223 | |||
224 | /* PTEs only contain page size encodings up to 32M */ | ||
225 | BUG_ON(mmu_psize_defs[mmu_vmemmap_psize].enc > 0xf); | ||
226 | |||
227 | /* Encode the size in the PTE */ | ||
228 | flags |= mmu_psize_defs[mmu_vmemmap_psize].enc << 8; | ||
229 | |||
230 | /* For each PTE for that area, map things. Note that we don't | ||
231 | * increment phys because all PTEs are of the large size and | ||
232 | * thus must have the low bits clear | ||
233 | */ | ||
234 | for (i = 0; i < page_size; i += PAGE_SIZE) | ||
235 | BUG_ON(map_kernel_page(start + i, phys, flags)); | ||
236 | } | ||
237 | #else /* CONFIG_PPC_BOOK3E */ | ||
238 | static void __meminit vmemmap_create_mapping(unsigned long start, | ||
239 | unsigned long page_size, | ||
240 | unsigned long phys) | ||
241 | { | ||
242 | int mapped = htab_bolt_mapping(start, start + page_size, phys, | ||
243 | PAGE_KERNEL, mmu_vmemmap_psize, | ||
244 | mmu_kernel_ssize); | ||
245 | BUG_ON(mapped < 0); | ||
246 | } | ||
247 | #endif /* CONFIG_PPC_BOOK3E */ | ||
248 | |||
208 | int __meminit vmemmap_populate(struct page *start_page, | 249 | int __meminit vmemmap_populate(struct page *start_page, |
209 | unsigned long nr_pages, int node) | 250 | unsigned long nr_pages, int node) |
210 | { | 251 | { |
@@ -215,8 +256,11 @@ int __meminit vmemmap_populate(struct page *start_page, | |||
215 | /* Align to the page size of the linear mapping. */ | 256 | /* Align to the page size of the linear mapping. */ |
216 | start = _ALIGN_DOWN(start, page_size); | 257 | start = _ALIGN_DOWN(start, page_size); |
217 | 258 | ||
259 | pr_debug("vmemmap_populate page %p, %ld pages, node %d\n", | ||
260 | start_page, nr_pages, node); | ||
261 | pr_debug(" -> map %lx..%lx\n", start, end); | ||
262 | |||
218 | for (; start < end; start += page_size) { | 263 | for (; start < end; start += page_size) { |
219 | int mapped; | ||
220 | void *p; | 264 | void *p; |
221 | 265 | ||
222 | if (vmemmap_populated(start, page_size)) | 266 | if (vmemmap_populated(start, page_size)) |
@@ -226,13 +270,10 @@ int __meminit vmemmap_populate(struct page *start_page, | |||
226 | if (!p) | 270 | if (!p) |
227 | return -ENOMEM; | 271 | return -ENOMEM; |
228 | 272 | ||
229 | pr_debug("vmemmap %08lx allocated at %p, physical %08lx.\n", | 273 | pr_debug(" * %016lx..%016lx allocated at %p\n", |
230 | start, p, __pa(p)); | 274 | start, start + page_size, p); |
231 | 275 | ||
232 | mapped = htab_bolt_mapping(start, start + page_size, __pa(p), | 276 | vmemmap_create_mapping(start, page_size, __pa(p)); |
233 | pgprot_val(PAGE_KERNEL), | ||
234 | mmu_vmemmap_psize, mmu_kernel_ssize); | ||
235 | BUG_ON(mapped < 0); | ||
236 | } | 277 | } |
237 | 278 | ||
238 | return 0; | 279 | return 0; |
diff --git a/arch/powerpc/mm/mmu_context_nohash.c b/arch/powerpc/mm/mmu_context_nohash.c index b1a727def15b..c2f93dc470e6 100644 --- a/arch/powerpc/mm/mmu_context_nohash.c +++ b/arch/powerpc/mm/mmu_context_nohash.c | |||
@@ -25,10 +25,20 @@ | |||
25 | * also clear mm->cpu_vm_mask bits when processes are migrated | 25 | * also clear mm->cpu_vm_mask bits when processes are migrated |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #undef DEBUG | 28 | #define DEBUG_MAP_CONSISTENCY |
29 | #define DEBUG_STEAL_ONLY | 29 | #define DEBUG_CLAMP_LAST_CONTEXT 31 |
30 | #undef DEBUG_MAP_CONSISTENCY | 30 | //#define DEBUG_HARDER |
31 | /*#define DEBUG_CLAMP_LAST_CONTEXT 15 */ | 31 | |
32 | /* We don't use DEBUG because it tends to be compiled in always nowadays | ||
33 | * and this would generate way too much output | ||
34 | */ | ||
35 | #ifdef DEBUG_HARDER | ||
36 | #define pr_hard(args...) printk(KERN_DEBUG args) | ||
37 | #define pr_hardcont(args...) printk(KERN_CONT args) | ||
38 | #else | ||
39 | #define pr_hard(args...) do { } while(0) | ||
40 | #define pr_hardcont(args...) do { } while(0) | ||
41 | #endif | ||
32 | 42 | ||
33 | #include <linux/kernel.h> | 43 | #include <linux/kernel.h> |
34 | #include <linux/mm.h> | 44 | #include <linux/mm.h> |
@@ -71,7 +81,7 @@ static DEFINE_SPINLOCK(context_lock); | |||
71 | static unsigned int steal_context_smp(unsigned int id) | 81 | static unsigned int steal_context_smp(unsigned int id) |
72 | { | 82 | { |
73 | struct mm_struct *mm; | 83 | struct mm_struct *mm; |
74 | unsigned int cpu, max; | 84 | unsigned int cpu, max, i; |
75 | 85 | ||
76 | max = last_context - first_context; | 86 | max = last_context - first_context; |
77 | 87 | ||
@@ -89,15 +99,22 @@ static unsigned int steal_context_smp(unsigned int id) | |||
89 | id = first_context; | 99 | id = first_context; |
90 | continue; | 100 | continue; |
91 | } | 101 | } |
92 | pr_devel("[%d] steal context %d from mm @%p\n", | 102 | pr_hardcont(" | steal %d from 0x%p", id, mm); |
93 | smp_processor_id(), id, mm); | ||
94 | 103 | ||
95 | /* Mark this mm has having no context anymore */ | 104 | /* Mark this mm has having no context anymore */ |
96 | mm->context.id = MMU_NO_CONTEXT; | 105 | mm->context.id = MMU_NO_CONTEXT; |
97 | 106 | ||
98 | /* Mark it stale on all CPUs that used this mm */ | 107 | /* Mark it stale on all CPUs that used this mm. For threaded |
99 | for_each_cpu(cpu, mm_cpumask(mm)) | 108 | * implementations, we set it on all threads on each core |
100 | __set_bit(id, stale_map[cpu]); | 109 | * represented in the mask. A future implementation will use |
110 | * a core map instead but this will do for now. | ||
111 | */ | ||
112 | for_each_cpu(cpu, mm_cpumask(mm)) { | ||
113 | for (i = cpu_first_thread_in_core(cpu); | ||
114 | i <= cpu_last_thread_in_core(cpu); i++) | ||
115 | __set_bit(id, stale_map[i]); | ||
116 | cpu = i - 1; | ||
117 | } | ||
101 | return id; | 118 | return id; |
102 | } | 119 | } |
103 | 120 | ||
@@ -126,7 +143,7 @@ static unsigned int steal_context_up(unsigned int id) | |||
126 | /* Pick up the victim mm */ | 143 | /* Pick up the victim mm */ |
127 | mm = context_mm[id]; | 144 | mm = context_mm[id]; |
128 | 145 | ||
129 | pr_devel("[%d] steal context %d from mm @%p\n", cpu, id, mm); | 146 | pr_hardcont(" | steal %d from 0x%p", id, mm); |
130 | 147 | ||
131 | /* Flush the TLB for that context */ | 148 | /* Flush the TLB for that context */ |
132 | local_flush_tlb_mm(mm); | 149 | local_flush_tlb_mm(mm); |
@@ -173,25 +190,20 @@ static void context_check_map(void) { } | |||
173 | 190 | ||
174 | void switch_mmu_context(struct mm_struct *prev, struct mm_struct *next) | 191 | void switch_mmu_context(struct mm_struct *prev, struct mm_struct *next) |
175 | { | 192 | { |
176 | unsigned int id, cpu = smp_processor_id(); | 193 | unsigned int i, id, cpu = smp_processor_id(); |
177 | unsigned long *map; | 194 | unsigned long *map; |
178 | 195 | ||
179 | /* No lockless fast path .. yet */ | 196 | /* No lockless fast path .. yet */ |
180 | spin_lock(&context_lock); | 197 | spin_lock(&context_lock); |
181 | 198 | ||
182 | #ifndef DEBUG_STEAL_ONLY | 199 | pr_hard("[%d] activating context for mm @%p, active=%d, id=%d", |
183 | pr_devel("[%d] activating context for mm @%p, active=%d, id=%d\n", | 200 | cpu, next, next->context.active, next->context.id); |
184 | cpu, next, next->context.active, next->context.id); | ||
185 | #endif | ||
186 | 201 | ||
187 | #ifdef CONFIG_SMP | 202 | #ifdef CONFIG_SMP |
188 | /* Mark us active and the previous one not anymore */ | 203 | /* Mark us active and the previous one not anymore */ |
189 | next->context.active++; | 204 | next->context.active++; |
190 | if (prev) { | 205 | if (prev) { |
191 | #ifndef DEBUG_STEAL_ONLY | 206 | pr_hardcont(" (old=0x%p a=%d)", prev, prev->context.active); |
192 | pr_devel(" old context %p active was: %d\n", | ||
193 | prev, prev->context.active); | ||
194 | #endif | ||
195 | WARN_ON(prev->context.active < 1); | 207 | WARN_ON(prev->context.active < 1); |
196 | prev->context.active--; | 208 | prev->context.active--; |
197 | } | 209 | } |
@@ -201,8 +213,14 @@ void switch_mmu_context(struct mm_struct *prev, struct mm_struct *next) | |||
201 | 213 | ||
202 | /* If we already have a valid assigned context, skip all that */ | 214 | /* If we already have a valid assigned context, skip all that */ |
203 | id = next->context.id; | 215 | id = next->context.id; |
204 | if (likely(id != MMU_NO_CONTEXT)) | 216 | if (likely(id != MMU_NO_CONTEXT)) { |
217 | #ifdef DEBUG_MAP_CONSISTENCY | ||
218 | if (context_mm[id] != next) | ||
219 | pr_err("MMU: mm 0x%p has id %d but context_mm[%d] says 0x%p\n", | ||
220 | next, id, id, context_mm[id]); | ||
221 | #endif | ||
205 | goto ctxt_ok; | 222 | goto ctxt_ok; |
223 | } | ||
206 | 224 | ||
207 | /* We really don't have a context, let's try to acquire one */ | 225 | /* We really don't have a context, let's try to acquire one */ |
208 | id = next_context; | 226 | id = next_context; |
@@ -235,11 +253,7 @@ void switch_mmu_context(struct mm_struct *prev, struct mm_struct *next) | |||
235 | next_context = id + 1; | 253 | next_context = id + 1; |
236 | context_mm[id] = next; | 254 | context_mm[id] = next; |
237 | next->context.id = id; | 255 | next->context.id = id; |
238 | 256 | pr_hardcont(" | new id=%d,nrf=%d", id, nr_free_contexts); | |
239 | #ifndef DEBUG_STEAL_ONLY | ||
240 | pr_devel("[%d] picked up new id %d, nrf is now %d\n", | ||
241 | cpu, id, nr_free_contexts); | ||
242 | #endif | ||
243 | 257 | ||
244 | context_check_map(); | 258 | context_check_map(); |
245 | ctxt_ok: | 259 | ctxt_ok: |
@@ -248,15 +262,21 @@ void switch_mmu_context(struct mm_struct *prev, struct mm_struct *next) | |||
248 | * local TLB for it and unmark it before we use it | 262 | * local TLB for it and unmark it before we use it |
249 | */ | 263 | */ |
250 | if (test_bit(id, stale_map[cpu])) { | 264 | if (test_bit(id, stale_map[cpu])) { |
251 | pr_devel("[%d] flushing stale context %d for mm @%p !\n", | 265 | pr_hardcont(" | stale flush %d [%d..%d]", |
252 | cpu, id, next); | 266 | id, cpu_first_thread_in_core(cpu), |
267 | cpu_last_thread_in_core(cpu)); | ||
268 | |||
253 | local_flush_tlb_mm(next); | 269 | local_flush_tlb_mm(next); |
254 | 270 | ||
255 | /* XXX This clear should ultimately be part of local_flush_tlb_mm */ | 271 | /* XXX This clear should ultimately be part of local_flush_tlb_mm */ |
256 | __clear_bit(id, stale_map[cpu]); | 272 | for (i = cpu_first_thread_in_core(cpu); |
273 | i <= cpu_last_thread_in_core(cpu); i++) { | ||
274 | __clear_bit(id, stale_map[i]); | ||
275 | } | ||
257 | } | 276 | } |
258 | 277 | ||
259 | /* Flick the MMU and release lock */ | 278 | /* Flick the MMU and release lock */ |
279 | pr_hardcont(" -> %d\n", id); | ||
260 | set_context(id, next->pgd); | 280 | set_context(id, next->pgd); |
261 | spin_unlock(&context_lock); | 281 | spin_unlock(&context_lock); |
262 | } | 282 | } |
@@ -266,6 +286,8 @@ void switch_mmu_context(struct mm_struct *prev, struct mm_struct *next) | |||
266 | */ | 286 | */ |
267 | int init_new_context(struct task_struct *t, struct mm_struct *mm) | 287 | int init_new_context(struct task_struct *t, struct mm_struct *mm) |
268 | { | 288 | { |
289 | pr_hard("initing context for mm @%p\n", mm); | ||
290 | |||
269 | mm->context.id = MMU_NO_CONTEXT; | 291 | mm->context.id = MMU_NO_CONTEXT; |
270 | mm->context.active = 0; | 292 | mm->context.active = 0; |
271 | 293 | ||
@@ -305,7 +327,9 @@ static int __cpuinit mmu_context_cpu_notify(struct notifier_block *self, | |||
305 | unsigned long action, void *hcpu) | 327 | unsigned long action, void *hcpu) |
306 | { | 328 | { |
307 | unsigned int cpu = (unsigned int)(long)hcpu; | 329 | unsigned int cpu = (unsigned int)(long)hcpu; |
308 | 330 | #ifdef CONFIG_HOTPLUG_CPU | |
331 | struct task_struct *p; | ||
332 | #endif | ||
309 | /* We don't touch CPU 0 map, it's allocated at aboot and kept | 333 | /* We don't touch CPU 0 map, it's allocated at aboot and kept |
310 | * around forever | 334 | * around forever |
311 | */ | 335 | */ |
@@ -324,8 +348,16 @@ static int __cpuinit mmu_context_cpu_notify(struct notifier_block *self, | |||
324 | pr_devel("MMU: Freeing stale context map for CPU %d\n", cpu); | 348 | pr_devel("MMU: Freeing stale context map for CPU %d\n", cpu); |
325 | kfree(stale_map[cpu]); | 349 | kfree(stale_map[cpu]); |
326 | stale_map[cpu] = NULL; | 350 | stale_map[cpu] = NULL; |
327 | break; | 351 | |
328 | #endif | 352 | /* We also clear the cpu_vm_mask bits of CPUs going away */ |
353 | read_lock(&tasklist_lock); | ||
354 | for_each_process(p) { | ||
355 | if (p->mm) | ||
356 | cpu_mask_clear_cpu(cpu, mm_cpumask(p->mm)); | ||
357 | } | ||
358 | read_unlock(&tasklist_lock); | ||
359 | break; | ||
360 | #endif /* CONFIG_HOTPLUG_CPU */ | ||
329 | } | 361 | } |
330 | return NOTIFY_OK; | 362 | return NOTIFY_OK; |
331 | } | 363 | } |
diff --git a/arch/powerpc/mm/mmu_decl.h b/arch/powerpc/mm/mmu_decl.h index d1f9c62dc177..d2e5321d5ea6 100644 --- a/arch/powerpc/mm/mmu_decl.h +++ b/arch/powerpc/mm/mmu_decl.h | |||
@@ -36,21 +36,37 @@ static inline void _tlbil_pid(unsigned int pid) | |||
36 | { | 36 | { |
37 | asm volatile ("sync; tlbia; isync" : : : "memory"); | 37 | asm volatile ("sync; tlbia; isync" : : : "memory"); |
38 | } | 38 | } |
39 | #define _tlbil_pid_noind(pid) _tlbil_pid(pid) | ||
40 | |||
39 | #else /* CONFIG_40x || CONFIG_8xx */ | 41 | #else /* CONFIG_40x || CONFIG_8xx */ |
40 | extern void _tlbil_all(void); | 42 | extern void _tlbil_all(void); |
41 | extern void _tlbil_pid(unsigned int pid); | 43 | extern void _tlbil_pid(unsigned int pid); |
44 | #ifdef CONFIG_PPC_BOOK3E | ||
45 | extern void _tlbil_pid_noind(unsigned int pid); | ||
46 | #else | ||
47 | #define _tlbil_pid_noind(pid) _tlbil_pid(pid) | ||
48 | #endif | ||
42 | #endif /* !(CONFIG_40x || CONFIG_8xx) */ | 49 | #endif /* !(CONFIG_40x || CONFIG_8xx) */ |
43 | 50 | ||
44 | /* | 51 | /* |
45 | * On 8xx, we directly inline tlbie, on others, it's extern | 52 | * On 8xx, we directly inline tlbie, on others, it's extern |
46 | */ | 53 | */ |
47 | #ifdef CONFIG_8xx | 54 | #ifdef CONFIG_8xx |
48 | static inline void _tlbil_va(unsigned long address, unsigned int pid) | 55 | static inline void _tlbil_va(unsigned long address, unsigned int pid, |
56 | unsigned int tsize, unsigned int ind) | ||
49 | { | 57 | { |
50 | asm volatile ("tlbie %0; sync" : : "r" (address) : "memory"); | 58 | asm volatile ("tlbie %0; sync" : : "r" (address) : "memory"); |
51 | } | 59 | } |
52 | #else /* CONFIG_8xx */ | 60 | #elif defined(CONFIG_PPC_BOOK3E) |
53 | extern void _tlbil_va(unsigned long address, unsigned int pid); | 61 | extern void _tlbil_va(unsigned long address, unsigned int pid, |
62 | unsigned int tsize, unsigned int ind); | ||
63 | #else | ||
64 | extern void __tlbil_va(unsigned long address, unsigned int pid); | ||
65 | static inline void _tlbil_va(unsigned long address, unsigned int pid, | ||
66 | unsigned int tsize, unsigned int ind) | ||
67 | { | ||
68 | __tlbil_va(address, pid); | ||
69 | } | ||
54 | #endif /* CONIFG_8xx */ | 70 | #endif /* CONIFG_8xx */ |
55 | 71 | ||
56 | /* | 72 | /* |
@@ -58,10 +74,16 @@ extern void _tlbil_va(unsigned long address, unsigned int pid); | |||
58 | * implementation. When that becomes the case, this will be | 74 | * implementation. When that becomes the case, this will be |
59 | * an extern. | 75 | * an extern. |
60 | */ | 76 | */ |
61 | static inline void _tlbivax_bcast(unsigned long address, unsigned int pid) | 77 | #ifdef CONFIG_PPC_BOOK3E |
78 | extern void _tlbivax_bcast(unsigned long address, unsigned int pid, | ||
79 | unsigned int tsize, unsigned int ind); | ||
80 | #else | ||
81 | static inline void _tlbivax_bcast(unsigned long address, unsigned int pid, | ||
82 | unsigned int tsize, unsigned int ind) | ||
62 | { | 83 | { |
63 | BUG(); | 84 | BUG(); |
64 | } | 85 | } |
86 | #endif | ||
65 | 87 | ||
66 | #else /* CONFIG_PPC_MMU_NOHASH */ | 88 | #else /* CONFIG_PPC_MMU_NOHASH */ |
67 | 89 | ||
@@ -99,7 +121,12 @@ extern unsigned int rtas_data, rtas_size; | |||
99 | struct hash_pte; | 121 | struct hash_pte; |
100 | extern struct hash_pte *Hash, *Hash_end; | 122 | extern struct hash_pte *Hash, *Hash_end; |
101 | extern unsigned long Hash_size, Hash_mask; | 123 | extern unsigned long Hash_size, Hash_mask; |
102 | #endif | 124 | |
125 | #endif /* CONFIG_PPC32 */ | ||
126 | |||
127 | #ifdef CONFIG_PPC64 | ||
128 | extern int map_kernel_page(unsigned long ea, unsigned long pa, int flags); | ||
129 | #endif /* CONFIG_PPC64 */ | ||
103 | 130 | ||
104 | extern unsigned long ioremap_bot; | 131 | extern unsigned long ioremap_bot; |
105 | extern unsigned long __max_low_memory; | 132 | extern unsigned long __max_low_memory; |
diff --git a/arch/powerpc/mm/pgtable.c b/arch/powerpc/mm/pgtable.c index 627767d6169b..83f1551ec2c9 100644 --- a/arch/powerpc/mm/pgtable.c +++ b/arch/powerpc/mm/pgtable.c | |||
@@ -30,6 +30,16 @@ | |||
30 | #include <asm/tlbflush.h> | 30 | #include <asm/tlbflush.h> |
31 | #include <asm/tlb.h> | 31 | #include <asm/tlb.h> |
32 | 32 | ||
33 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); | ||
34 | |||
35 | #ifdef CONFIG_SMP | ||
36 | |||
37 | /* | ||
38 | * Handle batching of page table freeing on SMP. Page tables are | ||
39 | * queued up and send to be freed later by RCU in order to avoid | ||
40 | * freeing a page table page that is being walked without locks | ||
41 | */ | ||
42 | |||
33 | static DEFINE_PER_CPU(struct pte_freelist_batch *, pte_freelist_cur); | 43 | static DEFINE_PER_CPU(struct pte_freelist_batch *, pte_freelist_cur); |
34 | static unsigned long pte_freelist_forced_free; | 44 | static unsigned long pte_freelist_forced_free; |
35 | 45 | ||
@@ -116,27 +126,7 @@ void pte_free_finish(void) | |||
116 | *batchp = NULL; | 126 | *batchp = NULL; |
117 | } | 127 | } |
118 | 128 | ||
119 | /* | 129 | #endif /* CONFIG_SMP */ |
120 | * Handle i/d cache flushing, called from set_pte_at() or ptep_set_access_flags() | ||
121 | */ | ||
122 | static pte_t do_dcache_icache_coherency(pte_t pte) | ||
123 | { | ||
124 | unsigned long pfn = pte_pfn(pte); | ||
125 | struct page *page; | ||
126 | |||
127 | if (unlikely(!pfn_valid(pfn))) | ||
128 | return pte; | ||
129 | page = pfn_to_page(pfn); | ||
130 | |||
131 | if (!PageReserved(page) && !test_bit(PG_arch_1, &page->flags)) { | ||
132 | pr_devel("do_dcache_icache_coherency... flushing\n"); | ||
133 | flush_dcache_icache_page(page); | ||
134 | set_bit(PG_arch_1, &page->flags); | ||
135 | } | ||
136 | else | ||
137 | pr_devel("do_dcache_icache_coherency... already clean\n"); | ||
138 | return __pte(pte_val(pte) | _PAGE_HWEXEC); | ||
139 | } | ||
140 | 130 | ||
141 | static inline int is_exec_fault(void) | 131 | static inline int is_exec_fault(void) |
142 | { | 132 | { |
@@ -145,49 +135,139 @@ static inline int is_exec_fault(void) | |||
145 | 135 | ||
146 | /* We only try to do i/d cache coherency on stuff that looks like | 136 | /* We only try to do i/d cache coherency on stuff that looks like |
147 | * reasonably "normal" PTEs. We currently require a PTE to be present | 137 | * reasonably "normal" PTEs. We currently require a PTE to be present |
148 | * and we avoid _PAGE_SPECIAL and _PAGE_NO_CACHE | 138 | * and we avoid _PAGE_SPECIAL and _PAGE_NO_CACHE. We also only do that |
139 | * on userspace PTEs | ||
149 | */ | 140 | */ |
150 | static inline int pte_looks_normal(pte_t pte) | 141 | static inline int pte_looks_normal(pte_t pte) |
151 | { | 142 | { |
152 | return (pte_val(pte) & | 143 | return (pte_val(pte) & |
153 | (_PAGE_PRESENT | _PAGE_SPECIAL | _PAGE_NO_CACHE)) == | 144 | (_PAGE_PRESENT | _PAGE_SPECIAL | _PAGE_NO_CACHE | _PAGE_USER)) == |
154 | (_PAGE_PRESENT); | 145 | (_PAGE_PRESENT | _PAGE_USER); |
155 | } | 146 | } |
156 | 147 | ||
157 | #if defined(CONFIG_PPC_STD_MMU) | 148 | struct page * maybe_pte_to_page(pte_t pte) |
149 | { | ||
150 | unsigned long pfn = pte_pfn(pte); | ||
151 | struct page *page; | ||
152 | |||
153 | if (unlikely(!pfn_valid(pfn))) | ||
154 | return NULL; | ||
155 | page = pfn_to_page(pfn); | ||
156 | if (PageReserved(page)) | ||
157 | return NULL; | ||
158 | return page; | ||
159 | } | ||
160 | |||
161 | #if defined(CONFIG_PPC_STD_MMU) || _PAGE_EXEC == 0 | ||
162 | |||
158 | /* Server-style MMU handles coherency when hashing if HW exec permission | 163 | /* Server-style MMU handles coherency when hashing if HW exec permission |
159 | * is supposed per page (currently 64-bit only). Else, we always flush | 164 | * is supposed per page (currently 64-bit only). If not, then, we always |
160 | * valid PTEs in set_pte. | 165 | * flush the cache for valid PTEs in set_pte. Embedded CPU without HW exec |
166 | * support falls into the same category. | ||
161 | */ | 167 | */ |
162 | static inline int pte_need_exec_flush(pte_t pte, int set_pte) | 168 | |
169 | static pte_t set_pte_filter(pte_t pte) | ||
163 | { | 170 | { |
164 | return set_pte && pte_looks_normal(pte) && | 171 | pte = __pte(pte_val(pte) & ~_PAGE_HPTEFLAGS); |
165 | !(cpu_has_feature(CPU_FTR_COHERENT_ICACHE) || | 172 | if (pte_looks_normal(pte) && !(cpu_has_feature(CPU_FTR_COHERENT_ICACHE) || |
166 | cpu_has_feature(CPU_FTR_NOEXECUTE)); | 173 | cpu_has_feature(CPU_FTR_NOEXECUTE))) { |
174 | struct page *pg = maybe_pte_to_page(pte); | ||
175 | if (!pg) | ||
176 | return pte; | ||
177 | if (!test_bit(PG_arch_1, &pg->flags)) { | ||
178 | flush_dcache_icache_page(pg); | ||
179 | set_bit(PG_arch_1, &pg->flags); | ||
180 | } | ||
181 | } | ||
182 | return pte; | ||
167 | } | 183 | } |
168 | #elif _PAGE_HWEXEC == 0 | 184 | |
169 | /* Embedded type MMU without HW exec support (8xx only so far), we flush | 185 | static pte_t set_access_flags_filter(pte_t pte, struct vm_area_struct *vma, |
170 | * the cache for any present PTE | 186 | int dirty) |
171 | */ | ||
172 | static inline int pte_need_exec_flush(pte_t pte, int set_pte) | ||
173 | { | 187 | { |
174 | return set_pte && pte_looks_normal(pte); | 188 | return pte; |
175 | } | 189 | } |
176 | #else | 190 | |
177 | /* Other embedded CPUs with HW exec support per-page, we flush on exec | 191 | #else /* defined(CONFIG_PPC_STD_MMU) || _PAGE_EXEC == 0 */ |
178 | * fault if HWEXEC is not set | 192 | |
193 | /* Embedded type MMU with HW exec support. This is a bit more complicated | ||
194 | * as we don't have two bits to spare for _PAGE_EXEC and _PAGE_HWEXEC so | ||
195 | * instead we "filter out" the exec permission for non clean pages. | ||
179 | */ | 196 | */ |
180 | static inline int pte_need_exec_flush(pte_t pte, int set_pte) | 197 | static pte_t set_pte_filter(pte_t pte) |
181 | { | 198 | { |
182 | return pte_looks_normal(pte) && is_exec_fault() && | 199 | struct page *pg; |
183 | !(pte_val(pte) & _PAGE_HWEXEC); | 200 | |
201 | /* No exec permission in the first place, move on */ | ||
202 | if (!(pte_val(pte) & _PAGE_EXEC) || !pte_looks_normal(pte)) | ||
203 | return pte; | ||
204 | |||
205 | /* If you set _PAGE_EXEC on weird pages you're on your own */ | ||
206 | pg = maybe_pte_to_page(pte); | ||
207 | if (unlikely(!pg)) | ||
208 | return pte; | ||
209 | |||
210 | /* If the page clean, we move on */ | ||
211 | if (test_bit(PG_arch_1, &pg->flags)) | ||
212 | return pte; | ||
213 | |||
214 | /* If it's an exec fault, we flush the cache and make it clean */ | ||
215 | if (is_exec_fault()) { | ||
216 | flush_dcache_icache_page(pg); | ||
217 | set_bit(PG_arch_1, &pg->flags); | ||
218 | return pte; | ||
219 | } | ||
220 | |||
221 | /* Else, we filter out _PAGE_EXEC */ | ||
222 | return __pte(pte_val(pte) & ~_PAGE_EXEC); | ||
184 | } | 223 | } |
185 | #endif | 224 | |
225 | static pte_t set_access_flags_filter(pte_t pte, struct vm_area_struct *vma, | ||
226 | int dirty) | ||
227 | { | ||
228 | struct page *pg; | ||
229 | |||
230 | /* So here, we only care about exec faults, as we use them | ||
231 | * to recover lost _PAGE_EXEC and perform I$/D$ coherency | ||
232 | * if necessary. Also if _PAGE_EXEC is already set, same deal, | ||
233 | * we just bail out | ||
234 | */ | ||
235 | if (dirty || (pte_val(pte) & _PAGE_EXEC) || !is_exec_fault()) | ||
236 | return pte; | ||
237 | |||
238 | #ifdef CONFIG_DEBUG_VM | ||
239 | /* So this is an exec fault, _PAGE_EXEC is not set. If it was | ||
240 | * an error we would have bailed out earlier in do_page_fault() | ||
241 | * but let's make sure of it | ||
242 | */ | ||
243 | if (WARN_ON(!(vma->vm_flags & VM_EXEC))) | ||
244 | return pte; | ||
245 | #endif /* CONFIG_DEBUG_VM */ | ||
246 | |||
247 | /* If you set _PAGE_EXEC on weird pages you're on your own */ | ||
248 | pg = maybe_pte_to_page(pte); | ||
249 | if (unlikely(!pg)) | ||
250 | goto bail; | ||
251 | |||
252 | /* If the page is already clean, we move on */ | ||
253 | if (test_bit(PG_arch_1, &pg->flags)) | ||
254 | goto bail; | ||
255 | |||
256 | /* Clean the page and set PG_arch_1 */ | ||
257 | flush_dcache_icache_page(pg); | ||
258 | set_bit(PG_arch_1, &pg->flags); | ||
259 | |||
260 | bail: | ||
261 | return __pte(pte_val(pte) | _PAGE_EXEC); | ||
262 | } | ||
263 | |||
264 | #endif /* !(defined(CONFIG_PPC_STD_MMU) || _PAGE_EXEC == 0) */ | ||
186 | 265 | ||
187 | /* | 266 | /* |
188 | * set_pte stores a linux PTE into the linux page table. | 267 | * set_pte stores a linux PTE into the linux page table. |
189 | */ | 268 | */ |
190 | void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pte) | 269 | void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, |
270 | pte_t pte) | ||
191 | { | 271 | { |
192 | #ifdef CONFIG_DEBUG_VM | 272 | #ifdef CONFIG_DEBUG_VM |
193 | WARN_ON(pte_present(*ptep)); | 273 | WARN_ON(pte_present(*ptep)); |
@@ -196,9 +276,7 @@ void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pte | |||
196 | * this context might not have been activated yet when this | 276 | * this context might not have been activated yet when this |
197 | * is called. | 277 | * is called. |
198 | */ | 278 | */ |
199 | pte = __pte(pte_val(pte) & ~_PAGE_HPTEFLAGS); | 279 | pte = set_pte_filter(pte); |
200 | if (pte_need_exec_flush(pte, 1)) | ||
201 | pte = do_dcache_icache_coherency(pte); | ||
202 | 280 | ||
203 | /* Perform the setting of the PTE */ | 281 | /* Perform the setting of the PTE */ |
204 | __set_pte_at(mm, addr, ptep, pte, 0); | 282 | __set_pte_at(mm, addr, ptep, pte, 0); |
@@ -215,8 +293,7 @@ int ptep_set_access_flags(struct vm_area_struct *vma, unsigned long address, | |||
215 | pte_t *ptep, pte_t entry, int dirty) | 293 | pte_t *ptep, pte_t entry, int dirty) |
216 | { | 294 | { |
217 | int changed; | 295 | int changed; |
218 | if (!dirty && pte_need_exec_flush(entry, 0)) | 296 | entry = set_access_flags_filter(entry, vma, dirty); |
219 | entry = do_dcache_icache_coherency(entry); | ||
220 | changed = !pte_same(*(ptep), entry); | 297 | changed = !pte_same(*(ptep), entry); |
221 | if (changed) { | 298 | if (changed) { |
222 | if (!(vma->vm_flags & VM_HUGETLB)) | 299 | if (!(vma->vm_flags & VM_HUGETLB)) |
@@ -242,7 +319,7 @@ void assert_pte_locked(struct mm_struct *mm, unsigned long addr) | |||
242 | BUG_ON(pud_none(*pud)); | 319 | BUG_ON(pud_none(*pud)); |
243 | pmd = pmd_offset(pud, addr); | 320 | pmd = pmd_offset(pud, addr); |
244 | BUG_ON(!pmd_present(*pmd)); | 321 | BUG_ON(!pmd_present(*pmd)); |
245 | BUG_ON(!spin_is_locked(pte_lockptr(mm, pmd))); | 322 | assert_spin_locked(pte_lockptr(mm, pmd)); |
246 | } | 323 | } |
247 | #endif /* CONFIG_DEBUG_VM */ | 324 | #endif /* CONFIG_DEBUG_VM */ |
248 | 325 | ||
diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c index 5422169626ba..cb96cb2e17cc 100644 --- a/arch/powerpc/mm/pgtable_32.c +++ b/arch/powerpc/mm/pgtable_32.c | |||
@@ -142,7 +142,7 @@ ioremap_flags(phys_addr_t addr, unsigned long size, unsigned long flags) | |||
142 | flags |= _PAGE_DIRTY | _PAGE_HWWRITE; | 142 | flags |= _PAGE_DIRTY | _PAGE_HWWRITE; |
143 | 143 | ||
144 | /* we don't want to let _PAGE_USER and _PAGE_EXEC leak out */ | 144 | /* we don't want to let _PAGE_USER and _PAGE_EXEC leak out */ |
145 | flags &= ~(_PAGE_USER | _PAGE_EXEC | _PAGE_HWEXEC); | 145 | flags &= ~(_PAGE_USER | _PAGE_EXEC); |
146 | 146 | ||
147 | return __ioremap_caller(addr, size, flags, __builtin_return_address(0)); | 147 | return __ioremap_caller(addr, size, flags, __builtin_return_address(0)); |
148 | } | 148 | } |
diff --git a/arch/powerpc/mm/pgtable_64.c b/arch/powerpc/mm/pgtable_64.c index bfa7db6b2fd5..853d5565eed5 100644 --- a/arch/powerpc/mm/pgtable_64.c +++ b/arch/powerpc/mm/pgtable_64.c | |||
@@ -33,6 +33,8 @@ | |||
33 | #include <linux/stddef.h> | 33 | #include <linux/stddef.h> |
34 | #include <linux/vmalloc.h> | 34 | #include <linux/vmalloc.h> |
35 | #include <linux/init.h> | 35 | #include <linux/init.h> |
36 | #include <linux/bootmem.h> | ||
37 | #include <linux/lmb.h> | ||
36 | 38 | ||
37 | #include <asm/pgalloc.h> | 39 | #include <asm/pgalloc.h> |
38 | #include <asm/page.h> | 40 | #include <asm/page.h> |
@@ -55,19 +57,36 @@ | |||
55 | 57 | ||
56 | unsigned long ioremap_bot = IOREMAP_BASE; | 58 | unsigned long ioremap_bot = IOREMAP_BASE; |
57 | 59 | ||
60 | |||
61 | #ifdef CONFIG_PPC_MMU_NOHASH | ||
62 | static void *early_alloc_pgtable(unsigned long size) | ||
63 | { | ||
64 | void *pt; | ||
65 | |||
66 | if (init_bootmem_done) | ||
67 | pt = __alloc_bootmem(size, size, __pa(MAX_DMA_ADDRESS)); | ||
68 | else | ||
69 | pt = __va(lmb_alloc_base(size, size, | ||
70 | __pa(MAX_DMA_ADDRESS))); | ||
71 | memset(pt, 0, size); | ||
72 | |||
73 | return pt; | ||
74 | } | ||
75 | #endif /* CONFIG_PPC_MMU_NOHASH */ | ||
76 | |||
58 | /* | 77 | /* |
59 | * map_io_page currently only called by __ioremap | 78 | * map_kernel_page currently only called by __ioremap |
60 | * map_io_page adds an entry to the ioremap page table | 79 | * map_kernel_page adds an entry to the ioremap page table |
61 | * and adds an entry to the HPT, possibly bolting it | 80 | * and adds an entry to the HPT, possibly bolting it |
62 | */ | 81 | */ |
63 | static int map_io_page(unsigned long ea, unsigned long pa, int flags) | 82 | int map_kernel_page(unsigned long ea, unsigned long pa, int flags) |
64 | { | 83 | { |
65 | pgd_t *pgdp; | 84 | pgd_t *pgdp; |
66 | pud_t *pudp; | 85 | pud_t *pudp; |
67 | pmd_t *pmdp; | 86 | pmd_t *pmdp; |
68 | pte_t *ptep; | 87 | pte_t *ptep; |
69 | 88 | ||
70 | if (mem_init_done) { | 89 | if (slab_is_available()) { |
71 | pgdp = pgd_offset_k(ea); | 90 | pgdp = pgd_offset_k(ea); |
72 | pudp = pud_alloc(&init_mm, pgdp, ea); | 91 | pudp = pud_alloc(&init_mm, pgdp, ea); |
73 | if (!pudp) | 92 | if (!pudp) |
@@ -81,6 +100,35 @@ static int map_io_page(unsigned long ea, unsigned long pa, int flags) | |||
81 | set_pte_at(&init_mm, ea, ptep, pfn_pte(pa >> PAGE_SHIFT, | 100 | set_pte_at(&init_mm, ea, ptep, pfn_pte(pa >> PAGE_SHIFT, |
82 | __pgprot(flags))); | 101 | __pgprot(flags))); |
83 | } else { | 102 | } else { |
103 | #ifdef CONFIG_PPC_MMU_NOHASH | ||
104 | /* Warning ! This will blow up if bootmem is not initialized | ||
105 | * which our ppc64 code is keen to do that, we'll need to | ||
106 | * fix it and/or be more careful | ||
107 | */ | ||
108 | pgdp = pgd_offset_k(ea); | ||
109 | #ifdef PUD_TABLE_SIZE | ||
110 | if (pgd_none(*pgdp)) { | ||
111 | pudp = early_alloc_pgtable(PUD_TABLE_SIZE); | ||
112 | BUG_ON(pudp == NULL); | ||
113 | pgd_populate(&init_mm, pgdp, pudp); | ||
114 | } | ||
115 | #endif /* PUD_TABLE_SIZE */ | ||
116 | pudp = pud_offset(pgdp, ea); | ||
117 | if (pud_none(*pudp)) { | ||
118 | pmdp = early_alloc_pgtable(PMD_TABLE_SIZE); | ||
119 | BUG_ON(pmdp == NULL); | ||
120 | pud_populate(&init_mm, pudp, pmdp); | ||
121 | } | ||
122 | pmdp = pmd_offset(pudp, ea); | ||
123 | if (!pmd_present(*pmdp)) { | ||
124 | ptep = early_alloc_pgtable(PAGE_SIZE); | ||
125 | BUG_ON(ptep == NULL); | ||
126 | pmd_populate_kernel(&init_mm, pmdp, ptep); | ||
127 | } | ||
128 | ptep = pte_offset_kernel(pmdp, ea); | ||
129 | set_pte_at(&init_mm, ea, ptep, pfn_pte(pa >> PAGE_SHIFT, | ||
130 | __pgprot(flags))); | ||
131 | #else /* CONFIG_PPC_MMU_NOHASH */ | ||
84 | /* | 132 | /* |
85 | * If the mm subsystem is not fully up, we cannot create a | 133 | * If the mm subsystem is not fully up, we cannot create a |
86 | * linux page table entry for this mapping. Simply bolt an | 134 | * linux page table entry for this mapping. Simply bolt an |
@@ -93,6 +141,7 @@ static int map_io_page(unsigned long ea, unsigned long pa, int flags) | |||
93 | "memory at %016lx !\n", pa); | 141 | "memory at %016lx !\n", pa); |
94 | return -ENOMEM; | 142 | return -ENOMEM; |
95 | } | 143 | } |
144 | #endif /* !CONFIG_PPC_MMU_NOHASH */ | ||
96 | } | 145 | } |
97 | return 0; | 146 | return 0; |
98 | } | 147 | } |
@@ -124,7 +173,7 @@ void __iomem * __ioremap_at(phys_addr_t pa, void *ea, unsigned long size, | |||
124 | WARN_ON(size & ~PAGE_MASK); | 173 | WARN_ON(size & ~PAGE_MASK); |
125 | 174 | ||
126 | for (i = 0; i < size; i += PAGE_SIZE) | 175 | for (i = 0; i < size; i += PAGE_SIZE) |
127 | if (map_io_page((unsigned long)ea+i, pa+i, flags)) | 176 | if (map_kernel_page((unsigned long)ea+i, pa+i, flags)) |
128 | return NULL; | 177 | return NULL; |
129 | 178 | ||
130 | return (void __iomem *)ea; | 179 | return (void __iomem *)ea; |
diff --git a/arch/powerpc/mm/slb.c b/arch/powerpc/mm/slb.c index a685652effeb..1d98ecc8eecd 100644 --- a/arch/powerpc/mm/slb.c +++ b/arch/powerpc/mm/slb.c | |||
@@ -191,7 +191,7 @@ void switch_slb(struct task_struct *tsk, struct mm_struct *mm) | |||
191 | unsigned long slbie_data = 0; | 191 | unsigned long slbie_data = 0; |
192 | unsigned long pc = KSTK_EIP(tsk); | 192 | unsigned long pc = KSTK_EIP(tsk); |
193 | unsigned long stack = KSTK_ESP(tsk); | 193 | unsigned long stack = KSTK_ESP(tsk); |
194 | unsigned long unmapped_base; | 194 | unsigned long exec_base; |
195 | 195 | ||
196 | /* | 196 | /* |
197 | * We need interrupts hard-disabled here, not just soft-disabled, | 197 | * We need interrupts hard-disabled here, not just soft-disabled, |
@@ -227,42 +227,44 @@ void switch_slb(struct task_struct *tsk, struct mm_struct *mm) | |||
227 | 227 | ||
228 | /* | 228 | /* |
229 | * preload some userspace segments into the SLB. | 229 | * preload some userspace segments into the SLB. |
230 | * Almost all 32 and 64bit PowerPC executables are linked at | ||
231 | * 0x10000000 so it makes sense to preload this segment. | ||
230 | */ | 232 | */ |
231 | if (test_tsk_thread_flag(tsk, TIF_32BIT)) | 233 | exec_base = 0x10000000; |
232 | unmapped_base = TASK_UNMAPPED_BASE_USER32; | ||
233 | else | ||
234 | unmapped_base = TASK_UNMAPPED_BASE_USER64; | ||
235 | 234 | ||
236 | if (is_kernel_addr(pc)) | 235 | if (is_kernel_addr(pc) || is_kernel_addr(stack) || |
237 | return; | 236 | is_kernel_addr(exec_base)) |
238 | slb_allocate(pc); | ||
239 | |||
240 | if (esids_match(pc,stack)) | ||
241 | return; | 237 | return; |
242 | 238 | ||
243 | if (is_kernel_addr(stack)) | 239 | slb_allocate(pc); |
244 | return; | ||
245 | slb_allocate(stack); | ||
246 | 240 | ||
247 | if (esids_match(pc,unmapped_base) || esids_match(stack,unmapped_base)) | 241 | if (!esids_match(pc, stack)) |
248 | return; | 242 | slb_allocate(stack); |
249 | 243 | ||
250 | if (is_kernel_addr(unmapped_base)) | 244 | if (!esids_match(pc, exec_base) && |
251 | return; | 245 | !esids_match(stack, exec_base)) |
252 | slb_allocate(unmapped_base); | 246 | slb_allocate(exec_base); |
253 | } | 247 | } |
254 | 248 | ||
255 | static inline void patch_slb_encoding(unsigned int *insn_addr, | 249 | static inline void patch_slb_encoding(unsigned int *insn_addr, |
256 | unsigned int immed) | 250 | unsigned int immed) |
257 | { | 251 | { |
258 | /* Assume the instruction had a "0" immediate value, just | 252 | *insn_addr = (*insn_addr & 0xffff0000) | immed; |
259 | * "or" in the new value | ||
260 | */ | ||
261 | *insn_addr |= immed; | ||
262 | flush_icache_range((unsigned long)insn_addr, 4+ | 253 | flush_icache_range((unsigned long)insn_addr, 4+ |
263 | (unsigned long)insn_addr); | 254 | (unsigned long)insn_addr); |
264 | } | 255 | } |
265 | 256 | ||
257 | void slb_set_size(u16 size) | ||
258 | { | ||
259 | extern unsigned int *slb_compare_rr_to_size; | ||
260 | |||
261 | if (mmu_slb_size == size) | ||
262 | return; | ||
263 | |||
264 | mmu_slb_size = size; | ||
265 | patch_slb_encoding(slb_compare_rr_to_size, mmu_slb_size); | ||
266 | } | ||
267 | |||
266 | void slb_initialize(void) | 268 | void slb_initialize(void) |
267 | { | 269 | { |
268 | unsigned long linear_llp, vmalloc_llp, io_llp; | 270 | unsigned long linear_llp, vmalloc_llp, io_llp; |
diff --git a/arch/powerpc/mm/tlb_hash32.c b/arch/powerpc/mm/tlb_hash32.c index 65190587a365..8aaa8b7eb324 100644 --- a/arch/powerpc/mm/tlb_hash32.c +++ b/arch/powerpc/mm/tlb_hash32.c | |||
@@ -71,6 +71,9 @@ void tlb_flush(struct mmu_gather *tlb) | |||
71 | */ | 71 | */ |
72 | _tlbia(); | 72 | _tlbia(); |
73 | } | 73 | } |
74 | |||
75 | /* Push out batch of freed page tables */ | ||
76 | pte_free_finish(); | ||
74 | } | 77 | } |
75 | 78 | ||
76 | /* | 79 | /* |
diff --git a/arch/powerpc/mm/tlb_hash64.c b/arch/powerpc/mm/tlb_hash64.c index 937eb90677d9..2b2f35f6985e 100644 --- a/arch/powerpc/mm/tlb_hash64.c +++ b/arch/powerpc/mm/tlb_hash64.c | |||
@@ -33,11 +33,6 @@ | |||
33 | 33 | ||
34 | DEFINE_PER_CPU(struct ppc64_tlb_batch, ppc64_tlb_batch); | 34 | DEFINE_PER_CPU(struct ppc64_tlb_batch, ppc64_tlb_batch); |
35 | 35 | ||
36 | /* This is declared as we are using the more or less generic | ||
37 | * arch/powerpc/include/asm/tlb.h file -- tgall | ||
38 | */ | ||
39 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); | ||
40 | |||
41 | /* | 36 | /* |
42 | * A linux PTE was changed and the corresponding hash table entry | 37 | * A linux PTE was changed and the corresponding hash table entry |
43 | * neesd to be flushed. This function will either perform the flush | 38 | * neesd to be flushed. This function will either perform the flush |
@@ -154,6 +149,21 @@ void __flush_tlb_pending(struct ppc64_tlb_batch *batch) | |||
154 | batch->index = 0; | 149 | batch->index = 0; |
155 | } | 150 | } |
156 | 151 | ||
152 | void tlb_flush(struct mmu_gather *tlb) | ||
153 | { | ||
154 | struct ppc64_tlb_batch *tlbbatch = &__get_cpu_var(ppc64_tlb_batch); | ||
155 | |||
156 | /* If there's a TLB batch pending, then we must flush it because the | ||
157 | * pages are going to be freed and we really don't want to have a CPU | ||
158 | * access a freed page because it has a stale TLB | ||
159 | */ | ||
160 | if (tlbbatch->index) | ||
161 | __flush_tlb_pending(tlbbatch); | ||
162 | |||
163 | /* Push out batch of freed page tables */ | ||
164 | pte_free_finish(); | ||
165 | } | ||
166 | |||
157 | /** | 167 | /** |
158 | * __flush_hash_table_range - Flush all HPTEs for a given address range | 168 | * __flush_hash_table_range - Flush all HPTEs for a given address range |
159 | * from the hash table (and the TLB). But keeps | 169 | * from the hash table (and the TLB). But keeps |
diff --git a/arch/powerpc/mm/tlb_low_64e.S b/arch/powerpc/mm/tlb_low_64e.S new file mode 100644 index 000000000000..ef1cccf71173 --- /dev/null +++ b/arch/powerpc/mm/tlb_low_64e.S | |||
@@ -0,0 +1,770 @@ | |||
1 | /* | ||
2 | * Low leve TLB miss handlers for Book3E | ||
3 | * | ||
4 | * Copyright (C) 2008-2009 | ||
5 | * Ben. Herrenschmidt (benh@kernel.crashing.org), IBM Corp. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or | ||
8 | * modify it under the terms of the GNU General Public License | ||
9 | * as published by the Free Software Foundation; either version | ||
10 | * 2 of the License, or (at your option) any later version. | ||
11 | */ | ||
12 | |||
13 | #include <asm/processor.h> | ||
14 | #include <asm/reg.h> | ||
15 | #include <asm/page.h> | ||
16 | #include <asm/mmu.h> | ||
17 | #include <asm/ppc_asm.h> | ||
18 | #include <asm/asm-offsets.h> | ||
19 | #include <asm/cputable.h> | ||
20 | #include <asm/pgtable.h> | ||
21 | #include <asm/reg.h> | ||
22 | #include <asm/exception-64e.h> | ||
23 | #include <asm/ppc-opcode.h> | ||
24 | |||
25 | #ifdef CONFIG_PPC_64K_PAGES | ||
26 | #define VPTE_PMD_SHIFT (PTE_INDEX_SIZE+1) | ||
27 | #else | ||
28 | #define VPTE_PMD_SHIFT (PTE_INDEX_SIZE) | ||
29 | #endif | ||
30 | #define VPTE_PUD_SHIFT (VPTE_PMD_SHIFT + PMD_INDEX_SIZE) | ||
31 | #define VPTE_PGD_SHIFT (VPTE_PUD_SHIFT + PUD_INDEX_SIZE) | ||
32 | #define VPTE_INDEX_SIZE (VPTE_PGD_SHIFT + PGD_INDEX_SIZE) | ||
33 | |||
34 | |||
35 | /********************************************************************** | ||
36 | * * | ||
37 | * TLB miss handling for Book3E with TLB reservation and HES support * | ||
38 | * * | ||
39 | **********************************************************************/ | ||
40 | |||
41 | |||
42 | /* Data TLB miss */ | ||
43 | START_EXCEPTION(data_tlb_miss) | ||
44 | TLB_MISS_PROLOG | ||
45 | |||
46 | /* Now we handle the fault proper. We only save DEAR in normal | ||
47 | * fault case since that's the only interesting values here. | ||
48 | * We could probably also optimize by not saving SRR0/1 in the | ||
49 | * linear mapping case but I'll leave that for later | ||
50 | */ | ||
51 | mfspr r14,SPRN_ESR | ||
52 | mfspr r16,SPRN_DEAR /* get faulting address */ | ||
53 | srdi r15,r16,60 /* get region */ | ||
54 | cmpldi cr0,r15,0xc /* linear mapping ? */ | ||
55 | TLB_MISS_STATS_SAVE_INFO | ||
56 | beq tlb_load_linear /* yes -> go to linear map load */ | ||
57 | |||
58 | /* The page tables are mapped virtually linear. At this point, though, | ||
59 | * we don't know whether we are trying to fault in a first level | ||
60 | * virtual address or a virtual page table address. We can get that | ||
61 | * from bit 0x1 of the region ID which we have set for a page table | ||
62 | */ | ||
63 | andi. r10,r15,0x1 | ||
64 | bne- virt_page_table_tlb_miss | ||
65 | |||
66 | std r14,EX_TLB_ESR(r12); /* save ESR */ | ||
67 | std r16,EX_TLB_DEAR(r12); /* save DEAR */ | ||
68 | |||
69 | /* We need _PAGE_PRESENT and _PAGE_ACCESSED set */ | ||
70 | li r11,_PAGE_PRESENT | ||
71 | oris r11,r11,_PAGE_ACCESSED@h | ||
72 | |||
73 | /* We do the user/kernel test for the PID here along with the RW test | ||
74 | */ | ||
75 | cmpldi cr0,r15,0 /* Check for user region */ | ||
76 | |||
77 | /* We pre-test some combination of permissions to avoid double | ||
78 | * faults: | ||
79 | * | ||
80 | * We move the ESR:ST bit into the position of _PAGE_BAP_SW in the PTE | ||
81 | * ESR_ST is 0x00800000 | ||
82 | * _PAGE_BAP_SW is 0x00000010 | ||
83 | * So the shift is >> 19. This tests for supervisor writeability. | ||
84 | * If the page happens to be supervisor writeable and not user | ||
85 | * writeable, we will take a new fault later, but that should be | ||
86 | * a rare enough case. | ||
87 | * | ||
88 | * We also move ESR_ST in _PAGE_DIRTY position | ||
89 | * _PAGE_DIRTY is 0x00001000 so the shift is >> 11 | ||
90 | * | ||
91 | * MAS1 is preset for all we need except for TID that needs to | ||
92 | * be cleared for kernel translations | ||
93 | */ | ||
94 | rlwimi r11,r14,32-19,27,27 | ||
95 | rlwimi r11,r14,32-16,19,19 | ||
96 | beq normal_tlb_miss | ||
97 | /* XXX replace the RMW cycles with immediate loads + writes */ | ||
98 | 1: mfspr r10,SPRN_MAS1 | ||
99 | cmpldi cr0,r15,8 /* Check for vmalloc region */ | ||
100 | rlwinm r10,r10,0,16,1 /* Clear TID */ | ||
101 | mtspr SPRN_MAS1,r10 | ||
102 | beq+ normal_tlb_miss | ||
103 | |||
104 | /* We got a crappy address, just fault with whatever DEAR and ESR | ||
105 | * are here | ||
106 | */ | ||
107 | TLB_MISS_STATS_D(MMSTAT_TLB_MISS_NORM_FAULT) | ||
108 | TLB_MISS_EPILOG_ERROR | ||
109 | b exc_data_storage_book3e | ||
110 | |||
111 | /* Instruction TLB miss */ | ||
112 | START_EXCEPTION(instruction_tlb_miss) | ||
113 | TLB_MISS_PROLOG | ||
114 | |||
115 | /* If we take a recursive fault, the second level handler may need | ||
116 | * to know whether we are handling a data or instruction fault in | ||
117 | * order to get to the right store fault handler. We provide that | ||
118 | * info by writing a crazy value in ESR in our exception frame | ||
119 | */ | ||
120 | li r14,-1 /* store to exception frame is done later */ | ||
121 | |||
122 | /* Now we handle the fault proper. We only save DEAR in the non | ||
123 | * linear mapping case since we know the linear mapping case will | ||
124 | * not re-enter. We could indeed optimize and also not save SRR0/1 | ||
125 | * in the linear mapping case but I'll leave that for later | ||
126 | * | ||
127 | * Faulting address is SRR0 which is already in r16 | ||
128 | */ | ||
129 | srdi r15,r16,60 /* get region */ | ||
130 | cmpldi cr0,r15,0xc /* linear mapping ? */ | ||
131 | TLB_MISS_STATS_SAVE_INFO | ||
132 | beq tlb_load_linear /* yes -> go to linear map load */ | ||
133 | |||
134 | /* We do the user/kernel test for the PID here along with the RW test | ||
135 | */ | ||
136 | li r11,_PAGE_PRESENT|_PAGE_EXEC /* Base perm */ | ||
137 | oris r11,r11,_PAGE_ACCESSED@h | ||
138 | |||
139 | cmpldi cr0,r15,0 /* Check for user region */ | ||
140 | std r14,EX_TLB_ESR(r12) /* write crazy -1 to frame */ | ||
141 | beq normal_tlb_miss | ||
142 | /* XXX replace the RMW cycles with immediate loads + writes */ | ||
143 | 1: mfspr r10,SPRN_MAS1 | ||
144 | cmpldi cr0,r15,8 /* Check for vmalloc region */ | ||
145 | rlwinm r10,r10,0,16,1 /* Clear TID */ | ||
146 | mtspr SPRN_MAS1,r10 | ||
147 | beq+ normal_tlb_miss | ||
148 | |||
149 | /* We got a crappy address, just fault */ | ||
150 | TLB_MISS_STATS_I(MMSTAT_TLB_MISS_NORM_FAULT) | ||
151 | TLB_MISS_EPILOG_ERROR | ||
152 | b exc_instruction_storage_book3e | ||
153 | |||
154 | /* | ||
155 | * This is the guts of the first-level TLB miss handler for direct | ||
156 | * misses. We are entered with: | ||
157 | * | ||
158 | * r16 = faulting address | ||
159 | * r15 = region ID | ||
160 | * r14 = crap (free to use) | ||
161 | * r13 = PACA | ||
162 | * r12 = TLB exception frame in PACA | ||
163 | * r11 = PTE permission mask | ||
164 | * r10 = crap (free to use) | ||
165 | */ | ||
166 | normal_tlb_miss: | ||
167 | /* So we first construct the page table address. We do that by | ||
168 | * shifting the bottom of the address (not the region ID) by | ||
169 | * PAGE_SHIFT-3, clearing the bottom 3 bits (get a PTE ptr) and | ||
170 | * or'ing the fourth high bit. | ||
171 | * | ||
172 | * NOTE: For 64K pages, we do things slightly differently in | ||
173 | * order to handle the weird page table format used by linux | ||
174 | */ | ||
175 | ori r10,r15,0x1 | ||
176 | #ifdef CONFIG_PPC_64K_PAGES | ||
177 | /* For the top bits, 16 bytes per PTE */ | ||
178 | rldicl r14,r16,64-(PAGE_SHIFT-4),PAGE_SHIFT-4+4 | ||
179 | /* Now create the bottom bits as 0 in position 0x8000 and | ||
180 | * the rest calculated for 8 bytes per PTE | ||
181 | */ | ||
182 | rldicl r15,r16,64-(PAGE_SHIFT-3),64-15 | ||
183 | /* Insert the bottom bits in */ | ||
184 | rlwimi r14,r15,0,16,31 | ||
185 | #else | ||
186 | rldicl r14,r16,64-(PAGE_SHIFT-3),PAGE_SHIFT-3+4 | ||
187 | #endif | ||
188 | sldi r15,r10,60 | ||
189 | clrrdi r14,r14,3 | ||
190 | or r10,r15,r14 | ||
191 | |||
192 | BEGIN_MMU_FTR_SECTION | ||
193 | /* Set the TLB reservation and seach for existing entry. Then load | ||
194 | * the entry. | ||
195 | */ | ||
196 | PPC_TLBSRX_DOT(0,r16) | ||
197 | ld r14,0(r10) | ||
198 | beq normal_tlb_miss_done | ||
199 | MMU_FTR_SECTION_ELSE | ||
200 | ld r14,0(r10) | ||
201 | ALT_MMU_FTR_SECTION_END_IFSET(MMU_FTR_USE_TLBRSRV) | ||
202 | |||
203 | finish_normal_tlb_miss: | ||
204 | /* Check if required permissions are met */ | ||
205 | andc. r15,r11,r14 | ||
206 | bne- normal_tlb_miss_access_fault | ||
207 | |||
208 | /* Now we build the MAS: | ||
209 | * | ||
210 | * MAS 0 : Fully setup with defaults in MAS4 and TLBnCFG | ||
211 | * MAS 1 : Almost fully setup | ||
212 | * - PID already updated by caller if necessary | ||
213 | * - TSIZE need change if !base page size, not | ||
214 | * yet implemented for now | ||
215 | * MAS 2 : Defaults not useful, need to be redone | ||
216 | * MAS 3+7 : Needs to be done | ||
217 | * | ||
218 | * TODO: mix up code below for better scheduling | ||
219 | */ | ||
220 | clrrdi r11,r16,12 /* Clear low crap in EA */ | ||
221 | rlwimi r11,r14,32-19,27,31 /* Insert WIMGE */ | ||
222 | mtspr SPRN_MAS2,r11 | ||
223 | |||
224 | /* Check page size, if not standard, update MAS1 */ | ||
225 | rldicl r11,r14,64-8,64-8 | ||
226 | #ifdef CONFIG_PPC_64K_PAGES | ||
227 | cmpldi cr0,r11,BOOK3E_PAGESZ_64K | ||
228 | #else | ||
229 | cmpldi cr0,r11,BOOK3E_PAGESZ_4K | ||
230 | #endif | ||
231 | beq- 1f | ||
232 | mfspr r11,SPRN_MAS1 | ||
233 | rlwimi r11,r14,31,21,24 | ||
234 | rlwinm r11,r11,0,21,19 | ||
235 | mtspr SPRN_MAS1,r11 | ||
236 | 1: | ||
237 | /* Move RPN in position */ | ||
238 | rldicr r11,r14,64-(PTE_RPN_SHIFT-PAGE_SHIFT),63-PAGE_SHIFT | ||
239 | clrldi r15,r11,12 /* Clear crap at the top */ | ||
240 | rlwimi r15,r14,32-8,22,25 /* Move in U bits */ | ||
241 | rlwimi r15,r14,32-2,26,31 /* Move in BAP bits */ | ||
242 | |||
243 | /* Mask out SW and UW if !DIRTY (XXX optimize this !) */ | ||
244 | andi. r11,r14,_PAGE_DIRTY | ||
245 | bne 1f | ||
246 | li r11,MAS3_SW|MAS3_UW | ||
247 | andc r15,r15,r11 | ||
248 | 1: | ||
249 | BEGIN_MMU_FTR_SECTION | ||
250 | srdi r16,r15,32 | ||
251 | mtspr SPRN_MAS3,r15 | ||
252 | mtspr SPRN_MAS7,r16 | ||
253 | MMU_FTR_SECTION_ELSE | ||
254 | mtspr SPRN_MAS7_MAS3,r15 | ||
255 | ALT_MMU_FTR_SECTION_END_IFCLR(MMU_FTR_USE_PAIRED_MAS) | ||
256 | |||
257 | tlbwe | ||
258 | |||
259 | normal_tlb_miss_done: | ||
260 | /* We don't bother with restoring DEAR or ESR since we know we are | ||
261 | * level 0 and just going back to userland. They are only needed | ||
262 | * if you are going to take an access fault | ||
263 | */ | ||
264 | TLB_MISS_STATS_X(MMSTAT_TLB_MISS_NORM_OK) | ||
265 | TLB_MISS_EPILOG_SUCCESS | ||
266 | rfi | ||
267 | |||
268 | normal_tlb_miss_access_fault: | ||
269 | /* We need to check if it was an instruction miss */ | ||
270 | andi. r10,r11,_PAGE_EXEC | ||
271 | bne 1f | ||
272 | ld r14,EX_TLB_DEAR(r12) | ||
273 | ld r15,EX_TLB_ESR(r12) | ||
274 | mtspr SPRN_DEAR,r14 | ||
275 | mtspr SPRN_ESR,r15 | ||
276 | TLB_MISS_STATS_D(MMSTAT_TLB_MISS_NORM_FAULT) | ||
277 | TLB_MISS_EPILOG_ERROR | ||
278 | b exc_data_storage_book3e | ||
279 | 1: TLB_MISS_STATS_I(MMSTAT_TLB_MISS_NORM_FAULT) | ||
280 | TLB_MISS_EPILOG_ERROR | ||
281 | b exc_instruction_storage_book3e | ||
282 | |||
283 | |||
284 | /* | ||
285 | * This is the guts of the second-level TLB miss handler for direct | ||
286 | * misses. We are entered with: | ||
287 | * | ||
288 | * r16 = virtual page table faulting address | ||
289 | * r15 = region (top 4 bits of address) | ||
290 | * r14 = crap (free to use) | ||
291 | * r13 = PACA | ||
292 | * r12 = TLB exception frame in PACA | ||
293 | * r11 = crap (free to use) | ||
294 | * r10 = crap (free to use) | ||
295 | * | ||
296 | * Note that this should only ever be called as a second level handler | ||
297 | * with the current scheme when using SW load. | ||
298 | * That means we can always get the original fault DEAR at | ||
299 | * EX_TLB_DEAR-EX_TLB_SIZE(r12) | ||
300 | * | ||
301 | * It can be re-entered by the linear mapping miss handler. However, to | ||
302 | * avoid too much complication, it will restart the whole fault at level | ||
303 | * 0 so we don't care too much about clobbers | ||
304 | * | ||
305 | * XXX That code was written back when we couldn't clobber r14. We can now, | ||
306 | * so we could probably optimize things a bit | ||
307 | */ | ||
308 | virt_page_table_tlb_miss: | ||
309 | /* Are we hitting a kernel page table ? */ | ||
310 | andi. r10,r15,0x8 | ||
311 | |||
312 | /* The cool thing now is that r10 contains 0 for user and 8 for kernel, | ||
313 | * and we happen to have the swapper_pg_dir at offset 8 from the user | ||
314 | * pgdir in the PACA :-). | ||
315 | */ | ||
316 | add r11,r10,r13 | ||
317 | |||
318 | /* If kernel, we need to clear MAS1 TID */ | ||
319 | beq 1f | ||
320 | /* XXX replace the RMW cycles with immediate loads + writes */ | ||
321 | mfspr r10,SPRN_MAS1 | ||
322 | rlwinm r10,r10,0,16,1 /* Clear TID */ | ||
323 | mtspr SPRN_MAS1,r10 | ||
324 | 1: | ||
325 | BEGIN_MMU_FTR_SECTION | ||
326 | /* Search if we already have a TLB entry for that virtual address, and | ||
327 | * if we do, bail out. | ||
328 | */ | ||
329 | PPC_TLBSRX_DOT(0,r16) | ||
330 | beq virt_page_table_tlb_miss_done | ||
331 | END_MMU_FTR_SECTION_IFSET(MMU_FTR_USE_TLBRSRV) | ||
332 | |||
333 | /* Now, we need to walk the page tables. First check if we are in | ||
334 | * range. | ||
335 | */ | ||
336 | rldicl. r10,r16,64-(VPTE_INDEX_SIZE+3),VPTE_INDEX_SIZE+3+4 | ||
337 | bne- virt_page_table_tlb_miss_fault | ||
338 | |||
339 | /* Get the PGD pointer */ | ||
340 | ld r15,PACAPGD(r11) | ||
341 | cmpldi cr0,r15,0 | ||
342 | beq- virt_page_table_tlb_miss_fault | ||
343 | |||
344 | /* Get to PGD entry */ | ||
345 | rldicl r11,r16,64-VPTE_PGD_SHIFT,64-PGD_INDEX_SIZE-3 | ||
346 | clrrdi r10,r11,3 | ||
347 | ldx r15,r10,r15 | ||
348 | cmpldi cr0,r15,0 | ||
349 | beq virt_page_table_tlb_miss_fault | ||
350 | |||
351 | #ifndef CONFIG_PPC_64K_PAGES | ||
352 | /* Get to PUD entry */ | ||
353 | rldicl r11,r16,64-VPTE_PUD_SHIFT,64-PUD_INDEX_SIZE-3 | ||
354 | clrrdi r10,r11,3 | ||
355 | ldx r15,r10,r15 | ||
356 | cmpldi cr0,r15,0 | ||
357 | beq virt_page_table_tlb_miss_fault | ||
358 | #endif /* CONFIG_PPC_64K_PAGES */ | ||
359 | |||
360 | /* Get to PMD entry */ | ||
361 | rldicl r11,r16,64-VPTE_PMD_SHIFT,64-PMD_INDEX_SIZE-3 | ||
362 | clrrdi r10,r11,3 | ||
363 | ldx r15,r10,r15 | ||
364 | cmpldi cr0,r15,0 | ||
365 | beq virt_page_table_tlb_miss_fault | ||
366 | |||
367 | /* Ok, we're all right, we can now create a kernel translation for | ||
368 | * a 4K or 64K page from r16 -> r15. | ||
369 | */ | ||
370 | /* Now we build the MAS: | ||
371 | * | ||
372 | * MAS 0 : Fully setup with defaults in MAS4 and TLBnCFG | ||
373 | * MAS 1 : Almost fully setup | ||
374 | * - PID already updated by caller if necessary | ||
375 | * - TSIZE for now is base page size always | ||
376 | * MAS 2 : Use defaults | ||
377 | * MAS 3+7 : Needs to be done | ||
378 | * | ||
379 | * So we only do MAS 2 and 3 for now... | ||
380 | */ | ||
381 | clrldi r11,r15,4 /* remove region ID from RPN */ | ||
382 | ori r10,r11,1 /* Or-in SR */ | ||
383 | |||
384 | BEGIN_MMU_FTR_SECTION | ||
385 | srdi r16,r10,32 | ||
386 | mtspr SPRN_MAS3,r10 | ||
387 | mtspr SPRN_MAS7,r16 | ||
388 | MMU_FTR_SECTION_ELSE | ||
389 | mtspr SPRN_MAS7_MAS3,r10 | ||
390 | ALT_MMU_FTR_SECTION_END_IFCLR(MMU_FTR_USE_PAIRED_MAS) | ||
391 | |||
392 | tlbwe | ||
393 | |||
394 | BEGIN_MMU_FTR_SECTION | ||
395 | virt_page_table_tlb_miss_done: | ||
396 | |||
397 | /* We have overriden MAS2:EPN but currently our primary TLB miss | ||
398 | * handler will always restore it so that should not be an issue, | ||
399 | * if we ever optimize the primary handler to not write MAS2 on | ||
400 | * some cases, we'll have to restore MAS2:EPN here based on the | ||
401 | * original fault's DEAR. If we do that we have to modify the | ||
402 | * ITLB miss handler to also store SRR0 in the exception frame | ||
403 | * as DEAR. | ||
404 | * | ||
405 | * However, one nasty thing we did is we cleared the reservation | ||
406 | * (well, potentially we did). We do a trick here thus if we | ||
407 | * are not a level 0 exception (we interrupted the TLB miss) we | ||
408 | * offset the return address by -4 in order to replay the tlbsrx | ||
409 | * instruction there | ||
410 | */ | ||
411 | subf r10,r13,r12 | ||
412 | cmpldi cr0,r10,PACA_EXTLB+EX_TLB_SIZE | ||
413 | bne- 1f | ||
414 | ld r11,PACA_EXTLB+EX_TLB_SIZE+EX_TLB_SRR0(r13) | ||
415 | addi r10,r11,-4 | ||
416 | std r10,PACA_EXTLB+EX_TLB_SIZE+EX_TLB_SRR0(r13) | ||
417 | 1: | ||
418 | END_MMU_FTR_SECTION_IFSET(MMU_FTR_USE_TLBRSRV) | ||
419 | /* Return to caller, normal case */ | ||
420 | TLB_MISS_STATS_X(MMSTAT_TLB_MISS_PT_OK); | ||
421 | TLB_MISS_EPILOG_SUCCESS | ||
422 | rfi | ||
423 | |||
424 | virt_page_table_tlb_miss_fault: | ||
425 | /* If we fault here, things are a little bit tricky. We need to call | ||
426 | * either data or instruction store fault, and we need to retreive | ||
427 | * the original fault address and ESR (for data). | ||
428 | * | ||
429 | * The thing is, we know that in normal circumstances, this is | ||
430 | * always called as a second level tlb miss for SW load or as a first | ||
431 | * level TLB miss for HW load, so we should be able to peek at the | ||
432 | * relevant informations in the first exception frame in the PACA. | ||
433 | * | ||
434 | * However, we do need to double check that, because we may just hit | ||
435 | * a stray kernel pointer or a userland attack trying to hit those | ||
436 | * areas. If that is the case, we do a data fault. (We can't get here | ||
437 | * from an instruction tlb miss anyway). | ||
438 | * | ||
439 | * Note also that when going to a fault, we must unwind the previous | ||
440 | * level as well. Since we are doing that, we don't need to clear or | ||
441 | * restore the TLB reservation neither. | ||
442 | */ | ||
443 | subf r10,r13,r12 | ||
444 | cmpldi cr0,r10,PACA_EXTLB+EX_TLB_SIZE | ||
445 | bne- virt_page_table_tlb_miss_whacko_fault | ||
446 | |||
447 | /* We dig the original DEAR and ESR from slot 0 */ | ||
448 | ld r15,EX_TLB_DEAR+PACA_EXTLB(r13) | ||
449 | ld r16,EX_TLB_ESR+PACA_EXTLB(r13) | ||
450 | |||
451 | /* We check for the "special" ESR value for instruction faults */ | ||
452 | cmpdi cr0,r16,-1 | ||
453 | beq 1f | ||
454 | mtspr SPRN_DEAR,r15 | ||
455 | mtspr SPRN_ESR,r16 | ||
456 | TLB_MISS_STATS_D(MMSTAT_TLB_MISS_PT_FAULT); | ||
457 | TLB_MISS_EPILOG_ERROR | ||
458 | b exc_data_storage_book3e | ||
459 | 1: TLB_MISS_STATS_I(MMSTAT_TLB_MISS_PT_FAULT); | ||
460 | TLB_MISS_EPILOG_ERROR | ||
461 | b exc_instruction_storage_book3e | ||
462 | |||
463 | virt_page_table_tlb_miss_whacko_fault: | ||
464 | /* The linear fault will restart everything so ESR and DEAR will | ||
465 | * not have been clobbered, let's just fault with what we have | ||
466 | */ | ||
467 | TLB_MISS_STATS_X(MMSTAT_TLB_MISS_PT_FAULT); | ||
468 | TLB_MISS_EPILOG_ERROR | ||
469 | b exc_data_storage_book3e | ||
470 | |||
471 | |||
472 | /************************************************************** | ||
473 | * * | ||
474 | * TLB miss handling for Book3E with hw page table support * | ||
475 | * * | ||
476 | **************************************************************/ | ||
477 | |||
478 | |||
479 | /* Data TLB miss */ | ||
480 | START_EXCEPTION(data_tlb_miss_htw) | ||
481 | TLB_MISS_PROLOG | ||
482 | |||
483 | /* Now we handle the fault proper. We only save DEAR in normal | ||
484 | * fault case since that's the only interesting values here. | ||
485 | * We could probably also optimize by not saving SRR0/1 in the | ||
486 | * linear mapping case but I'll leave that for later | ||
487 | */ | ||
488 | mfspr r14,SPRN_ESR | ||
489 | mfspr r16,SPRN_DEAR /* get faulting address */ | ||
490 | srdi r11,r16,60 /* get region */ | ||
491 | cmpldi cr0,r11,0xc /* linear mapping ? */ | ||
492 | TLB_MISS_STATS_SAVE_INFO | ||
493 | beq tlb_load_linear /* yes -> go to linear map load */ | ||
494 | |||
495 | /* We do the user/kernel test for the PID here along with the RW test | ||
496 | */ | ||
497 | cmpldi cr0,r11,0 /* Check for user region */ | ||
498 | ld r15,PACAPGD(r13) /* Load user pgdir */ | ||
499 | beq htw_tlb_miss | ||
500 | |||
501 | /* XXX replace the RMW cycles with immediate loads + writes */ | ||
502 | 1: mfspr r10,SPRN_MAS1 | ||
503 | cmpldi cr0,r11,8 /* Check for vmalloc region */ | ||
504 | rlwinm r10,r10,0,16,1 /* Clear TID */ | ||
505 | mtspr SPRN_MAS1,r10 | ||
506 | ld r15,PACA_KERNELPGD(r13) /* Load kernel pgdir */ | ||
507 | beq+ htw_tlb_miss | ||
508 | |||
509 | /* We got a crappy address, just fault with whatever DEAR and ESR | ||
510 | * are here | ||
511 | */ | ||
512 | TLB_MISS_STATS_D(MMSTAT_TLB_MISS_NORM_FAULT) | ||
513 | TLB_MISS_EPILOG_ERROR | ||
514 | b exc_data_storage_book3e | ||
515 | |||
516 | /* Instruction TLB miss */ | ||
517 | START_EXCEPTION(instruction_tlb_miss_htw) | ||
518 | TLB_MISS_PROLOG | ||
519 | |||
520 | /* If we take a recursive fault, the second level handler may need | ||
521 | * to know whether we are handling a data or instruction fault in | ||
522 | * order to get to the right store fault handler. We provide that | ||
523 | * info by keeping a crazy value for ESR in r14 | ||
524 | */ | ||
525 | li r14,-1 /* store to exception frame is done later */ | ||
526 | |||
527 | /* Now we handle the fault proper. We only save DEAR in the non | ||
528 | * linear mapping case since we know the linear mapping case will | ||
529 | * not re-enter. We could indeed optimize and also not save SRR0/1 | ||
530 | * in the linear mapping case but I'll leave that for later | ||
531 | * | ||
532 | * Faulting address is SRR0 which is already in r16 | ||
533 | */ | ||
534 | srdi r11,r16,60 /* get region */ | ||
535 | cmpldi cr0,r11,0xc /* linear mapping ? */ | ||
536 | TLB_MISS_STATS_SAVE_INFO | ||
537 | beq tlb_load_linear /* yes -> go to linear map load */ | ||
538 | |||
539 | /* We do the user/kernel test for the PID here along with the RW test | ||
540 | */ | ||
541 | cmpldi cr0,r11,0 /* Check for user region */ | ||
542 | ld r15,PACAPGD(r13) /* Load user pgdir */ | ||
543 | beq htw_tlb_miss | ||
544 | |||
545 | /* XXX replace the RMW cycles with immediate loads + writes */ | ||
546 | 1: mfspr r10,SPRN_MAS1 | ||
547 | cmpldi cr0,r11,8 /* Check for vmalloc region */ | ||
548 | rlwinm r10,r10,0,16,1 /* Clear TID */ | ||
549 | mtspr SPRN_MAS1,r10 | ||
550 | ld r15,PACA_KERNELPGD(r13) /* Load kernel pgdir */ | ||
551 | beq+ htw_tlb_miss | ||
552 | |||
553 | /* We got a crappy address, just fault */ | ||
554 | TLB_MISS_STATS_I(MMSTAT_TLB_MISS_NORM_FAULT) | ||
555 | TLB_MISS_EPILOG_ERROR | ||
556 | b exc_instruction_storage_book3e | ||
557 | |||
558 | |||
559 | /* | ||
560 | * This is the guts of the second-level TLB miss handler for direct | ||
561 | * misses. We are entered with: | ||
562 | * | ||
563 | * r16 = virtual page table faulting address | ||
564 | * r15 = PGD pointer | ||
565 | * r14 = ESR | ||
566 | * r13 = PACA | ||
567 | * r12 = TLB exception frame in PACA | ||
568 | * r11 = crap (free to use) | ||
569 | * r10 = crap (free to use) | ||
570 | * | ||
571 | * It can be re-entered by the linear mapping miss handler. However, to | ||
572 | * avoid too much complication, it will save/restore things for us | ||
573 | */ | ||
574 | htw_tlb_miss: | ||
575 | /* Search if we already have a TLB entry for that virtual address, and | ||
576 | * if we do, bail out. | ||
577 | * | ||
578 | * MAS1:IND should be already set based on MAS4 | ||
579 | */ | ||
580 | PPC_TLBSRX_DOT(0,r16) | ||
581 | beq htw_tlb_miss_done | ||
582 | |||
583 | /* Now, we need to walk the page tables. First check if we are in | ||
584 | * range. | ||
585 | */ | ||
586 | rldicl. r10,r16,64-PGTABLE_EADDR_SIZE,PGTABLE_EADDR_SIZE+4 | ||
587 | bne- htw_tlb_miss_fault | ||
588 | |||
589 | /* Get the PGD pointer */ | ||
590 | cmpldi cr0,r15,0 | ||
591 | beq- htw_tlb_miss_fault | ||
592 | |||
593 | /* Get to PGD entry */ | ||
594 | rldicl r11,r16,64-(PGDIR_SHIFT-3),64-PGD_INDEX_SIZE-3 | ||
595 | clrrdi r10,r11,3 | ||
596 | ldx r15,r10,r15 | ||
597 | cmpldi cr0,r15,0 | ||
598 | beq htw_tlb_miss_fault | ||
599 | |||
600 | #ifndef CONFIG_PPC_64K_PAGES | ||
601 | /* Get to PUD entry */ | ||
602 | rldicl r11,r16,64-(PUD_SHIFT-3),64-PUD_INDEX_SIZE-3 | ||
603 | clrrdi r10,r11,3 | ||
604 | ldx r15,r10,r15 | ||
605 | cmpldi cr0,r15,0 | ||
606 | beq htw_tlb_miss_fault | ||
607 | #endif /* CONFIG_PPC_64K_PAGES */ | ||
608 | |||
609 | /* Get to PMD entry */ | ||
610 | rldicl r11,r16,64-(PMD_SHIFT-3),64-PMD_INDEX_SIZE-3 | ||
611 | clrrdi r10,r11,3 | ||
612 | ldx r15,r10,r15 | ||
613 | cmpldi cr0,r15,0 | ||
614 | beq htw_tlb_miss_fault | ||
615 | |||
616 | /* Ok, we're all right, we can now create an indirect entry for | ||
617 | * a 1M or 256M page. | ||
618 | * | ||
619 | * The last trick is now that because we use "half" pages for | ||
620 | * the HTW (1M IND is 2K and 256M IND is 32K) we need to account | ||
621 | * for an added LSB bit to the RPN. For 64K pages, there is no | ||
622 | * problem as we already use 32K arrays (half PTE pages), but for | ||
623 | * 4K page we need to extract a bit from the virtual address and | ||
624 | * insert it into the "PA52" bit of the RPN. | ||
625 | */ | ||
626 | #ifndef CONFIG_PPC_64K_PAGES | ||
627 | rlwimi r15,r16,32-9,20,20 | ||
628 | #endif | ||
629 | /* Now we build the MAS: | ||
630 | * | ||
631 | * MAS 0 : Fully setup with defaults in MAS4 and TLBnCFG | ||
632 | * MAS 1 : Almost fully setup | ||
633 | * - PID already updated by caller if necessary | ||
634 | * - TSIZE for now is base ind page size always | ||
635 | * MAS 2 : Use defaults | ||
636 | * MAS 3+7 : Needs to be done | ||
637 | */ | ||
638 | #ifdef CONFIG_PPC_64K_PAGES | ||
639 | ori r10,r15,(BOOK3E_PAGESZ_64K << MAS3_SPSIZE_SHIFT) | ||
640 | #else | ||
641 | ori r10,r15,(BOOK3E_PAGESZ_4K << MAS3_SPSIZE_SHIFT) | ||
642 | #endif | ||
643 | |||
644 | BEGIN_MMU_FTR_SECTION | ||
645 | srdi r16,r10,32 | ||
646 | mtspr SPRN_MAS3,r10 | ||
647 | mtspr SPRN_MAS7,r16 | ||
648 | MMU_FTR_SECTION_ELSE | ||
649 | mtspr SPRN_MAS7_MAS3,r10 | ||
650 | ALT_MMU_FTR_SECTION_END_IFCLR(MMU_FTR_USE_PAIRED_MAS) | ||
651 | |||
652 | tlbwe | ||
653 | |||
654 | htw_tlb_miss_done: | ||
655 | /* We don't bother with restoring DEAR or ESR since we know we are | ||
656 | * level 0 and just going back to userland. They are only needed | ||
657 | * if you are going to take an access fault | ||
658 | */ | ||
659 | TLB_MISS_STATS_X(MMSTAT_TLB_MISS_PT_OK) | ||
660 | TLB_MISS_EPILOG_SUCCESS | ||
661 | rfi | ||
662 | |||
663 | htw_tlb_miss_fault: | ||
664 | /* We need to check if it was an instruction miss. We know this | ||
665 | * though because r14 would contain -1 | ||
666 | */ | ||
667 | cmpdi cr0,r14,-1 | ||
668 | beq 1f | ||
669 | mtspr SPRN_DEAR,r16 | ||
670 | mtspr SPRN_ESR,r14 | ||
671 | TLB_MISS_STATS_D(MMSTAT_TLB_MISS_PT_FAULT) | ||
672 | TLB_MISS_EPILOG_ERROR | ||
673 | b exc_data_storage_book3e | ||
674 | 1: TLB_MISS_STATS_I(MMSTAT_TLB_MISS_PT_FAULT) | ||
675 | TLB_MISS_EPILOG_ERROR | ||
676 | b exc_instruction_storage_book3e | ||
677 | |||
678 | /* | ||
679 | * This is the guts of "any" level TLB miss handler for kernel linear | ||
680 | * mapping misses. We are entered with: | ||
681 | * | ||
682 | * | ||
683 | * r16 = faulting address | ||
684 | * r15 = crap (free to use) | ||
685 | * r14 = ESR (data) or -1 (instruction) | ||
686 | * r13 = PACA | ||
687 | * r12 = TLB exception frame in PACA | ||
688 | * r11 = crap (free to use) | ||
689 | * r10 = crap (free to use) | ||
690 | * | ||
691 | * In addition we know that we will not re-enter, so in theory, we could | ||
692 | * use a simpler epilog not restoring SRR0/1 etc.. but we'll do that later. | ||
693 | * | ||
694 | * We also need to be careful about MAS registers here & TLB reservation, | ||
695 | * as we know we'll have clobbered them if we interrupt the main TLB miss | ||
696 | * handlers in which case we probably want to do a full restart at level | ||
697 | * 0 rather than saving / restoring the MAS. | ||
698 | * | ||
699 | * Note: If we care about performance of that core, we can easily shuffle | ||
700 | * a few things around | ||
701 | */ | ||
702 | tlb_load_linear: | ||
703 | /* For now, we assume the linear mapping is contiguous and stops at | ||
704 | * linear_map_top. We also assume the size is a multiple of 1G, thus | ||
705 | * we only use 1G pages for now. That might have to be changed in a | ||
706 | * final implementation, especially when dealing with hypervisors | ||
707 | */ | ||
708 | ld r11,PACATOC(r13) | ||
709 | ld r11,linear_map_top@got(r11) | ||
710 | ld r10,0(r11) | ||
711 | cmpld cr0,r10,r16 | ||
712 | bge tlb_load_linear_fault | ||
713 | |||
714 | /* MAS1 need whole new setup. */ | ||
715 | li r15,(BOOK3E_PAGESZ_1GB<<MAS1_TSIZE_SHIFT) | ||
716 | oris r15,r15,MAS1_VALID@h /* MAS1 needs V and TSIZE */ | ||
717 | mtspr SPRN_MAS1,r15 | ||
718 | |||
719 | /* Already somebody there ? */ | ||
720 | PPC_TLBSRX_DOT(0,r16) | ||
721 | beq tlb_load_linear_done | ||
722 | |||
723 | /* Now we build the remaining MAS. MAS0 and 2 should be fine | ||
724 | * with their defaults, which leaves us with MAS 3 and 7. The | ||
725 | * mapping is linear, so we just take the address, clear the | ||
726 | * region bits, and or in the permission bits which are currently | ||
727 | * hard wired | ||
728 | */ | ||
729 | clrrdi r10,r16,30 /* 1G page index */ | ||
730 | clrldi r10,r10,4 /* clear region bits */ | ||
731 | ori r10,r10,MAS3_SR|MAS3_SW|MAS3_SX | ||
732 | |||
733 | BEGIN_MMU_FTR_SECTION | ||
734 | srdi r16,r10,32 | ||
735 | mtspr SPRN_MAS3,r10 | ||
736 | mtspr SPRN_MAS7,r16 | ||
737 | MMU_FTR_SECTION_ELSE | ||
738 | mtspr SPRN_MAS7_MAS3,r10 | ||
739 | ALT_MMU_FTR_SECTION_END_IFCLR(MMU_FTR_USE_PAIRED_MAS) | ||
740 | |||
741 | tlbwe | ||
742 | |||
743 | tlb_load_linear_done: | ||
744 | /* We use the "error" epilog for success as we do want to | ||
745 | * restore to the initial faulting context, whatever it was. | ||
746 | * We do that because we can't resume a fault within a TLB | ||
747 | * miss handler, due to MAS and TLB reservation being clobbered. | ||
748 | */ | ||
749 | TLB_MISS_STATS_X(MMSTAT_TLB_MISS_LINEAR) | ||
750 | TLB_MISS_EPILOG_ERROR | ||
751 | rfi | ||
752 | |||
753 | tlb_load_linear_fault: | ||
754 | /* We keep the DEAR and ESR around, this shouldn't have happened */ | ||
755 | cmpdi cr0,r14,-1 | ||
756 | beq 1f | ||
757 | TLB_MISS_EPILOG_ERROR_SPECIAL | ||
758 | b exc_data_storage_book3e | ||
759 | 1: TLB_MISS_EPILOG_ERROR_SPECIAL | ||
760 | b exc_instruction_storage_book3e | ||
761 | |||
762 | |||
763 | #ifdef CONFIG_BOOK3E_MMU_TLB_STATS | ||
764 | .tlb_stat_inc: | ||
765 | 1: ldarx r8,0,r9 | ||
766 | addi r8,r8,1 | ||
767 | stdcx. r8,0,r9 | ||
768 | bne- 1b | ||
769 | blr | ||
770 | #endif | ||
diff --git a/arch/powerpc/mm/tlb_nohash.c b/arch/powerpc/mm/tlb_nohash.c index ad2eb4d34dd4..2fbc680c2c71 100644 --- a/arch/powerpc/mm/tlb_nohash.c +++ b/arch/powerpc/mm/tlb_nohash.c | |||
@@ -7,8 +7,8 @@ | |||
7 | * | 7 | * |
8 | * -- BenH | 8 | * -- BenH |
9 | * | 9 | * |
10 | * Copyright 2008 Ben Herrenschmidt <benh@kernel.crashing.org> | 10 | * Copyright 2008,2009 Ben Herrenschmidt <benh@kernel.crashing.org> |
11 | * IBM Corp. | 11 | * IBM Corp. |
12 | * | 12 | * |
13 | * Derived from arch/ppc/mm/init.c: | 13 | * Derived from arch/ppc/mm/init.c: |
14 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) | 14 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) |
@@ -34,12 +34,71 @@ | |||
34 | #include <linux/pagemap.h> | 34 | #include <linux/pagemap.h> |
35 | #include <linux/preempt.h> | 35 | #include <linux/preempt.h> |
36 | #include <linux/spinlock.h> | 36 | #include <linux/spinlock.h> |
37 | #include <linux/lmb.h> | ||
37 | 38 | ||
38 | #include <asm/tlbflush.h> | 39 | #include <asm/tlbflush.h> |
39 | #include <asm/tlb.h> | 40 | #include <asm/tlb.h> |
41 | #include <asm/code-patching.h> | ||
40 | 42 | ||
41 | #include "mmu_decl.h" | 43 | #include "mmu_decl.h" |
42 | 44 | ||
45 | #ifdef CONFIG_PPC_BOOK3E | ||
46 | struct mmu_psize_def mmu_psize_defs[MMU_PAGE_COUNT] = { | ||
47 | [MMU_PAGE_4K] = { | ||
48 | .shift = 12, | ||
49 | .enc = BOOK3E_PAGESZ_4K, | ||
50 | }, | ||
51 | [MMU_PAGE_16K] = { | ||
52 | .shift = 14, | ||
53 | .enc = BOOK3E_PAGESZ_16K, | ||
54 | }, | ||
55 | [MMU_PAGE_64K] = { | ||
56 | .shift = 16, | ||
57 | .enc = BOOK3E_PAGESZ_64K, | ||
58 | }, | ||
59 | [MMU_PAGE_1M] = { | ||
60 | .shift = 20, | ||
61 | .enc = BOOK3E_PAGESZ_1M, | ||
62 | }, | ||
63 | [MMU_PAGE_16M] = { | ||
64 | .shift = 24, | ||
65 | .enc = BOOK3E_PAGESZ_16M, | ||
66 | }, | ||
67 | [MMU_PAGE_256M] = { | ||
68 | .shift = 28, | ||
69 | .enc = BOOK3E_PAGESZ_256M, | ||
70 | }, | ||
71 | [MMU_PAGE_1G] = { | ||
72 | .shift = 30, | ||
73 | .enc = BOOK3E_PAGESZ_1GB, | ||
74 | }, | ||
75 | }; | ||
76 | static inline int mmu_get_tsize(int psize) | ||
77 | { | ||
78 | return mmu_psize_defs[psize].enc; | ||
79 | } | ||
80 | #else | ||
81 | static inline int mmu_get_tsize(int psize) | ||
82 | { | ||
83 | /* This isn't used on !Book3E for now */ | ||
84 | return 0; | ||
85 | } | ||
86 | #endif | ||
87 | |||
88 | /* The variables below are currently only used on 64-bit Book3E | ||
89 | * though this will probably be made common with other nohash | ||
90 | * implementations at some point | ||
91 | */ | ||
92 | #ifdef CONFIG_PPC64 | ||
93 | |||
94 | int mmu_linear_psize; /* Page size used for the linear mapping */ | ||
95 | int mmu_pte_psize; /* Page size used for PTE pages */ | ||
96 | int mmu_vmemmap_psize; /* Page size used for the virtual mem map */ | ||
97 | int book3e_htw_enabled; /* Is HW tablewalk enabled ? */ | ||
98 | unsigned long linear_map_top; /* Top of linear mapping */ | ||
99 | |||
100 | #endif /* CONFIG_PPC64 */ | ||
101 | |||
43 | /* | 102 | /* |
44 | * Base TLB flushing operations: | 103 | * Base TLB flushing operations: |
45 | * | 104 | * |
@@ -67,18 +126,24 @@ void local_flush_tlb_mm(struct mm_struct *mm) | |||
67 | } | 126 | } |
68 | EXPORT_SYMBOL(local_flush_tlb_mm); | 127 | EXPORT_SYMBOL(local_flush_tlb_mm); |
69 | 128 | ||
70 | void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr) | 129 | void __local_flush_tlb_page(struct mm_struct *mm, unsigned long vmaddr, |
130 | int tsize, int ind) | ||
71 | { | 131 | { |
72 | unsigned int pid; | 132 | unsigned int pid; |
73 | 133 | ||
74 | preempt_disable(); | 134 | preempt_disable(); |
75 | pid = vma ? vma->vm_mm->context.id : 0; | 135 | pid = mm ? mm->context.id : 0; |
76 | if (pid != MMU_NO_CONTEXT) | 136 | if (pid != MMU_NO_CONTEXT) |
77 | _tlbil_va(vmaddr, pid); | 137 | _tlbil_va(vmaddr, pid, tsize, ind); |
78 | preempt_enable(); | 138 | preempt_enable(); |
79 | } | 139 | } |
80 | EXPORT_SYMBOL(local_flush_tlb_page); | ||
81 | 140 | ||
141 | void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr) | ||
142 | { | ||
143 | __local_flush_tlb_page(vma ? vma->vm_mm : NULL, vmaddr, | ||
144 | mmu_get_tsize(mmu_virtual_psize), 0); | ||
145 | } | ||
146 | EXPORT_SYMBOL(local_flush_tlb_page); | ||
82 | 147 | ||
83 | /* | 148 | /* |
84 | * And here are the SMP non-local implementations | 149 | * And here are the SMP non-local implementations |
@@ -87,9 +152,17 @@ EXPORT_SYMBOL(local_flush_tlb_page); | |||
87 | 152 | ||
88 | static DEFINE_SPINLOCK(tlbivax_lock); | 153 | static DEFINE_SPINLOCK(tlbivax_lock); |
89 | 154 | ||
155 | static int mm_is_core_local(struct mm_struct *mm) | ||
156 | { | ||
157 | return cpumask_subset(mm_cpumask(mm), | ||
158 | topology_thread_cpumask(smp_processor_id())); | ||
159 | } | ||
160 | |||
90 | struct tlb_flush_param { | 161 | struct tlb_flush_param { |
91 | unsigned long addr; | 162 | unsigned long addr; |
92 | unsigned int pid; | 163 | unsigned int pid; |
164 | unsigned int tsize; | ||
165 | unsigned int ind; | ||
93 | }; | 166 | }; |
94 | 167 | ||
95 | static void do_flush_tlb_mm_ipi(void *param) | 168 | static void do_flush_tlb_mm_ipi(void *param) |
@@ -103,7 +176,7 @@ static void do_flush_tlb_page_ipi(void *param) | |||
103 | { | 176 | { |
104 | struct tlb_flush_param *p = param; | 177 | struct tlb_flush_param *p = param; |
105 | 178 | ||
106 | _tlbil_va(p->addr, p->pid); | 179 | _tlbil_va(p->addr, p->pid, p->tsize, p->ind); |
107 | } | 180 | } |
108 | 181 | ||
109 | 182 | ||
@@ -131,7 +204,7 @@ void flush_tlb_mm(struct mm_struct *mm) | |||
131 | pid = mm->context.id; | 204 | pid = mm->context.id; |
132 | if (unlikely(pid == MMU_NO_CONTEXT)) | 205 | if (unlikely(pid == MMU_NO_CONTEXT)) |
133 | goto no_context; | 206 | goto no_context; |
134 | if (!cpumask_equal(mm_cpumask(mm), cpumask_of(smp_processor_id()))) { | 207 | if (!mm_is_core_local(mm)) { |
135 | struct tlb_flush_param p = { .pid = pid }; | 208 | struct tlb_flush_param p = { .pid = pid }; |
136 | /* Ignores smp_processor_id() even if set. */ | 209 | /* Ignores smp_processor_id() even if set. */ |
137 | smp_call_function_many(mm_cpumask(mm), | 210 | smp_call_function_many(mm_cpumask(mm), |
@@ -143,37 +216,49 @@ void flush_tlb_mm(struct mm_struct *mm) | |||
143 | } | 216 | } |
144 | EXPORT_SYMBOL(flush_tlb_mm); | 217 | EXPORT_SYMBOL(flush_tlb_mm); |
145 | 218 | ||
146 | void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr) | 219 | void __flush_tlb_page(struct mm_struct *mm, unsigned long vmaddr, |
220 | int tsize, int ind) | ||
147 | { | 221 | { |
148 | struct cpumask *cpu_mask; | 222 | struct cpumask *cpu_mask; |
149 | unsigned int pid; | 223 | unsigned int pid; |
150 | 224 | ||
151 | preempt_disable(); | 225 | preempt_disable(); |
152 | pid = vma ? vma->vm_mm->context.id : 0; | 226 | pid = mm ? mm->context.id : 0; |
153 | if (unlikely(pid == MMU_NO_CONTEXT)) | 227 | if (unlikely(pid == MMU_NO_CONTEXT)) |
154 | goto bail; | 228 | goto bail; |
155 | cpu_mask = mm_cpumask(vma->vm_mm); | 229 | cpu_mask = mm_cpumask(mm); |
156 | if (!cpumask_equal(cpu_mask, cpumask_of(smp_processor_id()))) { | 230 | if (!mm_is_core_local(mm)) { |
157 | /* If broadcast tlbivax is supported, use it */ | 231 | /* If broadcast tlbivax is supported, use it */ |
158 | if (mmu_has_feature(MMU_FTR_USE_TLBIVAX_BCAST)) { | 232 | if (mmu_has_feature(MMU_FTR_USE_TLBIVAX_BCAST)) { |
159 | int lock = mmu_has_feature(MMU_FTR_LOCK_BCAST_INVAL); | 233 | int lock = mmu_has_feature(MMU_FTR_LOCK_BCAST_INVAL); |
160 | if (lock) | 234 | if (lock) |
161 | spin_lock(&tlbivax_lock); | 235 | spin_lock(&tlbivax_lock); |
162 | _tlbivax_bcast(vmaddr, pid); | 236 | _tlbivax_bcast(vmaddr, pid, tsize, ind); |
163 | if (lock) | 237 | if (lock) |
164 | spin_unlock(&tlbivax_lock); | 238 | spin_unlock(&tlbivax_lock); |
165 | goto bail; | 239 | goto bail; |
166 | } else { | 240 | } else { |
167 | struct tlb_flush_param p = { .pid = pid, .addr = vmaddr }; | 241 | struct tlb_flush_param p = { |
242 | .pid = pid, | ||
243 | .addr = vmaddr, | ||
244 | .tsize = tsize, | ||
245 | .ind = ind, | ||
246 | }; | ||
168 | /* Ignores smp_processor_id() even if set in cpu_mask */ | 247 | /* Ignores smp_processor_id() even if set in cpu_mask */ |
169 | smp_call_function_many(cpu_mask, | 248 | smp_call_function_many(cpu_mask, |
170 | do_flush_tlb_page_ipi, &p, 1); | 249 | do_flush_tlb_page_ipi, &p, 1); |
171 | } | 250 | } |
172 | } | 251 | } |
173 | _tlbil_va(vmaddr, pid); | 252 | _tlbil_va(vmaddr, pid, tsize, ind); |
174 | bail: | 253 | bail: |
175 | preempt_enable(); | 254 | preempt_enable(); |
176 | } | 255 | } |
256 | |||
257 | void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr) | ||
258 | { | ||
259 | __flush_tlb_page(vma ? vma->vm_mm : NULL, vmaddr, | ||
260 | mmu_get_tsize(mmu_virtual_psize), 0); | ||
261 | } | ||
177 | EXPORT_SYMBOL(flush_tlb_page); | 262 | EXPORT_SYMBOL(flush_tlb_page); |
178 | 263 | ||
179 | #endif /* CONFIG_SMP */ | 264 | #endif /* CONFIG_SMP */ |
@@ -207,3 +292,156 @@ void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, | |||
207 | flush_tlb_mm(vma->vm_mm); | 292 | flush_tlb_mm(vma->vm_mm); |
208 | } | 293 | } |
209 | EXPORT_SYMBOL(flush_tlb_range); | 294 | EXPORT_SYMBOL(flush_tlb_range); |
295 | |||
296 | void tlb_flush(struct mmu_gather *tlb) | ||
297 | { | ||
298 | flush_tlb_mm(tlb->mm); | ||
299 | |||
300 | /* Push out batch of freed page tables */ | ||
301 | pte_free_finish(); | ||
302 | } | ||
303 | |||
304 | /* | ||
305 | * Below are functions specific to the 64-bit variant of Book3E though that | ||
306 | * may change in the future | ||
307 | */ | ||
308 | |||
309 | #ifdef CONFIG_PPC64 | ||
310 | |||
311 | /* | ||
312 | * Handling of virtual linear page tables or indirect TLB entries | ||
313 | * flushing when PTE pages are freed | ||
314 | */ | ||
315 | void tlb_flush_pgtable(struct mmu_gather *tlb, unsigned long address) | ||
316 | { | ||
317 | int tsize = mmu_psize_defs[mmu_pte_psize].enc; | ||
318 | |||
319 | if (book3e_htw_enabled) { | ||
320 | unsigned long start = address & PMD_MASK; | ||
321 | unsigned long end = address + PMD_SIZE; | ||
322 | unsigned long size = 1UL << mmu_psize_defs[mmu_pte_psize].shift; | ||
323 | |||
324 | /* This isn't the most optimal, ideally we would factor out the | ||
325 | * while preempt & CPU mask mucking around, or even the IPI but | ||
326 | * it will do for now | ||
327 | */ | ||
328 | while (start < end) { | ||
329 | __flush_tlb_page(tlb->mm, start, tsize, 1); | ||
330 | start += size; | ||
331 | } | ||
332 | } else { | ||
333 | unsigned long rmask = 0xf000000000000000ul; | ||
334 | unsigned long rid = (address & rmask) | 0x1000000000000000ul; | ||
335 | unsigned long vpte = address & ~rmask; | ||
336 | |||
337 | #ifdef CONFIG_PPC_64K_PAGES | ||
338 | vpte = (vpte >> (PAGE_SHIFT - 4)) & ~0xfffful; | ||
339 | #else | ||
340 | vpte = (vpte >> (PAGE_SHIFT - 3)) & ~0xffful; | ||
341 | #endif | ||
342 | vpte |= rid; | ||
343 | __flush_tlb_page(tlb->mm, vpte, tsize, 0); | ||
344 | } | ||
345 | } | ||
346 | |||
347 | /* | ||
348 | * Early initialization of the MMU TLB code | ||
349 | */ | ||
350 | static void __early_init_mmu(int boot_cpu) | ||
351 | { | ||
352 | extern unsigned int interrupt_base_book3e; | ||
353 | extern unsigned int exc_data_tlb_miss_htw_book3e; | ||
354 | extern unsigned int exc_instruction_tlb_miss_htw_book3e; | ||
355 | |||
356 | unsigned int *ibase = &interrupt_base_book3e; | ||
357 | unsigned int mas4; | ||
358 | |||
359 | /* XXX This will have to be decided at runtime, but right | ||
360 | * now our boot and TLB miss code hard wires it. Ideally | ||
361 | * we should find out a suitable page size and patch the | ||
362 | * TLB miss code (either that or use the PACA to store | ||
363 | * the value we want) | ||
364 | */ | ||
365 | mmu_linear_psize = MMU_PAGE_1G; | ||
366 | |||
367 | /* XXX This should be decided at runtime based on supported | ||
368 | * page sizes in the TLB, but for now let's assume 16M is | ||
369 | * always there and a good fit (which it probably is) | ||
370 | */ | ||
371 | mmu_vmemmap_psize = MMU_PAGE_16M; | ||
372 | |||
373 | /* Check if HW tablewalk is present, and if yes, enable it by: | ||
374 | * | ||
375 | * - patching the TLB miss handlers to branch to the | ||
376 | * one dedicates to it | ||
377 | * | ||
378 | * - setting the global book3e_htw_enabled | ||
379 | * | ||
380 | * - Set MAS4:INDD and default page size | ||
381 | */ | ||
382 | |||
383 | /* XXX This code only checks for TLB 0 capabilities and doesn't | ||
384 | * check what page size combos are supported by the HW. It | ||
385 | * also doesn't handle the case where a separate array holds | ||
386 | * the IND entries from the array loaded by the PT. | ||
387 | */ | ||
388 | if (boot_cpu) { | ||
389 | unsigned int tlb0cfg = mfspr(SPRN_TLB0CFG); | ||
390 | |||
391 | /* Check if HW loader is supported */ | ||
392 | if ((tlb0cfg & TLBnCFG_IND) && | ||
393 | (tlb0cfg & TLBnCFG_PT)) { | ||
394 | patch_branch(ibase + (0x1c0 / 4), | ||
395 | (unsigned long)&exc_data_tlb_miss_htw_book3e, 0); | ||
396 | patch_branch(ibase + (0x1e0 / 4), | ||
397 | (unsigned long)&exc_instruction_tlb_miss_htw_book3e, 0); | ||
398 | book3e_htw_enabled = 1; | ||
399 | } | ||
400 | pr_info("MMU: Book3E Page Tables %s\n", | ||
401 | book3e_htw_enabled ? "Enabled" : "Disabled"); | ||
402 | } | ||
403 | |||
404 | /* Set MAS4 based on page table setting */ | ||
405 | |||
406 | mas4 = 0x4 << MAS4_WIMGED_SHIFT; | ||
407 | if (book3e_htw_enabled) { | ||
408 | mas4 |= mas4 | MAS4_INDD; | ||
409 | #ifdef CONFIG_PPC_64K_PAGES | ||
410 | mas4 |= BOOK3E_PAGESZ_256M << MAS4_TSIZED_SHIFT; | ||
411 | mmu_pte_psize = MMU_PAGE_256M; | ||
412 | #else | ||
413 | mas4 |= BOOK3E_PAGESZ_1M << MAS4_TSIZED_SHIFT; | ||
414 | mmu_pte_psize = MMU_PAGE_1M; | ||
415 | #endif | ||
416 | } else { | ||
417 | #ifdef CONFIG_PPC_64K_PAGES | ||
418 | mas4 |= BOOK3E_PAGESZ_64K << MAS4_TSIZED_SHIFT; | ||
419 | #else | ||
420 | mas4 |= BOOK3E_PAGESZ_4K << MAS4_TSIZED_SHIFT; | ||
421 | #endif | ||
422 | mmu_pte_psize = mmu_virtual_psize; | ||
423 | } | ||
424 | mtspr(SPRN_MAS4, mas4); | ||
425 | |||
426 | /* Set the global containing the top of the linear mapping | ||
427 | * for use by the TLB miss code | ||
428 | */ | ||
429 | linear_map_top = lmb_end_of_DRAM(); | ||
430 | |||
431 | /* A sync won't hurt us after mucking around with | ||
432 | * the MMU configuration | ||
433 | */ | ||
434 | mb(); | ||
435 | } | ||
436 | |||
437 | void __init early_init_mmu(void) | ||
438 | { | ||
439 | __early_init_mmu(1); | ||
440 | } | ||
441 | |||
442 | void __cpuinit early_init_mmu_secondary(void) | ||
443 | { | ||
444 | __early_init_mmu(0); | ||
445 | } | ||
446 | |||
447 | #endif /* CONFIG_PPC64 */ | ||
diff --git a/arch/powerpc/mm/tlb_nohash_low.S b/arch/powerpc/mm/tlb_nohash_low.S index 3037911279b1..bbdc5b577b85 100644 --- a/arch/powerpc/mm/tlb_nohash_low.S +++ b/arch/powerpc/mm/tlb_nohash_low.S | |||
@@ -39,7 +39,7 @@ | |||
39 | /* | 39 | /* |
40 | * 40x implementation needs only tlbil_va | 40 | * 40x implementation needs only tlbil_va |
41 | */ | 41 | */ |
42 | _GLOBAL(_tlbil_va) | 42 | _GLOBAL(__tlbil_va) |
43 | /* We run the search with interrupts disabled because we have to change | 43 | /* We run the search with interrupts disabled because we have to change |
44 | * the PID and I don't want to preempt when that happens. | 44 | * the PID and I don't want to preempt when that happens. |
45 | */ | 45 | */ |
@@ -71,7 +71,7 @@ _GLOBAL(_tlbil_va) | |||
71 | * 440 implementation uses tlbsx/we for tlbil_va and a full sweep | 71 | * 440 implementation uses tlbsx/we for tlbil_va and a full sweep |
72 | * of the TLB for everything else. | 72 | * of the TLB for everything else. |
73 | */ | 73 | */ |
74 | _GLOBAL(_tlbil_va) | 74 | _GLOBAL(__tlbil_va) |
75 | mfspr r5,SPRN_MMUCR | 75 | mfspr r5,SPRN_MMUCR |
76 | rlwimi r5,r4,0,24,31 /* Set TID */ | 76 | rlwimi r5,r4,0,24,31 /* Set TID */ |
77 | 77 | ||
@@ -124,8 +124,6 @@ _GLOBAL(_tlbil_pid) | |||
124 | * to have the larger code path before the _SECTION_ELSE | 124 | * to have the larger code path before the _SECTION_ELSE |
125 | */ | 125 | */ |
126 | 126 | ||
127 | #define MMUCSR0_TLBFI (MMUCSR0_TLB0FI | MMUCSR0_TLB1FI | \ | ||
128 | MMUCSR0_TLB2FI | MMUCSR0_TLB3FI) | ||
129 | /* | 127 | /* |
130 | * Flush MMU TLB on the local processor | 128 | * Flush MMU TLB on the local processor |
131 | */ | 129 | */ |
@@ -170,7 +168,7 @@ ALT_MMU_FTR_SECTION_END_IFSET(MMU_FTR_USE_TLBILX) | |||
170 | * Flush MMU TLB for a particular address, but only on the local processor | 168 | * Flush MMU TLB for a particular address, but only on the local processor |
171 | * (no broadcast) | 169 | * (no broadcast) |
172 | */ | 170 | */ |
173 | _GLOBAL(_tlbil_va) | 171 | _GLOBAL(__tlbil_va) |
174 | mfmsr r10 | 172 | mfmsr r10 |
175 | wrteei 0 | 173 | wrteei 0 |
176 | slwi r4,r4,16 | 174 | slwi r4,r4,16 |
@@ -191,6 +189,85 @@ ALT_MMU_FTR_SECTION_END_IFCLR(MMU_FTR_USE_TLBILX) | |||
191 | isync | 189 | isync |
192 | 1: wrtee r10 | 190 | 1: wrtee r10 |
193 | blr | 191 | blr |
192 | #elif defined(CONFIG_PPC_BOOK3E) | ||
193 | /* | ||
194 | * New Book3E (>= 2.06) implementation | ||
195 | * | ||
196 | * Note: We may be able to get away without the interrupt masking stuff | ||
197 | * if we save/restore MAS6 on exceptions that might modify it | ||
198 | */ | ||
199 | _GLOBAL(_tlbil_pid) | ||
200 | slwi r4,r3,MAS6_SPID_SHIFT | ||
201 | mfmsr r10 | ||
202 | wrteei 0 | ||
203 | mtspr SPRN_MAS6,r4 | ||
204 | PPC_TLBILX_PID(0,0) | ||
205 | wrtee r10 | ||
206 | msync | ||
207 | isync | ||
208 | blr | ||
209 | |||
210 | _GLOBAL(_tlbil_pid_noind) | ||
211 | slwi r4,r3,MAS6_SPID_SHIFT | ||
212 | mfmsr r10 | ||
213 | ori r4,r4,MAS6_SIND | ||
214 | wrteei 0 | ||
215 | mtspr SPRN_MAS6,r4 | ||
216 | PPC_TLBILX_PID(0,0) | ||
217 | wrtee r10 | ||
218 | msync | ||
219 | isync | ||
220 | blr | ||
221 | |||
222 | _GLOBAL(_tlbil_all) | ||
223 | PPC_TLBILX_ALL(0,0) | ||
224 | msync | ||
225 | isync | ||
226 | blr | ||
227 | |||
228 | _GLOBAL(_tlbil_va) | ||
229 | mfmsr r10 | ||
230 | wrteei 0 | ||
231 | cmpwi cr0,r6,0 | ||
232 | slwi r4,r4,MAS6_SPID_SHIFT | ||
233 | rlwimi r4,r5,MAS6_ISIZE_SHIFT,MAS6_ISIZE_MASK | ||
234 | beq 1f | ||
235 | rlwimi r4,r6,MAS6_SIND_SHIFT,MAS6_SIND | ||
236 | 1: mtspr SPRN_MAS6,r4 /* assume AS=0 for now */ | ||
237 | PPC_TLBILX_VA(0,r3) | ||
238 | msync | ||
239 | isync | ||
240 | wrtee r10 | ||
241 | blr | ||
242 | |||
243 | _GLOBAL(_tlbivax_bcast) | ||
244 | mfmsr r10 | ||
245 | wrteei 0 | ||
246 | cmpwi cr0,r6,0 | ||
247 | slwi r4,r4,MAS6_SPID_SHIFT | ||
248 | rlwimi r4,r5,MAS6_ISIZE_SHIFT,MAS6_ISIZE_MASK | ||
249 | beq 1f | ||
250 | rlwimi r4,r6,MAS6_SIND_SHIFT,MAS6_SIND | ||
251 | 1: mtspr SPRN_MAS6,r4 /* assume AS=0 for now */ | ||
252 | PPC_TLBIVAX(0,r3) | ||
253 | eieio | ||
254 | tlbsync | ||
255 | sync | ||
256 | wrtee r10 | ||
257 | blr | ||
258 | |||
259 | _GLOBAL(set_context) | ||
260 | #ifdef CONFIG_BDI_SWITCH | ||
261 | /* Context switch the PTE pointer for the Abatron BDI2000. | ||
262 | * The PGDIR is the second parameter. | ||
263 | */ | ||
264 | lis r5, abatron_pteptrs@h | ||
265 | ori r5, r5, abatron_pteptrs@l | ||
266 | stw r4, 0x4(r5) | ||
267 | #endif | ||
268 | mtspr SPRN_PID,r3 | ||
269 | isync /* Force context change */ | ||
270 | blr | ||
194 | #else | 271 | #else |
195 | #error Unsupported processor type ! | 272 | #error Unsupported processor type ! |
196 | #endif | 273 | #endif |
diff --git a/arch/powerpc/platforms/40x/Kconfig b/arch/powerpc/platforms/40x/Kconfig index a6e43cb6f825..ec64264f7a50 100644 --- a/arch/powerpc/platforms/40x/Kconfig +++ b/arch/powerpc/platforms/40x/Kconfig | |||
@@ -40,6 +40,16 @@ config HCU4 | |||
40 | help | 40 | help |
41 | This option enables support for the Nestal Maschinen HCU4 board. | 41 | This option enables support for the Nestal Maschinen HCU4 board. |
42 | 42 | ||
43 | config HOTFOOT | ||
44 | bool "Hotfoot" | ||
45 | depends on 40x | ||
46 | default n | ||
47 | select 405EP | ||
48 | select PPC40x_SIMPLE | ||
49 | select PCI | ||
50 | help | ||
51 | This option enables support for the ESTEEM 195E Hotfoot board. | ||
52 | |||
43 | config KILAUEA | 53 | config KILAUEA |
44 | bool "Kilauea" | 54 | bool "Kilauea" |
45 | depends on 40x | 55 | depends on 40x |
diff --git a/arch/powerpc/platforms/40x/ppc40x_simple.c b/arch/powerpc/platforms/40x/ppc40x_simple.c index 5fd5a5974001..546bbc229d19 100644 --- a/arch/powerpc/platforms/40x/ppc40x_simple.c +++ b/arch/powerpc/platforms/40x/ppc40x_simple.c | |||
@@ -54,7 +54,8 @@ static char *board[] __initdata = { | |||
54 | "amcc,acadia", | 54 | "amcc,acadia", |
55 | "amcc,haleakala", | 55 | "amcc,haleakala", |
56 | "amcc,kilauea", | 56 | "amcc,kilauea", |
57 | "amcc,makalu" | 57 | "amcc,makalu", |
58 | "est,hotfoot" | ||
58 | }; | 59 | }; |
59 | 60 | ||
60 | static int __init ppc40x_probe(void) | 61 | static int __init ppc40x_probe(void) |
diff --git a/arch/powerpc/platforms/44x/Kconfig b/arch/powerpc/platforms/44x/Kconfig index 90e3192611a4..7486bffd3ebb 100644 --- a/arch/powerpc/platforms/44x/Kconfig +++ b/arch/powerpc/platforms/44x/Kconfig | |||
@@ -129,6 +129,18 @@ config REDWOOD | |||
129 | help | 129 | help |
130 | This option enables support for the AMCC PPC460SX Redwood board. | 130 | This option enables support for the AMCC PPC460SX Redwood board. |
131 | 131 | ||
132 | config EIGER | ||
133 | bool "Eiger" | ||
134 | depends on 44x | ||
135 | default n | ||
136 | select PPC44x_SIMPLE | ||
137 | select 460SX | ||
138 | select PCI | ||
139 | select PPC4xx_PCI_EXPRESS | ||
140 | select IBM_NEW_EMAC_RGMII | ||
141 | help | ||
142 | This option enables support for the AMCC PPC460SX evaluation board. | ||
143 | |||
132 | config YOSEMITE | 144 | config YOSEMITE |
133 | bool "Yosemite" | 145 | bool "Yosemite" |
134 | depends on 44x | 146 | depends on 44x |
diff --git a/arch/powerpc/platforms/44x/ppc44x_simple.c b/arch/powerpc/platforms/44x/ppc44x_simple.c index 5bcd441885e8..e8c23ccaa1fc 100644 --- a/arch/powerpc/platforms/44x/ppc44x_simple.c +++ b/arch/powerpc/platforms/44x/ppc44x_simple.c | |||
@@ -55,6 +55,7 @@ static char *board[] __initdata = { | |||
55 | "amcc,canyonlands", | 55 | "amcc,canyonlands", |
56 | "amcc,glacier", | 56 | "amcc,glacier", |
57 | "ibm,ebony", | 57 | "ibm,ebony", |
58 | "amcc,eiger", | ||
58 | "amcc,katmai", | 59 | "amcc,katmai", |
59 | "amcc,rainier", | 60 | "amcc,rainier", |
60 | "amcc,redwood", | 61 | "amcc,redwood", |
diff --git a/arch/powerpc/platforms/82xx/mgcoge.c b/arch/powerpc/platforms/82xx/mgcoge.c index c2af169c1d1d..7a5de9eb3c73 100644 --- a/arch/powerpc/platforms/82xx/mgcoge.c +++ b/arch/powerpc/platforms/82xx/mgcoge.c | |||
@@ -50,16 +50,63 @@ struct cpm_pin { | |||
50 | static __initdata struct cpm_pin mgcoge_pins[] = { | 50 | static __initdata struct cpm_pin mgcoge_pins[] = { |
51 | 51 | ||
52 | /* SMC2 */ | 52 | /* SMC2 */ |
53 | {1, 8, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | 53 | {0, 8, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, |
54 | {1, 9, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | 54 | {0, 9, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, |
55 | 55 | ||
56 | /* SCC4 */ | 56 | /* SCC4 */ |
57 | {3, 25, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | 57 | {2, 25, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, |
58 | {3, 24, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | 58 | {2, 24, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, |
59 | {3, 9, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | 59 | {2, 9, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, |
60 | {3, 8, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | 60 | {2, 8, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, |
61 | {4, 22, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | 61 | {3, 22, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, |
62 | {4, 21, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | 62 | {3, 21, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, |
63 | |||
64 | /* FCC1 */ | ||
65 | {0, 14, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
66 | {0, 15, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
67 | {0, 16, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
68 | {0, 17, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
69 | {0, 18, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | ||
70 | {0, 19, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | ||
71 | {0, 20, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | ||
72 | {0, 21, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | ||
73 | {0, 26, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, | ||
74 | {0, 27, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, | ||
75 | {0, 28, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY}, | ||
76 | {0, 29, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY}, | ||
77 | {0, 30, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, | ||
78 | {0, 31, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, | ||
79 | |||
80 | {2, 22, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
81 | {2, 23, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
82 | |||
83 | /* FCC2 */ | ||
84 | {1, 18, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
85 | {1, 19, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
86 | {1, 20, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
87 | {1, 21, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
88 | {1, 22, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | ||
89 | {1, 23, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | ||
90 | {1, 24, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | ||
91 | {1, 25, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | ||
92 | {1, 26, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
93 | {1, 27, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
94 | {1, 28, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
95 | {1, 29, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY}, | ||
96 | {1, 30, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
97 | {1, 31, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | ||
98 | |||
99 | {2, 18, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
100 | {2, 19, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
101 | |||
102 | /* MDC */ | ||
103 | {0, 13, CPM_PIN_OUTPUT | CPM_PIN_GPIO}, | ||
104 | |||
105 | #if defined(CONFIG_I2C_CPM) | ||
106 | /* I2C */ | ||
107 | {3, 14, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_OPENDRAIN}, | ||
108 | {3, 15, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_OPENDRAIN}, | ||
109 | #endif | ||
63 | }; | 110 | }; |
64 | 111 | ||
65 | static void __init init_ioports(void) | 112 | static void __init init_ioports(void) |
@@ -68,12 +115,16 @@ static void __init init_ioports(void) | |||
68 | 115 | ||
69 | for (i = 0; i < ARRAY_SIZE(mgcoge_pins); i++) { | 116 | for (i = 0; i < ARRAY_SIZE(mgcoge_pins); i++) { |
70 | const struct cpm_pin *pin = &mgcoge_pins[i]; | 117 | const struct cpm_pin *pin = &mgcoge_pins[i]; |
71 | cpm2_set_pin(pin->port - 1, pin->pin, pin->flags); | 118 | cpm2_set_pin(pin->port, pin->pin, pin->flags); |
72 | } | 119 | } |
73 | 120 | ||
74 | cpm2_smc_clk_setup(CPM_CLK_SMC2, CPM_BRG8); | 121 | cpm2_smc_clk_setup(CPM_CLK_SMC2, CPM_BRG8); |
75 | cpm2_clk_setup(CPM_CLK_SCC4, CPM_CLK7, CPM_CLK_RX); | 122 | cpm2_clk_setup(CPM_CLK_SCC4, CPM_CLK7, CPM_CLK_RX); |
76 | cpm2_clk_setup(CPM_CLK_SCC4, CPM_CLK8, CPM_CLK_TX); | 123 | cpm2_clk_setup(CPM_CLK_SCC4, CPM_CLK8, CPM_CLK_TX); |
124 | cpm2_clk_setup(CPM_CLK_FCC1, CPM_CLK10, CPM_CLK_RX); | ||
125 | cpm2_clk_setup(CPM_CLK_FCC1, CPM_CLK9, CPM_CLK_TX); | ||
126 | cpm2_clk_setup(CPM_CLK_FCC2, CPM_CLK13, CPM_CLK_RX); | ||
127 | cpm2_clk_setup(CPM_CLK_FCC2, CPM_CLK14, CPM_CLK_TX); | ||
77 | } | 128 | } |
78 | 129 | ||
79 | static void __init mgcoge_setup_arch(void) | 130 | static void __init mgcoge_setup_arch(void) |
diff --git a/arch/powerpc/platforms/82xx/mpc8272_ads.c b/arch/powerpc/platforms/82xx/mpc8272_ads.c index 8054c685d323..30394b409b3f 100644 --- a/arch/powerpc/platforms/82xx/mpc8272_ads.c +++ b/arch/powerpc/platforms/82xx/mpc8272_ads.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <sysdev/fsl_soc.h> | 29 | #include <sysdev/fsl_soc.h> |
30 | #include <sysdev/cpm2_pic.h> | 30 | #include <sysdev/cpm2_pic.h> |
31 | 31 | ||
32 | #include "pq2ads.h" | ||
33 | #include "pq2.h" | 32 | #include "pq2.h" |
34 | 33 | ||
35 | static void __init mpc8272_ads_pic_init(void) | 34 | static void __init mpc8272_ads_pic_init(void) |
@@ -100,6 +99,15 @@ static struct cpm_pin mpc8272_ads_pins[] = { | |||
100 | /* I2C */ | 99 | /* I2C */ |
101 | {3, 14, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_OPENDRAIN}, | 100 | {3, 14, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_OPENDRAIN}, |
102 | {3, 15, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_OPENDRAIN}, | 101 | {3, 15, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_OPENDRAIN}, |
102 | |||
103 | /* USB */ | ||
104 | {2, 10, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
105 | {2, 11, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
106 | {2, 20, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | ||
107 | {2, 24, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
108 | {3, 23, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | ||
109 | {3, 24, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | ||
110 | {3, 25, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
103 | }; | 111 | }; |
104 | 112 | ||
105 | static void __init init_ioports(void) | 113 | static void __init init_ioports(void) |
@@ -113,6 +121,8 @@ static void __init init_ioports(void) | |||
113 | 121 | ||
114 | cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_RX); | 122 | cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_RX); |
115 | cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_TX); | 123 | cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_TX); |
124 | cpm2_clk_setup(CPM_CLK_SCC3, CPM_CLK8, CPM_CLK_RX); | ||
125 | cpm2_clk_setup(CPM_CLK_SCC3, CPM_CLK8, CPM_CLK_TX); | ||
116 | cpm2_clk_setup(CPM_CLK_SCC4, CPM_BRG4, CPM_CLK_RX); | 126 | cpm2_clk_setup(CPM_CLK_SCC4, CPM_BRG4, CPM_CLK_RX); |
117 | cpm2_clk_setup(CPM_CLK_SCC4, CPM_BRG4, CPM_CLK_TX); | 127 | cpm2_clk_setup(CPM_CLK_SCC4, CPM_BRG4, CPM_CLK_TX); |
118 | cpm2_clk_setup(CPM_CLK_FCC1, CPM_CLK11, CPM_CLK_RX); | 128 | cpm2_clk_setup(CPM_CLK_FCC1, CPM_CLK11, CPM_CLK_RX); |
@@ -144,12 +154,22 @@ static void __init mpc8272_ads_setup_arch(void) | |||
144 | return; | 154 | return; |
145 | } | 155 | } |
146 | 156 | ||
157 | #define BCSR1_FETHIEN 0x08000000 | ||
158 | #define BCSR1_FETH_RST 0x04000000 | ||
159 | #define BCSR1_RS232_EN1 0x02000000 | ||
160 | #define BCSR1_RS232_EN2 0x01000000 | ||
161 | #define BCSR3_USB_nEN 0x80000000 | ||
162 | #define BCSR3_FETHIEN2 0x10000000 | ||
163 | #define BCSR3_FETH2_RST 0x08000000 | ||
164 | |||
147 | clrbits32(&bcsr[1], BCSR1_RS232_EN1 | BCSR1_RS232_EN2 | BCSR1_FETHIEN); | 165 | clrbits32(&bcsr[1], BCSR1_RS232_EN1 | BCSR1_RS232_EN2 | BCSR1_FETHIEN); |
148 | setbits32(&bcsr[1], BCSR1_FETH_RST); | 166 | setbits32(&bcsr[1], BCSR1_FETH_RST); |
149 | 167 | ||
150 | clrbits32(&bcsr[3], BCSR3_FETHIEN2); | 168 | clrbits32(&bcsr[3], BCSR3_FETHIEN2); |
151 | setbits32(&bcsr[3], BCSR3_FETH2_RST); | 169 | setbits32(&bcsr[3], BCSR3_FETH2_RST); |
152 | 170 | ||
171 | clrbits32(&bcsr[3], BCSR3_USB_nEN); | ||
172 | |||
153 | iounmap(bcsr); | 173 | iounmap(bcsr); |
154 | 174 | ||
155 | init_ioports(); | 175 | init_ioports(); |
diff --git a/arch/powerpc/platforms/83xx/Kconfig b/arch/powerpc/platforms/83xx/Kconfig index 083ebee9a16d..f49a2548c5ff 100644 --- a/arch/powerpc/platforms/83xx/Kconfig +++ b/arch/powerpc/platforms/83xx/Kconfig | |||
@@ -75,11 +75,11 @@ config MPC837x_MDS | |||
75 | This option enables support for the MPC837x MDS Processor Board. | 75 | This option enables support for the MPC837x MDS Processor Board. |
76 | 76 | ||
77 | config MPC837x_RDB | 77 | config MPC837x_RDB |
78 | bool "Freescale MPC837x RDB" | 78 | bool "Freescale MPC837x RDB/WLAN" |
79 | select DEFAULT_UIMAGE | 79 | select DEFAULT_UIMAGE |
80 | select PPC_MPC837x | 80 | select PPC_MPC837x |
81 | help | 81 | help |
82 | This option enables support for the MPC837x RDB Board. | 82 | This option enables support for the MPC837x RDB and WLAN Boards. |
83 | 83 | ||
84 | config SBC834x | 84 | config SBC834x |
85 | bool "Wind River SBC834x" | 85 | bool "Wind River SBC834x" |
diff --git a/arch/powerpc/platforms/83xx/mpc837x_rdb.c b/arch/powerpc/platforms/83xx/mpc837x_rdb.c index 76f3b32a155e..a1908d261240 100644 --- a/arch/powerpc/platforms/83xx/mpc837x_rdb.c +++ b/arch/powerpc/platforms/83xx/mpc837x_rdb.c | |||
@@ -17,10 +17,32 @@ | |||
17 | #include <asm/time.h> | 17 | #include <asm/time.h> |
18 | #include <asm/ipic.h> | 18 | #include <asm/ipic.h> |
19 | #include <asm/udbg.h> | 19 | #include <asm/udbg.h> |
20 | #include <sysdev/fsl_soc.h> | ||
20 | #include <sysdev/fsl_pci.h> | 21 | #include <sysdev/fsl_pci.h> |
21 | 22 | ||
22 | #include "mpc83xx.h" | 23 | #include "mpc83xx.h" |
23 | 24 | ||
25 | static void mpc837x_rdb_sd_cfg(void) | ||
26 | { | ||
27 | void __iomem *im; | ||
28 | |||
29 | im = ioremap(get_immrbase(), 0x1000); | ||
30 | if (!im) { | ||
31 | WARN_ON(1); | ||
32 | return; | ||
33 | } | ||
34 | |||
35 | /* | ||
36 | * On RDB boards (in contrast to MDS) USBB pins are used for SD only, | ||
37 | * so we can safely mux them away from the USB block. | ||
38 | */ | ||
39 | clrsetbits_be32(im + MPC83XX_SICRL_OFFS, MPC837X_SICRL_USBB_MASK, | ||
40 | MPC837X_SICRL_SD); | ||
41 | clrsetbits_be32(im + MPC83XX_SICRH_OFFS, MPC837X_SICRH_SPI_MASK, | ||
42 | MPC837X_SICRH_SD); | ||
43 | iounmap(im); | ||
44 | } | ||
45 | |||
24 | /* ************************************************************************ | 46 | /* ************************************************************************ |
25 | * | 47 | * |
26 | * Setup the architecture | 48 | * Setup the architecture |
@@ -42,6 +64,7 @@ static void __init mpc837x_rdb_setup_arch(void) | |||
42 | mpc83xx_add_bridge(np); | 64 | mpc83xx_add_bridge(np); |
43 | #endif | 65 | #endif |
44 | mpc837x_usb_cfg(); | 66 | mpc837x_usb_cfg(); |
67 | mpc837x_rdb_sd_cfg(); | ||
45 | } | 68 | } |
46 | 69 | ||
47 | static struct of_device_id mpc837x_ids[] = { | 70 | static struct of_device_id mpc837x_ids[] = { |
@@ -86,11 +109,12 @@ static int __init mpc837x_rdb_probe(void) | |||
86 | 109 | ||
87 | return of_flat_dt_is_compatible(root, "fsl,mpc8377rdb") || | 110 | return of_flat_dt_is_compatible(root, "fsl,mpc8377rdb") || |
88 | of_flat_dt_is_compatible(root, "fsl,mpc8378rdb") || | 111 | of_flat_dt_is_compatible(root, "fsl,mpc8378rdb") || |
89 | of_flat_dt_is_compatible(root, "fsl,mpc8379rdb"); | 112 | of_flat_dt_is_compatible(root, "fsl,mpc8379rdb") || |
113 | of_flat_dt_is_compatible(root, "fsl,mpc8377wlan"); | ||
90 | } | 114 | } |
91 | 115 | ||
92 | define_machine(mpc837x_rdb) { | 116 | define_machine(mpc837x_rdb) { |
93 | .name = "MPC837x RDB", | 117 | .name = "MPC837x RDB/WLAN", |
94 | .probe = mpc837x_rdb_probe, | 118 | .probe = mpc837x_rdb_probe, |
95 | .setup_arch = mpc837x_rdb_setup_arch, | 119 | .setup_arch = mpc837x_rdb_setup_arch, |
96 | .init_IRQ = mpc837x_rdb_init_IRQ, | 120 | .init_IRQ = mpc837x_rdb_init_IRQ, |
diff --git a/arch/powerpc/platforms/83xx/mpc83xx.h b/arch/powerpc/platforms/83xx/mpc83xx.h index d1dc5b0b4fbf..0fea8811d45b 100644 --- a/arch/powerpc/platforms/83xx/mpc83xx.h +++ b/arch/powerpc/platforms/83xx/mpc83xx.h | |||
@@ -30,6 +30,8 @@ | |||
30 | #define MPC8315_SICRL_USB_ULPI 0x00000054 | 30 | #define MPC8315_SICRL_USB_ULPI 0x00000054 |
31 | #define MPC837X_SICRL_USB_MASK 0xf0000000 | 31 | #define MPC837X_SICRL_USB_MASK 0xf0000000 |
32 | #define MPC837X_SICRL_USB_ULPI 0x50000000 | 32 | #define MPC837X_SICRL_USB_ULPI 0x50000000 |
33 | #define MPC837X_SICRL_USBB_MASK 0x30000000 | ||
34 | #define MPC837X_SICRL_SD 0x20000000 | ||
33 | 35 | ||
34 | /* system i/o configuration register high */ | 36 | /* system i/o configuration register high */ |
35 | #define MPC83XX_SICRH_OFFS 0x118 | 37 | #define MPC83XX_SICRH_OFFS 0x118 |
@@ -38,6 +40,8 @@ | |||
38 | #define MPC831X_SICRH_USB_ULPI 0x000000a0 | 40 | #define MPC831X_SICRH_USB_ULPI 0x000000a0 |
39 | #define MPC8315_SICRH_USB_MASK 0x0000ff00 | 41 | #define MPC8315_SICRH_USB_MASK 0x0000ff00 |
40 | #define MPC8315_SICRH_USB_ULPI 0x00000000 | 42 | #define MPC8315_SICRH_USB_ULPI 0x00000000 |
43 | #define MPC837X_SICRH_SPI_MASK 0x00000003 | ||
44 | #define MPC837X_SICRH_SD 0x00000001 | ||
41 | 45 | ||
42 | /* USB Control Register */ | 46 | /* USB Control Register */ |
43 | #define FSL_USB2_CONTROL_OFFS 0x500 | 47 | #define FSL_USB2_CONTROL_OFFS 0x500 |
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig index a9b416688975..d3a975e8fd3e 100644 --- a/arch/powerpc/platforms/85xx/Kconfig +++ b/arch/powerpc/platforms/85xx/Kconfig | |||
@@ -55,6 +55,15 @@ config MPC85xx_DS | |||
55 | help | 55 | help |
56 | This option enables support for the MPC85xx DS (MPC8544 DS) board | 56 | This option enables support for the MPC85xx DS (MPC8544 DS) board |
57 | 57 | ||
58 | config MPC85xx_RDB | ||
59 | bool "Freescale MPC85xx RDB" | ||
60 | select PPC_I8259 | ||
61 | select DEFAULT_UIMAGE | ||
62 | select FSL_ULI1575 | ||
63 | select SWIOTLB | ||
64 | help | ||
65 | This option enables support for the MPC85xx RDB (P2020 RDB) board | ||
66 | |||
58 | config SOCRATES | 67 | config SOCRATES |
59 | bool "Socrates" | 68 | bool "Socrates" |
60 | select DEFAULT_UIMAGE | 69 | select DEFAULT_UIMAGE |
diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/85xx/Makefile index 835733f2b12c..9098aea0cf32 100644 --- a/arch/powerpc/platforms/85xx/Makefile +++ b/arch/powerpc/platforms/85xx/Makefile | |||
@@ -9,10 +9,11 @@ obj-$(CONFIG_MPC85xx_CDS) += mpc85xx_cds.o | |||
9 | obj-$(CONFIG_MPC8536_DS) += mpc8536_ds.o | 9 | obj-$(CONFIG_MPC8536_DS) += mpc8536_ds.o |
10 | obj-$(CONFIG_MPC85xx_DS) += mpc85xx_ds.o | 10 | obj-$(CONFIG_MPC85xx_DS) += mpc85xx_ds.o |
11 | obj-$(CONFIG_MPC85xx_MDS) += mpc85xx_mds.o | 11 | obj-$(CONFIG_MPC85xx_MDS) += mpc85xx_mds.o |
12 | obj-$(CONFIG_MPC85xx_RDB) += mpc85xx_rdb.o | ||
12 | obj-$(CONFIG_STX_GP3) += stx_gp3.o | 13 | obj-$(CONFIG_STX_GP3) += stx_gp3.o |
13 | obj-$(CONFIG_TQM85xx) += tqm85xx.o | 14 | obj-$(CONFIG_TQM85xx) += tqm85xx.o |
14 | obj-$(CONFIG_SBC8560) += sbc8560.o | 15 | obj-$(CONFIG_SBC8560) += sbc8560.o |
15 | obj-$(CONFIG_SBC8548) += sbc8548.o | 16 | obj-$(CONFIG_SBC8548) += sbc8548.o |
16 | obj-$(CONFIG_SOCRATES) += socrates.o socrates_fpga_pic.o | 17 | obj-$(CONFIG_SOCRATES) += socrates.o socrates_fpga_pic.o |
17 | obj-$(CONFIG_KSI8560) += ksi8560.o | 18 | obj-$(CONFIG_KSI8560) += ksi8560.o |
18 | obj-$(CONFIG_XES_MPC85xx) += xes_mpc85xx.o \ No newline at end of file | 19 | obj-$(CONFIG_XES_MPC85xx) += xes_mpc85xx.o |
diff --git a/arch/powerpc/platforms/85xx/mpc8536_ds.c b/arch/powerpc/platforms/85xx/mpc8536_ds.c index 055ff417bae9..004b7d36cdb7 100644 --- a/arch/powerpc/platforms/85xx/mpc8536_ds.c +++ b/arch/powerpc/platforms/85xx/mpc8536_ds.c | |||
@@ -96,7 +96,8 @@ static void __init mpc8536_ds_setup_arch(void) | |||
96 | #ifdef CONFIG_SWIOTLB | 96 | #ifdef CONFIG_SWIOTLB |
97 | if (lmb_end_of_DRAM() > max) { | 97 | if (lmb_end_of_DRAM() > max) { |
98 | ppc_swiotlb_enable = 1; | 98 | ppc_swiotlb_enable = 1; |
99 | set_pci_dma_ops(&swiotlb_pci_dma_ops); | 99 | set_pci_dma_ops(&swiotlb_dma_ops); |
100 | ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb; | ||
100 | } | 101 | } |
101 | #endif | 102 | #endif |
102 | 103 | ||
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c index 849c0ac0025f..544011a562fb 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c | |||
@@ -192,7 +192,8 @@ static void __init mpc85xx_ds_setup_arch(void) | |||
192 | #ifdef CONFIG_SWIOTLB | 192 | #ifdef CONFIG_SWIOTLB |
193 | if (lmb_end_of_DRAM() > max) { | 193 | if (lmb_end_of_DRAM() > max) { |
194 | ppc_swiotlb_enable = 1; | 194 | ppc_swiotlb_enable = 1; |
195 | set_pci_dma_ops(&swiotlb_pci_dma_ops); | 195 | set_pci_dma_ops(&swiotlb_dma_ops); |
196 | ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb; | ||
196 | } | 197 | } |
197 | #endif | 198 | #endif |
198 | 199 | ||
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c index bfb32834ab0c..3909d57b86e3 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <asm/udbg.h> | 47 | #include <asm/udbg.h> |
48 | #include <sysdev/fsl_soc.h> | 48 | #include <sysdev/fsl_soc.h> |
49 | #include <sysdev/fsl_pci.h> | 49 | #include <sysdev/fsl_pci.h> |
50 | #include <sysdev/simple_gpio.h> | ||
50 | #include <asm/qe.h> | 51 | #include <asm/qe.h> |
51 | #include <asm/qe_ic.h> | 52 | #include <asm/qe_ic.h> |
52 | #include <asm/mpic.h> | 53 | #include <asm/mpic.h> |
@@ -254,7 +255,8 @@ static void __init mpc85xx_mds_setup_arch(void) | |||
254 | #ifdef CONFIG_SWIOTLB | 255 | #ifdef CONFIG_SWIOTLB |
255 | if (lmb_end_of_DRAM() > max) { | 256 | if (lmb_end_of_DRAM() > max) { |
256 | ppc_swiotlb_enable = 1; | 257 | ppc_swiotlb_enable = 1; |
257 | set_pci_dma_ops(&swiotlb_pci_dma_ops); | 258 | set_pci_dma_ops(&swiotlb_dma_ops); |
259 | ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb; | ||
258 | } | 260 | } |
259 | #endif | 261 | #endif |
260 | } | 262 | } |
@@ -304,6 +306,9 @@ static struct of_device_id mpc85xx_ids[] = { | |||
304 | 306 | ||
305 | static int __init mpc85xx_publish_devices(void) | 307 | static int __init mpc85xx_publish_devices(void) |
306 | { | 308 | { |
309 | if (machine_is(mpc8569_mds)) | ||
310 | simple_gpiochip_init("fsl,mpc8569mds-bcsr-gpio"); | ||
311 | |||
307 | /* Publish the QE devices */ | 312 | /* Publish the QE devices */ |
308 | of_platform_bus_probe(NULL, mpc85xx_ids, NULL); | 313 | of_platform_bus_probe(NULL, mpc85xx_ids, NULL); |
309 | 314 | ||
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c new file mode 100644 index 000000000000..c8468de4acf6 --- /dev/null +++ b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c | |||
@@ -0,0 +1,141 @@ | |||
1 | /* | ||
2 | * MPC85xx RDB Board Setup | ||
3 | * | ||
4 | * Copyright 2009 Freescale Semiconductor Inc. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the | ||
8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
9 | * option) any later version. | ||
10 | */ | ||
11 | |||
12 | #include <linux/stddef.h> | ||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/pci.h> | ||
15 | #include <linux/kdev_t.h> | ||
16 | #include <linux/delay.h> | ||
17 | #include <linux/seq_file.h> | ||
18 | #include <linux/interrupt.h> | ||
19 | #include <linux/of_platform.h> | ||
20 | |||
21 | #include <asm/system.h> | ||
22 | #include <asm/time.h> | ||
23 | #include <asm/machdep.h> | ||
24 | #include <asm/pci-bridge.h> | ||
25 | #include <mm/mmu_decl.h> | ||
26 | #include <asm/prom.h> | ||
27 | #include <asm/udbg.h> | ||
28 | #include <asm/mpic.h> | ||
29 | |||
30 | #include <sysdev/fsl_soc.h> | ||
31 | #include <sysdev/fsl_pci.h> | ||
32 | |||
33 | #undef DEBUG | ||
34 | |||
35 | #ifdef DEBUG | ||
36 | #define DBG(fmt, args...) printk(KERN_ERR "%s: " fmt, __func__, ## args) | ||
37 | #else | ||
38 | #define DBG(fmt, args...) | ||
39 | #endif | ||
40 | |||
41 | |||
42 | void __init mpc85xx_rdb_pic_init(void) | ||
43 | { | ||
44 | struct mpic *mpic; | ||
45 | struct resource r; | ||
46 | struct device_node *np; | ||
47 | |||
48 | np = of_find_node_by_type(NULL, "open-pic"); | ||
49 | if (np == NULL) { | ||
50 | printk(KERN_ERR "Could not find open-pic node\n"); | ||
51 | return; | ||
52 | } | ||
53 | |||
54 | if (of_address_to_resource(np, 0, &r)) { | ||
55 | printk(KERN_ERR "Failed to map mpic register space\n"); | ||
56 | of_node_put(np); | ||
57 | return; | ||
58 | } | ||
59 | |||
60 | mpic = mpic_alloc(np, r.start, | ||
61 | MPIC_PRIMARY | MPIC_WANTS_RESET | | ||
62 | MPIC_BIG_ENDIAN | MPIC_BROKEN_FRR_NIRQS | | ||
63 | MPIC_SINGLE_DEST_CPU, | ||
64 | 0, 256, " OpenPIC "); | ||
65 | |||
66 | BUG_ON(mpic == NULL); | ||
67 | of_node_put(np); | ||
68 | |||
69 | mpic_init(mpic); | ||
70 | |||
71 | } | ||
72 | |||
73 | /* | ||
74 | * Setup the architecture | ||
75 | */ | ||
76 | #ifdef CONFIG_SMP | ||
77 | extern void __init mpc85xx_smp_init(void); | ||
78 | #endif | ||
79 | static void __init mpc85xx_rdb_setup_arch(void) | ||
80 | { | ||
81 | #ifdef CONFIG_PCI | ||
82 | struct device_node *np; | ||
83 | #endif | ||
84 | |||
85 | if (ppc_md.progress) | ||
86 | ppc_md.progress("mpc85xx_rdb_setup_arch()", 0); | ||
87 | |||
88 | #ifdef CONFIG_PCI | ||
89 | for_each_node_by_type(np, "pci") { | ||
90 | if (of_device_is_compatible(np, "fsl,mpc8548-pcie")) | ||
91 | fsl_add_bridge(np, 0); | ||
92 | } | ||
93 | |||
94 | #endif | ||
95 | |||
96 | #ifdef CONFIG_SMP | ||
97 | mpc85xx_smp_init(); | ||
98 | #endif | ||
99 | |||
100 | printk(KERN_INFO "MPC85xx RDB board from Freescale Semiconductor\n"); | ||
101 | } | ||
102 | |||
103 | static struct of_device_id __initdata mpc85xxrdb_ids[] = { | ||
104 | { .type = "soc", }, | ||
105 | { .compatible = "soc", }, | ||
106 | { .compatible = "simple-bus", }, | ||
107 | { .compatible = "gianfar", }, | ||
108 | {}, | ||
109 | }; | ||
110 | |||
111 | static int __init mpc85xxrdb_publish_devices(void) | ||
112 | { | ||
113 | return of_platform_bus_probe(NULL, mpc85xxrdb_ids, NULL); | ||
114 | } | ||
115 | machine_device_initcall(p2020_rdb, mpc85xxrdb_publish_devices); | ||
116 | |||
117 | /* | ||
118 | * Called very early, device-tree isn't unflattened | ||
119 | */ | ||
120 | static int __init p2020_rdb_probe(void) | ||
121 | { | ||
122 | unsigned long root = of_get_flat_dt_root(); | ||
123 | |||
124 | if (of_flat_dt_is_compatible(root, "fsl,P2020RDB")) | ||
125 | return 1; | ||
126 | return 0; | ||
127 | } | ||
128 | |||
129 | define_machine(p2020_rdb) { | ||
130 | .name = "P2020 RDB", | ||
131 | .probe = p2020_rdb_probe, | ||
132 | .setup_arch = mpc85xx_rdb_setup_arch, | ||
133 | .init_IRQ = mpc85xx_rdb_pic_init, | ||
134 | #ifdef CONFIG_PCI | ||
135 | .pcibios_fixup_bus = fsl_pcibios_fixup_bus, | ||
136 | #endif | ||
137 | .get_irq = mpic_get_irq, | ||
138 | .restart = fsl_rstcr_restart, | ||
139 | .calibrate_decr = generic_calibrate_decr, | ||
140 | .progress = udbg_progress, | ||
141 | }; | ||
diff --git a/arch/powerpc/platforms/85xx/sbc8560.c b/arch/powerpc/platforms/85xx/sbc8560.c index cc27807a8b64..a5ad1c7794bf 100644 --- a/arch/powerpc/platforms/85xx/sbc8560.c +++ b/arch/powerpc/platforms/85xx/sbc8560.c | |||
@@ -267,6 +267,43 @@ arch_initcall(sbc8560_rtc_init); | |||
267 | 267 | ||
268 | #endif /* M48T59 */ | 268 | #endif /* M48T59 */ |
269 | 269 | ||
270 | static __u8 __iomem *brstcr; | ||
271 | |||
272 | static int __init sbc8560_bdrstcr_init(void) | ||
273 | { | ||
274 | struct device_node *np; | ||
275 | struct resource res; | ||
276 | |||
277 | np = of_find_compatible_node(NULL, NULL, "wrs,sbc8560-brstcr"); | ||
278 | if (np == NULL) { | ||
279 | printk(KERN_WARNING "sbc8560: No board specific RSTCR in DTB.\n"); | ||
280 | return -ENODEV; | ||
281 | } | ||
282 | |||
283 | of_address_to_resource(np, 0, &res); | ||
284 | |||
285 | printk(KERN_INFO "sbc8560: Found BRSTCR at i/o 0x%x\n", res.start); | ||
286 | |||
287 | brstcr = ioremap(res.start, res.end - res.start); | ||
288 | if(!brstcr) | ||
289 | printk(KERN_WARNING "sbc8560: ioremap of brstcr failed.\n"); | ||
290 | |||
291 | of_node_put(np); | ||
292 | |||
293 | return 0; | ||
294 | } | ||
295 | |||
296 | arch_initcall(sbc8560_bdrstcr_init); | ||
297 | |||
298 | void sbc8560_rstcr_restart(char * cmd) | ||
299 | { | ||
300 | local_irq_disable(); | ||
301 | if(brstcr) | ||
302 | clrbits8(brstcr, 0x80); | ||
303 | |||
304 | while(1); | ||
305 | } | ||
306 | |||
270 | define_machine(sbc8560) { | 307 | define_machine(sbc8560) { |
271 | .name = "SBC8560", | 308 | .name = "SBC8560", |
272 | .probe = sbc8560_probe, | 309 | .probe = sbc8560_probe, |
@@ -274,7 +311,7 @@ define_machine(sbc8560) { | |||
274 | .init_IRQ = sbc8560_pic_init, | 311 | .init_IRQ = sbc8560_pic_init, |
275 | .show_cpuinfo = sbc8560_show_cpuinfo, | 312 | .show_cpuinfo = sbc8560_show_cpuinfo, |
276 | .get_irq = mpic_get_irq, | 313 | .get_irq = mpic_get_irq, |
277 | .restart = fsl_rstcr_restart, | 314 | .restart = sbc8560_rstcr_restart, |
278 | .calibrate_decr = generic_calibrate_decr, | 315 | .calibrate_decr = generic_calibrate_decr, |
279 | .progress = udbg_progress, | 316 | .progress = udbg_progress, |
280 | }; | 317 | }; |
diff --git a/arch/powerpc/platforms/85xx/smp.c b/arch/powerpc/platforms/85xx/smp.c index 62c592ede641..04160a4cc699 100644 --- a/arch/powerpc/platforms/85xx/smp.c +++ b/arch/powerpc/platforms/85xx/smp.c | |||
@@ -25,7 +25,6 @@ | |||
25 | 25 | ||
26 | #include <sysdev/fsl_soc.h> | 26 | #include <sysdev/fsl_soc.h> |
27 | 27 | ||
28 | extern volatile unsigned long __secondary_hold_acknowledge; | ||
29 | extern void __early_start(void); | 28 | extern void __early_start(void); |
30 | 29 | ||
31 | #define BOOT_ENTRY_ADDR_UPPER 0 | 30 | #define BOOT_ENTRY_ADDR_UPPER 0 |
@@ -80,46 +79,24 @@ smp_85xx_kick_cpu(int nr) | |||
80 | } | 79 | } |
81 | 80 | ||
82 | static void __init | 81 | static void __init |
83 | smp_85xx_basic_setup(int cpu_nr) | ||
84 | { | ||
85 | /* Clear any pending timer interrupts */ | ||
86 | mtspr(SPRN_TSR, TSR_ENW | TSR_WIS | TSR_DIS | TSR_FIS); | ||
87 | |||
88 | /* Enable decrementer interrupt */ | ||
89 | mtspr(SPRN_TCR, TCR_DIE); | ||
90 | } | ||
91 | |||
92 | static void __init | ||
93 | smp_85xx_setup_cpu(int cpu_nr) | 82 | smp_85xx_setup_cpu(int cpu_nr) |
94 | { | 83 | { |
95 | mpic_setup_this_cpu(); | 84 | mpic_setup_this_cpu(); |
96 | |||
97 | smp_85xx_basic_setup(cpu_nr); | ||
98 | } | 85 | } |
99 | 86 | ||
100 | struct smp_ops_t smp_85xx_ops = { | 87 | struct smp_ops_t smp_85xx_ops = { |
101 | .kick_cpu = smp_85xx_kick_cpu, | 88 | .kick_cpu = smp_85xx_kick_cpu, |
102 | }; | 89 | }; |
103 | 90 | ||
104 | static int __init smp_dummy_probe(void) | ||
105 | { | ||
106 | return NR_CPUS; | ||
107 | } | ||
108 | |||
109 | void __init mpc85xx_smp_init(void) | 91 | void __init mpc85xx_smp_init(void) |
110 | { | 92 | { |
111 | struct device_node *np; | 93 | struct device_node *np; |
112 | 94 | ||
113 | smp_85xx_ops.message_pass = NULL; | ||
114 | |||
115 | np = of_find_node_by_type(NULL, "open-pic"); | 95 | np = of_find_node_by_type(NULL, "open-pic"); |
116 | if (np) { | 96 | if (np) { |
117 | smp_85xx_ops.probe = smp_mpic_probe; | 97 | smp_85xx_ops.probe = smp_mpic_probe; |
118 | smp_85xx_ops.setup_cpu = smp_85xx_setup_cpu; | 98 | smp_85xx_ops.setup_cpu = smp_85xx_setup_cpu; |
119 | smp_85xx_ops.message_pass = smp_mpic_message_pass; | 99 | smp_85xx_ops.message_pass = smp_mpic_message_pass; |
120 | } else { | ||
121 | smp_85xx_ops.probe = smp_dummy_probe; | ||
122 | smp_85xx_ops.setup_cpu = smp_85xx_basic_setup; | ||
123 | } | 100 | } |
124 | 101 | ||
125 | if (cpu_has_feature(CPU_FTR_DBELL)) | 102 | if (cpu_has_feature(CPU_FTR_DBELL)) |
diff --git a/arch/powerpc/platforms/86xx/gef_ppc9a.c b/arch/powerpc/platforms/86xx/gef_ppc9a.c index 2efa052975e6..287f7bd17dd9 100644 --- a/arch/powerpc/platforms/86xx/gef_ppc9a.c +++ b/arch/powerpc/platforms/86xx/gef_ppc9a.c | |||
@@ -102,8 +102,8 @@ static unsigned int gef_ppc9a_get_pcb_rev(void) | |||
102 | { | 102 | { |
103 | unsigned int reg; | 103 | unsigned int reg; |
104 | 104 | ||
105 | reg = ioread32(ppc9a_regs); | 105 | reg = ioread32be(ppc9a_regs); |
106 | return (reg >> 8) & 0xff; | 106 | return (reg >> 16) & 0xff; |
107 | } | 107 | } |
108 | 108 | ||
109 | /* Return the board (software) revision */ | 109 | /* Return the board (software) revision */ |
@@ -111,8 +111,8 @@ static unsigned int gef_ppc9a_get_board_rev(void) | |||
111 | { | 111 | { |
112 | unsigned int reg; | 112 | unsigned int reg; |
113 | 113 | ||
114 | reg = ioread32(ppc9a_regs); | 114 | reg = ioread32be(ppc9a_regs); |
115 | return (reg >> 16) & 0xff; | 115 | return (reg >> 8) & 0xff; |
116 | } | 116 | } |
117 | 117 | ||
118 | /* Return the FPGA revision */ | 118 | /* Return the FPGA revision */ |
@@ -120,8 +120,26 @@ static unsigned int gef_ppc9a_get_fpga_rev(void) | |||
120 | { | 120 | { |
121 | unsigned int reg; | 121 | unsigned int reg; |
122 | 122 | ||
123 | reg = ioread32(ppc9a_regs); | 123 | reg = ioread32be(ppc9a_regs); |
124 | return (reg >> 24) & 0xf; | 124 | return reg & 0xf; |
125 | } | ||
126 | |||
127 | /* Return VME Geographical Address */ | ||
128 | static unsigned int gef_ppc9a_get_vme_geo_addr(void) | ||
129 | { | ||
130 | unsigned int reg; | ||
131 | |||
132 | reg = ioread32be(ppc9a_regs + 0x4); | ||
133 | return reg & 0x1f; | ||
134 | } | ||
135 | |||
136 | /* Return VME System Controller Status */ | ||
137 | static unsigned int gef_ppc9a_get_vme_is_syscon(void) | ||
138 | { | ||
139 | unsigned int reg; | ||
140 | |||
141 | reg = ioread32be(ppc9a_regs + 0x4); | ||
142 | return (reg >> 9) & 0x1; | ||
125 | } | 143 | } |
126 | 144 | ||
127 | static void gef_ppc9a_show_cpuinfo(struct seq_file *m) | 145 | static void gef_ppc9a_show_cpuinfo(struct seq_file *m) |
@@ -131,10 +149,15 @@ static void gef_ppc9a_show_cpuinfo(struct seq_file *m) | |||
131 | seq_printf(m, "Vendor\t\t: GE Fanuc Intelligent Platforms\n"); | 149 | seq_printf(m, "Vendor\t\t: GE Fanuc Intelligent Platforms\n"); |
132 | 150 | ||
133 | seq_printf(m, "Revision\t: %u%c\n", gef_ppc9a_get_pcb_rev(), | 151 | seq_printf(m, "Revision\t: %u%c\n", gef_ppc9a_get_pcb_rev(), |
134 | ('A' + gef_ppc9a_get_board_rev() - 1)); | 152 | ('A' + gef_ppc9a_get_board_rev())); |
135 | seq_printf(m, "FPGA Revision\t: %u\n", gef_ppc9a_get_fpga_rev()); | 153 | seq_printf(m, "FPGA Revision\t: %u\n", gef_ppc9a_get_fpga_rev()); |
136 | 154 | ||
137 | seq_printf(m, "SVR\t\t: 0x%x\n", svid); | 155 | seq_printf(m, "SVR\t\t: 0x%x\n", svid); |
156 | |||
157 | seq_printf(m, "VME geo. addr\t: %u\n", gef_ppc9a_get_vme_geo_addr()); | ||
158 | |||
159 | seq_printf(m, "VME syscon\t: %s\n", | ||
160 | gef_ppc9a_get_vme_is_syscon() ? "yes" : "no"); | ||
138 | } | 161 | } |
139 | 162 | ||
140 | static void __init gef_ppc9a_nec_fixup(struct pci_dev *pdev) | 163 | static void __init gef_ppc9a_nec_fixup(struct pci_dev *pdev) |
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c index 66327024a6a6..2aa69a69bcc8 100644 --- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c +++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | |||
@@ -105,7 +105,8 @@ mpc86xx_hpcn_setup_arch(void) | |||
105 | #ifdef CONFIG_SWIOTLB | 105 | #ifdef CONFIG_SWIOTLB |
106 | if (lmb_end_of_DRAM() > max) { | 106 | if (lmb_end_of_DRAM() > max) { |
107 | ppc_swiotlb_enable = 1; | 107 | ppc_swiotlb_enable = 1; |
108 | set_pci_dma_ops(&swiotlb_pci_dma_ops); | 108 | set_pci_dma_ops(&swiotlb_dma_ops); |
109 | ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb; | ||
109 | } | 110 | } |
110 | #endif | 111 | #endif |
111 | } | 112 | } |
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_smp.c b/arch/powerpc/platforms/86xx/mpc86xx_smp.c index d84bbb508ee7..eacea0e3fcc8 100644 --- a/arch/powerpc/platforms/86xx/mpc86xx_smp.c +++ b/arch/powerpc/platforms/86xx/mpc86xx_smp.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include "mpc86xx.h" | 27 | #include "mpc86xx.h" |
28 | 28 | ||
29 | extern void __secondary_start_mpc86xx(void); | 29 | extern void __secondary_start_mpc86xx(void); |
30 | extern unsigned long __secondary_hold_acknowledge; | ||
31 | 30 | ||
32 | #define MCM_PORT_CONFIG_OFFSET 0x10 | 31 | #define MCM_PORT_CONFIG_OFFSET 0x10 |
33 | 32 | ||
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype index 61187bec7506..9efc8bda01b4 100644 --- a/arch/powerpc/platforms/Kconfig.cputype +++ b/arch/powerpc/platforms/Kconfig.cputype | |||
@@ -57,15 +57,35 @@ config E200 | |||
57 | 57 | ||
58 | endchoice | 58 | endchoice |
59 | 59 | ||
60 | config PPC_BOOK3S_64 | 60 | choice |
61 | def_bool y | 61 | prompt "Processor Type" |
62 | depends on PPC64 | 62 | depends on PPC64 |
63 | help | ||
64 | There are two families of 64 bit PowerPC chips supported. | ||
65 | The most common ones are the desktop and server CPUs | ||
66 | (POWER3, RS64, POWER4, POWER5, POWER5+, POWER6, ...) | ||
67 | |||
68 | The other are the "embedded" processors compliant with the | ||
69 | "Book 3E" variant of the architecture | ||
70 | |||
71 | config PPC_BOOK3S_64 | ||
72 | bool "Server processors" | ||
63 | select PPC_FPU | 73 | select PPC_FPU |
64 | 74 | ||
75 | config PPC_BOOK3E_64 | ||
76 | bool "Embedded processors" | ||
77 | select PPC_FPU # Make it a choice ? | ||
78 | |||
79 | endchoice | ||
80 | |||
65 | config PPC_BOOK3S | 81 | config PPC_BOOK3S |
66 | def_bool y | 82 | def_bool y |
67 | depends on PPC_BOOK3S_32 || PPC_BOOK3S_64 | 83 | depends on PPC_BOOK3S_32 || PPC_BOOK3S_64 |
68 | 84 | ||
85 | config PPC_BOOK3E | ||
86 | def_bool y | ||
87 | depends on PPC_BOOK3E_64 | ||
88 | |||
69 | config POWER4_ONLY | 89 | config POWER4_ONLY |
70 | bool "Optimize for POWER4" | 90 | bool "Optimize for POWER4" |
71 | depends on PPC64 && PPC_BOOK3S | 91 | depends on PPC64 && PPC_BOOK3S |
@@ -125,7 +145,7 @@ config 4xx | |||
125 | 145 | ||
126 | config BOOKE | 146 | config BOOKE |
127 | bool | 147 | bool |
128 | depends on E200 || E500 || 44x | 148 | depends on E200 || E500 || 44x || PPC_BOOK3E |
129 | default y | 149 | default y |
130 | 150 | ||
131 | config FSL_BOOKE | 151 | config FSL_BOOKE |
@@ -223,9 +243,17 @@ config PPC_MMU_NOHASH | |||
223 | def_bool y | 243 | def_bool y |
224 | depends on !PPC_STD_MMU | 244 | depends on !PPC_STD_MMU |
225 | 245 | ||
246 | config PPC_MMU_NOHASH_32 | ||
247 | def_bool y | ||
248 | depends on PPC_MMU_NOHASH && PPC32 | ||
249 | |||
250 | config PPC_MMU_NOHASH_64 | ||
251 | def_bool y | ||
252 | depends on PPC_MMU_NOHASH && PPC64 | ||
253 | |||
226 | config PPC_BOOK3E_MMU | 254 | config PPC_BOOK3E_MMU |
227 | def_bool y | 255 | def_bool y |
228 | depends on FSL_BOOKE | 256 | depends on FSL_BOOKE || PPC_BOOK3E |
229 | 257 | ||
230 | config PPC_MM_SLICES | 258 | config PPC_MM_SLICES |
231 | bool | 259 | bool |
@@ -257,7 +285,7 @@ config PPC_PERF_CTRS | |||
257 | This enables the powerpc-specific perf_counter back-end. | 285 | This enables the powerpc-specific perf_counter back-end. |
258 | 286 | ||
259 | config SMP | 287 | config SMP |
260 | depends on PPC_STD_MMU || FSL_BOOKE | 288 | depends on PPC_BOOK3S || PPC_BOOK3E || FSL_BOOKE |
261 | bool "Symmetric multi-processing support" | 289 | bool "Symmetric multi-processing support" |
262 | ---help--- | 290 | ---help--- |
263 | This enables support for systems with more than one CPU. If you have | 291 | This enables support for systems with more than one CPU. If you have |
diff --git a/arch/powerpc/platforms/amigaone/setup.c b/arch/powerpc/platforms/amigaone/setup.c index 443035366c12..9290a7a442d0 100644 --- a/arch/powerpc/platforms/amigaone/setup.c +++ b/arch/powerpc/platforms/amigaone/setup.c | |||
@@ -110,13 +110,16 @@ void __init amigaone_init_IRQ(void) | |||
110 | irq_set_default_host(i8259_get_host()); | 110 | irq_set_default_host(i8259_get_host()); |
111 | } | 111 | } |
112 | 112 | ||
113 | void __init amigaone_init(void) | 113 | static int __init request_isa_regions(void) |
114 | { | 114 | { |
115 | request_region(0x00, 0x20, "dma1"); | 115 | request_region(0x00, 0x20, "dma1"); |
116 | request_region(0x40, 0x20, "timer"); | 116 | request_region(0x40, 0x20, "timer"); |
117 | request_region(0x80, 0x10, "dma page reg"); | 117 | request_region(0x80, 0x10, "dma page reg"); |
118 | request_region(0xc0, 0x20, "dma2"); | 118 | request_region(0xc0, 0x20, "dma2"); |
119 | |||
120 | return 0; | ||
119 | } | 121 | } |
122 | machine_device_initcall(amigaone, request_isa_regions); | ||
120 | 123 | ||
121 | void amigaone_restart(char *cmd) | 124 | void amigaone_restart(char *cmd) |
122 | { | 125 | { |
@@ -161,7 +164,6 @@ define_machine(amigaone) { | |||
161 | .name = "AmigaOne", | 164 | .name = "AmigaOne", |
162 | .probe = amigaone_probe, | 165 | .probe = amigaone_probe, |
163 | .setup_arch = amigaone_setup_arch, | 166 | .setup_arch = amigaone_setup_arch, |
164 | .init = amigaone_init, | ||
165 | .show_cpuinfo = amigaone_show_cpuinfo, | 167 | .show_cpuinfo = amigaone_show_cpuinfo, |
166 | .init_IRQ = amigaone_init_IRQ, | 168 | .init_IRQ = amigaone_init_IRQ, |
167 | .restart = amigaone_restart, | 169 | .restart = amigaone_restart, |
diff --git a/arch/powerpc/platforms/cell/Kconfig b/arch/powerpc/platforms/cell/Kconfig index 50f17bdd3c16..48cd7d2e1b75 100644 --- a/arch/powerpc/platforms/cell/Kconfig +++ b/arch/powerpc/platforms/cell/Kconfig | |||
@@ -80,13 +80,6 @@ config SPU_FS_64K_LS | |||
80 | uses 4K pages. This can improve performances of applications | 80 | uses 4K pages. This can improve performances of applications |
81 | using multiple SPEs by lowering the TLB pressure on them. | 81 | using multiple SPEs by lowering the TLB pressure on them. |
82 | 82 | ||
83 | config SPU_TRACE | ||
84 | tristate "SPU event tracing support" | ||
85 | depends on SPU_FS && MARKERS | ||
86 | help | ||
87 | This option allows reading a trace of spu-related events through | ||
88 | the sputrace file in procfs. | ||
89 | |||
90 | config SPU_BASE | 83 | config SPU_BASE |
91 | bool | 84 | bool |
92 | default n | 85 | default n |
diff --git a/arch/powerpc/platforms/cell/celleb_setup.c b/arch/powerpc/platforms/cell/celleb_setup.c index 07c234f6b2b6..e53845579770 100644 --- a/arch/powerpc/platforms/cell/celleb_setup.c +++ b/arch/powerpc/platforms/cell/celleb_setup.c | |||
@@ -80,8 +80,7 @@ static void celleb_show_cpuinfo(struct seq_file *m) | |||
80 | 80 | ||
81 | static int __init celleb_machine_type_hack(char *ptr) | 81 | static int __init celleb_machine_type_hack(char *ptr) |
82 | { | 82 | { |
83 | strncpy(celleb_machine_type, ptr, sizeof(celleb_machine_type)); | 83 | strlcpy(celleb_machine_type, ptr, sizeof(celleb_machine_type)); |
84 | celleb_machine_type[sizeof(celleb_machine_type)-1] = 0; | ||
85 | return 0; | 84 | return 0; |
86 | } | 85 | } |
87 | 86 | ||
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c index 5b34fc211f35..416db17eb18f 100644 --- a/arch/powerpc/platforms/cell/iommu.c +++ b/arch/powerpc/platforms/cell/iommu.c | |||
@@ -642,7 +642,7 @@ static int dma_fixed_dma_supported(struct device *dev, u64 mask) | |||
642 | 642 | ||
643 | static int dma_set_mask_and_switch(struct device *dev, u64 dma_mask); | 643 | static int dma_set_mask_and_switch(struct device *dev, u64 dma_mask); |
644 | 644 | ||
645 | struct dma_mapping_ops dma_iommu_fixed_ops = { | 645 | struct dma_map_ops dma_iommu_fixed_ops = { |
646 | .alloc_coherent = dma_fixed_alloc_coherent, | 646 | .alloc_coherent = dma_fixed_alloc_coherent, |
647 | .free_coherent = dma_fixed_free_coherent, | 647 | .free_coherent = dma_fixed_free_coherent, |
648 | .map_sg = dma_fixed_map_sg, | 648 | .map_sg = dma_fixed_map_sg, |
diff --git a/arch/powerpc/platforms/cell/smp.c b/arch/powerpc/platforms/cell/smp.c index bc97fada48c6..f774530075b7 100644 --- a/arch/powerpc/platforms/cell/smp.c +++ b/arch/powerpc/platforms/cell/smp.c | |||
@@ -58,8 +58,6 @@ | |||
58 | */ | 58 | */ |
59 | static cpumask_t of_spin_map; | 59 | static cpumask_t of_spin_map; |
60 | 60 | ||
61 | extern void generic_secondary_smp_init(unsigned long); | ||
62 | |||
63 | /** | 61 | /** |
64 | * smp_startup_cpu() - start the given cpu | 62 | * smp_startup_cpu() - start the given cpu |
65 | * | 63 | * |
diff --git a/arch/powerpc/platforms/cell/spufs/Makefile b/arch/powerpc/platforms/cell/spufs/Makefile index 99610a6361f2..b93f877ba504 100644 --- a/arch/powerpc/platforms/cell/spufs/Makefile +++ b/arch/powerpc/platforms/cell/spufs/Makefile | |||
@@ -4,7 +4,8 @@ spufs-y += inode.o file.o context.o syscalls.o coredump.o | |||
4 | spufs-y += sched.o backing_ops.o hw_ops.o run.o gang.o | 4 | spufs-y += sched.o backing_ops.o hw_ops.o run.o gang.o |
5 | spufs-y += switch.o fault.o lscsa_alloc.o | 5 | spufs-y += switch.o fault.o lscsa_alloc.o |
6 | 6 | ||
7 | obj-$(CONFIG_SPU_TRACE) += sputrace.o | 7 | # magic for the trace events |
8 | CFLAGS_sched.o := -I$(src) | ||
8 | 9 | ||
9 | # Rules to build switch.o with the help of SPU tool chain | 10 | # Rules to build switch.o with the help of SPU tool chain |
10 | SPU_CROSS := spu- | 11 | SPU_CROSS := spu- |
diff --git a/arch/powerpc/platforms/cell/spufs/context.c b/arch/powerpc/platforms/cell/spufs/context.c index db5398c0339f..0c87bcd2452a 100644 --- a/arch/powerpc/platforms/cell/spufs/context.c +++ b/arch/powerpc/platforms/cell/spufs/context.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <asm/spu.h> | 28 | #include <asm/spu.h> |
29 | #include <asm/spu_csa.h> | 29 | #include <asm/spu_csa.h> |
30 | #include "spufs.h" | 30 | #include "spufs.h" |
31 | #include "sputrace.h" | ||
31 | 32 | ||
32 | 33 | ||
33 | atomic_t nr_spu_contexts = ATOMIC_INIT(0); | 34 | atomic_t nr_spu_contexts = ATOMIC_INIT(0); |
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c index d6a519e6e1c1..ab8aef9bb8ea 100644 --- a/arch/powerpc/platforms/cell/spufs/file.c +++ b/arch/powerpc/platforms/cell/spufs/file.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <asm/uaccess.h> | 38 | #include <asm/uaccess.h> |
39 | 39 | ||
40 | #include "spufs.h" | 40 | #include "spufs.h" |
41 | #include "sputrace.h" | ||
41 | 42 | ||
42 | #define SPUFS_MMAP_4K (PAGE_SIZE == 0x1000) | 43 | #define SPUFS_MMAP_4K (PAGE_SIZE == 0x1000) |
43 | 44 | ||
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c index f085369301b1..bb5b77c66d05 100644 --- a/arch/powerpc/platforms/cell/spufs/sched.c +++ b/arch/powerpc/platforms/cell/spufs/sched.c | |||
@@ -47,6 +47,8 @@ | |||
47 | #include <asm/spu_csa.h> | 47 | #include <asm/spu_csa.h> |
48 | #include <asm/spu_priv1.h> | 48 | #include <asm/spu_priv1.h> |
49 | #include "spufs.h" | 49 | #include "spufs.h" |
50 | #define CREATE_TRACE_POINTS | ||
51 | #include "sputrace.h" | ||
50 | 52 | ||
51 | struct spu_prio_array { | 53 | struct spu_prio_array { |
52 | DECLARE_BITMAP(bitmap, MAX_PRIO); | 54 | DECLARE_BITMAP(bitmap, MAX_PRIO); |
diff --git a/arch/powerpc/platforms/cell/spufs/spufs.h b/arch/powerpc/platforms/cell/spufs/spufs.h index ae31573bea4a..c448bac65518 100644 --- a/arch/powerpc/platforms/cell/spufs/spufs.h +++ b/arch/powerpc/platforms/cell/spufs/spufs.h | |||
@@ -373,9 +373,4 @@ extern void spu_free_lscsa(struct spu_state *csa); | |||
373 | extern void spuctx_switch_state(struct spu_context *ctx, | 373 | extern void spuctx_switch_state(struct spu_context *ctx, |
374 | enum spu_utilization_state new_state); | 374 | enum spu_utilization_state new_state); |
375 | 375 | ||
376 | #define spu_context_trace(name, ctx, spu) \ | ||
377 | trace_mark(name, "ctx %p spu %p", ctx, spu); | ||
378 | #define spu_context_nospu_trace(name, ctx) \ | ||
379 | trace_mark(name, "ctx %p", ctx); | ||
380 | |||
381 | #endif | 376 | #endif |
diff --git a/arch/powerpc/platforms/cell/spufs/sputrace.c b/arch/powerpc/platforms/cell/spufs/sputrace.c deleted file mode 100644 index d0b1f3f4d9c8..000000000000 --- a/arch/powerpc/platforms/cell/spufs/sputrace.c +++ /dev/null | |||
@@ -1,272 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2007 IBM Deutschland Entwicklung GmbH | ||
3 | * Released under GPL v2. | ||
4 | * | ||
5 | * Partially based on net/ipv4/tcp_probe.c. | ||
6 | * | ||
7 | * Simple tracing facility for spu contexts. | ||
8 | */ | ||
9 | #include <linux/sched.h> | ||
10 | #include <linux/kernel.h> | ||
11 | #include <linux/module.h> | ||
12 | #include <linux/marker.h> | ||
13 | #include <linux/proc_fs.h> | ||
14 | #include <linux/wait.h> | ||
15 | #include <asm/atomic.h> | ||
16 | #include <asm/uaccess.h> | ||
17 | #include "spufs.h" | ||
18 | |||
19 | struct spu_probe { | ||
20 | const char *name; | ||
21 | const char *format; | ||
22 | marker_probe_func *probe_func; | ||
23 | }; | ||
24 | |||
25 | struct sputrace { | ||
26 | ktime_t tstamp; | ||
27 | int owner_tid; /* owner */ | ||
28 | int curr_tid; | ||
29 | const char *name; | ||
30 | int number; | ||
31 | }; | ||
32 | |||
33 | static int bufsize __read_mostly = 16384; | ||
34 | MODULE_PARM_DESC(bufsize, "Log buffer size (number of records)"); | ||
35 | module_param(bufsize, int, 0); | ||
36 | |||
37 | |||
38 | static DEFINE_SPINLOCK(sputrace_lock); | ||
39 | static DECLARE_WAIT_QUEUE_HEAD(sputrace_wait); | ||
40 | static ktime_t sputrace_start; | ||
41 | static unsigned long sputrace_head, sputrace_tail; | ||
42 | static struct sputrace *sputrace_log; | ||
43 | static int sputrace_logging; | ||
44 | |||
45 | static int sputrace_used(void) | ||
46 | { | ||
47 | return (sputrace_head - sputrace_tail) % bufsize; | ||
48 | } | ||
49 | |||
50 | static inline int sputrace_avail(void) | ||
51 | { | ||
52 | return bufsize - sputrace_used(); | ||
53 | } | ||
54 | |||
55 | static int sputrace_sprint(char *tbuf, int n) | ||
56 | { | ||
57 | const struct sputrace *t = sputrace_log + sputrace_tail % bufsize; | ||
58 | struct timespec tv = | ||
59 | ktime_to_timespec(ktime_sub(t->tstamp, sputrace_start)); | ||
60 | |||
61 | return snprintf(tbuf, n, | ||
62 | "[%lu.%09lu] %d: %s (ctxthread = %d, spu = %d)\n", | ||
63 | (unsigned long) tv.tv_sec, | ||
64 | (unsigned long) tv.tv_nsec, | ||
65 | t->curr_tid, | ||
66 | t->name, | ||
67 | t->owner_tid, | ||
68 | t->number); | ||
69 | } | ||
70 | |||
71 | static ssize_t sputrace_read(struct file *file, char __user *buf, | ||
72 | size_t len, loff_t *ppos) | ||
73 | { | ||
74 | int error = 0, cnt = 0; | ||
75 | |||
76 | if (!buf || len < 0) | ||
77 | return -EINVAL; | ||
78 | |||
79 | while (cnt < len) { | ||
80 | char tbuf[128]; | ||
81 | int width; | ||
82 | |||
83 | /* If we have data ready to return, don't block waiting | ||
84 | * for more */ | ||
85 | if (cnt > 0 && sputrace_used() == 0) | ||
86 | break; | ||
87 | |||
88 | error = wait_event_interruptible(sputrace_wait, | ||
89 | sputrace_used() > 0); | ||
90 | if (error) | ||
91 | break; | ||
92 | |||
93 | spin_lock(&sputrace_lock); | ||
94 | if (sputrace_head == sputrace_tail) { | ||
95 | spin_unlock(&sputrace_lock); | ||
96 | continue; | ||
97 | } | ||
98 | |||
99 | width = sputrace_sprint(tbuf, sizeof(tbuf)); | ||
100 | if (width < len) | ||
101 | sputrace_tail = (sputrace_tail + 1) % bufsize; | ||
102 | spin_unlock(&sputrace_lock); | ||
103 | |||
104 | if (width >= len) | ||
105 | break; | ||
106 | |||
107 | error = copy_to_user(buf + cnt, tbuf, width); | ||
108 | if (error) | ||
109 | break; | ||
110 | cnt += width; | ||
111 | } | ||
112 | |||
113 | return cnt == 0 ? error : cnt; | ||
114 | } | ||
115 | |||
116 | static int sputrace_open(struct inode *inode, struct file *file) | ||
117 | { | ||
118 | int rc; | ||
119 | |||
120 | spin_lock(&sputrace_lock); | ||
121 | if (sputrace_logging) { | ||
122 | rc = -EBUSY; | ||
123 | goto out; | ||
124 | } | ||
125 | |||
126 | sputrace_logging = 1; | ||
127 | sputrace_head = sputrace_tail = 0; | ||
128 | sputrace_start = ktime_get(); | ||
129 | rc = 0; | ||
130 | |||
131 | out: | ||
132 | spin_unlock(&sputrace_lock); | ||
133 | return rc; | ||
134 | } | ||
135 | |||
136 | static int sputrace_release(struct inode *inode, struct file *file) | ||
137 | { | ||
138 | spin_lock(&sputrace_lock); | ||
139 | sputrace_logging = 0; | ||
140 | spin_unlock(&sputrace_lock); | ||
141 | return 0; | ||
142 | } | ||
143 | |||
144 | static const struct file_operations sputrace_fops = { | ||
145 | .owner = THIS_MODULE, | ||
146 | .open = sputrace_open, | ||
147 | .read = sputrace_read, | ||
148 | .release = sputrace_release, | ||
149 | }; | ||
150 | |||
151 | static void sputrace_log_item(const char *name, struct spu_context *ctx, | ||
152 | struct spu *spu) | ||
153 | { | ||
154 | spin_lock(&sputrace_lock); | ||
155 | |||
156 | if (!sputrace_logging) { | ||
157 | spin_unlock(&sputrace_lock); | ||
158 | return; | ||
159 | } | ||
160 | |||
161 | if (sputrace_avail() > 1) { | ||
162 | struct sputrace *t = sputrace_log + sputrace_head; | ||
163 | |||
164 | t->tstamp = ktime_get(); | ||
165 | t->owner_tid = ctx->tid; | ||
166 | t->name = name; | ||
167 | t->curr_tid = current->pid; | ||
168 | t->number = spu ? spu->number : -1; | ||
169 | |||
170 | sputrace_head = (sputrace_head + 1) % bufsize; | ||
171 | } else { | ||
172 | printk(KERN_WARNING | ||
173 | "sputrace: lost samples due to full buffer.\n"); | ||
174 | } | ||
175 | spin_unlock(&sputrace_lock); | ||
176 | |||
177 | wake_up(&sputrace_wait); | ||
178 | } | ||
179 | |||
180 | static void spu_context_event(void *probe_private, void *call_data, | ||
181 | const char *format, va_list *args) | ||
182 | { | ||
183 | struct spu_probe *p = probe_private; | ||
184 | struct spu_context *ctx; | ||
185 | struct spu *spu; | ||
186 | |||
187 | ctx = va_arg(*args, struct spu_context *); | ||
188 | spu = va_arg(*args, struct spu *); | ||
189 | |||
190 | sputrace_log_item(p->name, ctx, spu); | ||
191 | } | ||
192 | |||
193 | static void spu_context_nospu_event(void *probe_private, void *call_data, | ||
194 | const char *format, va_list *args) | ||
195 | { | ||
196 | struct spu_probe *p = probe_private; | ||
197 | struct spu_context *ctx; | ||
198 | |||
199 | ctx = va_arg(*args, struct spu_context *); | ||
200 | |||
201 | sputrace_log_item(p->name, ctx, NULL); | ||
202 | } | ||
203 | |||
204 | struct spu_probe spu_probes[] = { | ||
205 | { "spu_bind_context__enter", "ctx %p spu %p", spu_context_event }, | ||
206 | { "spu_unbind_context__enter", "ctx %p spu %p", spu_context_event }, | ||
207 | { "spu_get_idle__enter", "ctx %p", spu_context_nospu_event }, | ||
208 | { "spu_get_idle__found", "ctx %p spu %p", spu_context_event }, | ||
209 | { "spu_get_idle__not_found", "ctx %p", spu_context_nospu_event }, | ||
210 | { "spu_find_victim__enter", "ctx %p", spu_context_nospu_event }, | ||
211 | { "spusched_tick__preempt", "ctx %p spu %p", spu_context_event }, | ||
212 | { "spusched_tick__newslice", "ctx %p", spu_context_nospu_event }, | ||
213 | { "spu_yield__enter", "ctx %p", spu_context_nospu_event }, | ||
214 | { "spu_deactivate__enter", "ctx %p", spu_context_nospu_event }, | ||
215 | { "__spu_deactivate__unload", "ctx %p spu %p", spu_context_event }, | ||
216 | { "spufs_ps_fault__enter", "ctx %p", spu_context_nospu_event }, | ||
217 | { "spufs_ps_fault__sleep", "ctx %p", spu_context_nospu_event }, | ||
218 | { "spufs_ps_fault__wake", "ctx %p spu %p", spu_context_event }, | ||
219 | { "spufs_ps_fault__insert", "ctx %p spu %p", spu_context_event }, | ||
220 | { "spu_acquire_saved__enter", "ctx %p", spu_context_nospu_event }, | ||
221 | { "destroy_spu_context__enter", "ctx %p", spu_context_nospu_event }, | ||
222 | { "spufs_stop_callback__enter", "ctx %p spu %p", spu_context_event }, | ||
223 | }; | ||
224 | |||
225 | static int __init sputrace_init(void) | ||
226 | { | ||
227 | struct proc_dir_entry *entry; | ||
228 | int i, error = -ENOMEM; | ||
229 | |||
230 | sputrace_log = kcalloc(bufsize, sizeof(struct sputrace), GFP_KERNEL); | ||
231 | if (!sputrace_log) | ||
232 | goto out; | ||
233 | |||
234 | entry = proc_create("sputrace", S_IRUSR, NULL, &sputrace_fops); | ||
235 | if (!entry) | ||
236 | goto out_free_log; | ||
237 | |||
238 | for (i = 0; i < ARRAY_SIZE(spu_probes); i++) { | ||
239 | struct spu_probe *p = &spu_probes[i]; | ||
240 | |||
241 | error = marker_probe_register(p->name, p->format, | ||
242 | p->probe_func, p); | ||
243 | if (error) | ||
244 | printk(KERN_INFO "Unable to register probe %s\n", | ||
245 | p->name); | ||
246 | } | ||
247 | |||
248 | return 0; | ||
249 | |||
250 | out_free_log: | ||
251 | kfree(sputrace_log); | ||
252 | out: | ||
253 | return -ENOMEM; | ||
254 | } | ||
255 | |||
256 | static void __exit sputrace_exit(void) | ||
257 | { | ||
258 | int i; | ||
259 | |||
260 | for (i = 0; i < ARRAY_SIZE(spu_probes); i++) | ||
261 | marker_probe_unregister(spu_probes[i].name, | ||
262 | spu_probes[i].probe_func, &spu_probes[i]); | ||
263 | |||
264 | remove_proc_entry("sputrace", NULL); | ||
265 | kfree(sputrace_log); | ||
266 | marker_synchronize_unregister(); | ||
267 | } | ||
268 | |||
269 | module_init(sputrace_init); | ||
270 | module_exit(sputrace_exit); | ||
271 | |||
272 | MODULE_LICENSE("GPL"); | ||
diff --git a/arch/powerpc/platforms/cell/spufs/sputrace.h b/arch/powerpc/platforms/cell/spufs/sputrace.h new file mode 100644 index 000000000000..db2656aa4103 --- /dev/null +++ b/arch/powerpc/platforms/cell/spufs/sputrace.h | |||
@@ -0,0 +1,39 @@ | |||
1 | #if !defined(_TRACE_SPUFS_H) || defined(TRACE_HEADER_MULTI_READ) | ||
2 | #define _TRACE_SPUFS_H | ||
3 | |||
4 | #include <linux/tracepoint.h> | ||
5 | |||
6 | #undef TRACE_SYSTEM | ||
7 | #define TRACE_SYSTEM spufs | ||
8 | |||
9 | TRACE_EVENT(spufs_context, | ||
10 | TP_PROTO(struct spu_context *ctx, struct spu *spu, const char *name), | ||
11 | TP_ARGS(ctx, spu, name), | ||
12 | |||
13 | TP_STRUCT__entry( | ||
14 | __field(const char *, name) | ||
15 | __field(int, owner_tid) | ||
16 | __field(int, number) | ||
17 | ), | ||
18 | |||
19 | TP_fast_assign( | ||
20 | __entry->name = name; | ||
21 | __entry->owner_tid = ctx->tid; | ||
22 | __entry->number = spu ? spu->number : -1; | ||
23 | ), | ||
24 | |||
25 | TP_printk("%s (ctxthread = %d, spu = %d)", | ||
26 | __entry->name, __entry->owner_tid, __entry->number) | ||
27 | ); | ||
28 | |||
29 | #define spu_context_trace(name, ctx, spu) \ | ||
30 | trace_spufs_context(ctx, spu, __stringify(name)) | ||
31 | #define spu_context_nospu_trace(name, ctx) \ | ||
32 | trace_spufs_context(ctx, NULL, __stringify(name)) | ||
33 | |||
34 | #endif /* _TRACE_SPUFS_H */ | ||
35 | |||
36 | #undef TRACE_INCLUDE_PATH | ||
37 | #define TRACE_INCLUDE_PATH . | ||
38 | #define TRACE_INCLUDE_FILE sputrace | ||
39 | #include <trace/define_trace.h> | ||
diff --git a/arch/powerpc/platforms/iseries/exception.S b/arch/powerpc/platforms/iseries/exception.S index 2f581521eb9b..5369653dcf6a 100644 --- a/arch/powerpc/platforms/iseries/exception.S +++ b/arch/powerpc/platforms/iseries/exception.S | |||
@@ -47,7 +47,7 @@ system_reset_iSeries: | |||
47 | LOAD_REG_ADDR(r13, paca) | 47 | LOAD_REG_ADDR(r13, paca) |
48 | mulli r0,r23,PACA_SIZE | 48 | mulli r0,r23,PACA_SIZE |
49 | add r13,r13,r0 | 49 | add r13,r13,r0 |
50 | mtspr SPRN_SPRG3,r13 /* Save it away for the future */ | 50 | mtspr SPRN_SPRG_PACA,r13 /* Save it away for the future */ |
51 | mfmsr r24 | 51 | mfmsr r24 |
52 | ori r24,r24,MSR_RI | 52 | ori r24,r24,MSR_RI |
53 | mtmsrd r24 /* RI on */ | 53 | mtmsrd r24 /* RI on */ |
@@ -116,7 +116,7 @@ iSeries_secondary_smp_loop: | |||
116 | #endif /* CONFIG_SMP */ | 116 | #endif /* CONFIG_SMP */ |
117 | li r0,-1 /* r0=-1 indicates a Hypervisor call */ | 117 | li r0,-1 /* r0=-1 indicates a Hypervisor call */ |
118 | sc /* Invoke the hypervisor via a system call */ | 118 | sc /* Invoke the hypervisor via a system call */ |
119 | mfspr r13,SPRN_SPRG3 /* Put r13 back ???? */ | 119 | mfspr r13,SPRN_SPRG_PACA /* Put r13 back ???? */ |
120 | b 2b /* If SMP not configured, secondaries | 120 | b 2b /* If SMP not configured, secondaries |
121 | * loop forever */ | 121 | * loop forever */ |
122 | 122 | ||
@@ -126,34 +126,45 @@ iSeries_secondary_smp_loop: | |||
126 | 126 | ||
127 | .globl data_access_iSeries | 127 | .globl data_access_iSeries |
128 | data_access_iSeries: | 128 | data_access_iSeries: |
129 | mtspr SPRN_SPRG1,r13 | 129 | mtspr SPRN_SPRG_SCRATCH0,r13 |
130 | BEGIN_FTR_SECTION | 130 | BEGIN_FTR_SECTION |
131 | mtspr SPRN_SPRG2,r12 | 131 | mfspr r13,SPRN_SPRG_PACA |
132 | mfspr r13,SPRN_DAR | 132 | std r9,PACA_EXSLB+EX_R9(r13) |
133 | mfspr r12,SPRN_DSISR | 133 | std r10,PACA_EXSLB+EX_R10(r13) |
134 | srdi r13,r13,60 | 134 | mfspr r10,SPRN_DAR |
135 | rlwimi r13,r12,16,0x20 | 135 | mfspr r9,SPRN_DSISR |
136 | mfcr r12 | 136 | srdi r10,r10,60 |
137 | cmpwi r13,0x2c | 137 | rlwimi r10,r9,16,0x20 |
138 | mfcr r9 | ||
139 | cmpwi r10,0x2c | ||
138 | beq .do_stab_bolted_iSeries | 140 | beq .do_stab_bolted_iSeries |
139 | mtcrf 0x80,r12 | 141 | ld r10,PACA_EXSLB+EX_R10(r13) |
140 | mfspr r12,SPRN_SPRG2 | 142 | std r11,PACA_EXGEN+EX_R11(r13) |
141 | END_FTR_SECTION_IFCLR(CPU_FTR_SLB) | 143 | ld r11,PACA_EXSLB+EX_R9(r13) |
144 | std r12,PACA_EXGEN+EX_R12(r13) | ||
145 | mfspr r12,SPRN_SPRG_SCRATCH0 | ||
146 | std r10,PACA_EXGEN+EX_R10(r13) | ||
147 | std r11,PACA_EXGEN+EX_R9(r13) | ||
148 | std r12,PACA_EXGEN+EX_R13(r13) | ||
149 | EXCEPTION_PROLOG_ISERIES_1 | ||
150 | FTR_SECTION_ELSE | ||
142 | EXCEPTION_PROLOG_1(PACA_EXGEN) | 151 | EXCEPTION_PROLOG_1(PACA_EXGEN) |
143 | EXCEPTION_PROLOG_ISERIES_1 | 152 | EXCEPTION_PROLOG_ISERIES_1 |
153 | ALT_FTR_SECTION_END_IFCLR(CPU_FTR_SLB) | ||
144 | b data_access_common | 154 | b data_access_common |
145 | 155 | ||
146 | .do_stab_bolted_iSeries: | 156 | .do_stab_bolted_iSeries: |
147 | mtcrf 0x80,r12 | 157 | std r11,PACA_EXSLB+EX_R11(r13) |
148 | mfspr r12,SPRN_SPRG2 | 158 | std r12,PACA_EXSLB+EX_R12(r13) |
149 | EXCEPTION_PROLOG_1(PACA_EXSLB) | 159 | mfspr r10,SPRN_SPRG_SCRATCH0 |
160 | std r10,PACA_EXSLB+EX_R13(r13) | ||
150 | EXCEPTION_PROLOG_ISERIES_1 | 161 | EXCEPTION_PROLOG_ISERIES_1 |
151 | b .do_stab_bolted | 162 | b .do_stab_bolted |
152 | 163 | ||
153 | .globl data_access_slb_iSeries | 164 | .globl data_access_slb_iSeries |
154 | data_access_slb_iSeries: | 165 | data_access_slb_iSeries: |
155 | mtspr SPRN_SPRG1,r13 /* save r13 */ | 166 | mtspr SPRN_SPRG_SCRATCH0,r13 /* save r13 */ |
156 | mfspr r13,SPRN_SPRG3 /* get paca address into r13 */ | 167 | mfspr r13,SPRN_SPRG_PACA /* get paca address into r13 */ |
157 | std r3,PACA_EXSLB+EX_R3(r13) | 168 | std r3,PACA_EXSLB+EX_R3(r13) |
158 | mfspr r3,SPRN_DAR | 169 | mfspr r3,SPRN_DAR |
159 | std r9,PACA_EXSLB+EX_R9(r13) | 170 | std r9,PACA_EXSLB+EX_R9(r13) |
@@ -165,7 +176,7 @@ data_access_slb_iSeries: | |||
165 | std r10,PACA_EXSLB+EX_R10(r13) | 176 | std r10,PACA_EXSLB+EX_R10(r13) |
166 | std r11,PACA_EXSLB+EX_R11(r13) | 177 | std r11,PACA_EXSLB+EX_R11(r13) |
167 | std r12,PACA_EXSLB+EX_R12(r13) | 178 | std r12,PACA_EXSLB+EX_R12(r13) |
168 | mfspr r10,SPRN_SPRG1 | 179 | mfspr r10,SPRN_SPRG_SCRATCH0 |
169 | std r10,PACA_EXSLB+EX_R13(r13) | 180 | std r10,PACA_EXSLB+EX_R13(r13) |
170 | ld r12,PACALPPACAPTR(r13) | 181 | ld r12,PACALPPACAPTR(r13) |
171 | ld r12,LPPACASRR1(r12) | 182 | ld r12,LPPACASRR1(r12) |
@@ -175,8 +186,8 @@ data_access_slb_iSeries: | |||
175 | 186 | ||
176 | .globl instruction_access_slb_iSeries | 187 | .globl instruction_access_slb_iSeries |
177 | instruction_access_slb_iSeries: | 188 | instruction_access_slb_iSeries: |
178 | mtspr SPRN_SPRG1,r13 /* save r13 */ | 189 | mtspr SPRN_SPRG_SCRATCH0,r13 /* save r13 */ |
179 | mfspr r13,SPRN_SPRG3 /* get paca address into r13 */ | 190 | mfspr r13,SPRN_SPRG_PACA /* get paca address into r13 */ |
180 | std r3,PACA_EXSLB+EX_R3(r13) | 191 | std r3,PACA_EXSLB+EX_R3(r13) |
181 | ld r3,PACALPPACAPTR(r13) | 192 | ld r3,PACALPPACAPTR(r13) |
182 | ld r3,LPPACASRR0(r3) /* get SRR0 value */ | 193 | ld r3,LPPACASRR0(r3) /* get SRR0 value */ |
@@ -189,7 +200,7 @@ instruction_access_slb_iSeries: | |||
189 | std r10,PACA_EXSLB+EX_R10(r13) | 200 | std r10,PACA_EXSLB+EX_R10(r13) |
190 | std r11,PACA_EXSLB+EX_R11(r13) | 201 | std r11,PACA_EXSLB+EX_R11(r13) |
191 | std r12,PACA_EXSLB+EX_R12(r13) | 202 | std r12,PACA_EXSLB+EX_R12(r13) |
192 | mfspr r10,SPRN_SPRG1 | 203 | mfspr r10,SPRN_SPRG_SCRATCH0 |
193 | std r10,PACA_EXSLB+EX_R13(r13) | 204 | std r10,PACA_EXSLB+EX_R13(r13) |
194 | ld r12,PACALPPACAPTR(r13) | 205 | ld r12,PACALPPACAPTR(r13) |
195 | ld r12,LPPACASRR1(r12) | 206 | ld r12,LPPACASRR1(r12) |
@@ -200,7 +211,7 @@ slb_miss_user_iseries: | |||
200 | std r10,PACA_EXGEN+EX_R10(r13) | 211 | std r10,PACA_EXGEN+EX_R10(r13) |
201 | std r11,PACA_EXGEN+EX_R11(r13) | 212 | std r11,PACA_EXGEN+EX_R11(r13) |
202 | std r12,PACA_EXGEN+EX_R12(r13) | 213 | std r12,PACA_EXGEN+EX_R12(r13) |
203 | mfspr r10,SPRG1 | 214 | mfspr r10,SPRG_SCRATCH0 |
204 | ld r11,PACA_EXSLB+EX_R9(r13) | 215 | ld r11,PACA_EXSLB+EX_R9(r13) |
205 | ld r12,PACA_EXSLB+EX_R3(r13) | 216 | ld r12,PACA_EXSLB+EX_R3(r13) |
206 | std r10,PACA_EXGEN+EX_R13(r13) | 217 | std r10,PACA_EXGEN+EX_R13(r13) |
@@ -221,7 +232,7 @@ slb_miss_user_iseries: | |||
221 | .globl system_call_iSeries | 232 | .globl system_call_iSeries |
222 | system_call_iSeries: | 233 | system_call_iSeries: |
223 | mr r9,r13 | 234 | mr r9,r13 |
224 | mfspr r13,SPRN_SPRG3 | 235 | mfspr r13,SPRN_SPRG_PACA |
225 | EXCEPTION_PROLOG_ISERIES_1 | 236 | EXCEPTION_PROLOG_ISERIES_1 |
226 | b system_call_common | 237 | b system_call_common |
227 | 238 | ||
diff --git a/arch/powerpc/platforms/iseries/exception.h b/arch/powerpc/platforms/iseries/exception.h index ced45a8fa1aa..bae3fba5ad8e 100644 --- a/arch/powerpc/platforms/iseries/exception.h +++ b/arch/powerpc/platforms/iseries/exception.h | |||
@@ -24,7 +24,7 @@ | |||
24 | * as published by the Free Software Foundation; either version | 24 | * as published by the Free Software Foundation; either version |
25 | * 2 of the License, or (at your option) any later version. | 25 | * 2 of the License, or (at your option) any later version. |
26 | */ | 26 | */ |
27 | #include <asm/exception.h> | 27 | #include <asm/exception-64s.h> |
28 | 28 | ||
29 | #define EXCEPTION_PROLOG_ISERIES_1 \ | 29 | #define EXCEPTION_PROLOG_ISERIES_1 \ |
30 | mfmsr r10; \ | 30 | mfmsr r10; \ |
@@ -38,7 +38,7 @@ | |||
38 | .globl label##_iSeries; \ | 38 | .globl label##_iSeries; \ |
39 | label##_iSeries: \ | 39 | label##_iSeries: \ |
40 | HMT_MEDIUM; \ | 40 | HMT_MEDIUM; \ |
41 | mtspr SPRN_SPRG1,r13; /* save r13 */ \ | 41 | mtspr SPRN_SPRG_SCRATCH0,r13; /* save r13 */ \ |
42 | EXCEPTION_PROLOG_1(area); \ | 42 | EXCEPTION_PROLOG_1(area); \ |
43 | EXCEPTION_PROLOG_ISERIES_1; \ | 43 | EXCEPTION_PROLOG_ISERIES_1; \ |
44 | b label##_common | 44 | b label##_common |
@@ -47,7 +47,7 @@ label##_iSeries: \ | |||
47 | .globl label##_iSeries; \ | 47 | .globl label##_iSeries; \ |
48 | label##_iSeries: \ | 48 | label##_iSeries: \ |
49 | HMT_MEDIUM; \ | 49 | HMT_MEDIUM; \ |
50 | mtspr SPRN_SPRG1,r13; /* save r13 */ \ | 50 | mtspr SPRN_SPRG_SCRATCH0,r13; /* save r13 */ \ |
51 | EXCEPTION_PROLOG_1(PACA_EXGEN); \ | 51 | EXCEPTION_PROLOG_1(PACA_EXGEN); \ |
52 | lbz r10,PACASOFTIRQEN(r13); \ | 52 | lbz r10,PACASOFTIRQEN(r13); \ |
53 | cmpwi 0,r10,0; \ | 53 | cmpwi 0,r10,0; \ |
diff --git a/arch/powerpc/platforms/iseries/mf.c b/arch/powerpc/platforms/iseries/mf.c index fef4d5150517..0d9343df35bc 100644 --- a/arch/powerpc/platforms/iseries/mf.c +++ b/arch/powerpc/platforms/iseries/mf.c | |||
@@ -872,7 +872,7 @@ static int proc_mf_dump_cmdline(char *page, char **start, off_t off, | |||
872 | count = 256 - off; | 872 | count = 256 - off; |
873 | 873 | ||
874 | dma_addr = iseries_hv_map(page, off + count, DMA_FROM_DEVICE); | 874 | dma_addr = iseries_hv_map(page, off + count, DMA_FROM_DEVICE); |
875 | if (dma_mapping_error(NULL, dma_addr)) | 875 | if (dma_addr == DMA_ERROR_CODE) |
876 | return -ENOMEM; | 876 | return -ENOMEM; |
877 | memset(page, 0, off + count); | 877 | memset(page, 0, off + count); |
878 | memset(&vsp_cmd, 0, sizeof(vsp_cmd)); | 878 | memset(&vsp_cmd, 0, sizeof(vsp_cmd)); |
diff --git a/arch/powerpc/platforms/pasemi/idle.c b/arch/powerpc/platforms/pasemi/idle.c index 43911d8b0206..75b296bc51af 100644 --- a/arch/powerpc/platforms/pasemi/idle.c +++ b/arch/powerpc/platforms/pasemi/idle.c | |||
@@ -90,7 +90,7 @@ machine_late_initcall(pasemi, pasemi_idle_init); | |||
90 | static int __init idle_param(char *p) | 90 | static int __init idle_param(char *p) |
91 | { | 91 | { |
92 | int i; | 92 | int i; |
93 | for (i = 0; i < sizeof(modes)/sizeof(struct sleep_mode); i++) { | 93 | for (i = 0; i < ARRAY_SIZE(modes); i++) { |
94 | if (!strcmp(modes[i].name, p)) { | 94 | if (!strcmp(modes[i].name, p)) { |
95 | current_mode = i; | 95 | current_mode = i; |
96 | break; | 96 | break; |
diff --git a/arch/powerpc/platforms/powermac/cpufreq_32.c b/arch/powerpc/platforms/powermac/cpufreq_32.c index 65c585b8b00d..08d94e4cedd3 100644 --- a/arch/powerpc/platforms/powermac/cpufreq_32.c +++ b/arch/powerpc/platforms/powermac/cpufreq_32.c | |||
@@ -44,14 +44,6 @@ | |||
44 | */ | 44 | */ |
45 | #undef DEBUG_FREQ | 45 | #undef DEBUG_FREQ |
46 | 46 | ||
47 | /* | ||
48 | * There is a problem with the core cpufreq code on SMP kernels, | ||
49 | * it won't recalculate the Bogomips properly | ||
50 | */ | ||
51 | #ifdef CONFIG_SMP | ||
52 | #warning "WARNING, CPUFREQ not recommended on SMP kernels" | ||
53 | #endif | ||
54 | |||
55 | extern void low_choose_7447a_dfs(int dfs); | 47 | extern void low_choose_7447a_dfs(int dfs); |
56 | extern void low_choose_750fx_pll(int pll); | 48 | extern void low_choose_750fx_pll(int pll); |
57 | extern void low_sleep_handler(void); | 49 | extern void low_sleep_handler(void); |
diff --git a/arch/powerpc/platforms/powermac/feature.c b/arch/powerpc/platforms/powermac/feature.c index e6c0040ee797..fbc9bbd74dbd 100644 --- a/arch/powerpc/platforms/powermac/feature.c +++ b/arch/powerpc/platforms/powermac/feature.c | |||
@@ -2419,13 +2419,13 @@ static int __init probe_motherboard(void) | |||
2419 | dt = of_find_node_by_name(NULL, "device-tree"); | 2419 | dt = of_find_node_by_name(NULL, "device-tree"); |
2420 | if (dt != NULL) | 2420 | if (dt != NULL) |
2421 | model = of_get_property(dt, "model", NULL); | 2421 | model = of_get_property(dt, "model", NULL); |
2422 | for(i=0; model && i<(sizeof(pmac_mb_defs)/sizeof(struct pmac_mb_def)); i++) { | 2422 | for(i=0; model && i<ARRAY_SIZE(pmac_mb_defs); i++) { |
2423 | if (strcmp(model, pmac_mb_defs[i].model_string) == 0) { | 2423 | if (strcmp(model, pmac_mb_defs[i].model_string) == 0) { |
2424 | pmac_mb = pmac_mb_defs[i]; | 2424 | pmac_mb = pmac_mb_defs[i]; |
2425 | goto found; | 2425 | goto found; |
2426 | } | 2426 | } |
2427 | } | 2427 | } |
2428 | for(i=0; i<(sizeof(pmac_mb_defs)/sizeof(struct pmac_mb_def)); i++) { | 2428 | for(i=0; i<ARRAY_SIZE(pmac_mb_defs); i++) { |
2429 | if (machine_is_compatible(pmac_mb_defs[i].model_string)) { | 2429 | if (machine_is_compatible(pmac_mb_defs[i].model_string)) { |
2430 | pmac_mb = pmac_mb_defs[i]; | 2430 | pmac_mb = pmac_mb_defs[i]; |
2431 | goto found; | 2431 | goto found; |
@@ -2589,9 +2589,16 @@ static void __init probe_uninorth(void) | |||
2589 | if (address == 0) | 2589 | if (address == 0) |
2590 | return; | 2590 | return; |
2591 | uninorth_base = ioremap(address, 0x40000); | 2591 | uninorth_base = ioremap(address, 0x40000); |
2592 | if (uninorth_base == NULL) | ||
2593 | return; | ||
2592 | uninorth_rev = in_be32(UN_REG(UNI_N_VERSION)); | 2594 | uninorth_rev = in_be32(UN_REG(UNI_N_VERSION)); |
2593 | if (uninorth_maj == 3 || uninorth_maj == 4) | 2595 | if (uninorth_maj == 3 || uninorth_maj == 4) { |
2594 | u3_ht_base = ioremap(address + U3_HT_CONFIG_BASE, 0x1000); | 2596 | u3_ht_base = ioremap(address + U3_HT_CONFIG_BASE, 0x1000); |
2597 | if (u3_ht_base == NULL) { | ||
2598 | iounmap(uninorth_base); | ||
2599 | return; | ||
2600 | } | ||
2601 | } | ||
2595 | 2602 | ||
2596 | printk(KERN_INFO "Found %s memory controller & host bridge" | 2603 | printk(KERN_INFO "Found %s memory controller & host bridge" |
2597 | " @ 0x%08x revision: 0x%02x\n", uninorth_maj == 3 ? "U3" : | 2604 | " @ 0x%08x revision: 0x%02x\n", uninorth_maj == 3 ? "U3" : |
diff --git a/arch/powerpc/platforms/powermac/pci.c b/arch/powerpc/platforms/powermac/pci.c index 04cdd32624d4..e81403b245b5 100644 --- a/arch/powerpc/platforms/powermac/pci.c +++ b/arch/powerpc/platforms/powermac/pci.c | |||
@@ -1286,3 +1286,64 @@ static void fixup_k2_sata(struct pci_dev* dev) | |||
1286 | } | 1286 | } |
1287 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SERVERWORKS, 0x0240, fixup_k2_sata); | 1287 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SERVERWORKS, 0x0240, fixup_k2_sata); |
1288 | 1288 | ||
1289 | /* | ||
1290 | * On U4 (aka CPC945) the PCIe root complex "P2P" bridge resource ranges aren't | ||
1291 | * configured by the firmware. The bridge itself seems to ignore them but it | ||
1292 | * causes problems with Linux which then re-assigns devices below the bridge, | ||
1293 | * thus changing addresses of those devices from what was in the device-tree, | ||
1294 | * which sucks when those are video cards using offb | ||
1295 | * | ||
1296 | * We could just mark it transparent but I prefer fixing up the resources to | ||
1297 | * properly show what's going on here, as I have some doubts about having them | ||
1298 | * badly configured potentially being an issue for DMA. | ||
1299 | * | ||
1300 | * We leave PIO alone, it seems to be fine | ||
1301 | * | ||
1302 | * Oh and there's another funny bug. The OF properties advertize the region | ||
1303 | * 0xf1000000..0xf1ffffff as being forwarded as memory space. But that's | ||
1304 | * actually not true, this region is the memory mapped config space. So we | ||
1305 | * also need to filter it out or we'll map things in the wrong place. | ||
1306 | */ | ||
1307 | static void fixup_u4_pcie(struct pci_dev* dev) | ||
1308 | { | ||
1309 | struct pci_controller *host = pci_bus_to_host(dev->bus); | ||
1310 | struct resource *region = NULL; | ||
1311 | u32 reg; | ||
1312 | int i; | ||
1313 | |||
1314 | /* Only do that on PowerMac */ | ||
1315 | if (!machine_is(powermac)) | ||
1316 | return; | ||
1317 | |||
1318 | /* Find the largest MMIO region */ | ||
1319 | for (i = 0; i < 3; i++) { | ||
1320 | struct resource *r = &host->mem_resources[i]; | ||
1321 | if (!(r->flags & IORESOURCE_MEM)) | ||
1322 | continue; | ||
1323 | /* Skip the 0xf0xxxxxx..f2xxxxxx regions, we know they | ||
1324 | * are reserved by HW for other things | ||
1325 | */ | ||
1326 | if (r->start >= 0xf0000000 && r->start < 0xf3000000) | ||
1327 | continue; | ||
1328 | if (!region || (r->end - r->start) > | ||
1329 | (region->end - region->start)) | ||
1330 | region = r; | ||
1331 | } | ||
1332 | /* Nothing found, bail */ | ||
1333 | if (region == 0) | ||
1334 | return; | ||
1335 | |||
1336 | /* Print things out */ | ||
1337 | printk(KERN_INFO "PCI: Fixup U4 PCIe bridge range: %pR\n", region); | ||
1338 | |||
1339 | /* Fixup bridge config space. We know it's a Mac, resource aren't | ||
1340 | * offset so let's just blast them as-is. We also know that they | ||
1341 | * fit in 32 bits | ||
1342 | */ | ||
1343 | reg = ((region->start >> 16) & 0xfff0) | (region->end & 0xfff00000); | ||
1344 | pci_write_config_dword(dev, PCI_MEMORY_BASE, reg); | ||
1345 | pci_write_config_dword(dev, PCI_PREF_BASE_UPPER32, 0); | ||
1346 | pci_write_config_dword(dev, PCI_PREF_LIMIT_UPPER32, 0); | ||
1347 | pci_write_config_dword(dev, PCI_PREF_MEMORY_BASE, 0); | ||
1348 | } | ||
1349 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_U4_PCIE, fixup_u4_pcie); | ||
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c index 6d4da7b46b41..937a38e73178 100644 --- a/arch/powerpc/platforms/powermac/smp.c +++ b/arch/powerpc/platforms/powermac/smp.c | |||
@@ -408,7 +408,7 @@ static void __init smp_psurge_setup_cpu(int cpu_nr) | |||
408 | /* reset the entry point so if we get another intr we won't | 408 | /* reset the entry point so if we get another intr we won't |
409 | * try to startup again */ | 409 | * try to startup again */ |
410 | out_be32(psurge_start, 0x100); | 410 | out_be32(psurge_start, 0x100); |
411 | if (setup_irq(30, &psurge_irqaction)) | 411 | if (setup_irq(irq_create_mapping(NULL, 30), &psurge_irqaction)) |
412 | printk(KERN_ERR "Couldn't get primary IPI interrupt"); | 412 | printk(KERN_ERR "Couldn't get primary IPI interrupt"); |
413 | } | 413 | } |
414 | 414 | ||
diff --git a/arch/powerpc/platforms/ps3/mm.c b/arch/powerpc/platforms/ps3/mm.c index 846eb8b57fd1..189a25b80735 100644 --- a/arch/powerpc/platforms/ps3/mm.c +++ b/arch/powerpc/platforms/ps3/mm.c | |||
@@ -23,8 +23,8 @@ | |||
23 | #include <linux/memory_hotplug.h> | 23 | #include <linux/memory_hotplug.h> |
24 | #include <linux/lmb.h> | 24 | #include <linux/lmb.h> |
25 | 25 | ||
26 | #include <asm/cell-regs.h> | ||
26 | #include <asm/firmware.h> | 27 | #include <asm/firmware.h> |
27 | #include <asm/iommu.h> | ||
28 | #include <asm/prom.h> | 28 | #include <asm/prom.h> |
29 | #include <asm/udbg.h> | 29 | #include <asm/udbg.h> |
30 | #include <asm/lv1call.h> | 30 | #include <asm/lv1call.h> |
diff --git a/arch/powerpc/platforms/ps3/system-bus.c b/arch/powerpc/platforms/ps3/system-bus.c index 3f763c5284ac..e34b305a7a52 100644 --- a/arch/powerpc/platforms/ps3/system-bus.c +++ b/arch/powerpc/platforms/ps3/system-bus.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include <asm/udbg.h> | 27 | #include <asm/udbg.h> |
28 | #include <asm/lv1call.h> | 28 | #include <asm/lv1call.h> |
29 | #include <asm/firmware.h> | 29 | #include <asm/firmware.h> |
30 | #include <asm/iommu.h> | 30 | #include <asm/cell-regs.h> |
31 | 31 | ||
32 | #include "platform.h" | 32 | #include "platform.h" |
33 | 33 | ||
@@ -694,7 +694,7 @@ static int ps3_dma_supported(struct device *_dev, u64 mask) | |||
694 | return mask >= DMA_BIT_MASK(32); | 694 | return mask >= DMA_BIT_MASK(32); |
695 | } | 695 | } |
696 | 696 | ||
697 | static struct dma_mapping_ops ps3_sb_dma_ops = { | 697 | static struct dma_map_ops ps3_sb_dma_ops = { |
698 | .alloc_coherent = ps3_alloc_coherent, | 698 | .alloc_coherent = ps3_alloc_coherent, |
699 | .free_coherent = ps3_free_coherent, | 699 | .free_coherent = ps3_free_coherent, |
700 | .map_sg = ps3_sb_map_sg, | 700 | .map_sg = ps3_sb_map_sg, |
@@ -704,7 +704,7 @@ static struct dma_mapping_ops ps3_sb_dma_ops = { | |||
704 | .unmap_page = ps3_unmap_page, | 704 | .unmap_page = ps3_unmap_page, |
705 | }; | 705 | }; |
706 | 706 | ||
707 | static struct dma_mapping_ops ps3_ioc0_dma_ops = { | 707 | static struct dma_map_ops ps3_ioc0_dma_ops = { |
708 | .alloc_coherent = ps3_alloc_coherent, | 708 | .alloc_coherent = ps3_alloc_coherent, |
709 | .free_coherent = ps3_free_coherent, | 709 | .free_coherent = ps3_free_coherent, |
710 | .map_sg = ps3_ioc0_map_sg, | 710 | .map_sg = ps3_ioc0_map_sg, |
diff --git a/arch/powerpc/platforms/pseries/pci_dlpar.c b/arch/powerpc/platforms/pseries/pci_dlpar.c index ad152a0e3946..b6fa3e4b51b5 100644 --- a/arch/powerpc/platforms/pseries/pci_dlpar.c +++ b/arch/powerpc/platforms/pseries/pci_dlpar.c | |||
@@ -151,7 +151,7 @@ struct pci_controller * __devinit init_phb_dynamic(struct device_node *dn) | |||
151 | if (dn->child) | 151 | if (dn->child) |
152 | eeh_add_device_tree_early(dn); | 152 | eeh_add_device_tree_early(dn); |
153 | 153 | ||
154 | scan_phb(phb); | 154 | pcibios_scan_phb(phb, dn); |
155 | pcibios_finish_adding_to_bus(phb->bus); | 155 | pcibios_finish_adding_to_bus(phb->bus); |
156 | 156 | ||
157 | return phb; | 157 | return phb; |
diff --git a/arch/powerpc/platforms/pseries/reconfig.c b/arch/powerpc/platforms/pseries/reconfig.c index b6f1b137d427..2e2bbe120b90 100644 --- a/arch/powerpc/platforms/pseries/reconfig.c +++ b/arch/powerpc/platforms/pseries/reconfig.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <asm/machdep.h> | 20 | #include <asm/machdep.h> |
21 | #include <asm/uaccess.h> | 21 | #include <asm/uaccess.h> |
22 | #include <asm/pSeries_reconfig.h> | 22 | #include <asm/pSeries_reconfig.h> |
23 | #include <asm/mmu.h> | ||
23 | 24 | ||
24 | 25 | ||
25 | 26 | ||
@@ -439,9 +440,15 @@ static int do_update_property(char *buf, size_t bufsize) | |||
439 | if (!newprop) | 440 | if (!newprop) |
440 | return -ENOMEM; | 441 | return -ENOMEM; |
441 | 442 | ||
443 | if (!strcmp(name, "slb-size") || !strcmp(name, "ibm,slb-size")) | ||
444 | slb_set_size(*(int *)value); | ||
445 | |||
442 | oldprop = of_find_property(np, name,NULL); | 446 | oldprop = of_find_property(np, name,NULL); |
443 | if (!oldprop) | 447 | if (!oldprop) { |
448 | if (strlen(name)) | ||
449 | return prom_add_property(np, newprop); | ||
444 | return -ENODEV; | 450 | return -ENODEV; |
451 | } | ||
445 | 452 | ||
446 | rc = prom_update_property(np, newprop, oldprop); | 453 | rc = prom_update_property(np, newprop, oldprop); |
447 | if (rc) | 454 | if (rc) |
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 8d75ea21296f..ca5f2e10972c 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
@@ -223,10 +223,6 @@ static void pseries_lpar_enable_pmcs(void) | |||
223 | set = 1UL << 63; | 223 | set = 1UL << 63; |
224 | reset = 0; | 224 | reset = 0; |
225 | plpar_hcall_norets(H_PERFMON, set, reset); | 225 | plpar_hcall_norets(H_PERFMON, set, reset); |
226 | |||
227 | /* instruct hypervisor to maintain PMCs */ | ||
228 | if (firmware_has_feature(FW_FEATURE_SPLPAR)) | ||
229 | get_lppaca()->pmcregs_in_use = 1; | ||
230 | } | 226 | } |
231 | 227 | ||
232 | static void __init pseries_discover_pic(void) | 228 | static void __init pseries_discover_pic(void) |
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c index 1f8f6cfb94f7..440000cc7130 100644 --- a/arch/powerpc/platforms/pseries/smp.c +++ b/arch/powerpc/platforms/pseries/smp.c | |||
@@ -56,8 +56,6 @@ | |||
56 | */ | 56 | */ |
57 | static cpumask_t of_spin_map; | 57 | static cpumask_t of_spin_map; |
58 | 58 | ||
59 | extern void generic_secondary_smp_init(unsigned long); | ||
60 | |||
61 | /** | 59 | /** |
62 | * smp_startup_cpu() - start the given cpu | 60 | * smp_startup_cpu() - start the given cpu |
63 | * | 61 | * |
diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c index cbb3bed75d3c..757a83fe5e59 100644 --- a/arch/powerpc/sysdev/fsl_rio.c +++ b/arch/powerpc/sysdev/fsl_rio.c | |||
@@ -1057,6 +1057,10 @@ int fsl_rio_setup(struct of_device *dev) | |||
1057 | law_start, law_size); | 1057 | law_start, law_size); |
1058 | 1058 | ||
1059 | ops = kmalloc(sizeof(struct rio_ops), GFP_KERNEL); | 1059 | ops = kmalloc(sizeof(struct rio_ops), GFP_KERNEL); |
1060 | if (!ops) { | ||
1061 | rc = -ENOMEM; | ||
1062 | goto err_ops; | ||
1063 | } | ||
1060 | ops->lcread = fsl_local_config_read; | 1064 | ops->lcread = fsl_local_config_read; |
1061 | ops->lcwrite = fsl_local_config_write; | 1065 | ops->lcwrite = fsl_local_config_write; |
1062 | ops->cread = fsl_rio_config_read; | 1066 | ops->cread = fsl_rio_config_read; |
@@ -1064,6 +1068,10 @@ int fsl_rio_setup(struct of_device *dev) | |||
1064 | ops->dsend = fsl_rio_doorbell_send; | 1068 | ops->dsend = fsl_rio_doorbell_send; |
1065 | 1069 | ||
1066 | port = kzalloc(sizeof(struct rio_mport), GFP_KERNEL); | 1070 | port = kzalloc(sizeof(struct rio_mport), GFP_KERNEL); |
1071 | if (!port) { | ||
1072 | rc = -ENOMEM; | ||
1073 | goto err_port; | ||
1074 | } | ||
1067 | port->id = 0; | 1075 | port->id = 0; |
1068 | port->index = 0; | 1076 | port->index = 0; |
1069 | 1077 | ||
@@ -1071,7 +1079,7 @@ int fsl_rio_setup(struct of_device *dev) | |||
1071 | if (!priv) { | 1079 | if (!priv) { |
1072 | printk(KERN_ERR "Can't alloc memory for 'priv'\n"); | 1080 | printk(KERN_ERR "Can't alloc memory for 'priv'\n"); |
1073 | rc = -ENOMEM; | 1081 | rc = -ENOMEM; |
1074 | goto err; | 1082 | goto err_priv; |
1075 | } | 1083 | } |
1076 | 1084 | ||
1077 | INIT_LIST_HEAD(&port->dbells); | 1085 | INIT_LIST_HEAD(&port->dbells); |
@@ -1169,11 +1177,13 @@ int fsl_rio_setup(struct of_device *dev) | |||
1169 | 1177 | ||
1170 | return 0; | 1178 | return 0; |
1171 | err: | 1179 | err: |
1172 | if (priv) | 1180 | iounmap(priv->regs_win); |
1173 | iounmap(priv->regs_win); | ||
1174 | kfree(ops); | ||
1175 | kfree(priv); | 1181 | kfree(priv); |
1182 | err_priv: | ||
1176 | kfree(port); | 1183 | kfree(port); |
1184 | err_port: | ||
1185 | kfree(ops); | ||
1186 | err_ops: | ||
1177 | return rc; | 1187 | return rc; |
1178 | } | 1188 | } |
1179 | 1189 | ||
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c index 95dbc643c4fc..adca4affcf1f 100644 --- a/arch/powerpc/sysdev/fsl_soc.c +++ b/arch/powerpc/sysdev/fsl_soc.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <asm/irq.h> | 37 | #include <asm/irq.h> |
38 | #include <asm/time.h> | 38 | #include <asm/time.h> |
39 | #include <asm/prom.h> | 39 | #include <asm/prom.h> |
40 | #include <asm/machdep.h> | ||
40 | #include <sysdev/fsl_soc.h> | 41 | #include <sysdev/fsl_soc.h> |
41 | #include <mm/mmu_decl.h> | 42 | #include <mm/mmu_decl.h> |
42 | #include <asm/cpm2.h> | 43 | #include <asm/cpm2.h> |
@@ -383,8 +384,9 @@ static int __init setup_rstcr(void) | |||
383 | if (!rstcr) | 384 | if (!rstcr) |
384 | printk (KERN_EMERG "Error: reset control register " | 385 | printk (KERN_EMERG "Error: reset control register " |
385 | "not mapped!\n"); | 386 | "not mapped!\n"); |
386 | } else | 387 | } else if (ppc_md.restart == fsl_rstcr_restart) |
387 | printk (KERN_INFO "rstcr compatible register does not exist!\n"); | 388 | printk(KERN_ERR "No RSTCR register, warm reboot won't work\n"); |
389 | |||
388 | if (np) | 390 | if (np) |
389 | of_node_put(np); | 391 | of_node_put(np); |
390 | return 0; | 392 | return 0; |
diff --git a/arch/powerpc/sysdev/ipic.c b/arch/powerpc/sysdev/ipic.c index 69e2630c9062..cb7689c4bfbd 100644 --- a/arch/powerpc/sysdev/ipic.c +++ b/arch/powerpc/sysdev/ipic.c | |||
@@ -735,8 +735,10 @@ struct ipic * __init ipic_init(struct device_node *node, unsigned int flags) | |||
735 | ipic->irqhost = irq_alloc_host(node, IRQ_HOST_MAP_LINEAR, | 735 | ipic->irqhost = irq_alloc_host(node, IRQ_HOST_MAP_LINEAR, |
736 | NR_IPIC_INTS, | 736 | NR_IPIC_INTS, |
737 | &ipic_host_ops, 0); | 737 | &ipic_host_ops, 0); |
738 | if (ipic->irqhost == NULL) | 738 | if (ipic->irqhost == NULL) { |
739 | kfree(ipic); | ||
739 | return NULL; | 740 | return NULL; |
741 | } | ||
740 | 742 | ||
741 | ipic->regs = ioremap(res.start, res.end - res.start + 1); | 743 | ipic->regs = ioremap(res.start, res.end - res.start + 1); |
742 | 744 | ||
@@ -781,6 +783,9 @@ struct ipic * __init ipic_init(struct device_node *node, unsigned int flags) | |||
781 | primary_ipic = ipic; | 783 | primary_ipic = ipic; |
782 | irq_set_default_host(primary_ipic->irqhost); | 784 | irq_set_default_host(primary_ipic->irqhost); |
783 | 785 | ||
786 | ipic_write(ipic->regs, IPIC_SIMSR_H, 0); | ||
787 | ipic_write(ipic->regs, IPIC_SIMSR_L, 0); | ||
788 | |||
784 | printk ("IPIC (%d IRQ sources) at %p\n", NR_IPIC_INTS, | 789 | printk ("IPIC (%d IRQ sources) at %p\n", NR_IPIC_INTS, |
785 | primary_ipic->regs); | 790 | primary_ipic->regs); |
786 | 791 | ||
diff --git a/arch/powerpc/sysdev/mmio_nvram.c b/arch/powerpc/sysdev/mmio_nvram.c index 7b49633a4bd0..207324209065 100644 --- a/arch/powerpc/sysdev/mmio_nvram.c +++ b/arch/powerpc/sysdev/mmio_nvram.c | |||
@@ -53,6 +53,23 @@ static ssize_t mmio_nvram_read(char *buf, size_t count, loff_t *index) | |||
53 | return count; | 53 | return count; |
54 | } | 54 | } |
55 | 55 | ||
56 | static unsigned char mmio_nvram_read_val(int addr) | ||
57 | { | ||
58 | unsigned long flags; | ||
59 | unsigned char val; | ||
60 | |||
61 | if (addr >= mmio_nvram_len) | ||
62 | return 0xff; | ||
63 | |||
64 | spin_lock_irqsave(&mmio_nvram_lock, flags); | ||
65 | |||
66 | val = ioread8(mmio_nvram_start + addr); | ||
67 | |||
68 | spin_unlock_irqrestore(&mmio_nvram_lock, flags); | ||
69 | |||
70 | return val; | ||
71 | } | ||
72 | |||
56 | static ssize_t mmio_nvram_write(char *buf, size_t count, loff_t *index) | 73 | static ssize_t mmio_nvram_write(char *buf, size_t count, loff_t *index) |
57 | { | 74 | { |
58 | unsigned long flags; | 75 | unsigned long flags; |
@@ -72,6 +89,19 @@ static ssize_t mmio_nvram_write(char *buf, size_t count, loff_t *index) | |||
72 | return count; | 89 | return count; |
73 | } | 90 | } |
74 | 91 | ||
92 | void mmio_nvram_write_val(int addr, unsigned char val) | ||
93 | { | ||
94 | unsigned long flags; | ||
95 | |||
96 | if (addr < mmio_nvram_len) { | ||
97 | spin_lock_irqsave(&mmio_nvram_lock, flags); | ||
98 | |||
99 | iowrite8(val, mmio_nvram_start + addr); | ||
100 | |||
101 | spin_unlock_irqrestore(&mmio_nvram_lock, flags); | ||
102 | } | ||
103 | } | ||
104 | |||
75 | static ssize_t mmio_nvram_get_size(void) | 105 | static ssize_t mmio_nvram_get_size(void) |
76 | { | 106 | { |
77 | return mmio_nvram_len; | 107 | return mmio_nvram_len; |
@@ -114,6 +144,8 @@ int __init mmio_nvram_init(void) | |||
114 | printk(KERN_INFO "mmio NVRAM, %luk at 0x%lx mapped to %p\n", | 144 | printk(KERN_INFO "mmio NVRAM, %luk at 0x%lx mapped to %p\n", |
115 | mmio_nvram_len >> 10, nvram_addr, mmio_nvram_start); | 145 | mmio_nvram_len >> 10, nvram_addr, mmio_nvram_start); |
116 | 146 | ||
147 | ppc_md.nvram_read_val = mmio_nvram_read_val; | ||
148 | ppc_md.nvram_write_val = mmio_nvram_write_val; | ||
117 | ppc_md.nvram_read = mmio_nvram_read; | 149 | ppc_md.nvram_read = mmio_nvram_read; |
118 | ppc_md.nvram_write = mmio_nvram_write; | 150 | ppc_md.nvram_write = mmio_nvram_write; |
119 | ppc_md.nvram_size = mmio_nvram_get_size; | 151 | ppc_md.nvram_size = mmio_nvram_get_size; |
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index 3981ae4cb58e..30c44e6b0413 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c | |||
@@ -230,14 +230,16 @@ static inline u32 _mpic_irq_read(struct mpic *mpic, unsigned int src_no, unsigne | |||
230 | { | 230 | { |
231 | unsigned int isu = src_no >> mpic->isu_shift; | 231 | unsigned int isu = src_no >> mpic->isu_shift; |
232 | unsigned int idx = src_no & mpic->isu_mask; | 232 | unsigned int idx = src_no & mpic->isu_mask; |
233 | unsigned int val; | ||
233 | 234 | ||
235 | val = _mpic_read(mpic->reg_type, &mpic->isus[isu], | ||
236 | reg + (idx * MPIC_INFO(IRQ_STRIDE))); | ||
234 | #ifdef CONFIG_MPIC_BROKEN_REGREAD | 237 | #ifdef CONFIG_MPIC_BROKEN_REGREAD |
235 | if (reg == 0) | 238 | if (reg == 0) |
236 | return mpic->isu_reg0_shadow[idx]; | 239 | val = (val & (MPIC_VECPRI_MASK | MPIC_VECPRI_ACTIVITY)) | |
237 | else | 240 | mpic->isu_reg0_shadow[src_no]; |
238 | #endif | 241 | #endif |
239 | return _mpic_read(mpic->reg_type, &mpic->isus[isu], | 242 | return val; |
240 | reg + (idx * MPIC_INFO(IRQ_STRIDE))); | ||
241 | } | 243 | } |
242 | 244 | ||
243 | static inline void _mpic_irq_write(struct mpic *mpic, unsigned int src_no, | 245 | static inline void _mpic_irq_write(struct mpic *mpic, unsigned int src_no, |
@@ -251,7 +253,8 @@ static inline void _mpic_irq_write(struct mpic *mpic, unsigned int src_no, | |||
251 | 253 | ||
252 | #ifdef CONFIG_MPIC_BROKEN_REGREAD | 254 | #ifdef CONFIG_MPIC_BROKEN_REGREAD |
253 | if (reg == 0) | 255 | if (reg == 0) |
254 | mpic->isu_reg0_shadow[idx] = value; | 256 | mpic->isu_reg0_shadow[src_no] = |
257 | value & ~(MPIC_VECPRI_MASK | MPIC_VECPRI_ACTIVITY); | ||
255 | #endif | 258 | #endif |
256 | } | 259 | } |
257 | 260 | ||
diff --git a/arch/powerpc/sysdev/qe_lib/gpio.c b/arch/powerpc/sysdev/qe_lib/gpio.c index 3485288dce31..8e7a7767dd5c 100644 --- a/arch/powerpc/sysdev/qe_lib/gpio.c +++ b/arch/powerpc/sysdev/qe_lib/gpio.c | |||
@@ -105,14 +105,14 @@ static int qe_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val) | |||
105 | struct qe_gpio_chip *qe_gc = to_qe_gpio_chip(mm_gc); | 105 | struct qe_gpio_chip *qe_gc = to_qe_gpio_chip(mm_gc); |
106 | unsigned long flags; | 106 | unsigned long flags; |
107 | 107 | ||
108 | qe_gpio_set(gc, gpio, val); | ||
109 | |||
108 | spin_lock_irqsave(&qe_gc->lock, flags); | 110 | spin_lock_irqsave(&qe_gc->lock, flags); |
109 | 111 | ||
110 | __par_io_config_pin(mm_gc->regs, gpio, QE_PIO_DIR_OUT, 0, 0, 0); | 112 | __par_io_config_pin(mm_gc->regs, gpio, QE_PIO_DIR_OUT, 0, 0, 0); |
111 | 113 | ||
112 | spin_unlock_irqrestore(&qe_gc->lock, flags); | 114 | spin_unlock_irqrestore(&qe_gc->lock, flags); |
113 | 115 | ||
114 | qe_gpio_set(gc, gpio, val); | ||
115 | |||
116 | return 0; | 116 | return 0; |
117 | } | 117 | } |
118 | 118 | ||
diff --git a/arch/powerpc/sysdev/qe_lib/qe_ic.c b/arch/powerpc/sysdev/qe_lib/qe_ic.c index 074905c3ee5a..3faa42e03a85 100644 --- a/arch/powerpc/sysdev/qe_lib/qe_ic.c +++ b/arch/powerpc/sysdev/qe_lib/qe_ic.c | |||
@@ -339,8 +339,10 @@ void __init qe_ic_init(struct device_node *node, unsigned int flags, | |||
339 | 339 | ||
340 | qe_ic->irqhost = irq_alloc_host(node, IRQ_HOST_MAP_LINEAR, | 340 | qe_ic->irqhost = irq_alloc_host(node, IRQ_HOST_MAP_LINEAR, |
341 | NR_QE_IC_INTS, &qe_ic_host_ops, 0); | 341 | NR_QE_IC_INTS, &qe_ic_host_ops, 0); |
342 | if (qe_ic->irqhost == NULL) | 342 | if (qe_ic->irqhost == NULL) { |
343 | kfree(qe_ic); | ||
343 | return; | 344 | return; |
345 | } | ||
344 | 346 | ||
345 | qe_ic->regs = ioremap(res.start, res.end - res.start + 1); | 347 | qe_ic->regs = ioremap(res.start, res.end - res.start + 1); |
346 | 348 | ||
@@ -352,6 +354,7 @@ void __init qe_ic_init(struct device_node *node, unsigned int flags, | |||
352 | 354 | ||
353 | if (qe_ic->virq_low == NO_IRQ) { | 355 | if (qe_ic->virq_low == NO_IRQ) { |
354 | printk(KERN_ERR "Failed to map QE_IC low IRQ\n"); | 356 | printk(KERN_ERR "Failed to map QE_IC low IRQ\n"); |
357 | kfree(qe_ic); | ||
355 | return; | 358 | return; |
356 | } | 359 | } |
357 | 360 | ||
diff --git a/arch/powerpc/xmon/Makefile b/arch/powerpc/xmon/Makefile index 85ab97ab840a..faa81b6a6612 100644 --- a/arch/powerpc/xmon/Makefile +++ b/arch/powerpc/xmon/Makefile | |||
@@ -2,6 +2,8 @@ | |||
2 | 2 | ||
3 | subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror | 3 | subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror |
4 | 4 | ||
5 | GCOV_PROFILE := n | ||
6 | |||
5 | ifdef CONFIG_PPC64 | 7 | ifdef CONFIG_PPC64 |
6 | EXTRA_CFLAGS += -mno-minimal-toc | 8 | EXTRA_CFLAGS += -mno-minimal-toc |
7 | endif | 9 | endif |
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index e1f33a81e5e1..0e09a45ac79a 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c | |||
@@ -2570,7 +2570,7 @@ static void xmon_print_symbol(unsigned long address, const char *mid, | |||
2570 | printf("%s", after); | 2570 | printf("%s", after); |
2571 | } | 2571 | } |
2572 | 2572 | ||
2573 | #ifdef CONFIG_PPC64 | 2573 | #ifdef CONFIG_PPC_BOOK3S_64 |
2574 | static void dump_slb(void) | 2574 | static void dump_slb(void) |
2575 | { | 2575 | { |
2576 | int i; | 2576 | int i; |
diff --git a/drivers/block/ps3vram.c b/drivers/block/ps3vram.c index 095f97e60665..c8753a9ed290 100644 --- a/drivers/block/ps3vram.c +++ b/drivers/block/ps3vram.c | |||
@@ -13,8 +13,8 @@ | |||
13 | #include <linux/proc_fs.h> | 13 | #include <linux/proc_fs.h> |
14 | #include <linux/seq_file.h> | 14 | #include <linux/seq_file.h> |
15 | 15 | ||
16 | #include <asm/cell-regs.h> | ||
16 | #include <asm/firmware.h> | 17 | #include <asm/firmware.h> |
17 | #include <asm/iommu.h> | ||
18 | #include <asm/lv1call.h> | 18 | #include <asm/lv1call.h> |
19 | #include <asm/ps3.h> | 19 | #include <asm/ps3.h> |
20 | #include <asm/ps3gpu.h> | 20 | #include <asm/ps3gpu.h> |
diff --git a/drivers/char/agp/uninorth-agp.c b/drivers/char/agp/uninorth-agp.c index 4317a5588daf..20ef1bf5e726 100644 --- a/drivers/char/agp/uninorth-agp.c +++ b/drivers/char/agp/uninorth-agp.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/pagemap.h> | 7 | #include <linux/pagemap.h> |
8 | #include <linux/agp_backend.h> | 8 | #include <linux/agp_backend.h> |
9 | #include <linux/delay.h> | 9 | #include <linux/delay.h> |
10 | #include <linux/vmalloc.h> | ||
10 | #include <asm/uninorth.h> | 11 | #include <asm/uninorth.h> |
11 | #include <asm/pci-bridge.h> | 12 | #include <asm/pci-bridge.h> |
12 | #include <asm/prom.h> | 13 | #include <asm/prom.h> |
@@ -27,6 +28,8 @@ | |||
27 | static int uninorth_rev; | 28 | static int uninorth_rev; |
28 | static int is_u3; | 29 | static int is_u3; |
29 | 30 | ||
31 | #define DEFAULT_APERTURE_SIZE 256 | ||
32 | #define DEFAULT_APERTURE_STRING "256" | ||
30 | static char *aperture = NULL; | 33 | static char *aperture = NULL; |
31 | 34 | ||
32 | static int uninorth_fetch_size(void) | 35 | static int uninorth_fetch_size(void) |
@@ -55,7 +58,7 @@ static int uninorth_fetch_size(void) | |||
55 | 58 | ||
56 | if (!size) { | 59 | if (!size) { |
57 | for (i = 0; i < agp_bridge->driver->num_aperture_sizes; i++) | 60 | for (i = 0; i < agp_bridge->driver->num_aperture_sizes; i++) |
58 | if (values[i].size == 32) | 61 | if (values[i].size == DEFAULT_APERTURE_SIZE) |
59 | break; | 62 | break; |
60 | } | 63 | } |
61 | 64 | ||
@@ -179,8 +182,6 @@ static int uninorth_insert_memory(struct agp_memory *mem, off_t pg_start, | |||
179 | } | 182 | } |
180 | (void)in_le32((volatile u32*)&agp_bridge->gatt_table[pg_start]); | 183 | (void)in_le32((volatile u32*)&agp_bridge->gatt_table[pg_start]); |
181 | mb(); | 184 | mb(); |
182 | flush_dcache_range((unsigned long)&agp_bridge->gatt_table[pg_start], | ||
183 | (unsigned long)&agp_bridge->gatt_table[pg_start + mem->page_count]); | ||
184 | 185 | ||
185 | uninorth_tlbflush(mem); | 186 | uninorth_tlbflush(mem); |
186 | return 0; | 187 | return 0; |
@@ -224,7 +225,6 @@ static int u3_insert_memory(struct agp_memory *mem, off_t pg_start, int type) | |||
224 | (unsigned long)__va(page_to_phys(mem->pages[i]))+0x1000); | 225 | (unsigned long)__va(page_to_phys(mem->pages[i]))+0x1000); |
225 | } | 226 | } |
226 | mb(); | 227 | mb(); |
227 | flush_dcache_range((unsigned long)gp, (unsigned long) &gp[i]); | ||
228 | uninorth_tlbflush(mem); | 228 | uninorth_tlbflush(mem); |
229 | 229 | ||
230 | return 0; | 230 | return 0; |
@@ -243,7 +243,6 @@ int u3_remove_memory(struct agp_memory *mem, off_t pg_start, int type) | |||
243 | for (i = 0; i < mem->page_count; ++i) | 243 | for (i = 0; i < mem->page_count; ++i) |
244 | gp[i] = 0; | 244 | gp[i] = 0; |
245 | mb(); | 245 | mb(); |
246 | flush_dcache_range((unsigned long)gp, (unsigned long) &gp[i]); | ||
247 | uninorth_tlbflush(mem); | 246 | uninorth_tlbflush(mem); |
248 | 247 | ||
249 | return 0; | 248 | return 0; |
@@ -396,6 +395,7 @@ static int uninorth_create_gatt_table(struct agp_bridge_data *bridge) | |||
396 | int i; | 395 | int i; |
397 | void *temp; | 396 | void *temp; |
398 | struct page *page; | 397 | struct page *page; |
398 | struct page **pages; | ||
399 | 399 | ||
400 | /* We can't handle 2 level gatt's */ | 400 | /* We can't handle 2 level gatt's */ |
401 | if (bridge->driver->size_type == LVL2_APER_SIZE) | 401 | if (bridge->driver->size_type == LVL2_APER_SIZE) |
@@ -424,21 +424,39 @@ static int uninorth_create_gatt_table(struct agp_bridge_data *bridge) | |||
424 | if (table == NULL) | 424 | if (table == NULL) |
425 | return -ENOMEM; | 425 | return -ENOMEM; |
426 | 426 | ||
427 | pages = kmalloc((1 << page_order) * sizeof(struct page*), GFP_KERNEL); | ||
428 | if (pages == NULL) | ||
429 | goto enomem; | ||
430 | |||
427 | table_end = table + ((PAGE_SIZE * (1 << page_order)) - 1); | 431 | table_end = table + ((PAGE_SIZE * (1 << page_order)) - 1); |
428 | 432 | ||
429 | for (page = virt_to_page(table); page <= virt_to_page(table_end); page++) | 433 | for (page = virt_to_page(table), i = 0; page <= virt_to_page(table_end); |
434 | page++, i++) { | ||
430 | SetPageReserved(page); | 435 | SetPageReserved(page); |
436 | pages[i] = page; | ||
437 | } | ||
431 | 438 | ||
432 | bridge->gatt_table_real = (u32 *) table; | 439 | bridge->gatt_table_real = (u32 *) table; |
433 | bridge->gatt_table = (u32 *)table; | 440 | /* Need to clear out any dirty data still sitting in caches */ |
441 | flush_dcache_range((unsigned long)table, | ||
442 | (unsigned long)(table_end + PAGE_SIZE)); | ||
443 | bridge->gatt_table = vmap(pages, (1 << page_order), 0, PAGE_KERNEL_NCG); | ||
444 | |||
445 | if (bridge->gatt_table == NULL) | ||
446 | goto enomem; | ||
447 | |||
434 | bridge->gatt_bus_addr = virt_to_phys(table); | 448 | bridge->gatt_bus_addr = virt_to_phys(table); |
435 | 449 | ||
436 | for (i = 0; i < num_entries; i++) | 450 | for (i = 0; i < num_entries; i++) |
437 | bridge->gatt_table[i] = 0; | 451 | bridge->gatt_table[i] = 0; |
438 | 452 | ||
439 | flush_dcache_range((unsigned long)table, (unsigned long)table_end); | ||
440 | |||
441 | return 0; | 453 | return 0; |
454 | |||
455 | enomem: | ||
456 | kfree(pages); | ||
457 | if (table) | ||
458 | free_pages((unsigned long)table, page_order); | ||
459 | return -ENOMEM; | ||
442 | } | 460 | } |
443 | 461 | ||
444 | static int uninorth_free_gatt_table(struct agp_bridge_data *bridge) | 462 | static int uninorth_free_gatt_table(struct agp_bridge_data *bridge) |
@@ -456,6 +474,7 @@ static int uninorth_free_gatt_table(struct agp_bridge_data *bridge) | |||
456 | * from the table. | 474 | * from the table. |
457 | */ | 475 | */ |
458 | 476 | ||
477 | vunmap(bridge->gatt_table); | ||
459 | table = (char *) bridge->gatt_table_real; | 478 | table = (char *) bridge->gatt_table_real; |
460 | table_end = table + ((PAGE_SIZE * (1 << page_order)) - 1); | 479 | table_end = table + ((PAGE_SIZE * (1 << page_order)) - 1); |
461 | 480 | ||
@@ -474,13 +493,11 @@ void null_cache_flush(void) | |||
474 | 493 | ||
475 | /* Setup function */ | 494 | /* Setup function */ |
476 | 495 | ||
477 | static const struct aper_size_info_32 uninorth_sizes[7] = | 496 | static const struct aper_size_info_32 uninorth_sizes[] = |
478 | { | 497 | { |
479 | #if 0 /* Not sure uninorth supports that high aperture sizes */ | ||
480 | {256, 65536, 6, 64}, | 498 | {256, 65536, 6, 64}, |
481 | {128, 32768, 5, 32}, | 499 | {128, 32768, 5, 32}, |
482 | {64, 16384, 4, 16}, | 500 | {64, 16384, 4, 16}, |
483 | #endif | ||
484 | {32, 8192, 3, 8}, | 501 | {32, 8192, 3, 8}, |
485 | {16, 4096, 2, 4}, | 502 | {16, 4096, 2, 4}, |
486 | {8, 2048, 1, 2}, | 503 | {8, 2048, 1, 2}, |
@@ -491,7 +508,7 @@ static const struct aper_size_info_32 uninorth_sizes[7] = | |||
491 | * Not sure that u3 supports that high aperture sizes but it | 508 | * Not sure that u3 supports that high aperture sizes but it |
492 | * would strange if it did not :) | 509 | * would strange if it did not :) |
493 | */ | 510 | */ |
494 | static const struct aper_size_info_32 u3_sizes[8] = | 511 | static const struct aper_size_info_32 u3_sizes[] = |
495 | { | 512 | { |
496 | {512, 131072, 7, 128}, | 513 | {512, 131072, 7, 128}, |
497 | {256, 65536, 6, 64}, | 514 | {256, 65536, 6, 64}, |
@@ -507,7 +524,7 @@ const struct agp_bridge_driver uninorth_agp_driver = { | |||
507 | .owner = THIS_MODULE, | 524 | .owner = THIS_MODULE, |
508 | .aperture_sizes = (void *)uninorth_sizes, | 525 | .aperture_sizes = (void *)uninorth_sizes, |
509 | .size_type = U32_APER_SIZE, | 526 | .size_type = U32_APER_SIZE, |
510 | .num_aperture_sizes = 4, | 527 | .num_aperture_sizes = ARRAY_SIZE(uninorth_sizes), |
511 | .configure = uninorth_configure, | 528 | .configure = uninorth_configure, |
512 | .fetch_size = uninorth_fetch_size, | 529 | .fetch_size = uninorth_fetch_size, |
513 | .cleanup = uninorth_cleanup, | 530 | .cleanup = uninorth_cleanup, |
@@ -534,7 +551,7 @@ const struct agp_bridge_driver u3_agp_driver = { | |||
534 | .owner = THIS_MODULE, | 551 | .owner = THIS_MODULE, |
535 | .aperture_sizes = (void *)u3_sizes, | 552 | .aperture_sizes = (void *)u3_sizes, |
536 | .size_type = U32_APER_SIZE, | 553 | .size_type = U32_APER_SIZE, |
537 | .num_aperture_sizes = 8, | 554 | .num_aperture_sizes = ARRAY_SIZE(u3_sizes), |
538 | .configure = uninorth_configure, | 555 | .configure = uninorth_configure, |
539 | .fetch_size = uninorth_fetch_size, | 556 | .fetch_size = uninorth_fetch_size, |
540 | .cleanup = uninorth_cleanup, | 557 | .cleanup = uninorth_cleanup, |
@@ -717,7 +734,7 @@ module_param(aperture, charp, 0); | |||
717 | MODULE_PARM_DESC(aperture, | 734 | MODULE_PARM_DESC(aperture, |
718 | "Aperture size, must be power of two between 4MB and an\n" | 735 | "Aperture size, must be power of two between 4MB and an\n" |
719 | "\t\tupper limit specific to the UniNorth revision.\n" | 736 | "\t\tupper limit specific to the UniNorth revision.\n" |
720 | "\t\tDefault: 32M"); | 737 | "\t\tDefault: " DEFAULT_APERTURE_STRING "M"); |
721 | 738 | ||
722 | MODULE_AUTHOR("Ben Herrenschmidt & Paul Mackerras"); | 739 | MODULE_AUTHOR("Ben Herrenschmidt & Paul Mackerras"); |
723 | MODULE_LICENSE("GPL"); | 740 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/char/generic_nvram.c b/drivers/char/generic_nvram.c index a00869c650d5..ef31738c2cbe 100644 --- a/drivers/char/generic_nvram.c +++ b/drivers/char/generic_nvram.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * Generic /dev/nvram driver for architectures providing some | 2 | * Generic /dev/nvram driver for architectures providing some |
3 | * "generic" hooks, that is : | 3 | * "generic" hooks, that is : |
4 | * | 4 | * |
5 | * nvram_read_byte, nvram_write_byte, nvram_sync | 5 | * nvram_read_byte, nvram_write_byte, nvram_sync, nvram_get_size |
6 | * | 6 | * |
7 | * Note that an additional hook is supported for PowerMac only | 7 | * Note that an additional hook is supported for PowerMac only |
8 | * for getting the nvram "partition" informations | 8 | * for getting the nvram "partition" informations |
@@ -28,6 +28,8 @@ | |||
28 | 28 | ||
29 | #define NVRAM_SIZE 8192 | 29 | #define NVRAM_SIZE 8192 |
30 | 30 | ||
31 | static ssize_t nvram_len; | ||
32 | |||
31 | static loff_t nvram_llseek(struct file *file, loff_t offset, int origin) | 33 | static loff_t nvram_llseek(struct file *file, loff_t offset, int origin) |
32 | { | 34 | { |
33 | lock_kernel(); | 35 | lock_kernel(); |
@@ -36,7 +38,7 @@ static loff_t nvram_llseek(struct file *file, loff_t offset, int origin) | |||
36 | offset += file->f_pos; | 38 | offset += file->f_pos; |
37 | break; | 39 | break; |
38 | case 2: | 40 | case 2: |
39 | offset += NVRAM_SIZE; | 41 | offset += nvram_len; |
40 | break; | 42 | break; |
41 | } | 43 | } |
42 | if (offset < 0) { | 44 | if (offset < 0) { |
@@ -56,9 +58,9 @@ static ssize_t read_nvram(struct file *file, char __user *buf, | |||
56 | 58 | ||
57 | if (!access_ok(VERIFY_WRITE, buf, count)) | 59 | if (!access_ok(VERIFY_WRITE, buf, count)) |
58 | return -EFAULT; | 60 | return -EFAULT; |
59 | if (*ppos >= NVRAM_SIZE) | 61 | if (*ppos >= nvram_len) |
60 | return 0; | 62 | return 0; |
61 | for (i = *ppos; count > 0 && i < NVRAM_SIZE; ++i, ++p, --count) | 63 | for (i = *ppos; count > 0 && i < nvram_len; ++i, ++p, --count) |
62 | if (__put_user(nvram_read_byte(i), p)) | 64 | if (__put_user(nvram_read_byte(i), p)) |
63 | return -EFAULT; | 65 | return -EFAULT; |
64 | *ppos = i; | 66 | *ppos = i; |
@@ -74,9 +76,9 @@ static ssize_t write_nvram(struct file *file, const char __user *buf, | |||
74 | 76 | ||
75 | if (!access_ok(VERIFY_READ, buf, count)) | 77 | if (!access_ok(VERIFY_READ, buf, count)) |
76 | return -EFAULT; | 78 | return -EFAULT; |
77 | if (*ppos >= NVRAM_SIZE) | 79 | if (*ppos >= nvram_len) |
78 | return 0; | 80 | return 0; |
79 | for (i = *ppos; count > 0 && i < NVRAM_SIZE; ++i, ++p, --count) { | 81 | for (i = *ppos; count > 0 && i < nvram_len; ++i, ++p, --count) { |
80 | if (__get_user(c, p)) | 82 | if (__get_user(c, p)) |
81 | return -EFAULT; | 83 | return -EFAULT; |
82 | nvram_write_byte(c, i); | 84 | nvram_write_byte(c, i); |
@@ -133,9 +135,20 @@ static struct miscdevice nvram_dev = { | |||
133 | 135 | ||
134 | int __init nvram_init(void) | 136 | int __init nvram_init(void) |
135 | { | 137 | { |
138 | int ret = 0; | ||
139 | |||
136 | printk(KERN_INFO "Generic non-volatile memory driver v%s\n", | 140 | printk(KERN_INFO "Generic non-volatile memory driver v%s\n", |
137 | NVRAM_VERSION); | 141 | NVRAM_VERSION); |
138 | return misc_register(&nvram_dev); | 142 | ret = misc_register(&nvram_dev); |
143 | if (ret != 0) | ||
144 | goto out; | ||
145 | |||
146 | nvram_len = nvram_get_size(); | ||
147 | if (nvram_len < 0) | ||
148 | nvram_len = NVRAM_SIZE; | ||
149 | |||
150 | out: | ||
151 | return ret; | ||
139 | } | 152 | } |
140 | 153 | ||
141 | void __exit nvram_cleanup(void) | 154 | void __exit nvram_cleanup(void) |
diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c index d97779ef72cb..25ce15bb1c08 100644 --- a/drivers/char/hvc_console.c +++ b/drivers/char/hvc_console.c | |||
@@ -516,8 +516,6 @@ static void hvc_set_winsz(struct work_struct *work) | |||
516 | struct winsize ws; | 516 | struct winsize ws; |
517 | 517 | ||
518 | hp = container_of(work, struct hvc_struct, tty_resize); | 518 | hp = container_of(work, struct hvc_struct, tty_resize); |
519 | if (!hp) | ||
520 | return; | ||
521 | 519 | ||
522 | spin_lock_irqsave(&hp->lock, hvc_flags); | 520 | spin_lock_irqsave(&hp->lock, hvc_flags); |
523 | if (!hp->tty) { | 521 | if (!hp->tty) { |
diff --git a/drivers/char/hvc_vio.c b/drivers/char/hvc_vio.c index c72b994652ac..10be343d6ae7 100644 --- a/drivers/char/hvc_vio.c +++ b/drivers/char/hvc_vio.c | |||
@@ -120,7 +120,7 @@ static struct vio_driver hvc_vio_driver = { | |||
120 | } | 120 | } |
121 | }; | 121 | }; |
122 | 122 | ||
123 | static int hvc_vio_init(void) | 123 | static int __init hvc_vio_init(void) |
124 | { | 124 | { |
125 | int rc; | 125 | int rc; |
126 | 126 | ||
@@ -134,7 +134,7 @@ static int hvc_vio_init(void) | |||
134 | } | 134 | } |
135 | module_init(hvc_vio_init); /* after drivers/char/hvc_console.c */ | 135 | module_init(hvc_vio_init); /* after drivers/char/hvc_console.c */ |
136 | 136 | ||
137 | static void hvc_vio_exit(void) | 137 | static void __exit hvc_vio_exit(void) |
138 | { | 138 | { |
139 | vio_unregister_driver(&hvc_vio_driver); | 139 | vio_unregister_driver(&hvc_vio_driver); |
140 | } | 140 | } |
diff --git a/drivers/char/hvsi.c b/drivers/char/hvsi.c index 2989056a9e39..793b236c9266 100644 --- a/drivers/char/hvsi.c +++ b/drivers/char/hvsi.c | |||
@@ -1230,11 +1230,12 @@ static struct tty_driver *hvsi_console_device(struct console *console, | |||
1230 | 1230 | ||
1231 | static int __init hvsi_console_setup(struct console *console, char *options) | 1231 | static int __init hvsi_console_setup(struct console *console, char *options) |
1232 | { | 1232 | { |
1233 | struct hvsi_struct *hp = &hvsi_ports[console->index]; | 1233 | struct hvsi_struct *hp; |
1234 | int ret; | 1234 | int ret; |
1235 | 1235 | ||
1236 | if (console->index < 0 || console->index >= hvsi_count) | 1236 | if (console->index < 0 || console->index >= hvsi_count) |
1237 | return -1; | 1237 | return -1; |
1238 | hp = &hvsi_ports[console->index]; | ||
1238 | 1239 | ||
1239 | /* give the FSP a chance to change the baud rate when we re-open */ | 1240 | /* give the FSP a chance to change the baud rate when we re-open */ |
1240 | hvsi_close_protocol(hp); | 1241 | hvsi_close_protocol(hp); |
diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c index a0f68386c12f..588a5b0bc4b5 100644 --- a/drivers/macintosh/macio_asic.c +++ b/drivers/macintosh/macio_asic.c | |||
@@ -294,10 +294,11 @@ static void macio_setup_interrupts(struct macio_dev *dev) | |||
294 | int i = 0, j = 0; | 294 | int i = 0, j = 0; |
295 | 295 | ||
296 | for (;;) { | 296 | for (;;) { |
297 | struct resource *res = &dev->interrupt[j]; | 297 | struct resource *res; |
298 | 298 | ||
299 | if (j >= MACIO_DEV_COUNT_IRQS) | 299 | if (j >= MACIO_DEV_COUNT_IRQS) |
300 | break; | 300 | break; |
301 | res = &dev->interrupt[j]; | ||
301 | irq = irq_of_parse_and_map(np, i++); | 302 | irq = irq_of_parse_and_map(np, i++); |
302 | if (irq == NO_IRQ) | 303 | if (irq == NO_IRQ) |
303 | break; | 304 | break; |
@@ -321,9 +322,10 @@ static void macio_setup_resources(struct macio_dev *dev, | |||
321 | int index; | 322 | int index; |
322 | 323 | ||
323 | for (index = 0; of_address_to_resource(np, index, &r) == 0; index++) { | 324 | for (index = 0; of_address_to_resource(np, index, &r) == 0; index++) { |
324 | struct resource *res = &dev->resource[index]; | 325 | struct resource *res; |
325 | if (index >= MACIO_DEV_COUNT_RESOURCES) | 326 | if (index >= MACIO_DEV_COUNT_RESOURCES) |
326 | break; | 327 | break; |
328 | res = &dev->resource[index]; | ||
327 | *res = r; | 329 | *res = r; |
328 | res->name = dev_name(&dev->ofdev.dev); | 330 | res->name = dev_name(&dev->ofdev.dev); |
329 | 331 | ||
diff --git a/drivers/macintosh/therm_windtunnel.c b/drivers/macintosh/therm_windtunnel.c index 40023313a760..8b9364434aa0 100644 --- a/drivers/macintosh/therm_windtunnel.c +++ b/drivers/macintosh/therm_windtunnel.c | |||
@@ -239,8 +239,8 @@ setup_hardware( void ) | |||
239 | * to be on the safe side (OSX doesn't)... | 239 | * to be on the safe side (OSX doesn't)... |
240 | */ | 240 | */ |
241 | if( x.overheat_temp == (80 << 8) ) { | 241 | if( x.overheat_temp == (80 << 8) ) { |
242 | x.overheat_temp = 65 << 8; | 242 | x.overheat_temp = 75 << 8; |
243 | x.overheat_hyst = 60 << 8; | 243 | x.overheat_hyst = 70 << 8; |
244 | write_reg( x.thermostat, 2, x.overheat_hyst, 2 ); | 244 | write_reg( x.thermostat, 2, x.overheat_hyst, 2 ); |
245 | write_reg( x.thermostat, 3, x.overheat_temp, 2 ); | 245 | write_reg( x.thermostat, 3, x.overheat_temp, 2 ); |
246 | 246 | ||
diff --git a/drivers/ps3/ps3stor_lib.c b/drivers/ps3/ps3stor_lib.c index 18066d555397..af0afa1db4a8 100644 --- a/drivers/ps3/ps3stor_lib.c +++ b/drivers/ps3/ps3stor_lib.c | |||
@@ -23,6 +23,65 @@ | |||
23 | #include <asm/lv1call.h> | 23 | #include <asm/lv1call.h> |
24 | #include <asm/ps3stor.h> | 24 | #include <asm/ps3stor.h> |
25 | 25 | ||
26 | /* | ||
27 | * A workaround for flash memory I/O errors when the internal hard disk | ||
28 | * has not been formatted for OtherOS use. Delay disk close until flash | ||
29 | * memory is closed. | ||
30 | */ | ||
31 | |||
32 | static struct ps3_flash_workaround { | ||
33 | int flash_open; | ||
34 | int disk_open; | ||
35 | struct ps3_system_bus_device *disk_sbd; | ||
36 | } ps3_flash_workaround; | ||
37 | |||
38 | static int ps3stor_open_hv_device(struct ps3_system_bus_device *sbd) | ||
39 | { | ||
40 | int error = ps3_open_hv_device(sbd); | ||
41 | |||
42 | if (error) | ||
43 | return error; | ||
44 | |||
45 | if (sbd->match_id == PS3_MATCH_ID_STOR_FLASH) | ||
46 | ps3_flash_workaround.flash_open = 1; | ||
47 | |||
48 | if (sbd->match_id == PS3_MATCH_ID_STOR_DISK) | ||
49 | ps3_flash_workaround.disk_open = 1; | ||
50 | |||
51 | return 0; | ||
52 | } | ||
53 | |||
54 | static int ps3stor_close_hv_device(struct ps3_system_bus_device *sbd) | ||
55 | { | ||
56 | int error; | ||
57 | |||
58 | if (sbd->match_id == PS3_MATCH_ID_STOR_DISK | ||
59 | && ps3_flash_workaround.disk_open | ||
60 | && ps3_flash_workaround.flash_open) { | ||
61 | ps3_flash_workaround.disk_sbd = sbd; | ||
62 | return 0; | ||
63 | } | ||
64 | |||
65 | error = ps3_close_hv_device(sbd); | ||
66 | |||
67 | if (error) | ||
68 | return error; | ||
69 | |||
70 | if (sbd->match_id == PS3_MATCH_ID_STOR_DISK) | ||
71 | ps3_flash_workaround.disk_open = 0; | ||
72 | |||
73 | if (sbd->match_id == PS3_MATCH_ID_STOR_FLASH) { | ||
74 | ps3_flash_workaround.flash_open = 0; | ||
75 | |||
76 | if (ps3_flash_workaround.disk_sbd) { | ||
77 | ps3_close_hv_device(ps3_flash_workaround.disk_sbd); | ||
78 | ps3_flash_workaround.disk_open = 0; | ||
79 | ps3_flash_workaround.disk_sbd = NULL; | ||
80 | } | ||
81 | } | ||
82 | |||
83 | return 0; | ||
84 | } | ||
26 | 85 | ||
27 | static int ps3stor_probe_access(struct ps3_storage_device *dev) | 86 | static int ps3stor_probe_access(struct ps3_storage_device *dev) |
28 | { | 87 | { |
@@ -90,7 +149,7 @@ int ps3stor_setup(struct ps3_storage_device *dev, irq_handler_t handler) | |||
90 | int error, res, alignment; | 149 | int error, res, alignment; |
91 | enum ps3_dma_page_size page_size; | 150 | enum ps3_dma_page_size page_size; |
92 | 151 | ||
93 | error = ps3_open_hv_device(&dev->sbd); | 152 | error = ps3stor_open_hv_device(&dev->sbd); |
94 | if (error) { | 153 | if (error) { |
95 | dev_err(&dev->sbd.core, | 154 | dev_err(&dev->sbd.core, |
96 | "%s:%u: ps3_open_hv_device failed %d\n", __func__, | 155 | "%s:%u: ps3_open_hv_device failed %d\n", __func__, |
@@ -166,7 +225,7 @@ fail_free_irq: | |||
166 | fail_sb_event_receive_port_destroy: | 225 | fail_sb_event_receive_port_destroy: |
167 | ps3_sb_event_receive_port_destroy(&dev->sbd, dev->irq); | 226 | ps3_sb_event_receive_port_destroy(&dev->sbd, dev->irq); |
168 | fail_close_device: | 227 | fail_close_device: |
169 | ps3_close_hv_device(&dev->sbd); | 228 | ps3stor_close_hv_device(&dev->sbd); |
170 | fail: | 229 | fail: |
171 | return error; | 230 | return error; |
172 | } | 231 | } |
@@ -193,7 +252,7 @@ void ps3stor_teardown(struct ps3_storage_device *dev) | |||
193 | "%s:%u: destroy event receive port failed %d\n", | 252 | "%s:%u: destroy event receive port failed %d\n", |
194 | __func__, __LINE__, error); | 253 | __func__, __LINE__, error); |
195 | 254 | ||
196 | error = ps3_close_hv_device(&dev->sbd); | 255 | error = ps3stor_close_hv_device(&dev->sbd); |
197 | if (error) | 256 | if (error) |
198 | dev_err(&dev->sbd.core, | 257 | dev_err(&dev->sbd.core, |
199 | "%s:%u: ps3_close_hv_device failed %d\n", __func__, | 258 | "%s:%u: ps3_close_hv_device failed %d\n", __func__, |
diff --git a/drivers/video/ps3fb.c b/drivers/video/ps3fb.c index c0af638fe702..9c0144ee7ae5 100644 --- a/drivers/video/ps3fb.c +++ b/drivers/video/ps3fb.c | |||
@@ -32,7 +32,7 @@ | |||
32 | #include <linux/init.h> | 32 | #include <linux/init.h> |
33 | 33 | ||
34 | #include <asm/abs_addr.h> | 34 | #include <asm/abs_addr.h> |
35 | #include <asm/iommu.h> | 35 | #include <asm/cell-regs.h> |
36 | #include <asm/lv1call.h> | 36 | #include <asm/lv1call.h> |
37 | #include <asm/ps3av.h> | 37 | #include <asm/ps3av.h> |
38 | #include <asm/ps3fb.h> | 38 | #include <asm/ps3fb.h> |
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index c0f6c3cd788c..91b761846061 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h | |||
@@ -58,6 +58,7 @@ struct dma_map_ops { | |||
58 | enum dma_data_direction dir); | 58 | enum dma_data_direction dir); |
59 | int (*mapping_error)(struct device *dev, dma_addr_t dma_addr); | 59 | int (*mapping_error)(struct device *dev, dma_addr_t dma_addr); |
60 | int (*dma_supported)(struct device *dev, u64 mask); | 60 | int (*dma_supported)(struct device *dev, u64 mask); |
61 | int (*set_dma_mask)(struct device *dev, u64 mask); | ||
61 | int is_phys; | 62 | int is_phys; |
62 | }; | 63 | }; |
63 | 64 | ||
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 555a8262fbc2..0d96be93b926 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -881,6 +881,7 @@ | |||
881 | #define PCI_DEVICE_ID_APPLE_SH_SUNGEM 0x0051 | 881 | #define PCI_DEVICE_ID_APPLE_SH_SUNGEM 0x0051 |
882 | #define PCI_DEVICE_ID_APPLE_U3L_AGP 0x0058 | 882 | #define PCI_DEVICE_ID_APPLE_U3L_AGP 0x0058 |
883 | #define PCI_DEVICE_ID_APPLE_U3H_AGP 0x0059 | 883 | #define PCI_DEVICE_ID_APPLE_U3H_AGP 0x0059 |
884 | #define PCI_DEVICE_ID_APPLE_U4_PCIE 0x005b | ||
884 | #define PCI_DEVICE_ID_APPLE_IPID2_AGP 0x0066 | 885 | #define PCI_DEVICE_ID_APPLE_IPID2_AGP 0x0066 |
885 | #define PCI_DEVICE_ID_APPLE_IPID2_ATA 0x0069 | 886 | #define PCI_DEVICE_ID_APPLE_IPID2_ATA 0x0069 |
886 | #define PCI_DEVICE_ID_APPLE_IPID2_FW 0x006a | 887 | #define PCI_DEVICE_ID_APPLE_IPID2_FW 0x006a |
diff --git a/kernel/gcov/Kconfig b/kernel/gcov/Kconfig index 22e9dcfaa3d3..654efd09f6a9 100644 --- a/kernel/gcov/Kconfig +++ b/kernel/gcov/Kconfig | |||
@@ -34,7 +34,7 @@ config GCOV_KERNEL | |||
34 | config GCOV_PROFILE_ALL | 34 | config GCOV_PROFILE_ALL |
35 | bool "Profile entire Kernel" | 35 | bool "Profile entire Kernel" |
36 | depends on GCOV_KERNEL | 36 | depends on GCOV_KERNEL |
37 | depends on S390 || X86 | 37 | depends on S390 || X86 || (PPC && EXPERIMENTAL) |
38 | default n | 38 | default n |
39 | ---help--- | 39 | ---help--- |
40 | This options activates profiling for the entire kernel. | 40 | This options activates profiling for the entire kernel. |
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 55d2acc607a1..d57b12f59c8c 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -338,7 +338,7 @@ config SLUB_STATS | |||
338 | 338 | ||
339 | config DEBUG_KMEMLEAK | 339 | config DEBUG_KMEMLEAK |
340 | bool "Kernel memory leak detector" | 340 | bool "Kernel memory leak detector" |
341 | depends on DEBUG_KERNEL && EXPERIMENTAL && (X86 || ARM) && \ | 341 | depends on DEBUG_KERNEL && EXPERIMENTAL && (X86 || ARM || PPC) && \ |
342 | !MEMORY_HOTPLUG | 342 | !MEMORY_HOTPLUG |
343 | select DEBUG_FS if SYSFS | 343 | select DEBUG_FS if SYSFS |
344 | select STACKTRACE if STACKTRACE_SUPPORT | 344 | select STACKTRACE if STACKTRACE_SUPPORT |