Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+11253 -2458
+13 -16
arch/powerpc/Kconfig
··· 123 123 select HAVE_KRETPROBES 124 124 select HAVE_ARCH_TRACEHOOK 125 125 select HAVE_LMB 126 - select HAVE_DMA_ATTRS if PPC64 126 + select HAVE_DMA_ATTRS 127 + select HAVE_DMA_API_DEBUG 127 128 select USE_GENERIC_SMP_HELPERS if SMP 128 129 select HAVE_OPROFILE 129 130 select HAVE_SYSCALL_WRAPPERS if PPC64 ··· 311 310 platforms where the size of a physical address is larger 312 311 than the bus address. Not all platforms support this. 313 312 314 - config PPC_NEED_DMA_SYNC_OPS 315 - def_bool y 316 - depends on (NOT_COHERENT_CACHE || SWIOTLB) 317 - 318 313 config HOTPLUG_CPU 319 314 bool "Support for enabling/disabling CPUs" 320 315 depends on SMP && HOTPLUG && EXPERIMENTAL && (PPC_PSERIES || PPC_PMAC) ··· 472 475 bool "16k page size" if 44x 473 476 474 477 config PPC_64K_PAGES 475 - bool "64k page size" if 44x || PPC_STD_MMU_64 478 + bool "64k page size" if 44x || PPC_STD_MMU_64 || PPC_BOOK3E_64 476 479 select PPC_HAS_HASH_64K if PPC_STD_MMU_64 477 480 478 481 config PPC_256K_PAGES ··· 492 495 493 496 config FORCE_MAX_ZONEORDER 494 497 int "Maximum zone order" 495 - range 9 64 if PPC_STD_MMU_64 && PPC_64K_PAGES 496 - default "9" if PPC_STD_MMU_64 && PPC_64K_PAGES 497 - range 13 64 if PPC_STD_MMU_64 && !PPC_64K_PAGES 498 - default "13" if PPC_STD_MMU_64 && !PPC_64K_PAGES 499 - range 9 64 if PPC_STD_MMU_32 && PPC_16K_PAGES 500 - default "9" if PPC_STD_MMU_32 && PPC_16K_PAGES 501 - range 7 64 if PPC_STD_MMU_32 && PPC_64K_PAGES 502 - default "7" if PPC_STD_MMU_32 && PPC_64K_PAGES 503 - range 5 64 if PPC_STD_MMU_32 && PPC_256K_PAGES 504 - default "5" if PPC_STD_MMU_32 && PPC_256K_PAGES 498 + range 9 64 if PPC64 && PPC_64K_PAGES 499 + default "9" if PPC64 && PPC_64K_PAGES 500 + range 13 64 if PPC64 && !PPC_64K_PAGES 501 + default "13" if PPC64 && !PPC_64K_PAGES 502 + range 9 64 if PPC32 && PPC_16K_PAGES 503 + default "9" if PPC32 && PPC_16K_PAGES 504 + range 7 64 if PPC32 && PPC_64K_PAGES 505 + default "7" if PPC32 && PPC_64K_PAGES 506 + range 5 64 if PPC32 && PPC_256K_PAGES 507 + default "5" if PPC32 && PPC_256K_PAGES 505 508 range 11 64 506 509 default "11" 507 510 help
+1 -1
arch/powerpc/Makefile
··· 77 77 CHECKFLAGS += -m$(CONFIG_WORD_SIZE) -D__powerpc__ -D__powerpc$(CONFIG_WORD_SIZE)__ 78 78 79 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 82 ifeq ($(CONFIG_POWER4_ONLY),y) 83 83 ifeq ($(CONFIG_ALTIVEC),y)
+142
arch/powerpc/boot/4xx.c
··· 8 8 * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> 9 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 15 * This program is free software; you can redistribute it and/or 12 16 * modify it under the terms of the GNU General Public License 13 17 * as published by the Free Software Foundation; either version ··· 662 658 dt_fixup_clock("/plb/ebc", ebc); 663 659 dt_fixup_clock("/plb/opb/serial@ef600300", uart0); 664 660 dt_fixup_clock("/plb/opb/serial@ef600400", uart1); 661 + } 662 + 663 + static u8 ibm405ex_fwdv_multi_bits[] = { 664 + /* values for: 1 - 16 */ 665 + 0x01, 0x02, 0x0e, 0x09, 0x04, 0x0b, 0x10, 0x0d, 0x0c, 0x05, 666 + 0x06, 0x0f, 0x0a, 0x07, 0x08, 0x03 667 + }; 668 + 669 + u32 ibm405ex_get_fwdva(unsigned long cpr_fwdv) 670 + { 671 + u32 index; 672 + 673 + for (index = 0; index < ARRAY_SIZE(ibm405ex_fwdv_multi_bits); index++) 674 + if (cpr_fwdv == (u32)ibm405ex_fwdv_multi_bits[index]) 675 + return index + 1; 676 + 677 + return 0; 678 + } 679 + 680 + static u8 ibm405ex_fbdv_multi_bits[] = { 681 + /* values for: 1 - 100 */ 682 + 0x00, 0xff, 0x7e, 0xfd, 0x7a, 0xf5, 0x6a, 0xd5, 0x2a, 0xd4, 683 + 0x29, 0xd3, 0x26, 0xcc, 0x19, 0xb3, 0x67, 0xce, 0x1d, 0xbb, 684 + 0x77, 0xee, 0x5d, 0xba, 0x74, 0xe9, 0x52, 0xa5, 0x4b, 0x96, 685 + 0x2c, 0xd8, 0x31, 0xe3, 0x46, 0x8d, 0x1b, 0xb7, 0x6f, 0xde, 686 + 0x3d, 0xfb, 0x76, 0xed, 0x5a, 0xb5, 0x6b, 0xd6, 0x2d, 0xdb, 687 + 0x36, 0xec, 0x59, 0xb2, 0x64, 0xc9, 0x12, 0xa4, 0x48, 0x91, 688 + 0x23, 0xc7, 0x0e, 0x9c, 0x38, 0xf0, 0x61, 0xc2, 0x05, 0x8b, 689 + 0x17, 0xaf, 0x5f, 0xbe, 0x7c, 0xf9, 0x72, 0xe5, 0x4a, 0x95, 690 + 0x2b, 0xd7, 0x2e, 0xdc, 0x39, 0xf3, 0x66, 0xcd, 0x1a, 0xb4, 691 + 0x68, 0xd1, 0x22, 0xc4, 0x09, 0x93, 0x27, 0xcf, 0x1e, 0xbc, 692 + /* values for: 101 - 200 */ 693 + 0x78, 0xf1, 0x62, 0xc5, 0x0a, 0x94, 0x28, 0xd0, 0x21, 0xc3, 694 + 0x06, 0x8c, 0x18, 0xb0, 0x60, 0xc1, 0x02, 0x84, 0x08, 0x90, 695 + 0x20, 0xc0, 0x01, 0x83, 0x07, 0x8f, 0x1f, 0xbf, 0x7f, 0xfe, 696 + 0x7d, 0xfa, 0x75, 0xea, 0x55, 0xaa, 0x54, 0xa9, 0x53, 0xa6, 697 + 0x4c, 0x99, 0x33, 0xe7, 0x4e, 0x9d, 0x3b, 0xf7, 0x6e, 0xdd, 698 + 0x3a, 0xf4, 0x69, 0xd2, 0x25, 0xcb, 0x16, 0xac, 0x58, 0xb1, 699 + 0x63, 0xc6, 0x0d, 0x9b, 0x37, 0xef, 0x5e, 0xbd, 0x7b, 0xf6, 700 + 0x6d, 0xda, 0x35, 0xeb, 0x56, 0xad, 0x5b, 0xb6, 0x6c, 0xd9, 701 + 0x32, 0xe4, 0x49, 0x92, 0x24, 0xc8, 0x11, 0xa3, 0x47, 0x8e, 702 + 0x1c, 0xb8, 0x70, 0xe1, 0x42, 0x85, 0x0b, 0x97, 0x2f, 0xdf, 703 + /* values for: 201 - 255 */ 704 + 0x3e, 0xfc, 0x79, 0xf2, 0x65, 0xca, 0x15, 0xab, 0x57, 0xae, 705 + 0x5c, 0xb9, 0x73, 0xe6, 0x4d, 0x9a, 0x34, 0xe8, 0x51, 0xa2, 706 + 0x44, 0x89, 0x13, 0xa7, 0x4f, 0x9e, 0x3c, 0xf8, 0x71, 0xe2, 707 + 0x45, 0x8a, 0x14, 0xa8, 0x50, 0xa1, 0x43, 0x86, 0x0c, 0x98, 708 + 0x30, 0xe0, 0x41, 0x82, 0x04, 0x88, 0x10, 0xa0, 0x40, 0x81, 709 + 0x03, 0x87, 0x0f, 0x9f, 0x3f /* END */ 710 + }; 711 + 712 + u32 ibm405ex_get_fbdv(unsigned long cpr_fbdv) 713 + { 714 + u32 index; 715 + 716 + for (index = 0; index < ARRAY_SIZE(ibm405ex_fbdv_multi_bits); index++) 717 + if (cpr_fbdv == (u32)ibm405ex_fbdv_multi_bits[index]) 718 + return index + 1; 719 + 720 + return 0; 721 + } 722 + 723 + void ibm405ex_fixup_clocks(unsigned int sys_clk, unsigned int uart_clk) 724 + { 725 + /* PLL config */ 726 + u32 pllc = CPR0_READ(DCRN_CPR0_PLLC); 727 + u32 plld = CPR0_READ(DCRN_CPR0_PLLD); 728 + u32 cpud = CPR0_READ(DCRN_CPR0_PRIMAD); 729 + u32 plbd = CPR0_READ(DCRN_CPR0_PRIMBD); 730 + u32 opbd = CPR0_READ(DCRN_CPR0_OPBD); 731 + u32 perd = CPR0_READ(DCRN_CPR0_PERD); 732 + 733 + /* Dividers */ 734 + u32 fbdv = ibm405ex_get_fbdv(__fix_zero((plld >> 24) & 0xff, 1)); 735 + 736 + u32 fwdva = ibm405ex_get_fwdva(__fix_zero((plld >> 16) & 0x0f, 1)); 737 + 738 + u32 cpudv0 = __fix_zero((cpud >> 24) & 7, 8); 739 + 740 + /* PLBDV0 is hardwared to 010. */ 741 + u32 plbdv0 = 2; 742 + u32 plb2xdv0 = __fix_zero((plbd >> 16) & 7, 8); 743 + 744 + u32 opbdv0 = __fix_zero((opbd >> 24) & 3, 4); 745 + 746 + u32 perdv0 = __fix_zero((perd >> 24) & 3, 4); 747 + 748 + /* Resulting clocks */ 749 + u32 cpu, plb, opb, ebc, vco, tb, uart0, uart1; 750 + 751 + /* PLL's VCO is the source for primary forward ? */ 752 + if (pllc & 0x40000000) { 753 + u32 m; 754 + 755 + /* Feedback path */ 756 + switch ((pllc >> 24) & 7) { 757 + case 0: 758 + /* PLLOUTx */ 759 + m = fbdv; 760 + break; 761 + case 1: 762 + /* CPU */ 763 + m = fbdv * fwdva * cpudv0; 764 + break; 765 + case 5: 766 + /* PERClk */ 767 + m = fbdv * fwdva * plb2xdv0 * plbdv0 * opbdv0 * perdv0; 768 + break; 769 + default: 770 + printf("WARNING ! Invalid PLL feedback source !\n"); 771 + goto bypass; 772 + } 773 + 774 + vco = (unsigned int)(sys_clk * m); 775 + } else { 776 + bypass: 777 + /* Bypass system PLL */ 778 + vco = 0; 779 + } 780 + 781 + /* CPU = VCO / ( FWDVA x CPUDV0) */ 782 + cpu = vco / (fwdva * cpudv0); 783 + /* PLB = VCO / ( FWDVA x PLB2XDV0 x PLBDV0) */ 784 + plb = vco / (fwdva * plb2xdv0 * plbdv0); 785 + /* OPB = PLB / OPBDV0 */ 786 + opb = plb / opbdv0; 787 + /* EBC = OPB / PERDV0 */ 788 + ebc = opb / perdv0; 789 + 790 + tb = cpu; 791 + uart0 = uart1 = uart_clk; 792 + 793 + dt_fixup_cpu_clocks(cpu, tb, 0); 794 + dt_fixup_clock("/plb", plb); 795 + dt_fixup_clock("/plb/opb", opb); 796 + dt_fixup_clock("/plb/opb/ebc", ebc); 797 + dt_fixup_clock("/plb/opb/serial@ef600200", uart0); 798 + dt_fixup_clock("/plb/opb/serial@ef600300", uart1); 665 799 }
+1
arch/powerpc/boot/4xx.h
··· 21 21 22 22 void ibm405gp_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk); 23 23 void ibm405ep_fixup_clocks(unsigned int sys_clk); 24 + void ibm405ex_fixup_clocks(unsigned int sys_clk, unsigned int uart_clk); 24 25 void ibm440gp_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk); 25 26 void ibm440ep_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk, 26 27 unsigned int tmr_clk);
+4 -2
arch/powerpc/boot/Makefile
··· 39 39 40 40 $(obj)/4xx.o: BOOTCFLAGS += -mcpu=405 41 41 $(obj)/ebony.o: BOOTCFLAGS += -mcpu=405 42 + $(obj)/cuboot-hotfoot.o: BOOTCFLAGS += -mcpu=405 42 43 $(obj)/cuboot-taishan.o: BOOTCFLAGS += -mcpu=405 43 44 $(obj)/cuboot-katmai.o: BOOTCFLAGS += -mcpu=405 44 45 $(obj)/cuboot-acadia.o: BOOTCFLAGS += -mcpu=405 ··· 68 67 cpm-serial.c stdlib.c mpc52xx-psc.c planetcore.c uartlite.c \ 69 68 fsl-soc.c mpc8xx.c pq2.c 70 69 src-plat := of.c cuboot-52xx.c cuboot-824x.c cuboot-83xx.c cuboot-85xx.c holly.c \ 71 - cuboot-ebony.c treeboot-ebony.c prpmc2800.c \ 70 + cuboot-ebony.c cuboot-hotfoot.c treeboot-ebony.c prpmc2800.c \ 72 71 ps3-head.S ps3-hvcall.S ps3.c treeboot-bamboo.c cuboot-8xx.c \ 73 72 cuboot-pq2.c cuboot-sequoia.c treeboot-walnut.c \ 74 73 cuboot-bamboo.c cuboot-mpc7448hpc2.c cuboot-taishan.c \ ··· 76 75 cuboot-katmai.c cuboot-rainier.c redboot-8xx.c ep8248e.c \ 77 76 cuboot-warp.c cuboot-85xx-cpm2.c cuboot-yosemite.c simpleboot.c \ 78 77 virtex405-head.S virtex.c redboot-83xx.c cuboot-sam440ep.c \ 79 - cuboot-acadia.c cuboot-amigaone.c 78 + cuboot-acadia.c cuboot-amigaone.c cuboot-kilauea.c 80 79 src-boot := $(src-wlib) $(src-plat) empty.c 81 80 82 81 src-boot := $(addprefix $(obj)/, $(src-boot)) ··· 191 190 192 191 # Board ports in arch/powerpc/platform/40x/Kconfig 193 192 image-$(CONFIG_EP405) += dtbImage.ep405 193 + image-$(CONFIG_HOTFOOT) += cuImage.hotfoot 194 194 image-$(CONFIG_WALNUT) += treeImage.walnut 195 195 image-$(CONFIG_ACADIA) += cuImage.acadia 196 196
+142
arch/powerpc/boot/cuboot-hotfoot.c
··· 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 + }
+49
arch/powerpc/boot/cuboot-kilauea.c
··· 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 + }
+1 -3
arch/powerpc/boot/dcr.h
··· 153 153 #define DCRN_CPC0_PLLMR1 0xf4 154 154 #define DCRN_CPC0_UCR 0xf5 155 155 156 - /* 440GX Clock control etc */ 157 - 158 - 156 + /* 440GX/405EX Clock Control reg */ 159 157 #define DCRN_CPR0_CLKUPD 0x020 160 158 #define DCRN_CPR0_PLLC 0x040 161 159 #define DCRN_CPR0_PLLD 0x060
+50
arch/powerpc/boot/dts/arches.dts
··· 124 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 137 plb { 128 138 compatible = "ibm,plb-460gt", "ibm,plb4"; 129 139 #address-cells = <2>; ··· 178 168 /* ranges property is supplied by U-Boot */ 179 169 interrupts = <0x6 0x4>; 180 170 interrupt-parent = <&UIC1>; 171 + 172 + nor_flash@0,0 { 173 + compatible = "amd,s29gl256n", "cfi-flash"; 174 + bank-width = <2>; 175 + reg = <0x00000000 0x00000000 0x02000000>; 176 + #address-cells = <1>; 177 + #size-cells = <1>; 178 + partition@0 { 179 + label = "kernel"; 180 + reg = <0x00000000 0x001e0000>; 181 + }; 182 + partition@1e0000 { 183 + label = "dtb"; 184 + reg = <0x001e0000 0x00020000>; 185 + }; 186 + partition@200000 { 187 + label = "root"; 188 + reg = <0x00200000 0x00200000>; 189 + }; 190 + partition@400000 { 191 + label = "user"; 192 + reg = <0x00400000 0x01b60000>; 193 + }; 194 + partition@1f60000 { 195 + label = "env"; 196 + reg = <0x01f60000 0x00040000>; 197 + }; 198 + partition@1fa0000 { 199 + label = "u-boot"; 200 + reg = <0x01fa0000 0x00060000>; 201 + }; 202 + }; 181 203 }; 182 204 183 205 UART0: serial@ef600300 { ··· 228 186 reg = <0xef600700 0x00000014>; 229 187 interrupt-parent = <&UIC0>; 230 188 interrupts = <0x2 0x4>; 189 + #address-cells = <1>; 190 + #size-cells = <0>; 191 + sttm@4a { 192 + compatible = "ad,ad7414"; 193 + reg = <0x4a>; 194 + interrupt-parent = <&UIC1>; 195 + interrupts = <0x0 0x8>; 196 + }; 231 197 }; 232 198 233 199 IIC1: i2c@ef600800 {
+36 -13
arch/powerpc/boot/dts/canyonlands.dts
··· 1 1 /* 2 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 6 * This file is licensed under the terms of the GNU General Public 7 7 * License version 2. This program is licensed "as is" without ··· 149 149 /*RXDE*/ 0x5 0x4>; 150 150 }; 151 151 152 - USB0: ehci@bffd0400 { 153 - compatible = "ibm,usb-ehci-460ex", "usb-ehci"; 154 - interrupt-parent = <&UIC2>; 155 - interrupts = <0x1d 4>; 156 - reg = <4 0xbffd0400 0x90 4 0xbffd0490 0x70>; 157 - }; 152 + USB0: ehci@bffd0400 { 153 + compatible = "ibm,usb-ehci-460ex", "usb-ehci"; 154 + interrupt-parent = <&UIC2>; 155 + interrupts = <0x1d 4>; 156 + reg = <4 0xbffd0400 0x90 4 0xbffd0490 0x70>; 157 + }; 158 158 159 - USB1: usb@bffd0000 { 160 - compatible = "ohci-le"; 161 - reg = <4 0xbffd0000 0x60>; 162 - interrupt-parent = <&UIC2>; 163 - interrupts = <0x1e 4>; 164 - }; 159 + USB1: usb@bffd0000 { 160 + compatible = "ohci-le"; 161 + reg = <4 0xbffd0000 0x60>; 162 + interrupt-parent = <&UIC2>; 163 + interrupts = <0x1e 4>; 164 + }; 165 165 166 166 POB0: opb { 167 167 compatible = "ibm,opb-460ex", "ibm,opb"; ··· 213 213 partition@3fa0000 { 214 214 label = "u-boot"; 215 215 reg = <0x03fa0000 0x00060000>; 216 + }; 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 + }; 216 239 }; 217 240 }; 218 241 };
+421
arch/powerpc/boot/dts/eiger.dts
··· 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 + };
+49 -15
arch/powerpc/boot/dts/gef_sbc310.dts
··· 83 83 84 84 /* flash@0,0 is a mirror of part of the memory in flash@1,0 85 85 flash@0,0 { 86 - compatible = "cfi-flash"; 87 - reg = <0 0 0x01000000>; 86 + compatible = "gef,sbc310-firmware-mirror", "cfi-flash"; 87 + reg = <0x0 0x0 0x01000000>; 88 88 bank-width = <2>; 89 89 device-width = <2>; 90 90 #address-cells = <1>; 91 91 #size-cells = <1>; 92 92 partition@0 { 93 93 label = "firmware"; 94 - reg = <0x00000000 0x01000000>; 94 + reg = <0x0 0x01000000>; 95 95 read-only; 96 96 }; 97 97 }; 98 98 */ 99 99 100 100 flash@1,0 { 101 - compatible = "cfi-flash"; 102 - reg = <1 0 0x8000000>; 101 + compatible = "gef,sbc310-paged-flash", "cfi-flash"; 102 + reg = <0x1 0x0 0x8000000>; 103 103 bank-width = <2>; 104 104 device-width = <2>; 105 105 #address-cells = <1>; 106 106 #size-cells = <1>; 107 107 partition@0 { 108 108 label = "user"; 109 - reg = <0x00000000 0x07800000>; 109 + reg = <0x0 0x7800000>; 110 110 }; 111 111 partition@7800000 { 112 112 label = "firmware"; 113 - reg = <0x07800000 0x00800000>; 113 + reg = <0x7800000 0x800000>; 114 114 read-only; 115 115 }; 116 116 }; ··· 121 121 }; 122 122 123 123 wdt@4,2000 { 124 - #interrupt-cells = <2>; 125 - device_type = "watchdog"; 126 - compatible = "gef,fpga-wdt"; 124 + compatible = "gef,sbc310-fpga-wdt", "gef,fpga-wdt-1.00", 125 + "gef,fpga-wdt"; 127 126 reg = <0x4 0x2000 0x8>; 128 127 interrupts = <0x1a 0x4>; 129 128 interrupt-parent = <&gef_pic>; 130 129 }; 131 130 /* 132 131 wdt@4,2010 { 133 - #interrupt-cells = <2>; 134 - device_type = "watchdog"; 135 - compatible = "gef,fpga-wdt"; 132 + compatible = "gef,sbc310-fpga-wdt", "gef,fpga-wdt-1.00", 133 + "gef,fpga-wdt"; 136 134 reg = <0x4 0x2010 0x8>; 137 135 interrupts = <0x1b 0x4>; 138 136 interrupt-parent = <&gef_pic>; ··· 139 141 gef_pic: pic@4,4000 { 140 142 #interrupt-cells = <1>; 141 143 interrupt-controller; 142 - compatible = "gef,fpga-pic"; 144 + compatible = "gef,sbc310-fpga-pic", "gef,fpga-pic"; 143 145 reg = <0x4 0x4000 0x20>; 144 146 interrupts = <0x8 145 147 0x9>; ··· 159 161 #size-cells = <1>; 160 162 #interrupt-cells = <2>; 161 163 device_type = "soc"; 162 - compatible = "simple-bus"; 164 + compatible = "fsl,mpc8641-soc", "simple-bus"; 163 165 ranges = <0x0 0xfef00000 0x00100000>; 164 166 bus-frequency = <33333333>; 165 167 ··· 368 370 ranges = <0x02000000 0x0 0x80000000 369 371 0x02000000 0x0 0x80000000 370 372 0x0 0x40000000 373 + 374 + 0x01000000 0x0 0x00000000 375 + 0x01000000 0x0 0x00000000 376 + 0x0 0x00400000>; 377 + }; 378 + }; 379 + 380 + pci1: pcie@fef09000 { 381 + compatible = "fsl,mpc8641-pcie"; 382 + device_type = "pci"; 383 + #interrupt-cells = <1>; 384 + #size-cells = <2>; 385 + #address-cells = <3>; 386 + reg = <0xfef09000 0x1000>; 387 + bus-range = <0x0 0xff>; 388 + ranges = <0x02000000 0x0 0xc0000000 0xc0000000 0x0 0x20000000 389 + 0x01000000 0x0 0x00000000 0xfe400000 0x0 0x00400000>; 390 + clock-frequency = <33333333>; 391 + interrupt-parent = <&mpic>; 392 + interrupts = <0x19 0x2>; 393 + interrupt-map-mask = <0xf800 0x0 0x0 0x7>; 394 + interrupt-map = < 395 + 0x0000 0x0 0x0 0x1 &mpic 0x4 0x2 396 + 0x0000 0x0 0x0 0x2 &mpic 0x5 0x2 397 + 0x0000 0x0 0x0 0x3 &mpic 0x6 0x2 398 + 0x0000 0x0 0x0 0x4 &mpic 0x7 0x2 399 + >; 400 + 401 + pcie@0 { 402 + reg = <0 0 0 0 0>; 403 + #size-cells = <2>; 404 + #address-cells = <3>; 405 + device_type = "pci"; 406 + ranges = <0x02000000 0x0 0xc0000000 407 + 0x02000000 0x0 0xc0000000 408 + 0x0 0x20000000 371 409 372 410 0x01000000 0x0 0x00000000 373 411 0x01000000 0x0 0x00000000
+294
arch/powerpc/boot/dts/hotfoot.dts
··· 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 + };
+41 -3
arch/powerpc/boot/dts/kilauea.dts
··· 1 1 /* 2 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 6 * This file is licensed under the terms of the GNU General Public 7 7 * License version 2. This program is licensed "as is" without ··· 150 150 #size-cells = <1>; 151 151 partition@0 { 152 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 159 partition@200000 { 156 160 label = "root"; ··· 171 167 partition@3fa0000 { 172 168 label = "u-boot"; 173 169 reg = <0x03fa0000 0x00060000>; 170 + }; 171 + }; 172 + 173 + ndfc@1,0 { 174 + compatible = "ibm,ndfc"; 175 + reg = <0x00000001 0x00000000 0x00002000>; 176 + ccr = <0x00001000>; 177 + bank-settings = <0x80002222>; 178 + #address-cells = <1>; 179 + #size-cells = <1>; 180 + 181 + nand { 182 + #address-cells = <1>; 183 + #size-cells = <1>; 184 + 185 + partition@0 { 186 + label = "u-boot"; 187 + reg = <0x00000000 0x00100000>; 188 + }; 189 + partition@100000 { 190 + label = "user"; 191 + reg = <0x00000000 0x03f00000>; 192 + }; 174 193 }; 175 194 }; 176 195 }; ··· 225 198 reg = <0xef600400 0x00000014>; 226 199 interrupt-parent = <&UIC0>; 227 200 interrupts = <0x2 0x4>; 201 + #address-cells = <1>; 202 + #size-cells = <0>; 203 + 204 + rtc@68 { 205 + compatible = "dallas,ds1338"; 206 + reg = <0x68>; 207 + }; 208 + 209 + dtt@48 { 210 + compatible = "dallas,ds1775"; 211 + reg = <0x48>; 212 + }; 228 213 }; 229 214 230 215 IIC1: i2c@ef600500 { ··· 245 206 interrupt-parent = <&UIC0>; 246 207 interrupts = <0x7 0x4>; 247 208 }; 248 - 249 209 250 210 RGMII0: emac-rgmii@ef600b00 { 251 211 compatible = "ibm,rgmii-405ex", "ibm,rgmii";
+53
arch/powerpc/boot/dts/mgcoge.dts
··· 162 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 220 PIC: interrupt-controller@10c00 {
+8
arch/powerpc/boot/dts/mpc8272ads.dts
··· 173 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 184 mdio@10d40 { 177 185 device_type = "mdio"; 178 186 compatible = "fsl,mpc8272ads-mdio-bitbang",
+1 -1
arch/powerpc/boot/dts/mpc8377_rdb.dts
··· 174 174 interrupts = <42 0x8>; 175 175 interrupt-parent = <&ipic>; 176 176 /* Filled in by U-Boot */ 177 - clock-frequency = <0>; 177 + clock-frequency = <111111111>; 178 178 }; 179 179 }; 180 180
+464
arch/powerpc/boot/dts/mpc8377_wlan.dts
··· 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 + };
+1 -1
arch/powerpc/boot/dts/mpc8378_rdb.dts
··· 174 174 interrupts = <42 0x8>; 175 175 interrupt-parent = <&ipic>; 176 176 /* Filled in by U-Boot */ 177 - clock-frequency = <0>; 177 + clock-frequency = <111111111>; 178 178 }; 179 179 }; 180 180
+1 -1
arch/powerpc/boot/dts/mpc8379_rdb.dts
··· 172 172 interrupts = <42 0x8>; 173 173 interrupt-parent = <&ipic>; 174 174 /* Filled in by U-Boot */ 175 - clock-frequency = <0>; 175 + clock-frequency = <111111111>; 176 176 }; 177 177 }; 178 178
+24 -16
arch/powerpc/boot/dts/mpc8536ds.dts
··· 14 14 / { 15 15 model = "fsl,mpc8536ds"; 16 16 compatible = "fsl,mpc8536ds"; 17 - #address-cells = <1>; 18 - #size-cells = <1>; 17 + #address-cells = <2>; 18 + #size-cells = <2>; 19 19 20 20 aliases { 21 21 ethernet0 = &enet0; ··· 42 42 43 43 memory { 44 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 48 soc@ffe00000 { ··· 50 50 #size-cells = <1>; 51 51 device_type = "soc"; 52 52 compatible = "simple-bus"; 53 - ranges = <0x0 0xffe00000 0x100000>; 53 + ranges = <0x0 0 0xffe00000 0x100000>; 54 54 bus-frequency = <0>; // Filled out by uboot. 55 55 56 56 ecm-law@0 { ··· 250 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 261 serial0: serial@4500 { 254 262 cell-index = <0>; 255 263 device_type = "serial"; ··· 355 347 interrupt-parent = <&mpic>; 356 348 interrupts = <24 0x2>; 357 349 bus-range = <0 0xff>; 358 - ranges = <0x02000000 0 0x80000000 0x80000000 0 0x10000000 359 - 0x01000000 0 0x00000000 0xffc00000 0 0x00010000>; 350 + ranges = <0x02000000 0 0x80000000 0 0x80000000 0 0x10000000 351 + 0x01000000 0 0x00000000 0 0xffc00000 0 0x00010000>; 360 352 clock-frequency = <66666666>; 361 353 #interrupt-cells = <1>; 362 354 #size-cells = <2>; 363 355 #address-cells = <3>; 364 - reg = <0xffe08000 0x1000>; 356 + reg = <0 0xffe08000 0 0x1000>; 365 357 }; 366 358 367 359 pci1: pcie@ffe09000 { ··· 370 362 #interrupt-cells = <1>; 371 363 #size-cells = <2>; 372 364 #address-cells = <3>; 373 - reg = <0xffe09000 0x1000>; 365 + reg = <0 0xffe09000 0 0x1000>; 374 366 bus-range = <0 0xff>; 375 - ranges = <0x02000000 0 0x98000000 0x98000000 0 0x08000000 376 - 0x01000000 0 0x00000000 0xffc20000 0 0x00010000>; 367 + ranges = <0x02000000 0 0x98000000 0 0x98000000 0 0x08000000 368 + 0x01000000 0 0x00000000 0 0xffc20000 0 0x00010000>; 377 369 clock-frequency = <33333333>; 378 370 interrupt-parent = <&mpic>; 379 371 interrupts = <25 0x2>; ··· 406 398 #interrupt-cells = <1>; 407 399 #size-cells = <2>; 408 400 #address-cells = <3>; 409 - reg = <0xffe0a000 0x1000>; 401 + reg = <0 0xffe0a000 0 0x1000>; 410 402 bus-range = <0 0xff>; 411 - ranges = <0x02000000 0 0x90000000 0x90000000 0 0x08000000 412 - 0x01000000 0 0x00000000 0xffc10000 0 0x00010000>; 403 + ranges = <0x02000000 0 0x90000000 0 0x90000000 0 0x08000000 404 + 0x01000000 0 0x00000000 0 0xffc10000 0 0x00010000>; 413 405 clock-frequency = <33333333>; 414 406 interrupt-parent = <&mpic>; 415 407 interrupts = <26 0x2>; ··· 442 434 #interrupt-cells = <1>; 443 435 #size-cells = <2>; 444 436 #address-cells = <3>; 445 - reg = <0xffe0b000 0x1000>; 437 + reg = <0 0xffe0b000 0 0x1000>; 446 438 bus-range = <0 0xff>; 447 - ranges = <0x02000000 0 0xa0000000 0xa0000000 0 0x20000000 448 - 0x01000000 0 0x00000000 0xffc30000 0 0x00010000>; 439 + ranges = <0x02000000 0 0xa0000000 0 0xa0000000 0 0x20000000 440 + 0x01000000 0 0x00000000 0 0xffc30000 0 0x00010000>; 449 441 clock-frequency = <33333333>; 450 442 interrupt-parent = <&mpic>; 451 443 interrupts = <27 0x2>;
+475
arch/powerpc/boot/dts/mpc8536ds_36b.dts
··· 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 + };
+20
arch/powerpc/boot/dts/mpc8548cds.dts
··· 100 100 interrupts = <43 2>; 101 101 interrupt-parent = <&mpic>; 102 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 120 i2c@3100 { ··· 126 111 interrupts = <43 2>; 127 112 interrupt-parent = <&mpic>; 128 113 dfsrr; 114 + 115 + eeprom@50 { 116 + compatible = "atmel,24c64"; 117 + reg = <0x50>; 118 + }; 129 119 }; 130 120 131 121 dma@21300 {
+45
arch/powerpc/boot/dts/mpc8569mds.dts
··· 99 99 }; 100 100 101 101 bcsr@1,0 { 102 + #address-cells = <1>; 103 + #size-cells = <1>; 102 104 compatible = "fsl,mpc8569mds-bcsr"; 103 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 116 nand@3,0 { ··· 325 315 gpio-controller; 326 316 }; 327 317 318 + qe_pio_f: gpio-controller@a0 { 319 + #gpio-cells = <2>; 320 + compatible = "fsl,mpc8569-qe-pario-bank", 321 + "fsl,mpc8323-qe-pario-bank"; 322 + reg = <0xa0 0x18>; 323 + gpio-controller; 324 + }; 325 + 328 326 pio1: ucc_pin@01 { 329 327 pio-map = < 330 328 /* port pin dir open_drain assignment has_irq */ ··· 437 419 interrupt-parent = <&mpic>; 438 420 }; 439 421 422 + timer@440 { 423 + compatible = "fsl,mpc8569-qe-gtm", 424 + "fsl,qe-gtm", "fsl,gtm"; 425 + reg = <0x440 0x40>; 426 + interrupts = <12 13 14 15>; 427 + interrupt-parent = <&qeic>; 428 + /* Filled in by U-Boot */ 429 + clock-frequency = <0>; 430 + }; 431 + 440 432 spi@4c0 { 441 433 #address-cells = <1>; 442 434 #size-cells = <0>; ··· 472 444 interrupts = <1>; 473 445 interrupt-parent = <&qeic>; 474 446 mode = "cpu"; 447 + }; 448 + 449 + usb@6c0 { 450 + compatible = "fsl,mpc8569-qe-usb", 451 + "fsl,mpc8323-qe-usb"; 452 + reg = <0x6c0 0x40 0x8b00 0x100>; 453 + interrupts = <11>; 454 + interrupt-parent = <&qeic>; 455 + fsl,fullspeed-clock = "clk5"; 456 + fsl,lowspeed-clock = "brg10"; 457 + gpios = <&qe_pio_f 3 0 /* USBOE */ 458 + &qe_pio_f 4 0 /* USBTP */ 459 + &qe_pio_f 5 0 /* USBTN */ 460 + &qe_pio_f 6 0 /* USBRP */ 461 + &qe_pio_f 8 0 /* USBRN */ 462 + &bcsr17 6 0 /* SPEED */ 463 + &bcsr17 5 1>; /* POWER */ 475 464 }; 476 465 477 466 enet0: ucc@2000 {
+586
arch/powerpc/boot/dts/p2020rdb.dts
··· 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 + };
+44 -16
arch/powerpc/boot/dts/sbc8349.dts
··· 146 146 phy_type = "ulpi"; 147 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 150 enet0: ethernet@24000 { 163 151 #address-cells = <1>; ··· 265 277 }; 266 278 }; 267 279 280 + localbus@e0005000 { 281 + #address-cells = <2>; 282 + #size-cells = <1>; 283 + compatible = "fsl,mpc8349-localbus", "simple-bus"; 284 + reg = <0xe0005000 0x1000>; 285 + interrupts = <77 0x8>; 286 + interrupt-parent = <&ipic>; 287 + ranges = <0x0 0x0 0xff800000 0x00800000 /* 8MB Flash */ 288 + 0x1 0x0 0xf8000000 0x00002000 /* 8KB EEPROM */ 289 + 0x2 0x0 0x10000000 0x04000000 /* 64MB SDRAM */ 290 + 0x3 0x0 0x10000000 0x04000000>; /* 64MB SDRAM */ 291 + 292 + flash@0,0 { 293 + #address-cells = <1>; 294 + #size-cells = <1>; 295 + compatible = "intel,28F640J3A", "cfi-flash"; 296 + reg = <0x0 0x0 0x800000>; 297 + bank-width = <2>; 298 + device-width = <1>; 299 + 300 + partition@0 { 301 + label = "u-boot"; 302 + reg = <0x00000000 0x00040000>; 303 + read-only; 304 + }; 305 + 306 + partition@40000 { 307 + label = "user"; 308 + reg = <0x00040000 0x006c0000>; 309 + }; 310 + 311 + partition@700000 { 312 + label = "legacy u-boot"; 313 + reg = <0x00700000 0x00100000>; 314 + read-only; 315 + }; 316 + 317 + }; 318 + }; 319 + 268 320 pci0: pci@e0008500 { 269 321 interrupt-map-mask = <0xf800 0x0 0x0 0x7>; 270 322 interrupt-map = < 271 323 272 324 /* IDSEL 0x11 */ 273 - 0x8800 0x0 0x0 0x1 &ipic 20 0x8 274 - 0x8800 0x0 0x0 0x2 &ipic 21 0x8 275 - 0x8800 0x0 0x0 0x3 &ipic 22 0x8 276 - 0x8800 0x0 0x0 0x4 &ipic 23 0x8>; 325 + 0x8800 0x0 0x0 0x1 &ipic 48 0x8 326 + 0x8800 0x0 0x0 0x2 &ipic 17 0x8 327 + 0x8800 0x0 0x0 0x3 &ipic 18 0x8 328 + 0x8800 0x0 0x0 0x4 &ipic 19 0x8>; 277 329 278 330 interrupt-parent = <&ipic>; 279 331 interrupts = <0x42 0x8>;
-1
arch/powerpc/boot/dts/sbc8560.dts
··· 303 303 global-utilities@e0000 { 304 304 compatible = "fsl,mpc8560-guts"; 305 305 reg = <0xe0000 0x1000>; 306 - fsl,has-rstcr; 307 306 }; 308 307 }; 309 308
+5 -5
arch/powerpc/boot/mktree.c
··· 36 36 } boot_block_t; 37 37 38 38 #define IMGBLK 512 39 - char tmpbuf[IMGBLK]; 39 + unsigned int tmpbuf[IMGBLK / sizeof(unsigned int)]; 40 40 41 41 int main(int argc, char *argv[]) 42 42 { ··· 95 95 96 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 99 fprintf(stderr, "%s is too small to be an ELF image\n", 100 100 argv[1]); 101 101 exit(4); 102 102 } 103 103 104 - if ((*(unsigned int *)tmpbuf) != htonl(0x7f454c46)) { 104 + if (tmpbuf[0] != htonl(0x7f454c46)) { 105 105 fprintf(stderr, "%s is not an ELF image\n", argv[1]); 106 106 exit(4); 107 107 } ··· 121 121 } 122 122 123 123 while (nblks-- > 0) { 124 - if (read(in_fd, tmpbuf, IMGBLK) < 0) { 124 + if (read(in_fd, tmpbuf, sizeof(tmpbuf)) < 0) { 125 125 perror("zImage read"); 126 126 exit(5); 127 127 } 128 - cp = (unsigned int *)tmpbuf; 128 + cp = tmpbuf; 129 129 for (i = 0; i < sizeof(tmpbuf) / sizeof(unsigned int); i++) 130 130 cksum += *cp++; 131 131 if (write(out_fd, tmpbuf, sizeof(tmpbuf)) != sizeof(tmpbuf)) {
+133
arch/powerpc/boot/ppcboot-hotfoot.h
··· 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__ */
+2 -1
arch/powerpc/boot/wrapper
··· 46 46 # directory for object and other files used by this script 47 47 object=arch/powerpc/boot 48 48 objbin=$object 49 + dtc=scripts/dtc/dtc 49 50 50 51 # directory for working files 51 52 tmpdir=. ··· 125 124 if [ -z "$dtb" ]; then 126 125 dtb="$platform.dtb" 127 126 fi 128 - $object/dtc -O dtb -o "$dtb" -b 0 "$dts" 127 + $dtc -O dtb -o "$dtb" -b 0 "$dts" 129 128 fi 130 129 131 130 if [ -z "$kernel" ]; then
+256 -42
arch/powerpc/configs/40x/kilauea_defconfig
··· 1 1 # 2 2 # Automatically generated make config: don't edit 3 - # Linux kernel version: 2.6.30-rc7 4 - # Wed Jun 3 10:18:16 2009 3 + # Linux kernel version: 2.6.31-rc4 4 + # Wed Jul 29 13:28:37 2009 5 5 # 6 6 # CONFIG_PPC64 is not set 7 7 8 8 # 9 9 # Processor support 10 10 # 11 - # CONFIG_6xx is not set 11 + # CONFIG_PPC_BOOK3S_32 is not set 12 12 # CONFIG_PPC_85xx is not set 13 13 # CONFIG_PPC_8xx is not set 14 14 CONFIG_40x=y ··· 32 32 CONFIG_IRQ_PER_CPU=y 33 33 CONFIG_STACKTRACE_SUPPORT=y 34 34 CONFIG_HAVE_LATENCYTOP_SUPPORT=y 35 + CONFIG_TRACE_IRQFLAGS_SUPPORT=y 35 36 CONFIG_LOCKDEP_SUPPORT=y 36 37 CONFIG_RWSEM_XCHGADD_ALGORITHM=y 37 38 CONFIG_ARCH_HAS_ILOG2_U32=y 38 39 CONFIG_GENERIC_HWEIGHT=y 39 - CONFIG_GENERIC_CALIBRATE_DELAY=y 40 40 CONFIG_GENERIC_FIND_NEXT_BIT=y 41 41 # CONFIG_ARCH_NO_VIRT_TO_BUS is not set 42 42 CONFIG_PPC=y ··· 57 57 CONFIG_PPC_DCR=y 58 58 CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 59 59 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 60 + CONFIG_CONSTRUCTORS=y 60 61 61 62 # 62 63 # General setup ··· 109 108 CONFIG_KALLSYMS=y 110 109 CONFIG_KALLSYMS_ALL=y 111 110 CONFIG_KALLSYMS_EXTRA_PASS=y 112 - # CONFIG_STRIP_ASM_SYMS is not set 113 111 CONFIG_HOTPLUG=y 114 112 CONFIG_PRINTK=y 115 113 CONFIG_BUG=y ··· 121 121 CONFIG_EVENTFD=y 122 122 CONFIG_SHMEM=y 123 123 CONFIG_AIO=y 124 + CONFIG_HAVE_PERF_COUNTERS=y 125 + 126 + # 127 + # Performance Counters 128 + # 129 + # CONFIG_PERF_COUNTERS is not set 124 130 CONFIG_VM_EVENT_COUNTERS=y 125 131 CONFIG_PCI_QUIRKS=y 126 132 CONFIG_SLUB_DEBUG=y 133 + # CONFIG_STRIP_ASM_SYMS is not set 127 134 CONFIG_COMPAT_BRK=y 128 135 # CONFIG_SLAB is not set 129 136 CONFIG_SLUB=y ··· 144 137 CONFIG_HAVE_KPROBES=y 145 138 CONFIG_HAVE_KRETPROBES=y 146 139 CONFIG_HAVE_ARCH_TRACEHOOK=y 140 + 141 + # 142 + # GCOV-based kernel profiling 143 + # 144 + # CONFIG_GCOV_KERNEL is not set 147 145 # CONFIG_SLOW_WORK is not set 148 146 # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 149 147 CONFIG_SLABINFO=y ··· 161 149 # CONFIG_MODVERSIONS is not set 162 150 # CONFIG_MODULE_SRCVERSION_ALL is not set 163 151 CONFIG_BLOCK=y 164 - CONFIG_LBD=y 152 + CONFIG_LBDAF=y 165 153 # CONFIG_BLK_DEV_BSG is not set 166 154 # CONFIG_BLK_DEV_INTEGRITY is not set 167 155 ··· 232 220 # CONFIG_BINFMT_MISC is not set 233 221 # CONFIG_MATH_EMULATION is not set 234 222 # CONFIG_IOMMU_HELPER is not set 223 + # CONFIG_SWIOTLB is not set 235 224 CONFIG_PPC_NEED_DMA_SYNC_OPS=y 236 225 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 237 226 CONFIG_ARCH_HAS_WALK_MEMORY=y ··· 252 239 CONFIG_ZONE_DMA_FLAG=1 253 240 CONFIG_BOUNCE=y 254 241 CONFIG_VIRT_TO_BUS=y 255 - CONFIG_UNEVICTABLE_LRU=y 256 242 CONFIG_HAVE_MLOCK=y 257 243 CONFIG_HAVE_MLOCKED_PAGE_BIT=y 244 + CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 258 245 CONFIG_PPC_4K_PAGES=y 259 246 # CONFIG_PPC_16K_PAGES is not set 260 247 # CONFIG_PPC_64K_PAGES is not set ··· 357 344 # CONFIG_ECONET is not set 358 345 # CONFIG_WAN_ROUTER is not set 359 346 # CONFIG_PHONET is not set 347 + # CONFIG_IEEE802154 is not set 360 348 # CONFIG_NET_SCHED is not set 361 349 # CONFIG_DCB is not set 362 350 ··· 407 393 # User Modules And Translation Layers 408 394 # 409 395 CONFIG_MTD_CHAR=y 410 - CONFIG_MTD_BLKDEVS=m 411 - CONFIG_MTD_BLOCK=m 412 - # CONFIG_MTD_BLOCK_RO is not set 396 + CONFIG_MTD_BLKDEVS=y 397 + CONFIG_MTD_BLOCK=y 413 398 # CONFIG_FTL is not set 414 399 # CONFIG_NFTL is not set 415 400 # CONFIG_INFTL is not set ··· 465 452 # CONFIG_MTD_DOC2000 is not set 466 453 # CONFIG_MTD_DOC2001 is not set 467 454 # CONFIG_MTD_DOC2001PLUS is not set 468 - # CONFIG_MTD_NAND is not set 455 + CONFIG_MTD_NAND=y 456 + # CONFIG_MTD_NAND_VERIFY_WRITE is not set 457 + CONFIG_MTD_NAND_ECC_SMC=y 458 + # CONFIG_MTD_NAND_MUSEUM_IDS is not set 459 + CONFIG_MTD_NAND_IDS=y 460 + CONFIG_MTD_NAND_NDFC=y 461 + # CONFIG_MTD_NAND_DISKONCHIP is not set 462 + # CONFIG_MTD_NAND_CAFE is not set 463 + # CONFIG_MTD_NAND_NANDSIM is not set 464 + # CONFIG_MTD_NAND_PLATFORM is not set 465 + # CONFIG_MTD_NAND_FSL_ELBC is not set 469 466 # CONFIG_MTD_ONENAND is not set 470 467 471 468 # ··· 488 465 # 489 466 # CONFIG_MTD_UBI is not set 490 467 CONFIG_OF_DEVICE=y 468 + CONFIG_OF_I2C=y 491 469 # CONFIG_PARPORT is not set 492 470 CONFIG_BLK_DEV=y 493 471 # CONFIG_BLK_DEV_FD is not set ··· 528 504 # 529 505 530 506 # 531 - # Enable only one of the two stacks, unless you know what you are doing 507 + # You can enable one or both FireWire driver stacks. 508 + # 509 + 510 + # 511 + # See the help texts for more information. 532 512 # 533 513 # CONFIG_FIREWIRE is not set 534 514 # CONFIG_IEEE1394 is not set 535 515 # CONFIG_I2O is not set 536 516 # CONFIG_MACINTOSH_DRIVERS is not set 537 517 CONFIG_NETDEVICES=y 538 - CONFIG_COMPAT_NET_DEV_OPS=y 539 518 # CONFIG_DUMMY is not set 540 519 # CONFIG_BONDING is not set 541 520 # CONFIG_MACVLAN is not set ··· 573 546 # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 574 547 # CONFIG_NET_PCI is not set 575 548 # CONFIG_B44 is not set 549 + # CONFIG_KS8842 is not set 576 550 # CONFIG_ATL2 is not set 577 551 # CONFIG_NETDEV_1000 is not set 578 552 # CONFIG_NETDEV_10000 is not set ··· 649 621 # CONFIG_IPMI_HANDLER is not set 650 622 # CONFIG_HW_RANDOM is not set 651 623 # CONFIG_NVRAM is not set 652 - # CONFIG_GEN_RTC is not set 653 624 # CONFIG_R3964 is not set 654 625 # CONFIG_APPLICOM is not set 655 626 # CONFIG_RAW_DRIVER is not set 656 627 # CONFIG_TCG_TPM is not set 657 628 CONFIG_DEVPORT=y 658 - # CONFIG_I2C is not set 629 + CONFIG_I2C=y 630 + CONFIG_I2C_BOARDINFO=y 631 + CONFIG_I2C_CHARDEV=y 632 + CONFIG_I2C_HELPER_AUTO=y 633 + 634 + # 635 + # I2C Hardware Bus support 636 + # 637 + 638 + # 639 + # PC SMBus host controller drivers 640 + # 641 + # CONFIG_I2C_ALI1535 is not set 642 + # CONFIG_I2C_ALI1563 is not set 643 + # CONFIG_I2C_ALI15X3 is not set 644 + # CONFIG_I2C_AMD756 is not set 645 + # CONFIG_I2C_AMD8111 is not set 646 + # CONFIG_I2C_I801 is not set 647 + # CONFIG_I2C_ISCH is not set 648 + # CONFIG_I2C_PIIX4 is not set 649 + # CONFIG_I2C_NFORCE2 is not set 650 + # CONFIG_I2C_SIS5595 is not set 651 + # CONFIG_I2C_SIS630 is not set 652 + # CONFIG_I2C_SIS96X is not set 653 + # CONFIG_I2C_VIA is not set 654 + # CONFIG_I2C_VIAPRO is not set 655 + 656 + # 657 + # I2C system bus drivers (mostly embedded / system-on-chip) 658 + # 659 + CONFIG_I2C_IBM_IIC=y 660 + # CONFIG_I2C_MPC is not set 661 + # CONFIG_I2C_OCORES is not set 662 + # CONFIG_I2C_SIMTEC is not set 663 + 664 + # 665 + # External I2C/SMBus adapter drivers 666 + # 667 + # CONFIG_I2C_PARPORT_LIGHT is not set 668 + # CONFIG_I2C_TAOS_EVM is not set 669 + 670 + # 671 + # Graphics adapter I2C/DDC channel drivers 672 + # 673 + # CONFIG_I2C_VOODOO3 is not set 674 + 675 + # 676 + # Other I2C/SMBus bus drivers 677 + # 678 + # CONFIG_I2C_PCA_PLATFORM is not set 679 + # CONFIG_I2C_STUB is not set 680 + 681 + # 682 + # Miscellaneous I2C Chip support 683 + # 684 + # CONFIG_DS1682 is not set 685 + # CONFIG_SENSORS_PCF8574 is not set 686 + # CONFIG_PCF8575 is not set 687 + # CONFIG_SENSORS_PCA9539 is not set 688 + # CONFIG_SENSORS_TSL2550 is not set 689 + # CONFIG_I2C_DEBUG_CORE is not set 690 + # CONFIG_I2C_DEBUG_ALGO is not set 691 + # CONFIG_I2C_DEBUG_BUS is not set 692 + # CONFIG_I2C_DEBUG_CHIP is not set 659 693 # CONFIG_SPI is not set 694 + 695 + # 696 + # PPS support 697 + # 698 + # CONFIG_PPS is not set 660 699 CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 661 700 # CONFIG_GPIOLIB is not set 662 701 # CONFIG_W1 is not set 663 702 # CONFIG_POWER_SUPPLY is not set 664 - # CONFIG_HWMON is not set 703 + CONFIG_HWMON=y 704 + # CONFIG_HWMON_VID is not set 705 + # CONFIG_SENSORS_AD7414 is not set 706 + # CONFIG_SENSORS_AD7418 is not set 707 + # CONFIG_SENSORS_ADM1021 is not set 708 + # CONFIG_SENSORS_ADM1025 is not set 709 + # CONFIG_SENSORS_ADM1026 is not set 710 + # CONFIG_SENSORS_ADM1029 is not set 711 + # CONFIG_SENSORS_ADM1031 is not set 712 + # CONFIG_SENSORS_ADM9240 is not set 713 + # CONFIG_SENSORS_ADT7462 is not set 714 + # CONFIG_SENSORS_ADT7470 is not set 715 + # CONFIG_SENSORS_ADT7473 is not set 716 + # CONFIG_SENSORS_ADT7475 is not set 717 + # CONFIG_SENSORS_ATXP1 is not set 718 + # CONFIG_SENSORS_DS1621 is not set 719 + # CONFIG_SENSORS_I5K_AMB is not set 720 + # CONFIG_SENSORS_F71805F is not set 721 + # CONFIG_SENSORS_F71882FG is not set 722 + # CONFIG_SENSORS_F75375S is not set 723 + # CONFIG_SENSORS_G760A is not set 724 + # CONFIG_SENSORS_GL518SM is not set 725 + # CONFIG_SENSORS_GL520SM is not set 726 + # CONFIG_SENSORS_IT87 is not set 727 + # CONFIG_SENSORS_LM63 is not set 728 + CONFIG_SENSORS_LM75=y 729 + # CONFIG_SENSORS_LM77 is not set 730 + # CONFIG_SENSORS_LM78 is not set 731 + # CONFIG_SENSORS_LM80 is not set 732 + # CONFIG_SENSORS_LM83 is not set 733 + # CONFIG_SENSORS_LM85 is not set 734 + # CONFIG_SENSORS_LM87 is not set 735 + # CONFIG_SENSORS_LM90 is not set 736 + # CONFIG_SENSORS_LM92 is not set 737 + # CONFIG_SENSORS_LM93 is not set 738 + # CONFIG_SENSORS_LTC4215 is not set 739 + # CONFIG_SENSORS_LTC4245 is not set 740 + # CONFIG_SENSORS_LM95241 is not set 741 + # CONFIG_SENSORS_MAX1619 is not set 742 + # CONFIG_SENSORS_MAX6650 is not set 743 + # CONFIG_SENSORS_PC87360 is not set 744 + # CONFIG_SENSORS_PC87427 is not set 745 + # CONFIG_SENSORS_PCF8591 is not set 746 + # CONFIG_SENSORS_SIS5595 is not set 747 + # CONFIG_SENSORS_DME1737 is not set 748 + # CONFIG_SENSORS_SMSC47M1 is not set 749 + # CONFIG_SENSORS_SMSC47M192 is not set 750 + # CONFIG_SENSORS_SMSC47B397 is not set 751 + # CONFIG_SENSORS_ADS7828 is not set 752 + # CONFIG_SENSORS_THMC50 is not set 753 + # CONFIG_SENSORS_TMP401 is not set 754 + # CONFIG_SENSORS_VIA686A is not set 755 + # CONFIG_SENSORS_VT1211 is not set 756 + # CONFIG_SENSORS_VT8231 is not set 757 + # CONFIG_SENSORS_W83781D is not set 758 + # CONFIG_SENSORS_W83791D is not set 759 + # CONFIG_SENSORS_W83792D is not set 760 + # CONFIG_SENSORS_W83793 is not set 761 + # CONFIG_SENSORS_W83L785TS is not set 762 + # CONFIG_SENSORS_W83L786NG is not set 763 + # CONFIG_SENSORS_W83627HF is not set 764 + # CONFIG_SENSORS_W83627EHF is not set 765 + # CONFIG_HWMON_DEBUG_CHIP is not set 665 766 CONFIG_THERMAL=y 767 + # CONFIG_THERMAL_HWMON is not set 666 768 # CONFIG_WATCHDOG is not set 667 769 CONFIG_SSB_POSSIBLE=y 668 770 ··· 807 649 # CONFIG_MFD_CORE is not set 808 650 # CONFIG_MFD_SM501 is not set 809 651 # CONFIG_HTC_PASIC3 is not set 652 + # CONFIG_TWL4030_CORE is not set 810 653 # CONFIG_MFD_TMIO is not set 654 + # CONFIG_PMIC_DA903X is not set 655 + # CONFIG_MFD_WM8400 is not set 656 + # CONFIG_MFD_WM8350_I2C is not set 657 + # CONFIG_MFD_PCF50633 is not set 658 + # CONFIG_AB3100_CORE is not set 811 659 # CONFIG_REGULATOR is not set 812 - 813 - # 814 - # Multimedia devices 815 - # 816 - 817 - # 818 - # Multimedia core support 819 - # 820 - # CONFIG_VIDEO_DEV is not set 821 - # CONFIG_DVB_CORE is not set 822 - # CONFIG_VIDEO_MEDIA is not set 823 - 824 - # 825 - # Multimedia drivers 826 - # 827 - # CONFIG_DAB is not set 660 + # CONFIG_MEDIA_SUPPORT is not set 828 661 829 662 # 830 663 # Graphics support ··· 840 691 # CONFIG_ACCESSIBILITY is not set 841 692 # CONFIG_INFINIBAND is not set 842 693 # CONFIG_EDAC is not set 843 - # CONFIG_RTC_CLASS is not set 694 + CONFIG_RTC_LIB=y 695 + CONFIG_RTC_CLASS=y 696 + CONFIG_RTC_HCTOSYS=y 697 + CONFIG_RTC_HCTOSYS_DEVICE="rtc0" 698 + # CONFIG_RTC_DEBUG is not set 699 + 700 + # 701 + # RTC interfaces 702 + # 703 + CONFIG_RTC_INTF_SYSFS=y 704 + CONFIG_RTC_INTF_PROC=y 705 + CONFIG_RTC_INTF_DEV=y 706 + # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set 707 + # CONFIG_RTC_DRV_TEST is not set 708 + 709 + # 710 + # I2C RTC drivers 711 + # 712 + CONFIG_RTC_DRV_DS1307=y 713 + # CONFIG_RTC_DRV_DS1374 is not set 714 + # CONFIG_RTC_DRV_DS1672 is not set 715 + # CONFIG_RTC_DRV_MAX6900 is not set 716 + # CONFIG_RTC_DRV_RS5C372 is not set 717 + # CONFIG_RTC_DRV_ISL1208 is not set 718 + # CONFIG_RTC_DRV_X1205 is not set 719 + # CONFIG_RTC_DRV_PCF8563 is not set 720 + # CONFIG_RTC_DRV_PCF8583 is not set 721 + # CONFIG_RTC_DRV_M41T80 is not set 722 + # CONFIG_RTC_DRV_S35390A is not set 723 + # CONFIG_RTC_DRV_FM3130 is not set 724 + # CONFIG_RTC_DRV_RX8581 is not set 725 + # CONFIG_RTC_DRV_RX8025 is not set 726 + 727 + # 728 + # SPI RTC drivers 729 + # 730 + 731 + # 732 + # Platform RTC drivers 733 + # 734 + # CONFIG_RTC_DRV_CMOS is not set 735 + # CONFIG_RTC_DRV_DS1286 is not set 736 + # CONFIG_RTC_DRV_DS1511 is not set 737 + # CONFIG_RTC_DRV_DS1553 is not set 738 + # CONFIG_RTC_DRV_DS1742 is not set 739 + # CONFIG_RTC_DRV_STK17TA8 is not set 740 + # CONFIG_RTC_DRV_M48T86 is not set 741 + # CONFIG_RTC_DRV_M48T35 is not set 742 + # CONFIG_RTC_DRV_M48T59 is not set 743 + # CONFIG_RTC_DRV_BQ4802 is not set 744 + # CONFIG_RTC_DRV_V3020 is not set 745 + 746 + # 747 + # on-CPU RTC drivers 748 + # 749 + # CONFIG_RTC_DRV_GENERIC is not set 844 750 # CONFIG_DMADEVICES is not set 845 751 # CONFIG_AUXDISPLAY is not set 846 752 # CONFIG_UIO is not set 753 + 754 + # 755 + # TI VLYNQ 756 + # 847 757 # CONFIG_STAGING is not set 848 758 849 759 # ··· 916 708 # CONFIG_REISERFS_FS is not set 917 709 # CONFIG_JFS_FS is not set 918 710 # CONFIG_FS_POSIX_ACL is not set 919 - CONFIG_FILE_LOCKING=y 920 711 # CONFIG_XFS_FS is not set 921 712 # CONFIG_GFS2_FS is not set 922 713 # CONFIG_OCFS2_FS is not set 923 714 # CONFIG_BTRFS_FS is not set 715 + CONFIG_FILE_LOCKING=y 716 + CONFIG_FSNOTIFY=y 924 717 CONFIG_DNOTIFY=y 925 718 CONFIG_INOTIFY=y 926 719 CONFIG_INOTIFY_USER=y ··· 1027 818 CONFIG_HAS_DMA=y 1028 819 CONFIG_HAVE_LMB=y 1029 820 CONFIG_NLATTR=y 821 + CONFIG_GENERIC_ATOMIC64=y 1030 822 1031 823 # 1032 824 # Kernel hacking ··· 1058 848 # CONFIG_RT_MUTEX_TESTER is not set 1059 849 # CONFIG_DEBUG_SPINLOCK is not set 1060 850 # CONFIG_DEBUG_MUTEXES is not set 851 + # CONFIG_DEBUG_LOCK_ALLOC is not set 852 + # CONFIG_PROVE_LOCKING is not set 853 + # CONFIG_LOCK_STAT is not set 1061 854 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1062 855 # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1063 856 # CONFIG_DEBUG_KOBJECT is not set ··· 1072 859 # CONFIG_DEBUG_LIST is not set 1073 860 # CONFIG_DEBUG_SG is not set 1074 861 # CONFIG_DEBUG_NOTIFIERS is not set 1075 - # CONFIG_BOOT_PRINTK_DELAY is not set 1076 862 # CONFIG_RCU_TORTURE_TEST is not set 1077 863 # CONFIG_RCU_CPU_STALL_DETECTOR is not set 1078 864 # CONFIG_BACKTRACE_SELF_TEST is not set ··· 1085 873 CONFIG_HAVE_DYNAMIC_FTRACE=y 1086 874 CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1087 875 CONFIG_TRACING_SUPPORT=y 1088 - 1089 - # 1090 - # Tracers 1091 - # 876 + CONFIG_FTRACE=y 1092 877 # CONFIG_FUNCTION_TRACER is not set 878 + # CONFIG_IRQSOFF_TRACER is not set 1093 879 # CONFIG_SCHED_TRACER is not set 1094 - # CONFIG_CONTEXT_SWITCH_TRACER is not set 1095 - # CONFIG_EVENT_TRACER is not set 880 + # CONFIG_ENABLE_DEFAULT_TRACERS is not set 1096 881 # CONFIG_BOOT_TRACER is not set 1097 - # CONFIG_TRACE_BRANCH_PROFILING is not set 882 + CONFIG_BRANCH_PROFILE_NONE=y 883 + # CONFIG_PROFILE_ANNOTATED_BRANCHES is not set 884 + # CONFIG_PROFILE_ALL_BRANCHES is not set 1098 885 # CONFIG_STACK_TRACER is not set 1099 886 # CONFIG_KMEMTRACE is not set 1100 887 # CONFIG_WORKQUEUE_TRACER is not set ··· 1102 891 # CONFIG_SAMPLES is not set 1103 892 CONFIG_HAVE_ARCH_KGDB=y 1104 893 # CONFIG_KGDB is not set 894 + # CONFIG_KMEMCHECK is not set 895 + # CONFIG_PPC_DISABLE_WERROR is not set 896 + CONFIG_PPC_WERROR=y 1105 897 CONFIG_PRINT_STACK_DEPTH=64 1106 898 # CONFIG_DEBUG_STACKOVERFLOW is not set 1107 899 # CONFIG_DEBUG_STACK_USAGE is not set
+332 -50
arch/powerpc/configs/44x/arches_defconfig
··· 1 1 # 2 2 # Automatically generated make config: don't edit 3 - # Linux kernel version: 2.6.29-rc2 4 - # Tue Jan 20 08:22:31 2009 3 + # Linux kernel version: 2.6.31-rc5 4 + # Thu Aug 13 14:14:07 2009 5 5 # 6 6 # CONFIG_PPC64 is not set 7 7 8 8 # 9 9 # Processor support 10 10 # 11 - # CONFIG_6xx is not set 11 + # CONFIG_PPC_BOOK3S_32 is not set 12 12 # CONFIG_PPC_85xx is not set 13 13 # CONFIG_PPC_8xx is not set 14 14 # CONFIG_40x is not set ··· 31 31 CONFIG_GENERIC_TIME_VSYSCALL=y 32 32 CONFIG_GENERIC_CLOCKEVENTS=y 33 33 CONFIG_GENERIC_HARDIRQS=y 34 + CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 34 35 # CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 35 36 CONFIG_IRQ_PER_CPU=y 36 37 CONFIG_STACKTRACE_SUPPORT=y 37 38 CONFIG_HAVE_LATENCYTOP_SUPPORT=y 39 + CONFIG_TRACE_IRQFLAGS_SUPPORT=y 38 40 CONFIG_LOCKDEP_SUPPORT=y 39 41 CONFIG_RWSEM_XCHGADD_ALGORITHM=y 40 42 CONFIG_ARCH_HAS_ILOG2_U32=y 41 43 CONFIG_GENERIC_HWEIGHT=y 42 - CONFIG_GENERIC_CALIBRATE_DELAY=y 43 44 CONFIG_GENERIC_FIND_NEXT_BIT=y 44 45 # CONFIG_ARCH_NO_VIRT_TO_BUS is not set 45 46 CONFIG_PPC=y ··· 54 53 # CONFIG_GENERIC_TBSYNC is not set 55 54 CONFIG_AUDIT_ARCH=y 56 55 CONFIG_GENERIC_BUG=y 56 + CONFIG_DTC=y 57 57 # CONFIG_DEFAULT_UIMAGE is not set 58 58 CONFIG_PPC_DCR_NATIVE=y 59 59 # CONFIG_PPC_DCR_MMIO is not set 60 60 CONFIG_PPC_DCR=y 61 + CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 61 62 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 63 + CONFIG_CONSTRUCTORS=y 62 64 63 65 # 64 66 # General setup ··· 75 71 CONFIG_SYSVIPC=y 76 72 CONFIG_SYSVIPC_SYSCTL=y 77 73 CONFIG_POSIX_MQUEUE=y 74 + CONFIG_POSIX_MQUEUE_SYSCTL=y 78 75 # CONFIG_BSD_PROCESS_ACCT is not set 79 76 # CONFIG_TASKSTATS is not set 80 77 # CONFIG_AUDIT is not set 78 + 79 + # 80 + # RCU Subsystem 81 + # 82 + CONFIG_CLASSIC_RCU=y 83 + # CONFIG_TREE_RCU is not set 84 + # CONFIG_PREEMPT_RCU is not set 85 + # CONFIG_TREE_RCU_TRACE is not set 86 + # CONFIG_PREEMPT_RCU_TRACE is not set 81 87 # CONFIG_IKCONFIG is not set 82 88 CONFIG_LOG_BUF_SHIFT=14 83 89 # CONFIG_GROUP_SCHED is not set ··· 98 84 # CONFIG_NAMESPACES is not set 99 85 CONFIG_BLK_DEV_INITRD=y 100 86 CONFIG_INITRAMFS_SOURCE="" 87 + CONFIG_RD_GZIP=y 88 + # CONFIG_RD_BZIP2 is not set 89 + # CONFIG_RD_LZMA is not set 101 90 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 102 91 CONFIG_SYSCTL=y 92 + CONFIG_ANON_INODES=y 103 93 CONFIG_EMBEDDED=y 104 94 CONFIG_SYSCTL_SYSCALL=y 105 95 CONFIG_KALLSYMS=y ··· 113 95 CONFIG_PRINTK=y 114 96 CONFIG_BUG=y 115 97 CONFIG_ELF_CORE=y 116 - CONFIG_COMPAT_BRK=y 117 98 CONFIG_BASE_FULL=y 118 99 CONFIG_FUTEX=y 119 - CONFIG_ANON_INODES=y 120 100 CONFIG_EPOLL=y 121 101 CONFIG_SIGNALFD=y 122 102 CONFIG_TIMERFD=y 123 103 CONFIG_EVENTFD=y 124 104 CONFIG_SHMEM=y 125 105 CONFIG_AIO=y 106 + CONFIG_HAVE_PERF_COUNTERS=y 107 + 108 + # 109 + # Performance Counters 110 + # 111 + # CONFIG_PERF_COUNTERS is not set 126 112 CONFIG_VM_EVENT_COUNTERS=y 127 113 CONFIG_PCI_QUIRKS=y 128 114 CONFIG_SLUB_DEBUG=y 115 + # CONFIG_STRIP_ASM_SYMS is not set 116 + CONFIG_COMPAT_BRK=y 129 117 # CONFIG_SLAB is not set 130 118 CONFIG_SLUB=y 131 119 # CONFIG_SLOB is not set 132 120 # CONFIG_PROFILING is not set 121 + # CONFIG_MARKERS is not set 133 122 CONFIG_HAVE_OPROFILE=y 134 123 # CONFIG_KPROBES is not set 135 124 CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y ··· 144 119 CONFIG_HAVE_KPROBES=y 145 120 CONFIG_HAVE_KRETPROBES=y 146 121 CONFIG_HAVE_ARCH_TRACEHOOK=y 122 + 123 + # 124 + # GCOV-based kernel profiling 125 + # 126 + # CONFIG_GCOV_KERNEL is not set 127 + # CONFIG_SLOW_WORK is not set 147 128 # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 148 129 CONFIG_SLABINFO=y 149 130 CONFIG_RT_MUTEXES=y ··· 161 130 # CONFIG_MODVERSIONS is not set 162 131 # CONFIG_MODULE_SRCVERSION_ALL is not set 163 132 CONFIG_BLOCK=y 164 - CONFIG_LBD=y 165 - # CONFIG_BLK_DEV_IO_TRACE is not set 133 + CONFIG_LBDAF=y 166 134 # CONFIG_BLK_DEV_BSG is not set 167 135 # CONFIG_BLK_DEV_INTEGRITY is not set 168 136 ··· 177 147 # CONFIG_DEFAULT_CFQ is not set 178 148 # CONFIG_DEFAULT_NOOP is not set 179 149 CONFIG_DEFAULT_IOSCHED="anticipatory" 180 - CONFIG_CLASSIC_RCU=y 181 - # CONFIG_TREE_RCU is not set 182 - # CONFIG_PREEMPT_RCU is not set 183 - # CONFIG_TREE_RCU_TRACE is not set 184 - # CONFIG_PREEMPT_RCU_TRACE is not set 185 150 # CONFIG_FREEZER is not set 186 151 CONFIG_PPC4xx_PCI_EXPRESS=y 187 152 ··· 197 172 CONFIG_ARCHES=y 198 173 # CONFIG_CANYONLANDS is not set 199 174 # CONFIG_GLACIER is not set 175 + # CONFIG_REDWOOD is not set 200 176 # CONFIG_YOSEMITE is not set 201 177 # CONFIG_XILINX_VIRTEX440_GENERIC_BOARD is not set 202 178 CONFIG_PPC44x_SIMPLE=y ··· 240 214 # CONFIG_BINFMT_MISC is not set 241 215 # CONFIG_MATH_EMULATION is not set 242 216 # CONFIG_IOMMU_HELPER is not set 217 + # CONFIG_SWIOTLB is not set 243 218 CONFIG_PPC_NEED_DMA_SYNC_OPS=y 244 219 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 245 220 CONFIG_ARCH_HAS_WALK_MEMORY=y ··· 260 233 CONFIG_ZONE_DMA_FLAG=1 261 234 CONFIG_BOUNCE=y 262 235 CONFIG_VIRT_TO_BUS=y 263 - CONFIG_UNEVICTABLE_LRU=y 236 + CONFIG_HAVE_MLOCK=y 237 + CONFIG_HAVE_MLOCKED_PAGE_BIT=y 238 + CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 239 + CONFIG_STDBINUTILS=y 264 240 CONFIG_PPC_4K_PAGES=y 265 241 # CONFIG_PPC_16K_PAGES is not set 266 242 # CONFIG_PPC_64K_PAGES is not set 243 + # CONFIG_PPC_256K_PAGES is not set 267 244 CONFIG_FORCE_MAX_ZONEORDER=11 268 245 CONFIG_PROC_DEVICETREE=y 269 246 CONFIG_CMDLINE_BOOL=y ··· 292 261 # CONFIG_PCI_LEGACY is not set 293 262 # CONFIG_PCI_DEBUG is not set 294 263 # CONFIG_PCI_STUB is not set 264 + # CONFIG_PCI_IOV is not set 295 265 # CONFIG_PCCARD is not set 296 266 # CONFIG_HOTPLUG_PCI is not set 297 267 # CONFIG_HAS_RAPIDIO is not set ··· 310 278 CONFIG_KERNEL_START=0xc0000000 311 279 CONFIG_PHYSICAL_START=0x00000000 312 280 CONFIG_TASK_SIZE=0xc0000000 313 - CONFIG_CONSISTENT_START=0xff100000 314 281 CONFIG_CONSISTENT_SIZE=0x00200000 315 282 CONFIG_NET=y 316 283 317 284 # 318 285 # Networking options 319 286 # 320 - CONFIG_COMPAT_NET_DEV_OPS=y 321 287 CONFIG_PACKET=y 322 288 # CONFIG_PACKET_MMAP is not set 323 289 CONFIG_UNIX=y ··· 365 335 # CONFIG_LAPB is not set 366 336 # CONFIG_ECONET is not set 367 337 # CONFIG_WAN_ROUTER is not set 338 + # CONFIG_PHONET is not set 339 + # CONFIG_IEEE802154 is not set 368 340 # CONFIG_NET_SCHED is not set 369 341 # CONFIG_DCB is not set 370 342 ··· 379 347 # CONFIG_IRDA is not set 380 348 # CONFIG_BT is not set 381 349 # CONFIG_AF_RXRPC is not set 382 - # CONFIG_PHONET is not set 383 350 # CONFIG_WIRELESS is not set 384 351 # CONFIG_WIMAX is not set 385 352 # CONFIG_RFKILL is not set ··· 402 371 # CONFIG_SYS_HYPERVISOR is not set 403 372 CONFIG_CONNECTOR=y 404 373 CONFIG_PROC_EVENTS=y 405 - # CONFIG_MTD is not set 374 + CONFIG_MTD=y 375 + # CONFIG_MTD_DEBUG is not set 376 + # CONFIG_MTD_CONCAT is not set 377 + CONFIG_MTD_PARTITIONS=y 378 + # CONFIG_MTD_TESTS is not set 379 + # CONFIG_MTD_REDBOOT_PARTS is not set 380 + CONFIG_MTD_CMDLINE_PARTS=y 381 + CONFIG_MTD_OF_PARTS=y 382 + # CONFIG_MTD_AR7_PARTS is not set 383 + 384 + # 385 + # User Modules And Translation Layers 386 + # 387 + CONFIG_MTD_CHAR=y 388 + CONFIG_MTD_BLKDEVS=y 389 + CONFIG_MTD_BLOCK=y 390 + # CONFIG_FTL is not set 391 + # CONFIG_NFTL is not set 392 + # CONFIG_INFTL is not set 393 + # CONFIG_RFD_FTL is not set 394 + # CONFIG_SSFDC is not set 395 + # CONFIG_MTD_OOPS is not set 396 + 397 + # 398 + # RAM/ROM/Flash chip drivers 399 + # 400 + CONFIG_MTD_CFI=y 401 + # CONFIG_MTD_JEDECPROBE is not set 402 + CONFIG_MTD_GEN_PROBE=y 403 + # CONFIG_MTD_CFI_ADV_OPTIONS is not set 404 + CONFIG_MTD_MAP_BANK_WIDTH_1=y 405 + CONFIG_MTD_MAP_BANK_WIDTH_2=y 406 + CONFIG_MTD_MAP_BANK_WIDTH_4=y 407 + # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set 408 + # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set 409 + # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set 410 + CONFIG_MTD_CFI_I1=y 411 + CONFIG_MTD_CFI_I2=y 412 + # CONFIG_MTD_CFI_I4 is not set 413 + # CONFIG_MTD_CFI_I8 is not set 414 + # CONFIG_MTD_CFI_INTELEXT is not set 415 + CONFIG_MTD_CFI_AMDSTD=y 416 + # CONFIG_MTD_CFI_STAA is not set 417 + CONFIG_MTD_CFI_UTIL=y 418 + # CONFIG_MTD_RAM is not set 419 + # CONFIG_MTD_ROM is not set 420 + # CONFIG_MTD_ABSENT is not set 421 + 422 + # 423 + # Mapping drivers for chip access 424 + # 425 + # CONFIG_MTD_COMPLEX_MAPPINGS is not set 426 + # CONFIG_MTD_PHYSMAP is not set 427 + CONFIG_MTD_PHYSMAP_OF=y 428 + # CONFIG_MTD_INTEL_VR_NOR is not set 429 + # CONFIG_MTD_PLATRAM is not set 430 + 431 + # 432 + # Self-contained MTD device drivers 433 + # 434 + # CONFIG_MTD_PMC551 is not set 435 + # CONFIG_MTD_SLRAM is not set 436 + # CONFIG_MTD_PHRAM is not set 437 + # CONFIG_MTD_MTDRAM is not set 438 + # CONFIG_MTD_BLOCK2MTD is not set 439 + 440 + # 441 + # Disk-On-Chip Device Drivers 442 + # 443 + # CONFIG_MTD_DOC2000 is not set 444 + # CONFIG_MTD_DOC2001 is not set 445 + # CONFIG_MTD_DOC2001PLUS is not set 446 + # CONFIG_MTD_NAND is not set 447 + # CONFIG_MTD_ONENAND is not set 448 + 449 + # 450 + # LPDDR flash memory drivers 451 + # 452 + # CONFIG_MTD_LPDDR is not set 453 + 454 + # 455 + # UBI - Unsorted block images 456 + # 457 + # CONFIG_MTD_UBI is not set 406 458 CONFIG_OF_DEVICE=y 459 + CONFIG_OF_I2C=y 407 460 # CONFIG_PARPORT is not set 408 461 CONFIG_BLK_DEV=y 409 462 # CONFIG_BLK_DEV_FD is not set ··· 527 412 # 528 413 529 414 # 530 - # Enable only one of the two stacks, unless you know what you are doing 415 + # You can enable one or both FireWire driver stacks. 416 + # 417 + 418 + # 419 + # See the help texts for more information. 531 420 # 532 421 # CONFIG_FIREWIRE is not set 533 422 # CONFIG_IEEE1394 is not set ··· 552 433 # CONFIG_SUNGEM is not set 553 434 # CONFIG_CASSINI is not set 554 435 # CONFIG_NET_VENDOR_3COM is not set 436 + # CONFIG_ETHOC is not set 437 + # CONFIG_DNET is not set 555 438 # CONFIG_NET_TULIP is not set 556 439 # CONFIG_HP100 is not set 557 440 CONFIG_IBM_NEW_EMAC=y ··· 572 451 # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 573 452 # CONFIG_NET_PCI is not set 574 453 # CONFIG_B44 is not set 454 + # CONFIG_KS8842 is not set 575 455 # CONFIG_ATL2 is not set 576 456 # CONFIG_NETDEV_1000 is not set 577 457 # CONFIG_NETDEV_10000 is not set ··· 583 461 # 584 462 # CONFIG_WLAN_PRE80211 is not set 585 463 # CONFIG_WLAN_80211 is not set 586 - # CONFIG_IWLWIFI_LEDS is not set 587 464 588 465 # 589 466 # Enable WiMAX (Networking options) to see the WiMAX drivers ··· 654 533 # CONFIG_RAW_DRIVER is not set 655 534 # CONFIG_TCG_TPM is not set 656 535 CONFIG_DEVPORT=y 657 - # CONFIG_I2C is not set 536 + CONFIG_I2C=y 537 + CONFIG_I2C_BOARDINFO=y 538 + CONFIG_I2C_CHARDEV=y 539 + CONFIG_I2C_HELPER_AUTO=y 540 + 541 + # 542 + # I2C Hardware Bus support 543 + # 544 + 545 + # 546 + # PC SMBus host controller drivers 547 + # 548 + # CONFIG_I2C_ALI1535 is not set 549 + # CONFIG_I2C_ALI1563 is not set 550 + # CONFIG_I2C_ALI15X3 is not set 551 + # CONFIG_I2C_AMD756 is not set 552 + # CONFIG_I2C_AMD8111 is not set 553 + # CONFIG_I2C_I801 is not set 554 + # CONFIG_I2C_ISCH is not set 555 + # CONFIG_I2C_PIIX4 is not set 556 + # CONFIG_I2C_NFORCE2 is not set 557 + # CONFIG_I2C_SIS5595 is not set 558 + # CONFIG_I2C_SIS630 is not set 559 + # CONFIG_I2C_SIS96X is not set 560 + # CONFIG_I2C_VIA is not set 561 + # CONFIG_I2C_VIAPRO is not set 562 + 563 + # 564 + # I2C system bus drivers (mostly embedded / system-on-chip) 565 + # 566 + CONFIG_I2C_IBM_IIC=y 567 + # CONFIG_I2C_MPC is not set 568 + # CONFIG_I2C_OCORES is not set 569 + # CONFIG_I2C_SIMTEC is not set 570 + 571 + # 572 + # External I2C/SMBus adapter drivers 573 + # 574 + # CONFIG_I2C_PARPORT_LIGHT is not set 575 + # CONFIG_I2C_TAOS_EVM is not set 576 + 577 + # 578 + # Graphics adapter I2C/DDC channel drivers 579 + # 580 + # CONFIG_I2C_VOODOO3 is not set 581 + 582 + # 583 + # Other I2C/SMBus bus drivers 584 + # 585 + # CONFIG_I2C_PCA_PLATFORM is not set 586 + # CONFIG_I2C_STUB is not set 587 + 588 + # 589 + # Miscellaneous I2C Chip support 590 + # 591 + # CONFIG_DS1682 is not set 592 + # CONFIG_SENSORS_PCF8574 is not set 593 + # CONFIG_PCF8575 is not set 594 + # CONFIG_SENSORS_PCA9539 is not set 595 + # CONFIG_SENSORS_TSL2550 is not set 596 + # CONFIG_I2C_DEBUG_CORE is not set 597 + # CONFIG_I2C_DEBUG_ALGO is not set 598 + # CONFIG_I2C_DEBUG_BUS is not set 599 + # CONFIG_I2C_DEBUG_CHIP is not set 658 600 # CONFIG_SPI is not set 601 + 602 + # 603 + # PPS support 604 + # 605 + # CONFIG_PPS is not set 659 606 CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 660 607 # CONFIG_GPIOLIB is not set 661 608 # CONFIG_W1 is not set 662 609 # CONFIG_POWER_SUPPLY is not set 663 - # CONFIG_HWMON is not set 610 + CONFIG_HWMON=y 611 + # CONFIG_HWMON_VID is not set 612 + CONFIG_SENSORS_AD7414=y 613 + # CONFIG_SENSORS_AD7418 is not set 614 + # CONFIG_SENSORS_ADM1021 is not set 615 + # CONFIG_SENSORS_ADM1025 is not set 616 + # CONFIG_SENSORS_ADM1026 is not set 617 + # CONFIG_SENSORS_ADM1029 is not set 618 + # CONFIG_SENSORS_ADM1031 is not set 619 + # CONFIG_SENSORS_ADM9240 is not set 620 + # CONFIG_SENSORS_ADT7462 is not set 621 + # CONFIG_SENSORS_ADT7470 is not set 622 + # CONFIG_SENSORS_ADT7473 is not set 623 + # CONFIG_SENSORS_ADT7475 is not set 624 + # CONFIG_SENSORS_ATXP1 is not set 625 + # CONFIG_SENSORS_DS1621 is not set 626 + # CONFIG_SENSORS_I5K_AMB is not set 627 + # CONFIG_SENSORS_F71805F is not set 628 + # CONFIG_SENSORS_F71882FG is not set 629 + # CONFIG_SENSORS_F75375S is not set 630 + # CONFIG_SENSORS_G760A is not set 631 + # CONFIG_SENSORS_GL518SM is not set 632 + # CONFIG_SENSORS_GL520SM is not set 633 + # CONFIG_SENSORS_IT87 is not set 634 + # CONFIG_SENSORS_LM63 is not set 635 + # CONFIG_SENSORS_LM75 is not set 636 + # CONFIG_SENSORS_LM77 is not set 637 + # CONFIG_SENSORS_LM78 is not set 638 + # CONFIG_SENSORS_LM80 is not set 639 + # CONFIG_SENSORS_LM83 is not set 640 + # CONFIG_SENSORS_LM85 is not set 641 + # CONFIG_SENSORS_LM87 is not set 642 + # CONFIG_SENSORS_LM90 is not set 643 + # CONFIG_SENSORS_LM92 is not set 644 + # CONFIG_SENSORS_LM93 is not set 645 + # CONFIG_SENSORS_LTC4215 is not set 646 + # CONFIG_SENSORS_LTC4245 is not set 647 + # CONFIG_SENSORS_LM95241 is not set 648 + # CONFIG_SENSORS_MAX1619 is not set 649 + # CONFIG_SENSORS_MAX6650 is not set 650 + # CONFIG_SENSORS_PC87360 is not set 651 + # CONFIG_SENSORS_PC87427 is not set 652 + # CONFIG_SENSORS_PCF8591 is not set 653 + # CONFIG_SENSORS_SIS5595 is not set 654 + # CONFIG_SENSORS_DME1737 is not set 655 + # CONFIG_SENSORS_SMSC47M1 is not set 656 + # CONFIG_SENSORS_SMSC47M192 is not set 657 + # CONFIG_SENSORS_SMSC47B397 is not set 658 + # CONFIG_SENSORS_ADS7828 is not set 659 + # CONFIG_SENSORS_THMC50 is not set 660 + # CONFIG_SENSORS_TMP401 is not set 661 + # CONFIG_SENSORS_VIA686A is not set 662 + # CONFIG_SENSORS_VT1211 is not set 663 + # CONFIG_SENSORS_VT8231 is not set 664 + # CONFIG_SENSORS_W83781D is not set 665 + # CONFIG_SENSORS_W83791D is not set 666 + # CONFIG_SENSORS_W83792D is not set 667 + # CONFIG_SENSORS_W83793 is not set 668 + # CONFIG_SENSORS_W83L785TS is not set 669 + # CONFIG_SENSORS_W83L786NG is not set 670 + # CONFIG_SENSORS_W83627HF is not set 671 + # CONFIG_SENSORS_W83627EHF is not set 672 + # CONFIG_HWMON_DEBUG_CHIP is not set 664 673 # CONFIG_THERMAL is not set 665 674 # CONFIG_THERMAL_HWMON is not set 666 675 # CONFIG_WATCHDOG is not set ··· 807 556 # CONFIG_MFD_CORE is not set 808 557 # CONFIG_MFD_SM501 is not set 809 558 # CONFIG_HTC_PASIC3 is not set 559 + # CONFIG_TWL4030_CORE is not set 810 560 # CONFIG_MFD_TMIO is not set 561 + # CONFIG_PMIC_DA903X is not set 562 + # CONFIG_MFD_WM8400 is not set 563 + # CONFIG_MFD_WM8350_I2C is not set 564 + # CONFIG_MFD_PCF50633 is not set 565 + # CONFIG_AB3100_CORE is not set 811 566 # CONFIG_REGULATOR is not set 812 - 813 - # 814 - # Multimedia devices 815 - # 816 - 817 - # 818 - # Multimedia core support 819 - # 820 - # CONFIG_VIDEO_DEV is not set 821 - # CONFIG_DVB_CORE is not set 822 - # CONFIG_VIDEO_MEDIA is not set 823 - 824 - # 825 - # Multimedia drivers 826 - # 827 - CONFIG_DAB=y 567 + # CONFIG_MEDIA_SUPPORT is not set 828 568 829 569 # 830 570 # Graphics support ··· 842 600 # CONFIG_EDAC is not set 843 601 # CONFIG_RTC_CLASS is not set 844 602 # CONFIG_DMADEVICES is not set 603 + # CONFIG_AUXDISPLAY is not set 845 604 # CONFIG_UIO is not set 605 + 606 + # 607 + # TI VLYNQ 608 + # 846 609 # CONFIG_STAGING is not set 847 610 848 611 # ··· 861 614 # CONFIG_REISERFS_FS is not set 862 615 # CONFIG_JFS_FS is not set 863 616 # CONFIG_FS_POSIX_ACL is not set 864 - CONFIG_FILE_LOCKING=y 865 617 # CONFIG_XFS_FS is not set 866 618 # CONFIG_GFS2_FS is not set 867 619 # CONFIG_OCFS2_FS is not set 868 620 # CONFIG_BTRFS_FS is not set 621 + CONFIG_FILE_LOCKING=y 622 + CONFIG_FSNOTIFY=y 869 623 CONFIG_DNOTIFY=y 870 624 CONFIG_INOTIFY=y 871 625 CONFIG_INOTIFY_USER=y ··· 874 626 # CONFIG_AUTOFS_FS is not set 875 627 # CONFIG_AUTOFS4_FS is not set 876 628 # CONFIG_FUSE_FS is not set 629 + 630 + # 631 + # Caches 632 + # 633 + # CONFIG_FSCACHE is not set 877 634 878 635 # 879 636 # CD-ROM/DVD Filesystems ··· 913 660 # CONFIG_BEFS_FS is not set 914 661 # CONFIG_BFS_FS is not set 915 662 # CONFIG_EFS_FS is not set 663 + CONFIG_JFFS2_FS=y 664 + CONFIG_JFFS2_FS_DEBUG=0 665 + CONFIG_JFFS2_FS_WRITEBUFFER=y 666 + # CONFIG_JFFS2_FS_WBUF_VERIFY is not set 667 + # CONFIG_JFFS2_SUMMARY is not set 668 + # CONFIG_JFFS2_FS_XATTR is not set 669 + # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set 670 + CONFIG_JFFS2_ZLIB=y 671 + # CONFIG_JFFS2_LZO is not set 672 + CONFIG_JFFS2_RTIME=y 673 + # CONFIG_JFFS2_RUBIN is not set 916 674 CONFIG_CRAMFS=y 917 675 # CONFIG_SQUASHFS is not set 918 676 # CONFIG_VXFS_FS is not set ··· 934 670 # CONFIG_ROMFS_FS is not set 935 671 # CONFIG_SYSV_FS is not set 936 672 # CONFIG_UFS_FS is not set 673 + # CONFIG_NILFS2_FS is not set 937 674 CONFIG_NETWORK_FILESYSTEMS=y 938 675 CONFIG_NFS_FS=y 939 676 CONFIG_NFS_V3=y ··· 946 681 CONFIG_LOCKD_V4=y 947 682 CONFIG_NFS_COMMON=y 948 683 CONFIG_SUNRPC=y 949 - # CONFIG_SUNRPC_REGISTER_V4 is not set 950 684 # CONFIG_RPCSEC_GSS_KRB5 is not set 951 685 # CONFIG_RPCSEC_GSS_SPKM3 is not set 952 686 # CONFIG_SMB_FS is not set ··· 961 697 CONFIG_MSDOS_PARTITION=y 962 698 # CONFIG_NLS is not set 963 699 # CONFIG_DLM is not set 700 + # CONFIG_BINARY_PRINTF is not set 964 701 965 702 # 966 703 # Library routines ··· 976 711 # CONFIG_CRC7 is not set 977 712 # CONFIG_LIBCRC32C is not set 978 713 CONFIG_ZLIB_INFLATE=y 979 - CONFIG_PLIST=y 714 + CONFIG_ZLIB_DEFLATE=y 715 + CONFIG_DECOMPRESS_GZIP=y 980 716 CONFIG_HAS_IOMEM=y 981 717 CONFIG_HAS_IOPORT=y 982 718 CONFIG_HAS_DMA=y 983 719 CONFIG_HAVE_LMB=y 720 + CONFIG_NLATTR=y 721 + CONFIG_GENERIC_ATOMIC64=y 984 722 985 723 # 986 724 # Kernel hacking ··· 1001 733 CONFIG_DETECT_SOFTLOCKUP=y 1002 734 # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set 1003 735 CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 736 + CONFIG_DETECT_HUNG_TASK=y 737 + # CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set 738 + CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 1004 739 CONFIG_SCHED_DEBUG=y 1005 740 # CONFIG_SCHEDSTATS is not set 1006 741 # CONFIG_TIMER_STATS is not set ··· 1014 743 # CONFIG_RT_MUTEX_TESTER is not set 1015 744 # CONFIG_DEBUG_SPINLOCK is not set 1016 745 # CONFIG_DEBUG_MUTEXES is not set 746 + # CONFIG_DEBUG_LOCK_ALLOC is not set 747 + # CONFIG_PROVE_LOCKING is not set 748 + # CONFIG_LOCK_STAT is not set 1017 749 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1018 750 # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1019 751 # CONFIG_DEBUG_KOBJECT is not set ··· 1028 754 # CONFIG_DEBUG_LIST is not set 1029 755 # CONFIG_DEBUG_SG is not set 1030 756 # CONFIG_DEBUG_NOTIFIERS is not set 1031 - # CONFIG_BOOT_PRINTK_DELAY is not set 1032 757 # CONFIG_RCU_TORTURE_TEST is not set 1033 758 # CONFIG_RCU_CPU_STALL_DETECTOR is not set 1034 759 # CONFIG_BACKTRACE_SELF_TEST is not set ··· 1035 762 # CONFIG_FAULT_INJECTION is not set 1036 763 # CONFIG_LATENCYTOP is not set 1037 764 CONFIG_SYSCTL_SYSCALL_CHECK=y 765 + # CONFIG_DEBUG_PAGEALLOC is not set 1038 766 CONFIG_HAVE_FUNCTION_TRACER=y 767 + CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y 1039 768 CONFIG_HAVE_DYNAMIC_FTRACE=y 1040 769 CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1041 - 1042 - # 1043 - # Tracers 1044 - # 770 + CONFIG_TRACING_SUPPORT=y 771 + CONFIG_FTRACE=y 1045 772 # CONFIG_FUNCTION_TRACER is not set 773 + # CONFIG_IRQSOFF_TRACER is not set 1046 774 # CONFIG_SCHED_TRACER is not set 1047 - # CONFIG_CONTEXT_SWITCH_TRACER is not set 775 + # CONFIG_ENABLE_DEFAULT_TRACERS is not set 1048 776 # CONFIG_BOOT_TRACER is not set 1049 - # CONFIG_TRACE_BRANCH_PROFILING is not set 777 + CONFIG_BRANCH_PROFILE_NONE=y 778 + # CONFIG_PROFILE_ANNOTATED_BRANCHES is not set 779 + # CONFIG_PROFILE_ALL_BRANCHES is not set 1050 780 # CONFIG_STACK_TRACER is not set 1051 - # CONFIG_DYNAMIC_PRINTK_DEBUG is not set 781 + # CONFIG_KMEMTRACE is not set 782 + # CONFIG_WORKQUEUE_TRACER is not set 783 + # CONFIG_BLK_DEV_IO_TRACE is not set 784 + # CONFIG_DYNAMIC_DEBUG is not set 1052 785 # CONFIG_SAMPLES is not set 1053 786 CONFIG_HAVE_ARCH_KGDB=y 1054 787 # CONFIG_KGDB is not set 788 + # CONFIG_KMEMCHECK is not set 789 + # CONFIG_PPC_DISABLE_WERROR is not set 790 + CONFIG_PPC_WERROR=y 1055 791 CONFIG_PRINT_STACK_DEPTH=64 1056 792 # CONFIG_DEBUG_STACKOVERFLOW is not set 1057 793 # CONFIG_DEBUG_STACK_USAGE is not set 1058 - # CONFIG_DEBUG_PAGEALLOC is not set 794 + # CONFIG_PPC_EMULATED_STATS is not set 1059 795 # CONFIG_CODE_PATCHING_SELFTEST is not set 1060 796 # CONFIG_FTR_FIXUP_SELFTEST is not set 1061 797 # CONFIG_MSI_BITMAP_SELFTEST is not set
+297 -53
arch/powerpc/configs/44x/canyonlands_defconfig
··· 1 1 # 2 2 # Automatically generated make config: don't edit 3 - # Linux kernel version: 2.6.29-rc3 4 - # Mon Feb 2 13:13:04 2009 3 + # Linux kernel version: 2.6.31-rc4 4 + # Wed Jul 29 17:27:20 2009 5 5 # 6 6 # CONFIG_PPC64 is not set 7 7 8 8 # 9 9 # Processor support 10 10 # 11 - # CONFIG_6xx is not set 11 + # CONFIG_PPC_BOOK3S_32 is not set 12 12 # CONFIG_PPC_85xx is not set 13 13 # CONFIG_PPC_8xx is not set 14 14 # CONFIG_40x is not set ··· 31 31 CONFIG_GENERIC_TIME_VSYSCALL=y 32 32 CONFIG_GENERIC_CLOCKEVENTS=y 33 33 CONFIG_GENERIC_HARDIRQS=y 34 + CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 34 35 # CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 35 36 CONFIG_IRQ_PER_CPU=y 36 37 CONFIG_STACKTRACE_SUPPORT=y 37 38 CONFIG_HAVE_LATENCYTOP_SUPPORT=y 39 + CONFIG_TRACE_IRQFLAGS_SUPPORT=y 38 40 CONFIG_LOCKDEP_SUPPORT=y 39 41 CONFIG_RWSEM_XCHGADD_ALGORITHM=y 40 42 CONFIG_ARCH_HAS_ILOG2_U32=y 41 43 CONFIG_GENERIC_HWEIGHT=y 42 - CONFIG_GENERIC_CALIBRATE_DELAY=y 43 44 CONFIG_GENERIC_FIND_NEXT_BIT=y 44 45 # CONFIG_ARCH_NO_VIRT_TO_BUS is not set 45 46 CONFIG_PPC=y ··· 54 53 # CONFIG_GENERIC_TBSYNC is not set 55 54 CONFIG_AUDIT_ARCH=y 56 55 CONFIG_GENERIC_BUG=y 56 + CONFIG_DTC=y 57 57 # CONFIG_DEFAULT_UIMAGE is not set 58 58 CONFIG_PPC_DCR_NATIVE=y 59 59 # CONFIG_PPC_DCR_MMIO is not set 60 60 CONFIG_PPC_DCR=y 61 + CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 61 62 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 63 + CONFIG_CONSTRUCTORS=y 62 64 63 65 # 64 66 # General setup ··· 75 71 CONFIG_SYSVIPC=y 76 72 CONFIG_SYSVIPC_SYSCTL=y 77 73 CONFIG_POSIX_MQUEUE=y 74 + CONFIG_POSIX_MQUEUE_SYSCTL=y 78 75 # CONFIG_BSD_PROCESS_ACCT is not set 79 76 # CONFIG_TASKSTATS is not set 80 77 # CONFIG_AUDIT is not set ··· 98 93 # CONFIG_NAMESPACES is not set 99 94 CONFIG_BLK_DEV_INITRD=y 100 95 CONFIG_INITRAMFS_SOURCE="" 96 + CONFIG_RD_GZIP=y 97 + # CONFIG_RD_BZIP2 is not set 98 + # CONFIG_RD_LZMA is not set 101 99 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 102 100 CONFIG_SYSCTL=y 101 + CONFIG_ANON_INODES=y 103 102 CONFIG_EMBEDDED=y 104 103 CONFIG_SYSCTL_SYSCALL=y 105 104 CONFIG_KALLSYMS=y ··· 113 104 CONFIG_PRINTK=y 114 105 CONFIG_BUG=y 115 106 CONFIG_ELF_CORE=y 116 - CONFIG_COMPAT_BRK=y 117 107 CONFIG_BASE_FULL=y 118 108 CONFIG_FUTEX=y 119 - CONFIG_ANON_INODES=y 120 109 CONFIG_EPOLL=y 121 110 CONFIG_SIGNALFD=y 122 111 CONFIG_TIMERFD=y 123 112 CONFIG_EVENTFD=y 124 113 CONFIG_SHMEM=y 125 114 CONFIG_AIO=y 115 + CONFIG_HAVE_PERF_COUNTERS=y 116 + 117 + # 118 + # Performance Counters 119 + # 120 + # CONFIG_PERF_COUNTERS is not set 126 121 CONFIG_VM_EVENT_COUNTERS=y 127 122 CONFIG_PCI_QUIRKS=y 128 123 CONFIG_SLUB_DEBUG=y 124 + # CONFIG_STRIP_ASM_SYMS is not set 125 + CONFIG_COMPAT_BRK=y 129 126 # CONFIG_SLAB is not set 130 127 CONFIG_SLUB=y 131 128 # CONFIG_SLOB is not set 132 129 # CONFIG_PROFILING is not set 130 + # CONFIG_MARKERS is not set 133 131 CONFIG_HAVE_OPROFILE=y 134 132 # CONFIG_KPROBES is not set 135 133 CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y ··· 144 128 CONFIG_HAVE_KPROBES=y 145 129 CONFIG_HAVE_KRETPROBES=y 146 130 CONFIG_HAVE_ARCH_TRACEHOOK=y 131 + 132 + # 133 + # GCOV-based kernel profiling 134 + # 135 + # CONFIG_GCOV_KERNEL is not set 136 + # CONFIG_SLOW_WORK is not set 147 137 # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 148 138 CONFIG_SLABINFO=y 149 139 CONFIG_RT_MUTEXES=y ··· 161 139 # CONFIG_MODVERSIONS is not set 162 140 # CONFIG_MODULE_SRCVERSION_ALL is not set 163 141 CONFIG_BLOCK=y 164 - CONFIG_LBD=y 165 - # CONFIG_BLK_DEV_IO_TRACE is not set 142 + CONFIG_LBDAF=y 166 143 # CONFIG_BLK_DEV_BSG is not set 167 144 # CONFIG_BLK_DEV_INTEGRITY is not set 168 145 ··· 197 176 # CONFIG_ARCHES is not set 198 177 CONFIG_CANYONLANDS=y 199 178 # CONFIG_GLACIER is not set 179 + # CONFIG_REDWOOD is not set 200 180 # CONFIG_YOSEMITE is not set 201 181 # CONFIG_XILINX_VIRTEX440_GENERIC_BOARD is not set 202 182 CONFIG_PPC44x_SIMPLE=y ··· 240 218 # CONFIG_BINFMT_MISC is not set 241 219 # CONFIG_MATH_EMULATION is not set 242 220 # CONFIG_IOMMU_HELPER is not set 221 + # CONFIG_SWIOTLB is not set 243 222 CONFIG_PPC_NEED_DMA_SYNC_OPS=y 244 223 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 245 224 CONFIG_ARCH_HAS_WALK_MEMORY=y ··· 260 237 CONFIG_ZONE_DMA_FLAG=1 261 238 CONFIG_BOUNCE=y 262 239 CONFIG_VIRT_TO_BUS=y 263 - CONFIG_UNEVICTABLE_LRU=y 240 + CONFIG_HAVE_MLOCK=y 241 + CONFIG_HAVE_MLOCKED_PAGE_BIT=y 242 + CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 243 + CONFIG_STDBINUTILS=y 264 244 CONFIG_PPC_4K_PAGES=y 265 245 # CONFIG_PPC_16K_PAGES is not set 266 246 # CONFIG_PPC_64K_PAGES is not set 247 + # CONFIG_PPC_256K_PAGES is not set 267 248 CONFIG_FORCE_MAX_ZONEORDER=11 268 249 CONFIG_PROC_DEVICETREE=y 269 250 CONFIG_CMDLINE_BOOL=y ··· 292 265 # CONFIG_PCI_LEGACY is not set 293 266 # CONFIG_PCI_DEBUG is not set 294 267 # CONFIG_PCI_STUB is not set 268 + # CONFIG_PCI_IOV is not set 295 269 # CONFIG_PCCARD is not set 296 270 # CONFIG_HOTPLUG_PCI is not set 297 271 # CONFIG_HAS_RAPIDIO is not set ··· 310 282 CONFIG_KERNEL_START=0xc0000000 311 283 CONFIG_PHYSICAL_START=0x00000000 312 284 CONFIG_TASK_SIZE=0xc0000000 313 - CONFIG_CONSISTENT_START=0xff100000 314 285 CONFIG_CONSISTENT_SIZE=0x00200000 315 286 CONFIG_NET=y 316 287 317 288 # 318 289 # Networking options 319 290 # 320 - CONFIG_COMPAT_NET_DEV_OPS=y 321 291 CONFIG_PACKET=y 322 292 # CONFIG_PACKET_MMAP is not set 323 293 CONFIG_UNIX=y ··· 365 339 # CONFIG_LAPB is not set 366 340 # CONFIG_ECONET is not set 367 341 # CONFIG_WAN_ROUTER is not set 342 + # CONFIG_PHONET is not set 343 + # CONFIG_IEEE802154 is not set 368 344 # CONFIG_NET_SCHED is not set 369 345 # CONFIG_DCB is not set 370 346 ··· 379 351 # CONFIG_IRDA is not set 380 352 # CONFIG_BT is not set 381 353 # CONFIG_AF_RXRPC is not set 382 - # CONFIG_PHONET is not set 383 354 # CONFIG_WIRELESS is not set 384 355 # CONFIG_WIMAX is not set 385 356 # CONFIG_RFKILL is not set ··· 402 375 # CONFIG_SYS_HYPERVISOR is not set 403 376 CONFIG_CONNECTOR=y 404 377 CONFIG_PROC_EVENTS=y 405 - # CONFIG_MTD is not set 378 + CONFIG_MTD=y 379 + # CONFIG_MTD_DEBUG is not set 380 + # CONFIG_MTD_CONCAT is not set 381 + CONFIG_MTD_PARTITIONS=y 382 + # CONFIG_MTD_TESTS is not set 383 + # CONFIG_MTD_REDBOOT_PARTS is not set 384 + CONFIG_MTD_CMDLINE_PARTS=y 385 + CONFIG_MTD_OF_PARTS=y 386 + # CONFIG_MTD_AR7_PARTS is not set 387 + 388 + # 389 + # User Modules And Translation Layers 390 + # 391 + CONFIG_MTD_CHAR=y 392 + CONFIG_MTD_BLKDEVS=y 393 + CONFIG_MTD_BLOCK=y 394 + # CONFIG_FTL is not set 395 + # CONFIG_NFTL is not set 396 + # CONFIG_INFTL is not set 397 + # CONFIG_RFD_FTL is not set 398 + # CONFIG_SSFDC is not set 399 + # CONFIG_MTD_OOPS is not set 400 + 401 + # 402 + # RAM/ROM/Flash chip drivers 403 + # 404 + CONFIG_MTD_CFI=y 405 + # CONFIG_MTD_JEDECPROBE is not set 406 + CONFIG_MTD_GEN_PROBE=y 407 + # CONFIG_MTD_CFI_ADV_OPTIONS is not set 408 + CONFIG_MTD_MAP_BANK_WIDTH_1=y 409 + CONFIG_MTD_MAP_BANK_WIDTH_2=y 410 + CONFIG_MTD_MAP_BANK_WIDTH_4=y 411 + # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set 412 + # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set 413 + # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set 414 + CONFIG_MTD_CFI_I1=y 415 + CONFIG_MTD_CFI_I2=y 416 + # CONFIG_MTD_CFI_I4 is not set 417 + # CONFIG_MTD_CFI_I8 is not set 418 + # CONFIG_MTD_CFI_INTELEXT is not set 419 + CONFIG_MTD_CFI_AMDSTD=y 420 + # CONFIG_MTD_CFI_STAA is not set 421 + CONFIG_MTD_CFI_UTIL=y 422 + # CONFIG_MTD_RAM is not set 423 + # CONFIG_MTD_ROM is not set 424 + # CONFIG_MTD_ABSENT is not set 425 + 426 + # 427 + # Mapping drivers for chip access 428 + # 429 + # CONFIG_MTD_COMPLEX_MAPPINGS is not set 430 + # CONFIG_MTD_PHYSMAP is not set 431 + CONFIG_MTD_PHYSMAP_OF=y 432 + # CONFIG_MTD_INTEL_VR_NOR is not set 433 + # CONFIG_MTD_PLATRAM is not set 434 + 435 + # 436 + # Self-contained MTD device drivers 437 + # 438 + # CONFIG_MTD_PMC551 is not set 439 + # CONFIG_MTD_SLRAM is not set 440 + # CONFIG_MTD_PHRAM is not set 441 + # CONFIG_MTD_MTDRAM is not set 442 + # CONFIG_MTD_BLOCK2MTD is not set 443 + 444 + # 445 + # Disk-On-Chip Device Drivers 446 + # 447 + # CONFIG_MTD_DOC2000 is not set 448 + # CONFIG_MTD_DOC2001 is not set 449 + # CONFIG_MTD_DOC2001PLUS is not set 450 + CONFIG_MTD_NAND=y 451 + # CONFIG_MTD_NAND_VERIFY_WRITE is not set 452 + CONFIG_MTD_NAND_ECC_SMC=y 453 + # CONFIG_MTD_NAND_MUSEUM_IDS is not set 454 + CONFIG_MTD_NAND_IDS=y 455 + CONFIG_MTD_NAND_NDFC=y 456 + # CONFIG_MTD_NAND_DISKONCHIP is not set 457 + # CONFIG_MTD_NAND_CAFE is not set 458 + # CONFIG_MTD_NAND_NANDSIM is not set 459 + # CONFIG_MTD_NAND_PLATFORM is not set 460 + # CONFIG_MTD_ALAUDA is not set 461 + # CONFIG_MTD_NAND_FSL_ELBC is not set 462 + # CONFIG_MTD_ONENAND is not set 463 + 464 + # 465 + # LPDDR flash memory drivers 466 + # 467 + # CONFIG_MTD_LPDDR is not set 468 + 469 + # 470 + # UBI - Unsorted block images 471 + # 472 + # CONFIG_MTD_UBI is not set 406 473 CONFIG_OF_DEVICE=y 407 474 CONFIG_OF_I2C=y 408 475 # CONFIG_PARPORT is not set ··· 539 418 # 540 419 541 420 # 542 - # Enable only one of the two stacks, unless you know what you are doing 421 + # You can enable one or both FireWire driver stacks. 422 + # 423 + 424 + # 425 + # See the help texts for more information. 543 426 # 544 427 # CONFIG_FIREWIRE is not set 545 428 # CONFIG_IEEE1394 is not set ··· 564 439 # CONFIG_SUNGEM is not set 565 440 # CONFIG_CASSINI is not set 566 441 # CONFIG_NET_VENDOR_3COM is not set 442 + # CONFIG_ETHOC is not set 443 + # CONFIG_DNET is not set 567 444 # CONFIG_NET_TULIP is not set 568 445 # CONFIG_HP100 is not set 569 446 CONFIG_IBM_NEW_EMAC=y ··· 584 457 # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 585 458 # CONFIG_NET_PCI is not set 586 459 # CONFIG_B44 is not set 460 + # CONFIG_KS8842 is not set 587 461 # CONFIG_ATL2 is not set 588 462 # CONFIG_NETDEV_1000 is not set 589 463 # CONFIG_NETDEV_10000 is not set ··· 595 467 # 596 468 # CONFIG_WLAN_PRE80211 is not set 597 469 # CONFIG_WLAN_80211 is not set 598 - # CONFIG_IWLWIFI_LEDS is not set 599 470 600 471 # 601 472 # Enable WiMAX (Networking options) to see the WiMAX drivers ··· 669 542 # CONFIG_IPMI_HANDLER is not set 670 543 # CONFIG_HW_RANDOM is not set 671 544 # CONFIG_NVRAM is not set 672 - # CONFIG_GEN_RTC is not set 673 545 # CONFIG_R3964 is not set 674 546 # CONFIG_APPLICOM is not set 675 547 # CONFIG_RAW_DRIVER is not set ··· 734 608 # CONFIG_SENSORS_PCF8574 is not set 735 609 # CONFIG_PCF8575 is not set 736 610 # CONFIG_SENSORS_PCA9539 is not set 737 - # CONFIG_SENSORS_PCF8591 is not set 738 - # CONFIG_SENSORS_MAX6875 is not set 739 611 # CONFIG_SENSORS_TSL2550 is not set 740 612 # CONFIG_I2C_DEBUG_CORE is not set 741 613 # CONFIG_I2C_DEBUG_ALGO is not set 742 614 # CONFIG_I2C_DEBUG_BUS is not set 743 615 # CONFIG_I2C_DEBUG_CHIP is not set 744 616 # CONFIG_SPI is not set 617 + 618 + # 619 + # PPS support 620 + # 621 + # CONFIG_PPS is not set 745 622 CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 746 623 # CONFIG_GPIOLIB is not set 747 624 # CONFIG_W1 is not set ··· 769 640 # CONFIG_SENSORS_F71805F is not set 770 641 # CONFIG_SENSORS_F71882FG is not set 771 642 # CONFIG_SENSORS_F75375S is not set 643 + # CONFIG_SENSORS_G760A is not set 772 644 # CONFIG_SENSORS_GL518SM is not set 773 645 # CONFIG_SENSORS_GL520SM is not set 774 646 # CONFIG_SENSORS_IT87 is not set ··· 784 654 # CONFIG_SENSORS_LM90 is not set 785 655 # CONFIG_SENSORS_LM92 is not set 786 656 # CONFIG_SENSORS_LM93 is not set 657 + # CONFIG_SENSORS_LTC4215 is not set 787 658 # CONFIG_SENSORS_LTC4245 is not set 659 + # CONFIG_SENSORS_LM95241 is not set 788 660 # CONFIG_SENSORS_MAX1619 is not set 789 661 # CONFIG_SENSORS_MAX6650 is not set 790 662 # CONFIG_SENSORS_PC87360 is not set 791 663 # CONFIG_SENSORS_PC87427 is not set 664 + # CONFIG_SENSORS_PCF8591 is not set 792 665 # CONFIG_SENSORS_SIS5595 is not set 793 666 # CONFIG_SENSORS_DME1737 is not set 794 667 # CONFIG_SENSORS_SMSC47M1 is not set ··· 799 666 # CONFIG_SENSORS_SMSC47B397 is not set 800 667 # CONFIG_SENSORS_ADS7828 is not set 801 668 # CONFIG_SENSORS_THMC50 is not set 669 + # CONFIG_SENSORS_TMP401 is not set 802 670 # CONFIG_SENSORS_VIA686A is not set 803 671 # CONFIG_SENSORS_VT1211 is not set 804 672 # CONFIG_SENSORS_VT8231 is not set ··· 834 700 # CONFIG_MFD_WM8400 is not set 835 701 # CONFIG_MFD_WM8350_I2C is not set 836 702 # CONFIG_MFD_PCF50633 is not set 703 + # CONFIG_AB3100_CORE is not set 837 704 # CONFIG_REGULATOR is not set 838 - 839 - # 840 - # Multimedia devices 841 - # 842 - 843 - # 844 - # Multimedia core support 845 - # 846 - # CONFIG_VIDEO_DEV is not set 847 - # CONFIG_DVB_CORE is not set 848 - # CONFIG_VIDEO_MEDIA is not set 849 - 850 - # 851 - # Multimedia drivers 852 - # 853 - # CONFIG_DAB is not set 854 - # CONFIG_USB_DABUSB is not set 705 + # CONFIG_MEDIA_SUPPORT is not set 855 706 856 707 # 857 708 # Graphics support ··· 878 759 # USB Host Controller Drivers 879 760 # 880 761 # CONFIG_USB_C67X00_HCD is not set 762 + # CONFIG_USB_XHCI_HCD is not set 881 763 CONFIG_USB_EHCI_HCD=m 882 764 # CONFIG_USB_EHCI_ROOT_HUB_TT is not set 883 765 # CONFIG_USB_EHCI_TT_NEWSCHED is not set ··· 887 767 # CONFIG_USB_ISP116X_HCD is not set 888 768 # CONFIG_USB_ISP1760_HCD is not set 889 769 CONFIG_USB_OHCI_HCD=y 890 - CONFIG_USB_OHCI_HCD_PPC_OF=y 891 770 CONFIG_USB_OHCI_HCD_PPC_OF_BE=y 892 771 CONFIG_USB_OHCI_HCD_PPC_OF_LE=y 772 + CONFIG_USB_OHCI_HCD_PPC_OF=y 893 773 CONFIG_USB_OHCI_HCD_PCI=y 894 774 CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y 895 775 CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y ··· 909 789 # CONFIG_USB_TMC is not set 910 790 911 791 # 912 - # NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 792 + # NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may 913 793 # 914 794 915 795 # 916 - # see USB_STORAGE Help for more information 796 + # also be needed; see USB_STORAGE Help for more info 917 797 # 918 798 CONFIG_USB_LIBUSUAL=y 919 799 ··· 941 821 # CONFIG_USB_LED is not set 942 822 # CONFIG_USB_CYPRESS_CY7C63 is not set 943 823 # CONFIG_USB_CYTHERM is not set 944 - # CONFIG_USB_PHIDGET is not set 945 824 # CONFIG_USB_IDMOUSE is not set 946 825 # CONFIG_USB_FTDI_ELAN is not set 947 826 # CONFIG_USB_APPLEDISPLAY is not set ··· 956 837 # 957 838 # OTG and related infrastructure 958 839 # 840 + # CONFIG_NOP_USB_XCEIV is not set 959 841 # CONFIG_UWB is not set 960 842 # CONFIG_MMC is not set 961 843 # CONFIG_MEMSTICK is not set ··· 964 844 # CONFIG_ACCESSIBILITY is not set 965 845 # CONFIG_INFINIBAND is not set 966 846 # CONFIG_EDAC is not set 967 - # CONFIG_RTC_CLASS is not set 847 + CONFIG_RTC_LIB=y 848 + CONFIG_RTC_CLASS=y 849 + CONFIG_RTC_HCTOSYS=y 850 + CONFIG_RTC_HCTOSYS_DEVICE="rtc0" 851 + # CONFIG_RTC_DEBUG is not set 852 + 853 + # 854 + # RTC interfaces 855 + # 856 + CONFIG_RTC_INTF_SYSFS=y 857 + CONFIG_RTC_INTF_PROC=y 858 + CONFIG_RTC_INTF_DEV=y 859 + # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set 860 + # CONFIG_RTC_DRV_TEST is not set 861 + 862 + # 863 + # I2C RTC drivers 864 + # 865 + # CONFIG_RTC_DRV_DS1307 is not set 866 + # CONFIG_RTC_DRV_DS1374 is not set 867 + # CONFIG_RTC_DRV_DS1672 is not set 868 + # CONFIG_RTC_DRV_MAX6900 is not set 869 + # CONFIG_RTC_DRV_RS5C372 is not set 870 + # CONFIG_RTC_DRV_ISL1208 is not set 871 + # CONFIG_RTC_DRV_X1205 is not set 872 + # CONFIG_RTC_DRV_PCF8563 is not set 873 + # CONFIG_RTC_DRV_PCF8583 is not set 874 + CONFIG_RTC_DRV_M41T80=y 875 + # CONFIG_RTC_DRV_M41T80_WDT is not set 876 + # CONFIG_RTC_DRV_S35390A is not set 877 + # CONFIG_RTC_DRV_FM3130 is not set 878 + # CONFIG_RTC_DRV_RX8581 is not set 879 + # CONFIG_RTC_DRV_RX8025 is not set 880 + 881 + # 882 + # SPI RTC drivers 883 + # 884 + 885 + # 886 + # Platform RTC drivers 887 + # 888 + # CONFIG_RTC_DRV_CMOS is not set 889 + # CONFIG_RTC_DRV_DS1286 is not set 890 + # CONFIG_RTC_DRV_DS1511 is not set 891 + # CONFIG_RTC_DRV_DS1553 is not set 892 + # CONFIG_RTC_DRV_DS1742 is not set 893 + # CONFIG_RTC_DRV_STK17TA8 is not set 894 + # CONFIG_RTC_DRV_M48T86 is not set 895 + # CONFIG_RTC_DRV_M48T35 is not set 896 + # CONFIG_RTC_DRV_M48T59 is not set 897 + # CONFIG_RTC_DRV_BQ4802 is not set 898 + # CONFIG_RTC_DRV_V3020 is not set 899 + 900 + # 901 + # on-CPU RTC drivers 902 + # 903 + # CONFIG_RTC_DRV_GENERIC is not set 968 904 # CONFIG_DMADEVICES is not set 905 + # CONFIG_AUXDISPLAY is not set 969 906 # CONFIG_UIO is not set 907 + 908 + # 909 + # TI VLYNQ 910 + # 970 911 # CONFIG_STAGING is not set 971 912 972 913 # ··· 1041 860 # CONFIG_REISERFS_FS is not set 1042 861 # CONFIG_JFS_FS is not set 1043 862 # CONFIG_FS_POSIX_ACL is not set 1044 - CONFIG_FILE_LOCKING=y 1045 863 # CONFIG_XFS_FS is not set 1046 864 # CONFIG_GFS2_FS is not set 1047 865 # CONFIG_OCFS2_FS is not set 1048 866 # CONFIG_BTRFS_FS is not set 867 + CONFIG_FILE_LOCKING=y 868 + CONFIG_FSNOTIFY=y 1049 869 CONFIG_DNOTIFY=y 1050 870 CONFIG_INOTIFY=y 1051 871 CONFIG_INOTIFY_USER=y ··· 1054 872 # CONFIG_AUTOFS_FS is not set 1055 873 # CONFIG_AUTOFS4_FS is not set 1056 874 # CONFIG_FUSE_FS is not set 875 + 876 + # 877 + # Caches 878 + # 879 + # CONFIG_FSCACHE is not set 1057 880 1058 881 # 1059 882 # CD-ROM/DVD Filesystems ··· 1093 906 # CONFIG_BEFS_FS is not set 1094 907 # CONFIG_BFS_FS is not set 1095 908 # CONFIG_EFS_FS is not set 909 + # CONFIG_JFFS2_FS is not set 1096 910 CONFIG_CRAMFS=y 1097 911 # CONFIG_SQUASHFS is not set 1098 912 # CONFIG_VXFS_FS is not set ··· 1104 916 # CONFIG_ROMFS_FS is not set 1105 917 # CONFIG_SYSV_FS is not set 1106 918 # CONFIG_UFS_FS is not set 919 + # CONFIG_NILFS2_FS is not set 1107 920 CONFIG_NETWORK_FILESYSTEMS=y 1108 921 CONFIG_NFS_FS=y 1109 922 CONFIG_NFS_V3=y ··· 1116 927 CONFIG_LOCKD_V4=y 1117 928 CONFIG_NFS_COMMON=y 1118 929 CONFIG_SUNRPC=y 1119 - # CONFIG_SUNRPC_REGISTER_V4 is not set 1120 930 # CONFIG_RPCSEC_GSS_KRB5 is not set 1121 931 # CONFIG_RPCSEC_GSS_SPKM3 is not set 1122 932 # CONFIG_SMB_FS is not set ··· 1129 941 # 1130 942 # CONFIG_PARTITION_ADVANCED is not set 1131 943 CONFIG_MSDOS_PARTITION=y 1132 - # CONFIG_NLS is not set 944 + CONFIG_NLS=y 945 + CONFIG_NLS_DEFAULT="iso8859-1" 946 + # CONFIG_NLS_CODEPAGE_437 is not set 947 + # CONFIG_NLS_CODEPAGE_737 is not set 948 + # CONFIG_NLS_CODEPAGE_775 is not set 949 + # CONFIG_NLS_CODEPAGE_850 is not set 950 + # CONFIG_NLS_CODEPAGE_852 is not set 951 + # CONFIG_NLS_CODEPAGE_855 is not set 952 + # CONFIG_NLS_CODEPAGE_857 is not set 953 + # CONFIG_NLS_CODEPAGE_860 is not set 954 + # CONFIG_NLS_CODEPAGE_861 is not set 955 + # CONFIG_NLS_CODEPAGE_862 is not set 956 + # CONFIG_NLS_CODEPAGE_863 is not set 957 + # CONFIG_NLS_CODEPAGE_864 is not set 958 + # CONFIG_NLS_CODEPAGE_865 is not set 959 + # CONFIG_NLS_CODEPAGE_866 is not set 960 + # CONFIG_NLS_CODEPAGE_869 is not set 961 + # CONFIG_NLS_CODEPAGE_936 is not set 962 + # CONFIG_NLS_CODEPAGE_950 is not set 963 + # CONFIG_NLS_CODEPAGE_932 is not set 964 + # CONFIG_NLS_CODEPAGE_949 is not set 965 + # CONFIG_NLS_CODEPAGE_874 is not set 966 + # CONFIG_NLS_ISO8859_8 is not set 967 + # CONFIG_NLS_CODEPAGE_1250 is not set 968 + # CONFIG_NLS_CODEPAGE_1251 is not set 969 + # CONFIG_NLS_ASCII is not set 970 + # CONFIG_NLS_ISO8859_1 is not set 971 + # CONFIG_NLS_ISO8859_2 is not set 972 + # CONFIG_NLS_ISO8859_3 is not set 973 + # CONFIG_NLS_ISO8859_4 is not set 974 + # CONFIG_NLS_ISO8859_5 is not set 975 + # CONFIG_NLS_ISO8859_6 is not set 976 + # CONFIG_NLS_ISO8859_7 is not set 977 + # CONFIG_NLS_ISO8859_9 is not set 978 + # CONFIG_NLS_ISO8859_13 is not set 979 + # CONFIG_NLS_ISO8859_14 is not set 980 + # CONFIG_NLS_ISO8859_15 is not set 981 + # CONFIG_NLS_KOI8_R is not set 982 + # CONFIG_NLS_KOI8_U is not set 983 + # CONFIG_NLS_UTF8 is not set 1133 984 # CONFIG_DLM is not set 985 + # CONFIG_BINARY_PRINTF is not set 1134 986 1135 987 # 1136 988 # Library routines ··· 1185 957 # CONFIG_CRC7 is not set 1186 958 # CONFIG_LIBCRC32C is not set 1187 959 CONFIG_ZLIB_INFLATE=y 1188 - CONFIG_PLIST=y 960 + CONFIG_DECOMPRESS_GZIP=y 1189 961 CONFIG_HAS_IOMEM=y 1190 962 CONFIG_HAS_IOPORT=y 1191 963 CONFIG_HAS_DMA=y 1192 964 CONFIG_HAVE_LMB=y 965 + CONFIG_NLATTR=y 966 + CONFIG_GENERIC_ATOMIC64=y 1193 967 1194 968 # 1195 969 # Kernel hacking ··· 1209 979 CONFIG_DETECT_SOFTLOCKUP=y 1210 980 # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set 1211 981 CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 982 + CONFIG_DETECT_HUNG_TASK=y 983 + # CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set 984 + CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 1212 985 CONFIG_SCHED_DEBUG=y 1213 986 # CONFIG_SCHEDSTATS is not set 1214 987 # CONFIG_TIMER_STATS is not set ··· 1222 989 # CONFIG_RT_MUTEX_TESTER is not set 1223 990 # CONFIG_DEBUG_SPINLOCK is not set 1224 991 # CONFIG_DEBUG_MUTEXES is not set 992 + # CONFIG_DEBUG_LOCK_ALLOC is not set 993 + # CONFIG_PROVE_LOCKING is not set 994 + # CONFIG_LOCK_STAT is not set 1225 995 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1226 996 # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1227 997 # CONFIG_DEBUG_KOBJECT is not set ··· 1236 1000 # CONFIG_DEBUG_LIST is not set 1237 1001 # CONFIG_DEBUG_SG is not set 1238 1002 # CONFIG_DEBUG_NOTIFIERS is not set 1239 - # CONFIG_BOOT_PRINTK_DELAY is not set 1240 1003 # CONFIG_RCU_TORTURE_TEST is not set 1241 1004 # CONFIG_RCU_CPU_STALL_DETECTOR is not set 1242 1005 # CONFIG_BACKTRACE_SELF_TEST is not set ··· 1243 1008 # CONFIG_FAULT_INJECTION is not set 1244 1009 # CONFIG_LATENCYTOP is not set 1245 1010 CONFIG_SYSCTL_SYSCALL_CHECK=y 1011 + # CONFIG_DEBUG_PAGEALLOC is not set 1246 1012 CONFIG_HAVE_FUNCTION_TRACER=y 1013 + CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y 1247 1014 CONFIG_HAVE_DYNAMIC_FTRACE=y 1248 1015 CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1249 - 1250 - # 1251 - # Tracers 1252 - # 1016 + CONFIG_TRACING_SUPPORT=y 1017 + CONFIG_FTRACE=y 1253 1018 # CONFIG_FUNCTION_TRACER is not set 1019 + # CONFIG_IRQSOFF_TRACER is not set 1254 1020 # CONFIG_SCHED_TRACER is not set 1255 - # CONFIG_CONTEXT_SWITCH_TRACER is not set 1021 + # CONFIG_ENABLE_DEFAULT_TRACERS is not set 1256 1022 # CONFIG_BOOT_TRACER is not set 1257 - # CONFIG_TRACE_BRANCH_PROFILING is not set 1023 + CONFIG_BRANCH_PROFILE_NONE=y 1024 + # CONFIG_PROFILE_ANNOTATED_BRANCHES is not set 1025 + # CONFIG_PROFILE_ALL_BRANCHES is not set 1258 1026 # CONFIG_STACK_TRACER is not set 1259 - # CONFIG_DYNAMIC_PRINTK_DEBUG is not set 1027 + # CONFIG_KMEMTRACE is not set 1028 + # CONFIG_WORKQUEUE_TRACER is not set 1029 + # CONFIG_BLK_DEV_IO_TRACE is not set 1030 + # CONFIG_DYNAMIC_DEBUG is not set 1260 1031 # CONFIG_SAMPLES is not set 1261 1032 CONFIG_HAVE_ARCH_KGDB=y 1262 1033 # CONFIG_KGDB is not set 1034 + # CONFIG_KMEMCHECK is not set 1035 + # CONFIG_PPC_DISABLE_WERROR is not set 1036 + CONFIG_PPC_WERROR=y 1263 1037 CONFIG_PRINT_STACK_DEPTH=64 1264 1038 # CONFIG_DEBUG_STACKOVERFLOW is not set 1265 1039 # CONFIG_DEBUG_STACK_USAGE is not set 1266 - # CONFIG_DEBUG_PAGEALLOC is not set 1040 + # CONFIG_PPC_EMULATED_STATS is not set 1267 1041 # CONFIG_CODE_PATCHING_SELFTEST is not set 1268 1042 # CONFIG_FTR_FIXUP_SELFTEST is not set 1269 1043 # CONFIG_MSI_BITMAP_SELFTEST is not set
+1252
arch/powerpc/configs/44x/eiger_defconfig
··· 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
+308 -12
arch/powerpc/configs/83xx/sbc834x_defconfig
··· 1 1 # 2 2 # Automatically generated make config: don't edit 3 - # Linux kernel version: 2.6.31-rc4 4 - # Wed Jul 29 23:32:13 2009 3 + # Linux kernel version: 2.6.31-rc5 4 + # Tue Aug 11 19:57:51 2009 5 5 # 6 6 # CONFIG_PPC64 is not set 7 7 ··· 420 420 # CONFIG_FW_LOADER is not set 421 421 # CONFIG_SYS_HYPERVISOR is not set 422 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 507 CONFIG_OF_DEVICE=y 425 508 CONFIG_OF_I2C=y 426 509 CONFIG_OF_MDIO=y ··· 519 436 # CONFIG_BLK_DEV_CRYPTOLOOP is not set 520 437 # CONFIG_BLK_DEV_NBD is not set 521 438 # CONFIG_BLK_DEV_SX8 is not set 439 + # CONFIG_BLK_DEV_UB is not set 522 440 CONFIG_BLK_DEV_RAM=y 523 441 CONFIG_BLK_DEV_RAM_COUNT=16 524 442 CONFIG_BLK_DEV_RAM_SIZE=32768 ··· 552 468 # SCSI device support 553 469 # 554 470 # CONFIG_RAID_ATTRS is not set 555 - # CONFIG_SCSI is not set 556 - # CONFIG_SCSI_DMA is not set 471 + CONFIG_SCSI=y 472 + CONFIG_SCSI_DMA=y 473 + # CONFIG_SCSI_TGT is not set 557 474 # CONFIG_SCSI_NETLINK is not set 475 + # CONFIG_SCSI_PROC_FS is not set 476 + 477 + # 478 + # SCSI support type (disk, tape, CD-ROM) 479 + # 480 + CONFIG_BLK_DEV_SD=y 481 + # CONFIG_CHR_DEV_ST is not set 482 + # CONFIG_CHR_DEV_OSST is not set 483 + # CONFIG_BLK_DEV_SR is not set 484 + # CONFIG_CHR_DEV_SG is not set 485 + # CONFIG_CHR_DEV_SCH is not set 486 + # CONFIG_SCSI_MULTI_LUN is not set 487 + # CONFIG_SCSI_CONSTANTS is not set 488 + # CONFIG_SCSI_LOGGING is not set 489 + # CONFIG_SCSI_SCAN_ASYNC is not set 490 + CONFIG_SCSI_WAIT_SCAN=m 491 + 492 + # 493 + # SCSI Transports 494 + # 495 + # CONFIG_SCSI_SPI_ATTRS is not set 496 + # CONFIG_SCSI_FC_ATTRS is not set 497 + # CONFIG_SCSI_ISCSI_ATTRS is not set 498 + # CONFIG_SCSI_SAS_LIBSAS is not set 499 + # CONFIG_SCSI_SRP_ATTRS is not set 500 + # CONFIG_SCSI_LOWLEVEL is not set 501 + # CONFIG_SCSI_DH is not set 502 + # CONFIG_SCSI_OSD_INITIATOR is not set 558 503 # CONFIG_ATA is not set 559 504 # CONFIG_MD is not set 560 505 # CONFIG_FUSION is not set ··· 691 578 # 692 579 # Enable WiMAX (Networking options) to see the WiMAX drivers 693 580 # 581 + 582 + # 583 + # USB Network Adapters 584 + # 585 + # CONFIG_USB_CATC is not set 586 + # CONFIG_USB_KAWETH is not set 587 + # CONFIG_USB_PEGASUS is not set 588 + # CONFIG_USB_RTL8150 is not set 589 + # CONFIG_USB_USBNET is not set 694 590 # CONFIG_WAN is not set 695 591 # CONFIG_FDDI is not set 696 592 # CONFIG_HIPPI is not set 697 593 # CONFIG_PPP is not set 698 594 # CONFIG_SLIP is not set 595 + # CONFIG_NET_FC is not set 699 596 # CONFIG_NETCONSOLE is not set 700 597 # CONFIG_NETPOLL is not set 701 598 # CONFIG_NET_POLL_CONTROLLER is not set ··· 756 633 # 757 634 CONFIG_SERIAL_8250=y 758 635 CONFIG_SERIAL_8250_CONSOLE=y 759 - CONFIG_SERIAL_8250_PCI=y 760 - CONFIG_SERIAL_8250_NR_UARTS=4 761 - CONFIG_SERIAL_8250_RUNTIME_UARTS=4 636 + # CONFIG_SERIAL_8250_PCI is not set 637 + CONFIG_SERIAL_8250_NR_UARTS=2 638 + CONFIG_SERIAL_8250_RUNTIME_UARTS=2 762 639 # CONFIG_SERIAL_8250_EXTENDED is not set 763 640 764 641 # ··· 823 700 # 824 701 # CONFIG_I2C_PARPORT_LIGHT is not set 825 702 # CONFIG_I2C_TAOS_EVM is not set 703 + # CONFIG_I2C_TINY_USB is not set 826 704 827 705 # 828 706 # Graphics adapter I2C/DDC channel drivers ··· 938 814 # 939 815 # CONFIG_PCIPCWATCHDOG is not set 940 816 # CONFIG_WDTPCI is not set 817 + 818 + # 819 + # USB-based Watchdog Cards 820 + # 821 + # CONFIG_USBPCWATCHDOG is not set 941 822 CONFIG_SSB_POSSIBLE=y 942 823 943 824 # ··· 985 856 CONFIG_HID=y 986 857 # CONFIG_HID_DEBUG is not set 987 858 # CONFIG_HIDRAW is not set 859 + 860 + # 861 + # USB Input Devices 862 + # 863 + # CONFIG_USB_HID is not set 988 864 # CONFIG_HID_PID is not set 865 + 866 + # 867 + # USB HID Boot Protocol drivers 868 + # 869 + # CONFIG_USB_KBD is not set 870 + # CONFIG_USB_MOUSE is not set 989 871 990 872 # 991 873 # Special HID drivers 992 874 # 993 - # CONFIG_USB_SUPPORT is not set 875 + CONFIG_USB_SUPPORT=y 876 + CONFIG_USB_ARCH_HAS_HCD=y 877 + CONFIG_USB_ARCH_HAS_OHCI=y 878 + CONFIG_USB_ARCH_HAS_EHCI=y 879 + CONFIG_USB=y 880 + # CONFIG_USB_DEBUG is not set 881 + # CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set 882 + 883 + # 884 + # Miscellaneous USB options 885 + # 886 + CONFIG_USB_DEVICEFS=y 887 + CONFIG_USB_DEVICE_CLASS=y 888 + # CONFIG_USB_DYNAMIC_MINORS is not set 889 + # CONFIG_USB_OTG is not set 890 + # CONFIG_USB_OTG_WHITELIST is not set 891 + # CONFIG_USB_OTG_BLACKLIST_HUB is not set 892 + CONFIG_USB_MON=y 893 + # CONFIG_USB_WUSB is not set 894 + # CONFIG_USB_WUSB_CBAF is not set 895 + 896 + # 897 + # USB Host Controller Drivers 898 + # 899 + # CONFIG_USB_C67X00_HCD is not set 900 + # CONFIG_USB_XHCI_HCD is not set 901 + CONFIG_USB_EHCI_HCD=y 902 + CONFIG_USB_EHCI_ROOT_HUB_TT=y 903 + # CONFIG_USB_EHCI_TT_NEWSCHED is not set 904 + CONFIG_USB_EHCI_FSL=y 905 + CONFIG_USB_EHCI_HCD_PPC_OF=y 906 + # CONFIG_USB_OXU210HP_HCD is not set 907 + # CONFIG_USB_ISP116X_HCD is not set 908 + # CONFIG_USB_ISP1760_HCD is not set 909 + # CONFIG_USB_OHCI_HCD is not set 910 + # CONFIG_USB_UHCI_HCD is not set 911 + # CONFIG_USB_SL811_HCD is not set 912 + # CONFIG_USB_R8A66597_HCD is not set 913 + # CONFIG_USB_WHCI_HCD is not set 914 + # CONFIG_USB_HWA_HCD is not set 915 + 916 + # 917 + # USB Device Class drivers 918 + # 919 + # CONFIG_USB_ACM is not set 920 + # CONFIG_USB_PRINTER is not set 921 + # CONFIG_USB_WDM is not set 922 + # CONFIG_USB_TMC is not set 923 + 924 + # 925 + # NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may 926 + # 927 + 928 + # 929 + # also be needed; see USB_STORAGE Help for more info 930 + # 931 + CONFIG_USB_STORAGE=y 932 + # CONFIG_USB_STORAGE_DEBUG is not set 933 + # CONFIG_USB_STORAGE_DATAFAB is not set 934 + # CONFIG_USB_STORAGE_FREECOM is not set 935 + # CONFIG_USB_STORAGE_ISD200 is not set 936 + # CONFIG_USB_STORAGE_USBAT is not set 937 + # CONFIG_USB_STORAGE_SDDR09 is not set 938 + # CONFIG_USB_STORAGE_SDDR55 is not set 939 + # CONFIG_USB_STORAGE_JUMPSHOT is not set 940 + # CONFIG_USB_STORAGE_ALAUDA is not set 941 + # CONFIG_USB_STORAGE_ONETOUCH is not set 942 + # CONFIG_USB_STORAGE_KARMA is not set 943 + # CONFIG_USB_STORAGE_CYPRESS_ATACB is not set 944 + # CONFIG_USB_LIBUSUAL is not set 945 + 946 + # 947 + # USB Imaging devices 948 + # 949 + # CONFIG_USB_MDC800 is not set 950 + # CONFIG_USB_MICROTEK is not set 951 + 952 + # 953 + # USB port drivers 954 + # 955 + # CONFIG_USB_SERIAL is not set 956 + 957 + # 958 + # USB Miscellaneous drivers 959 + # 960 + # CONFIG_USB_EMI62 is not set 961 + # CONFIG_USB_EMI26 is not set 962 + # CONFIG_USB_ADUTUX is not set 963 + # CONFIG_USB_SEVSEG is not set 964 + # CONFIG_USB_RIO500 is not set 965 + # CONFIG_USB_LEGOTOWER is not set 966 + # CONFIG_USB_LCD is not set 967 + # CONFIG_USB_BERRY_CHARGE is not set 968 + # CONFIG_USB_LED is not set 969 + # CONFIG_USB_CYPRESS_CY7C63 is not set 970 + # CONFIG_USB_CYTHERM is not set 971 + # CONFIG_USB_IDMOUSE is not set 972 + # CONFIG_USB_FTDI_ELAN is not set 973 + # CONFIG_USB_APPLEDISPLAY is not set 974 + # CONFIG_USB_SISUSBVGA is not set 975 + # CONFIG_USB_LD is not set 976 + # CONFIG_USB_TRANCEVIBRATOR is not set 977 + # CONFIG_USB_IOWARRIOR is not set 978 + # CONFIG_USB_TEST is not set 979 + # CONFIG_USB_ISIGHTFW is not set 980 + # CONFIG_USB_VST is not set 981 + # CONFIG_USB_GADGET is not set 982 + 983 + # 984 + # OTG and related infrastructure 985 + # 986 + # CONFIG_NOP_USB_XCEIV is not set 994 987 # CONFIG_UWB is not set 995 988 # CONFIG_MMC is not set 996 989 # CONFIG_MEMSTICK is not set ··· 1133 882 # 1134 883 # File systems 1135 884 # 1136 - # CONFIG_EXT2_FS is not set 1137 - # CONFIG_EXT3_FS is not set 885 + CONFIG_EXT2_FS=y 886 + # CONFIG_EXT2_FS_XATTR is not set 887 + # CONFIG_EXT2_FS_XIP is not set 888 + CONFIG_EXT3_FS=y 889 + # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set 890 + # CONFIG_EXT3_FS_XATTR is not set 1138 891 # CONFIG_EXT4_FS is not set 892 + CONFIG_JBD=y 1139 893 # CONFIG_REISERFS_FS is not set 1140 894 # CONFIG_JFS_FS is not set 1141 895 # CONFIG_FS_POSIX_ACL is not set ··· 1196 940 # CONFIG_BEFS_FS is not set 1197 941 # CONFIG_BFS_FS is not set 1198 942 # CONFIG_EFS_FS is not set 943 + # CONFIG_JFFS2_FS is not set 1199 944 # CONFIG_CRAMFS is not set 1200 945 # CONFIG_SQUASHFS is not set 1201 946 # CONFIG_VXFS_FS is not set ··· 1234 977 # 1235 978 # CONFIG_PARTITION_ADVANCED is not set 1236 979 CONFIG_MSDOS_PARTITION=y 1237 - # CONFIG_NLS is not set 980 + CONFIG_NLS=y 981 + CONFIG_NLS_DEFAULT="iso8859-1" 982 + # CONFIG_NLS_CODEPAGE_437 is not set 983 + # CONFIG_NLS_CODEPAGE_737 is not set 984 + # CONFIG_NLS_CODEPAGE_775 is not set 985 + # CONFIG_NLS_CODEPAGE_850 is not set 986 + # CONFIG_NLS_CODEPAGE_852 is not set 987 + # CONFIG_NLS_CODEPAGE_855 is not set 988 + # CONFIG_NLS_CODEPAGE_857 is not set 989 + # CONFIG_NLS_CODEPAGE_860 is not set 990 + # CONFIG_NLS_CODEPAGE_861 is not set 991 + # CONFIG_NLS_CODEPAGE_862 is not set 992 + # CONFIG_NLS_CODEPAGE_863 is not set 993 + # CONFIG_NLS_CODEPAGE_864 is not set 994 + # CONFIG_NLS_CODEPAGE_865 is not set 995 + # CONFIG_NLS_CODEPAGE_866 is not set 996 + # CONFIG_NLS_CODEPAGE_869 is not set 997 + # CONFIG_NLS_CODEPAGE_936 is not set 998 + # CONFIG_NLS_CODEPAGE_950 is not set 999 + # CONFIG_NLS_CODEPAGE_932 is not set 1000 + # CONFIG_NLS_CODEPAGE_949 is not set 1001 + # CONFIG_NLS_CODEPAGE_874 is not set 1002 + # CONFIG_NLS_ISO8859_8 is not set 1003 + # CONFIG_NLS_CODEPAGE_1250 is not set 1004 + # CONFIG_NLS_CODEPAGE_1251 is not set 1005 + # CONFIG_NLS_ASCII is not set 1006 + # CONFIG_NLS_ISO8859_1 is not set 1007 + # CONFIG_NLS_ISO8859_2 is not set 1008 + # CONFIG_NLS_ISO8859_3 is not set 1009 + # CONFIG_NLS_ISO8859_4 is not set 1010 + # CONFIG_NLS_ISO8859_5 is not set 1011 + # CONFIG_NLS_ISO8859_6 is not set 1012 + # CONFIG_NLS_ISO8859_7 is not set 1013 + # CONFIG_NLS_ISO8859_9 is not set 1014 + # CONFIG_NLS_ISO8859_13 is not set 1015 + # CONFIG_NLS_ISO8859_14 is not set 1016 + # CONFIG_NLS_ISO8859_15 is not set 1017 + # CONFIG_NLS_KOI8_R is not set 1018 + # CONFIG_NLS_KOI8_U is not set 1019 + # CONFIG_NLS_UTF8 is not set 1238 1020 # CONFIG_DLM is not set 1239 1021 # CONFIG_BINARY_PRINTF is not set 1240 1022
+80 -6
arch/powerpc/configs/mgcoge_defconfig
··· 1 1 # 2 2 # Automatically generated make config: don't edit 3 - # Linux kernel version: 2.6.31-rc4 4 - # Wed Jul 29 23:31:51 2009 3 + # Linux kernel version: 2.6.31-rc5 4 + # Fri Aug 7 08:19:15 2009 5 5 # 6 6 # CONFIG_PPC64 is not set 7 7 ··· 158 158 # CONFIG_MODULES is not set 159 159 CONFIG_BLOCK=y 160 160 CONFIG_LBDAF=y 161 + CONFIG_BLK_DEV_BSG=y 161 162 # CONFIG_BLK_DEV_INTEGRITY is not set 162 163 163 164 # ··· 507 506 # CONFIG_MTD_UBI is not set 508 507 CONFIG_OF_DEVICE=y 509 508 CONFIG_OF_GPIO=y 509 + CONFIG_OF_I2C=y 510 510 CONFIG_OF_MDIO=y 511 511 # CONFIG_PARPORT is not set 512 512 CONFIG_BLK_DEV=y ··· 584 582 # CONFIG_STE10XP is not set 585 583 # CONFIG_LSI_ET1011C_PHY is not set 586 584 CONFIG_FIXED_PHY=y 587 - # CONFIG_MDIO_BITBANG is not set 585 + CONFIG_MDIO_BITBANG=y 586 + # CONFIG_MDIO_GPIO is not set 588 587 CONFIG_NET_ETHERNET=y 589 588 CONFIG_MII=y 590 589 # CONFIG_MACE is not set ··· 611 608 # CONFIG_ATL2 is not set 612 609 CONFIG_FS_ENET=y 613 610 CONFIG_FS_ENET_HAS_SCC=y 614 - # CONFIG_FS_ENET_HAS_FCC is not set 615 - # CONFIG_FS_ENET_MDIO_FCC is not set 611 + CONFIG_FS_ENET_HAS_FCC=y 612 + CONFIG_FS_ENET_MDIO_FCC=y 616 613 # CONFIG_NETDEV_1000 is not set 617 614 # CONFIG_NETDEV_10000 is not set 618 615 # CONFIG_TR is not set ··· 683 680 # CONFIG_APPLICOM is not set 684 681 # CONFIG_RAW_DRIVER is not set 685 682 CONFIG_DEVPORT=y 686 - # CONFIG_I2C is not set 683 + CONFIG_I2C=y 684 + CONFIG_I2C_BOARDINFO=y 685 + CONFIG_I2C_CHARDEV=y 686 + CONFIG_I2C_HELPER_AUTO=y 687 + 688 + # 689 + # I2C Hardware Bus support 690 + # 691 + 692 + # 693 + # PC SMBus host controller drivers 694 + # 695 + # CONFIG_I2C_ALI1535 is not set 696 + # CONFIG_I2C_ALI15X3 is not set 697 + # CONFIG_I2C_AMD756 is not set 698 + # CONFIG_I2C_AMD8111 is not set 699 + # CONFIG_I2C_I801 is not set 700 + # CONFIG_I2C_ISCH is not set 701 + # CONFIG_I2C_PIIX4 is not set 702 + # CONFIG_I2C_NFORCE2 is not set 703 + # CONFIG_I2C_SIS5595 is not set 704 + # CONFIG_I2C_SIS630 is not set 705 + # CONFIG_I2C_SIS96X is not set 706 + # CONFIG_I2C_VIAPRO is not set 707 + 708 + # 709 + # Mac SMBus host controller drivers 710 + # 711 + # CONFIG_I2C_POWERMAC is not set 712 + 713 + # 714 + # I2C system bus drivers (mostly embedded / system-on-chip) 715 + # 716 + CONFIG_I2C_CPM=y 717 + # CONFIG_I2C_DESIGNWARE is not set 718 + # CONFIG_I2C_GPIO is not set 719 + # CONFIG_I2C_MPC is not set 720 + # CONFIG_I2C_SIMTEC is not set 721 + 722 + # 723 + # External I2C/SMBus adapter drivers 724 + # 725 + # CONFIG_I2C_PARPORT_LIGHT is not set 726 + 727 + # 728 + # Graphics adapter I2C/DDC channel drivers 729 + # 730 + # CONFIG_I2C_VOODOO3 is not set 731 + 732 + # 733 + # Other I2C/SMBus bus drivers 734 + # 735 + # CONFIG_I2C_PCA_PLATFORM is not set 736 + 737 + # 738 + # Miscellaneous I2C Chip support 739 + # 740 + # CONFIG_PCF8575 is not set 741 + # CONFIG_I2C_DEBUG_CORE is not set 742 + # CONFIG_I2C_DEBUG_ALGO is not set 743 + # CONFIG_I2C_DEBUG_BUS is not set 744 + # CONFIG_I2C_DEBUG_CHIP is not set 687 745 # CONFIG_SPI is not set 688 746 689 747 # ··· 763 699 # 764 700 # I2C GPIO expanders: 765 701 # 702 + # CONFIG_GPIO_MAX732X is not set 703 + # CONFIG_GPIO_PCA953X is not set 704 + # CONFIG_GPIO_PCF857X is not set 766 705 767 706 # 768 707 # PCI GPIO expanders: ··· 794 727 # CONFIG_MFD_CORE is not set 795 728 # CONFIG_MFD_SM501 is not set 796 729 # CONFIG_HTC_PASIC3 is not set 730 + # CONFIG_TPS65010 is not set 731 + # CONFIG_TWL4030_CORE is not set 797 732 # CONFIG_MFD_TMIO is not set 733 + # CONFIG_PMIC_DA903X is not set 734 + # CONFIG_MFD_WM8400 is not set 735 + # CONFIG_MFD_WM8350_I2C is not set 736 + # CONFIG_MFD_PCF50633 is not set 737 + # CONFIG_AB3100_CORE is not set 798 738 # CONFIG_REGULATOR is not set 799 739 # CONFIG_MEDIA_SUPPORT is not set 800 740
+1
arch/powerpc/configs/mpc85xx_defconfig
··· 203 203 CONFIG_MPC85xx_MDS=y 204 204 CONFIG_MPC8536_DS=y 205 205 CONFIG_MPC85xx_DS=y 206 + CONFIG_MPC85xx_RDB=y 206 207 CONFIG_SOCRATES=y 207 208 CONFIG_KSI8560=y 208 209 # CONFIG_XES_MPC85xx is not set
+62 -134
arch/powerpc/include/asm/bitops.h
··· 56 56 #define BITOP_WORD(nr) ((nr) / BITS_PER_LONG) 57 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 84 static __inline__ void set_bit(int nr, volatile unsigned long *addr) 60 85 { 61 - unsigned long old; 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" ); 86 + set_bits(BITOP_MASK(nr), addr + BITOP_WORD(nr)); 74 87 } 75 88 76 89 static __inline__ void clear_bit(int nr, volatile unsigned long *addr) 77 90 { 78 - unsigned long old; 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 + clear_bits(BITOP_MASK(nr), addr + BITOP_WORD(nr)); 91 92 } 92 93 93 94 static __inline__ void clear_bit_unlock(int nr, volatile unsigned long *addr) 94 95 { 95 - unsigned long old; 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"); 96 + clear_bits_unlock(BITOP_MASK(nr), addr + BITOP_WORD(nr)); 109 97 } 110 98 111 99 static __inline__ void change_bit(int nr, volatile unsigned long *addr) 112 100 { 113 - unsigned long old; 114 - unsigned long mask = BITOP_MASK(nr); 115 - unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr); 116 - 117 - __asm__ __volatile__( 118 - "1:" PPC_LLARX "%0,0,%3 # change_bit\n" 119 - "xor %0,%0,%2\n" 120 - PPC405_ERR77(0,%3) 121 - PPC_STLCX "%0,0,%3\n" 122 - "bne- 1b" 123 - : "=&r" (old), "+m" (*p) 124 - : "r" (mask), "r" (p) 125 - : "cc" ); 101 + change_bits(BITOP_MASK(nr), addr + BITOP_WORD(nr)); 126 102 } 103 + 104 + /* Like DEFINE_BITOP(), with changes to the arguments to 'op' and the output 105 + * operands. */ 106 + #define DEFINE_TESTOP(fn, op, prefix, postfix) \ 107 + static __inline__ unsigned long fn( \ 108 + unsigned long mask, \ 109 + volatile unsigned long *_p) \ 110 + { \ 111 + unsigned long old, t; \ 112 + unsigned long *p = (unsigned long *)_p; \ 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); \ 125 + } 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) 127 131 128 132 static __inline__ int test_and_set_bit(unsigned long nr, 129 133 volatile unsigned long *addr) 130 134 { 131 - unsigned long old, t; 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; 135 + return test_and_set_bits(BITOP_MASK(nr), addr + BITOP_WORD(nr)) != 0; 148 136 } 149 137 150 138 static __inline__ int test_and_set_bit_lock(unsigned long nr, 151 139 volatile unsigned long *addr) 152 140 { 153 - unsigned long old, t; 154 - unsigned long mask = BITOP_MASK(nr); 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; 141 + return test_and_set_bits_lock(BITOP_MASK(nr), 142 + addr + BITOP_WORD(nr)) != 0; 169 143 } 170 144 171 145 static __inline__ int test_and_clear_bit(unsigned long nr, 172 146 volatile unsigned long *addr) 173 147 { 174 - unsigned long old, t; 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; 148 + return test_and_clear_bits(BITOP_MASK(nr), addr + BITOP_WORD(nr)) != 0; 191 149 } 192 150 193 151 static __inline__ int test_and_change_bit(unsigned long nr, 194 152 volatile unsigned long *addr) 195 153 { 196 - unsigned long old, t; 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"); 154 + return test_and_change_bits(BITOP_MASK(nr), addr + BITOP_WORD(nr)) != 0; 227 155 } 228 156 229 157 #include <asm-generic/bitops/non-atomic.h>
+11
arch/powerpc/include/asm/cell-regs.h
··· 303 303 extern struct cbe_mic_tm_regs __iomem *cbe_get_mic_tm_regs(struct device_node *np); 304 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 317 /* some utility functions to deal with SMT */ 307 318 extern u32 cbe_get_hw_thread_id(int cpu); 308 319 extern u32 cbe_cpu_to_node(int cpu);
+16
arch/powerpc/include/asm/cputhreads.h
··· 5 5 6 6 /* 7 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 19 #ifdef CONFIG_SMP ··· 75 66 { 76 67 return cpu & ~(threads_per_core - 1); 77 68 } 69 + 70 + static inline int cpu_last_thread_in_core(int cpu) 71 + { 72 + return cpu | (threads_per_core - 1); 73 + } 74 + 75 + 78 76 79 77 #endif /* _ASM_POWERPC_CPUTHREADS_H */ 80 78
+5 -2
arch/powerpc/include/asm/device.h
··· 6 6 #ifndef _ASM_POWERPC_DEVICE_H 7 7 #define _ASM_POWERPC_DEVICE_H 8 8 9 - struct dma_mapping_ops; 9 + struct dma_map_ops; 10 10 struct device_node; 11 11 12 12 struct dev_archdata { ··· 14 14 struct device_node *of_node; 15 15 16 16 /* DMA operations on that device */ 17 - struct dma_mapping_ops *dma_ops; 17 + struct dma_map_ops *dma_ops; 18 18 void *dma_data; 19 + #ifdef CONFIG_SWIOTLB 20 + dma_addr_t max_direct_dma_addr; 21 + #endif 19 22 }; 20 23 21 24 static inline void dev_archdata_set_node(struct dev_archdata *ad,
+33 -291
arch/powerpc/include/asm/dma-mapping.h
··· 14 14 #include <linux/mm.h> 15 15 #include <linux/scatterlist.h> 16 16 #include <linux/dma-attrs.h> 17 + #include <linux/dma-debug.h> 17 18 #include <asm/io.h> 18 19 #include <asm/swiotlb.h> 19 20 ··· 65 64 } 66 65 67 66 /* 68 - * DMA operations are abstracted for G5 vs. i/pSeries, PCI vs. VIO 69 - */ 70 - struct dma_mapping_ops { 71 - void * (*alloc_coherent)(struct device *dev, size_t size, 72 - dma_addr_t *dma_handle, gfp_t flag); 73 - void (*free_coherent)(struct device *dev, size_t size, 74 - void *vaddr, dma_addr_t dma_handle); 75 - int (*map_sg)(struct device *dev, struct scatterlist *sg, 76 - int nents, enum dma_data_direction direction, 77 - struct dma_attrs *attrs); 78 - void (*unmap_sg)(struct device *dev, struct scatterlist *sg, 79 - int nents, enum dma_data_direction direction, 80 - struct dma_attrs *attrs); 81 - int (*dma_supported)(struct device *dev, u64 mask); 82 - int (*set_dma_mask)(struct device *dev, u64 dma_mask); 83 - dma_addr_t (*map_page)(struct device *dev, struct page *page, 84 - unsigned long offset, size_t size, 85 - enum dma_data_direction direction, 86 - struct dma_attrs *attrs); 87 - void (*unmap_page)(struct device *dev, 88 - dma_addr_t dma_address, size_t size, 89 - enum dma_data_direction direction, 90 - struct dma_attrs *attrs); 91 - int (*addr_needs_map)(struct device *dev, dma_addr_t addr, 92 - size_t size); 93 - #ifdef CONFIG_PPC_NEED_DMA_SYNC_OPS 94 - void (*sync_single_range_for_cpu)(struct device *hwdev, 95 - dma_addr_t dma_handle, unsigned long offset, 96 - size_t size, 97 - enum dma_data_direction direction); 98 - void (*sync_single_range_for_device)(struct device *hwdev, 99 - dma_addr_t dma_handle, unsigned long offset, 100 - size_t size, 101 - enum dma_data_direction direction); 102 - void (*sync_sg_for_cpu)(struct device *hwdev, 103 - struct scatterlist *sg, int nelems, 104 - enum dma_data_direction direction); 105 - void (*sync_sg_for_device)(struct device *hwdev, 106 - struct scatterlist *sg, int nelems, 107 - enum dma_data_direction direction); 108 - #endif 109 - }; 110 - 111 - /* 112 67 * Available generic sets of operations 113 68 */ 114 69 #ifdef CONFIG_PPC64 115 - extern struct dma_mapping_ops dma_iommu_ops; 70 + extern struct dma_map_ops dma_iommu_ops; 116 71 #endif 117 - extern struct dma_mapping_ops dma_direct_ops; 72 + extern struct dma_map_ops dma_direct_ops; 118 73 119 - static inline struct dma_mapping_ops *get_dma_ops(struct device *dev) 74 + static inline struct dma_map_ops *get_dma_ops(struct device *dev) 120 75 { 121 76 /* We don't handle the NULL dev case for ISA for now. We could 122 77 * do it via an out of line call but it is not needed for now. The ··· 85 128 return dev->archdata.dma_ops; 86 129 } 87 130 88 - static inline void set_dma_ops(struct device *dev, struct dma_mapping_ops *ops) 131 + static inline void set_dma_ops(struct device *dev, struct dma_map_ops *ops) 89 132 { 90 133 dev->archdata.dma_ops = ops; 91 134 } 92 135 136 + /* this will be removed soon */ 137 + #define flush_write_buffers() 138 + 139 + #include <asm-generic/dma-mapping-common.h> 140 + 93 141 static inline int dma_supported(struct device *dev, u64 mask) 94 142 { 95 - struct dma_mapping_ops *dma_ops = get_dma_ops(dev); 143 + struct dma_map_ops *dma_ops = get_dma_ops(dev); 96 144 97 145 if (unlikely(dma_ops == NULL)) 98 146 return 0; ··· 111 149 112 150 static inline int dma_set_mask(struct device *dev, u64 dma_mask) 113 151 { 114 - struct dma_mapping_ops *dma_ops = get_dma_ops(dev); 152 + struct dma_map_ops *dma_ops = get_dma_ops(dev); 115 153 116 154 if (unlikely(dma_ops == NULL)) 117 155 return -EIO; ··· 123 161 return 0; 124 162 } 125 163 126 - /* 127 - * map_/unmap_single actually call through to map/unmap_page now that all the 128 - * dma_mapping_ops have been converted over. We just have to get the page and 129 - * offset to pass through to map_page 130 - */ 131 - static inline dma_addr_t dma_map_single_attrs(struct device *dev, 132 - void *cpu_addr, 133 - size_t size, 134 - enum dma_data_direction direction, 135 - struct dma_attrs *attrs) 136 - { 137 - struct dma_mapping_ops *dma_ops = get_dma_ops(dev); 138 - 139 - BUG_ON(!dma_ops); 140 - 141 - return dma_ops->map_page(dev, virt_to_page(cpu_addr), 142 - (unsigned long)cpu_addr % PAGE_SIZE, size, 143 - direction, attrs); 144 - } 145 - 146 - static inline void dma_unmap_single_attrs(struct device *dev, 147 - dma_addr_t dma_addr, 148 - size_t size, 149 - enum dma_data_direction direction, 150 - struct dma_attrs *attrs) 151 - { 152 - struct dma_mapping_ops *dma_ops = get_dma_ops(dev); 153 - 154 - BUG_ON(!dma_ops); 155 - 156 - dma_ops->unmap_page(dev, dma_addr, size, direction, attrs); 157 - } 158 - 159 - static inline dma_addr_t dma_map_page_attrs(struct device *dev, 160 - struct page *page, 161 - unsigned long offset, size_t size, 162 - enum dma_data_direction direction, 163 - struct dma_attrs *attrs) 164 - { 165 - struct dma_mapping_ops *dma_ops = get_dma_ops(dev); 166 - 167 - BUG_ON(!dma_ops); 168 - 169 - return dma_ops->map_page(dev, page, offset, size, direction, attrs); 170 - } 171 - 172 - static inline void dma_unmap_page_attrs(struct device *dev, 173 - dma_addr_t dma_address, 174 - size_t size, 175 - enum dma_data_direction direction, 176 - struct dma_attrs *attrs) 177 - { 178 - struct dma_mapping_ops *dma_ops = get_dma_ops(dev); 179 - 180 - BUG_ON(!dma_ops); 181 - 182 - dma_ops->unmap_page(dev, dma_address, size, direction, attrs); 183 - } 184 - 185 - static inline int dma_map_sg_attrs(struct device *dev, struct scatterlist *sg, 186 - int nents, enum dma_data_direction direction, 187 - struct dma_attrs *attrs) 188 - { 189 - struct dma_mapping_ops *dma_ops = get_dma_ops(dev); 190 - 191 - BUG_ON(!dma_ops); 192 - return dma_ops->map_sg(dev, sg, nents, direction, attrs); 193 - } 194 - 195 - static inline void dma_unmap_sg_attrs(struct device *dev, 196 - struct scatterlist *sg, 197 - int nhwentries, 198 - enum dma_data_direction direction, 199 - struct dma_attrs *attrs) 200 - { 201 - struct dma_mapping_ops *dma_ops = get_dma_ops(dev); 202 - 203 - BUG_ON(!dma_ops); 204 - dma_ops->unmap_sg(dev, sg, nhwentries, direction, attrs); 205 - } 206 - 207 164 static inline void *dma_alloc_coherent(struct device *dev, size_t size, 208 165 dma_addr_t *dma_handle, gfp_t flag) 209 166 { 210 - struct dma_mapping_ops *dma_ops = get_dma_ops(dev); 167 + struct dma_map_ops *dma_ops = get_dma_ops(dev); 168 + void *cpu_addr; 211 169 212 170 BUG_ON(!dma_ops); 213 - return dma_ops->alloc_coherent(dev, size, dma_handle, flag); 171 + 172 + cpu_addr = dma_ops->alloc_coherent(dev, size, dma_handle, flag); 173 + 174 + debug_dma_alloc_coherent(dev, size, *dma_handle, cpu_addr); 175 + 176 + return cpu_addr; 214 177 } 215 178 216 179 static inline void dma_free_coherent(struct device *dev, size_t size, 217 180 void *cpu_addr, dma_addr_t dma_handle) 218 181 { 219 - struct dma_mapping_ops *dma_ops = get_dma_ops(dev); 182 + struct dma_map_ops *dma_ops = get_dma_ops(dev); 220 183 221 184 BUG_ON(!dma_ops); 185 + 186 + debug_dma_free_coherent(dev, size, cpu_addr, dma_handle); 187 + 222 188 dma_ops->free_coherent(dev, size, cpu_addr, dma_handle); 223 189 } 224 190 225 - static inline dma_addr_t dma_map_single(struct device *dev, void *cpu_addr, 226 - size_t size, 227 - enum dma_data_direction direction) 228 - { 229 - return dma_map_single_attrs(dev, cpu_addr, size, direction, NULL); 230 - } 231 - 232 - static inline void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, 233 - size_t size, 234 - enum dma_data_direction direction) 235 - { 236 - dma_unmap_single_attrs(dev, dma_addr, size, direction, NULL); 237 - } 238 - 239 - static inline dma_addr_t dma_map_page(struct device *dev, struct page *page, 240 - unsigned long offset, size_t size, 241 - enum dma_data_direction direction) 242 - { 243 - return dma_map_page_attrs(dev, page, offset, size, direction, NULL); 244 - } 245 - 246 - static inline void dma_unmap_page(struct device *dev, dma_addr_t dma_address, 247 - size_t size, 248 - enum dma_data_direction direction) 249 - { 250 - dma_unmap_page_attrs(dev, dma_address, size, direction, NULL); 251 - } 252 - 253 - static inline int dma_map_sg(struct device *dev, struct scatterlist *sg, 254 - int nents, enum dma_data_direction direction) 255 - { 256 - return dma_map_sg_attrs(dev, sg, nents, direction, NULL); 257 - } 258 - 259 - static inline void dma_unmap_sg(struct device *dev, struct scatterlist *sg, 260 - int nhwentries, 261 - enum dma_data_direction direction) 262 - { 263 - dma_unmap_sg_attrs(dev, sg, nhwentries, direction, NULL); 264 - } 265 - 266 - #ifdef CONFIG_PPC_NEED_DMA_SYNC_OPS 267 - static inline void dma_sync_single_for_cpu(struct device *dev, 268 - dma_addr_t dma_handle, size_t size, 269 - enum dma_data_direction direction) 270 - { 271 - struct dma_mapping_ops *dma_ops = get_dma_ops(dev); 272 - 273 - BUG_ON(!dma_ops); 274 - 275 - if (dma_ops->sync_single_range_for_cpu) 276 - dma_ops->sync_single_range_for_cpu(dev, dma_handle, 0, 277 - size, direction); 278 - } 279 - 280 - static inline void dma_sync_single_for_device(struct device *dev, 281 - dma_addr_t dma_handle, size_t size, 282 - enum dma_data_direction direction) 283 - { 284 - struct dma_mapping_ops *dma_ops = get_dma_ops(dev); 285 - 286 - BUG_ON(!dma_ops); 287 - 288 - if (dma_ops->sync_single_range_for_device) 289 - dma_ops->sync_single_range_for_device(dev, dma_handle, 290 - 0, size, direction); 291 - } 292 - 293 - static inline void dma_sync_sg_for_cpu(struct device *dev, 294 - struct scatterlist *sgl, int nents, 295 - enum dma_data_direction direction) 296 - { 297 - struct dma_mapping_ops *dma_ops = get_dma_ops(dev); 298 - 299 - BUG_ON(!dma_ops); 300 - 301 - if (dma_ops->sync_sg_for_cpu) 302 - dma_ops->sync_sg_for_cpu(dev, sgl, nents, direction); 303 - } 304 - 305 - static inline void dma_sync_sg_for_device(struct device *dev, 306 - struct scatterlist *sgl, int nents, 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_sg_for_device) 314 - dma_ops->sync_sg_for_device(dev, sgl, nents, direction); 315 - } 316 - 317 - static inline void dma_sync_single_range_for_cpu(struct device *dev, 318 - dma_addr_t dma_handle, unsigned long offset, size_t size, 319 - enum dma_data_direction direction) 320 - { 321 - struct dma_mapping_ops *dma_ops = get_dma_ops(dev); 322 - 323 - BUG_ON(!dma_ops); 324 - 325 - if (dma_ops->sync_single_range_for_cpu) 326 - dma_ops->sync_single_range_for_cpu(dev, dma_handle, 327 - offset, size, direction); 328 - } 329 - 330 - static inline void dma_sync_single_range_for_device(struct device *dev, 331 - dma_addr_t dma_handle, unsigned long offset, size_t size, 332 - enum dma_data_direction direction) 333 - { 334 - struct dma_mapping_ops *dma_ops = get_dma_ops(dev); 335 - 336 - BUG_ON(!dma_ops); 337 - 338 - if (dma_ops->sync_single_range_for_device) 339 - dma_ops->sync_single_range_for_device(dev, dma_handle, offset, 340 - size, direction); 341 - } 342 - #else /* CONFIG_PPC_NEED_DMA_SYNC_OPS */ 343 - static inline void dma_sync_single_for_cpu(struct device *dev, 344 - dma_addr_t dma_handle, size_t size, 345 - enum dma_data_direction direction) 346 - { 347 - } 348 - 349 - static inline void dma_sync_single_for_device(struct device *dev, 350 - dma_addr_t dma_handle, size_t size, 351 - enum dma_data_direction direction) 352 - { 353 - } 354 - 355 - static inline void dma_sync_sg_for_cpu(struct device *dev, 356 - struct scatterlist *sgl, int nents, 357 - enum dma_data_direction direction) 358 - { 359 - } 360 - 361 - static inline void dma_sync_sg_for_device(struct device *dev, 362 - struct scatterlist *sgl, int nents, 363 - enum dma_data_direction direction) 364 - { 365 - } 366 - 367 - static inline void dma_sync_single_range_for_cpu(struct device *dev, 368 - dma_addr_t dma_handle, unsigned long offset, size_t size, 369 - enum dma_data_direction direction) 370 - { 371 - } 372 - 373 - static inline void dma_sync_single_range_for_device(struct device *dev, 374 - dma_addr_t dma_handle, unsigned long offset, size_t size, 375 - enum dma_data_direction direction) 376 - { 377 - } 378 - #endif 379 - 380 191 static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) 381 192 { 193 + struct dma_map_ops *dma_ops = get_dma_ops(dev); 194 + 195 + if (dma_ops->mapping_error) 196 + return dma_ops->mapping_error(dev, dma_addr); 197 + 382 198 #ifdef CONFIG_PPC64 383 199 return (dma_addr == DMA_ERROR_CODE); 384 200 #else ··· 166 426 167 427 static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size) 168 428 { 169 - struct dma_mapping_ops *ops = get_dma_ops(dev); 429 + #ifdef CONFIG_SWIOTLB 430 + struct dev_archdata *sd = &dev->archdata; 170 431 171 - if (ops->addr_needs_map && ops->addr_needs_map(dev, addr, size)) 432 + if (sd->max_direct_dma_addr && addr + size > sd->max_direct_dma_addr) 172 433 return 0; 434 + #endif 173 435 174 436 if (!dev->dma_mask) 175 437 return 0;
+205
arch/powerpc/include/asm/exception-64e.h
··· 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 +
+14 -11
arch/powerpc/include/asm/exception.h arch/powerpc/include/asm/exception-64s.h
··· 57 57 addi reg,reg,(label)-_stext; /* virt addr of handler ... */ 58 58 59 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 61 std r9,area+EX_R9(r13); /* save r9 - r12 */ \ 62 62 std r10,area+EX_R10(r13); \ 63 63 std r11,area+EX_R11(r13); \ 64 64 std r12,area+EX_R12(r13); \ 65 - mfspr r9,SPRN_SPRG1; \ 65 + mfspr r9,SPRN_SPRG_SCRATCH0; \ 66 66 std r9,area+EX_R13(r13); \ 67 67 mfcr r9 68 68 69 - #define EXCEPTION_PROLOG_PSERIES(area, label) \ 70 - EXCEPTION_PROLOG_1(area); \ 69 + #define EXCEPTION_PROLOG_PSERIES_1(label) \ 71 70 ld r12,PACAKBASE(r13); /* get high part of &label */ \ 72 71 ld r10,PACAKMSR(r13); /* get MSR value for kernel */ \ 73 72 mfspr r11,SPRN_SRR0; /* save SRR0 */ \ ··· 76 77 mtspr SPRN_SRR1,r10; \ 77 78 rfid; \ 78 79 b . /* prevent speculative execution */ 80 + 81 + #define EXCEPTION_PROLOG_PSERIES(area, label) \ 82 + EXCEPTION_PROLOG_1(area); \ 83 + EXCEPTION_PROLOG_PSERIES_1(label); 79 84 80 85 /* 81 86 * The common exception prolog is used for all except a few exceptions ··· 147 144 .globl label##_pSeries; \ 148 145 label##_pSeries: \ 149 146 HMT_MEDIUM; \ 150 - mtspr SPRN_SPRG1,r13; /* save r13 */ \ 147 + mtspr SPRN_SPRG_SCRATCH0,r13; /* save r13 */ \ 151 148 EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, label##_common) 152 149 153 150 #define HSTD_EXCEPTION_PSERIES(n, label) \ ··· 155 152 .globl label##_pSeries; \ 156 153 label##_pSeries: \ 157 154 HMT_MEDIUM; \ 158 - mtspr SPRN_SPRG1,r20; /* save r20 */ \ 155 + mtspr SPRN_SPRG_SCRATCH0,r20; /* save r20 */ \ 159 156 mfspr r20,SPRN_HSRR0; /* copy HSRR0 to SRR0 */ \ 160 157 mtspr SPRN_SRR0,r20; \ 161 158 mfspr r20,SPRN_HSRR1; /* copy HSRR0 to SRR0 */ \ 162 159 mtspr SPRN_SRR1,r20; \ 163 - mfspr r20,SPRN_SPRG1; /* restore r20 */ \ 164 - mtspr SPRN_SPRG1,r13; /* save r13 */ \ 160 + mfspr r20,SPRN_SPRG_SCRATCH0; /* restore r20 */ \ 161 + mtspr SPRN_SPRG_SCRATCH0,r13; /* save r13 */ \ 165 162 EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, label##_common) 166 163 167 164 ··· 170 167 .globl label##_pSeries; \ 171 168 label##_pSeries: \ 172 169 HMT_MEDIUM; \ 173 - mtspr SPRN_SPRG1,r13; /* save r13 */ \ 174 - mfspr r13,SPRN_SPRG3; /* get paca address into r13 */ \ 170 + mtspr SPRN_SPRG_SCRATCH0,r13; /* save r13 */ \ 171 + mfspr r13,SPRN_SPRG_PACA; /* get paca address into r13 */ \ 175 172 std r9,PACA_EXGEN+EX_R9(r13); /* save r9, r10 */ \ 176 173 std r10,PACA_EXGEN+EX_R10(r13); \ 177 174 lbz r10,PACASOFTIRQEN(r13); \ 178 175 mfcr r9; \ 179 176 cmpwi r10,0; \ 180 177 beq masked_interrupt; \ 181 - mfspr r10,SPRN_SPRG1; \ 178 + mfspr r10,SPRN_SPRG_SCRATCH0; \ 182 179 std r10,PACA_EXGEN+EX_R13(r13); \ 183 180 std r11,PACA_EXGEN+EX_R11(r13); \ 184 181 std r12,PACA_EXGEN+EX_R12(r13); \
+1 -29
arch/powerpc/include/asm/hardirq.h
··· 1 - #ifndef _ASM_POWERPC_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 */ 1 + #include <asm-generic/hardirq.h>
+5
arch/powerpc/include/asm/hw_irq.h
··· 49 49 #define raw_irqs_disabled() (local_get_flags() == 0) 50 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 56 #define __hard_irq_enable() __mtmsrd(mfmsr() | MSR_EE, 1) 53 57 #define __hard_irq_disable() __mtmsrd(mfmsr() & ~MSR_EE, 1) 58 + #endif 54 59 55 60 #define hard_irq_disable() \ 56 61 do { \
-10
arch/powerpc/include/asm/iommu.h
··· 35 35 #define IOMMU_PAGE_MASK (~((1 << IOMMU_PAGE_SHIFT) - 1)) 36 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 38 /* Boot time flags */ 49 39 extern int iommu_is_off; 50 40 extern int iommu_force_on;
+4 -3
arch/powerpc/include/asm/irq.h
··· 302 302 303 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 307 * @controller: Device node of the interrupt controller 307 308 * @inspec: Interrupt specifier from the device-tree 308 309 * @intsize: Size of the interrupt specifier from the device-tree ··· 315 314 extern unsigned int irq_create_of_mapping(struct device_node *controller, 316 315 u32 *intspec, unsigned int intsize); 317 316 318 - 319 - /* irq_of_parse_and_map - Parse nad Map an interrupt into linux virq space 317 + /** 318 + * irq_of_parse_and_map - Parse and Map an interrupt into linux virq space 320 319 * @device: Device node of the device whose interrupt is to be mapped 321 320 * @index: Index of the interrupt to map 322 321 *
+3 -3
arch/powerpc/include/asm/machdep.h
··· 209 209 /* 210 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 212 /* Called at then very end of pcibios_init() */ 216 213 void (*pcibios_after_init)(void); 217 214 218 215 #endif /* CONFIG_PPC32 */ 216 + 217 + /* Called in indirect_* to avoid touching devices */ 218 + int (*pci_exclude_device)(struct pci_controller *, unsigned char, unsigned char); 219 219 220 220 /* Called after PPC generic resource fixup to perform 221 221 machine specific fixups */
+3
arch/powerpc/include/asm/mmu-40x.h
··· 61 61 62 62 #endif /* !__ASSEMBLY__ */ 63 63 64 + #define mmu_virtual_psize MMU_PAGE_4K 65 + #define mmu_linear_psize MMU_PAGE_256M 66 + 64 67 #endif /* _ASM_POWERPC_MMU_40X_H_ */
+6
arch/powerpc/include/asm/mmu-44x.h
··· 79 79 80 80 #if (PAGE_SHIFT == 12) 81 81 #define PPC44x_TLBE_SIZE PPC44x_TLB_4K 82 + #define mmu_virtual_psize MMU_PAGE_4K 82 83 #elif (PAGE_SHIFT == 14) 83 84 #define PPC44x_TLBE_SIZE PPC44x_TLB_16K 85 + #define mmu_virtual_psize MMU_PAGE_16K 84 86 #elif (PAGE_SHIFT == 16) 85 87 #define PPC44x_TLBE_SIZE PPC44x_TLB_64K 88 + #define mmu_virtual_psize MMU_PAGE_64K 86 89 #elif (PAGE_SHIFT == 18) 87 90 #define PPC44x_TLBE_SIZE PPC44x_TLB_256K 91 + #define mmu_virtual_psize MMU_PAGE_256K 88 92 #else 89 93 #error "Unsupported PAGE_SIZE" 90 94 #endif 95 + 96 + #define mmu_linear_psize MMU_PAGE_256M 91 97 92 98 #define PPC44x_PGD_OFF_SHIFT (32 - PGDIR_SHIFT + PGD_T_LOG2) 93 99 #define PPC44x_PGD_OFF_MASK_BIT (PGDIR_SHIFT - PGD_T_LOG2)
+3
arch/powerpc/include/asm/mmu-8xx.h
··· 143 143 } mm_context_t; 144 144 #endif /* !__ASSEMBLY__ */ 145 145 146 + #define mmu_virtual_psize MMU_PAGE_4K 147 + #define mmu_linear_psize MMU_PAGE_8M 148 + 146 149 #endif /* _ASM_POWERPC_MMU_8XX_H_ */
+154 -44
arch/powerpc/include/asm/mmu-book3e.h
··· 38 38 #define BOOK3E_PAGESZ_1TB 30 39 39 #define BOOK3E_PAGESZ_2TB 31 40 40 41 - #define MAS0_TLBSEL(x) ((x << 28) & 0x30000000) 42 - #define MAS0_ESEL(x) ((x << 16) & 0x0FFF0000) 43 - #define MAS0_NV(x) ((x) & 0x00000FFF) 41 + /* MAS registers bit definitions */ 44 42 45 - #define MAS1_VALID 0x80000000 46 - #define MAS1_IPROT 0x40000000 47 - #define MAS1_TID(x) ((x << 16) & 0x3FFF0000) 48 - #define MAS1_IND 0x00002000 49 - #define MAS1_TS 0x00001000 50 - #define MAS1_TSIZE(x) ((x << 7) & 0x00000F80) 43 + #define MAS0_TLBSEL(x) ((x << 28) & 0x30000000) 44 + #define MAS0_ESEL(x) ((x << 16) & 0x0FFF0000) 45 + #define MAS0_NV(x) ((x) & 0x00000FFF) 46 + #define MAS0_HES 0x00004000 47 + #define MAS0_WQ_ALLWAYS 0x00000000 48 + #define MAS0_WQ_COND 0x00001000 49 + #define MAS0_WQ_CLR_RSRV 0x00002000 51 50 52 - #define MAS2_EPN 0xFFFFF000 53 - #define MAS2_X0 0x00000040 54 - #define MAS2_X1 0x00000020 55 - #define MAS2_W 0x00000010 56 - #define MAS2_I 0x00000008 57 - #define MAS2_M 0x00000004 58 - #define MAS2_G 0x00000002 59 - #define MAS2_E 0x00000001 51 + #define MAS1_VALID 0x80000000 52 + #define MAS1_IPROT 0x40000000 53 + #define MAS1_TID(x) ((x << 16) & 0x3FFF0000) 54 + #define MAS1_IND 0x00002000 55 + #define MAS1_TS 0x00001000 56 + #define MAS1_TSIZE_MASK 0x00000f80 57 + #define MAS1_TSIZE_SHIFT 7 58 + #define MAS1_TSIZE(x) ((x << MAS1_TSIZE_SHIFT) & MAS1_TSIZE_MASK) 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 68 #define MAS2_EPN_MASK(size) (~0 << (size + 10)) 61 69 #define MAS2_VAL(addr, size, flags) ((addr) & MAS2_EPN_MASK(size) | (flags)) 62 70 63 - #define MAS3_RPN 0xFFFFF000 64 - #define MAS3_U0 0x00000200 65 - #define MAS3_U1 0x00000100 66 - #define MAS3_U2 0x00000080 67 - #define MAS3_U3 0x00000040 68 - #define MAS3_UX 0x00000020 69 - #define MAS3_SX 0x00000010 70 - #define MAS3_UW 0x00000008 71 - #define MAS3_SW 0x00000004 72 - #define MAS3_UR 0x00000002 73 - #define MAS3_SR 0x00000001 71 + #define MAS3_RPN 0xFFFFF000 72 + #define MAS3_U0 0x00000200 73 + #define MAS3_U1 0x00000100 74 + #define MAS3_U2 0x00000080 75 + #define MAS3_U3 0x00000040 76 + #define MAS3_UX 0x00000020 77 + #define MAS3_SX 0x00000010 78 + #define MAS3_UW 0x00000008 79 + #define MAS3_SW 0x00000004 80 + #define MAS3_UR 0x00000002 81 + #define MAS3_SR 0x00000001 82 + #define MAS3_SPSIZE 0x0000003e 83 + #define MAS3_SPSIZE_SHIFT 1 74 84 75 - #define MAS4_TLBSELD(x) MAS0_TLBSEL(x) 76 - #define MAS4_INDD 0x00008000 77 - #define MAS4_TSIZED(x) MAS1_TSIZE(x) 78 - #define MAS4_X0D 0x00000040 79 - #define MAS4_X1D 0x00000020 80 - #define MAS4_WD 0x00000010 81 - #define MAS4_ID 0x00000008 82 - #define MAS4_MD 0x00000004 83 - #define MAS4_GD 0x00000002 84 - #define MAS4_ED 0x00000001 85 + #define MAS4_TLBSELD(x) MAS0_TLBSEL(x) 86 + #define MAS4_INDD 0x00008000 /* Default IND */ 87 + #define MAS4_TSIZED(x) MAS1_TSIZE(x) 88 + #define MAS4_X0D 0x00000040 89 + #define MAS4_X1D 0x00000020 90 + #define MAS4_WD 0x00000010 91 + #define MAS4_ID 0x00000008 92 + #define MAS4_MD 0x00000004 93 + #define MAS4_GD 0x00000002 94 + #define MAS4_ED 0x00000001 95 + #define MAS4_WIMGED_MASK 0x0000001f /* Default WIMGE */ 96 + #define MAS4_WIMGED_SHIFT 0 97 + #define MAS4_VLED MAS4_X1D /* Default VLE */ 98 + #define MAS4_ACMD 0x000000c0 /* Default ACM */ 99 + #define MAS4_ACMD_SHIFT 6 100 + #define MAS4_TSIZED_MASK 0x00000f80 /* Default TSIZE */ 101 + #define MAS4_TSIZED_SHIFT 7 85 102 86 - #define MAS6_SPID0 0x3FFF0000 87 - #define MAS6_SPID1 0x00007FFE 88 - #define MAS6_ISIZE(x) MAS1_TSIZE(x) 89 - #define MAS6_SAS 0x00000001 90 - #define MAS6_SPID MAS6_SPID0 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 91 114 92 - #define MAS7_RPN 0xFFFFFFFF 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 176 #ifndef __ASSEMBLY__ 95 177 ··· 182 100 unsigned int active; 183 101 unsigned long vdso_base; 184 102 } mm_context_t; 103 + 104 + /* Page size definitions, common between 32 and 64-bit 105 + * 106 + * shift : is the "PAGE_SHIFT" value for that page size 107 + * penc : is the pte encoding mask 108 + * 109 + */ 110 + struct mmu_psize_def 111 + { 112 + unsigned int shift; /* number of bits */ 113 + unsigned int enc; /* PTE encoding */ 114 + }; 115 + extern struct mmu_psize_def mmu_psize_defs[MMU_PAGE_COUNT]; 116 + 117 + /* The page sizes use the same names as 64-bit hash but are 118 + * constants 119 + */ 120 + #if defined(CONFIG_PPC_4K_PAGES) 121 + #define mmu_virtual_psize MMU_PAGE_4K 122 + #elif defined(CONFIG_PPC_64K_PAGES) 123 + #define mmu_virtual_psize MMU_PAGE_64K 124 + #else 125 + #error Unsupported page size 126 + #endif 127 + 128 + extern int mmu_linear_psize; 129 + extern int mmu_vmemmap_psize; 130 + 185 131 #endif /* !__ASSEMBLY__ */ 186 132 187 133 #endif /* _ASM_POWERPC_MMU_BOOK3E_H_ */
+13 -3
arch/powerpc/include/asm/mmu-hash32.h
··· 55 55 56 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 63 struct hash_pte { 60 64 unsigned long v:1; /* Entry is valid */ 61 65 unsigned long vsid:24; /* Virtual segment identifier */ 62 66 unsigned long h:1; /* Hash algorithm indicator */ 63 67 unsigned long api:6; /* Abbreviated page index */ 64 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 70 unsigned long r:1; /* Referenced */ 67 71 unsigned long c:1; /* Changed */ 68 72 unsigned long w:1; /* Write-thru cache mode */ 69 73 unsigned long i:1; /* Cache inhibited */ 70 74 unsigned long m:1; /* Memory coherence */ 71 75 unsigned long g:1; /* Guarded */ 72 - unsigned long :1; /* Unused */ 76 + unsigned long x:1; /* Real page number bit 3, optional */ 73 77 unsigned long pp:2; /* Page protection */ 74 78 }; 75 79 ··· 83 79 } mm_context_t; 84 80 85 81 #endif /* !__ASSEMBLY__ */ 82 + 83 + /* We happily ignore the smaller BATs on 601, we don't actually use 84 + * those definitions on hash32 at the moment anyway 85 + */ 86 + #define mmu_virtual_psize MMU_PAGE_4K 87 + #define mmu_linear_psize MMU_PAGE_256M 86 88 87 89 #endif /* _ASM_POWERPC_MMU_HASH32_H_ */
+2 -20
arch/powerpc/include/asm/mmu-hash64.h
··· 41 41 42 42 #define SLB_NUM_BOLTED 3 43 43 #define SLB_CACHE_ENTRIES 8 44 + #define SLB_MIN_SIZE 32 44 45 45 46 /* Bits in the SLB ESID word */ 46 47 #define SLB_ESID_V ASM_CONST(0x0000000008000000) /* valid */ ··· 138 137 }; 139 138 140 139 #endif /* __ASSEMBLY__ */ 141 - 142 - /* 143 - * The kernel use the constants below to index in the page sizes array. 144 - * The use of fixed constants for this purpose is better for performances 145 - * of the low level hash refill handlers. 146 - * 147 - * A non supported page size has a "shift" field set to 0 148 - * 149 - * Any new page size being implemented can get a new entry in here. Whether 150 - * the kernel will use it or not is a different matter though. The actual page 151 - * size used by hugetlbfs is not defined here and may be made variable 152 - */ 153 - 154 - #define MMU_PAGE_4K 0 /* 4K */ 155 - #define MMU_PAGE_64K 1 /* 64K */ 156 - #define MMU_PAGE_64K_AP 2 /* 64K Admixed (in a 4K segment) */ 157 - #define MMU_PAGE_1M 3 /* 1M */ 158 - #define MMU_PAGE_16M 4 /* 16M */ 159 - #define MMU_PAGE_16G 5 /* 16G */ 160 - #define MMU_PAGE_COUNT 6 161 140 162 141 /* 163 142 * Segment sizes. ··· 277 296 extern void stab_initialize(unsigned long stab); 278 297 279 298 extern void slb_vmalloc_update(void); 299 + extern void slb_set_size(u16 size); 280 300 #endif /* __ASSEMBLY__ */ 281 301 282 302 /*
+46
arch/powerpc/include/asm/mmu.h
··· 17 17 #define MMU_FTR_TYPE_40x ASM_CONST(0x00000004) 18 18 #define MMU_FTR_TYPE_44x ASM_CONST(0x00000008) 19 19 #define MMU_FTR_TYPE_FSL_E ASM_CONST(0x00000010) 20 + #define MMU_FTR_TYPE_3E ASM_CONST(0x00000020) 20 21 21 22 /* 22 23 * This is individual features ··· 58 57 */ 59 58 #define MMU_FTR_TLBIE_206 ASM_CONST(0x00400000) 60 59 60 + /* Enable use of TLB reservation. Processor should support tlbsrx. 61 + * instruction and MAS0[WQ]. 62 + */ 63 + #define MMU_FTR_USE_TLBRSRV ASM_CONST(0x00800000) 64 + 65 + /* Use paired MAS registers (MAS7||MAS3, etc.) 66 + */ 67 + #define MMU_FTR_USE_PAIRED_MAS ASM_CONST(0x01000000) 68 + 61 69 #ifndef __ASSEMBLY__ 62 70 #include <asm/cputable.h> 63 71 ··· 82 72 extern void early_init_mmu_secondary(void); 83 73 84 74 #endif /* !__ASSEMBLY__ */ 75 + 76 + /* The kernel use the constants below to index in the page sizes array. 77 + * The use of fixed constants for this purpose is better for performances 78 + * of the low level hash refill handlers. 79 + * 80 + * A non supported page size has a "shift" field set to 0 81 + * 82 + * Any new page size being implemented can get a new entry in here. Whether 83 + * the kernel will use it or not is a different matter though. The actual page 84 + * size used by hugetlbfs is not defined here and may be made variable 85 + * 86 + * Note: This array ended up being a false good idea as it's growing to the 87 + * point where I wonder if we should replace it with something different, 88 + * to think about, feedback welcome. --BenH. 89 + */ 90 + 91 + /* There are #define as they have to be used in assembly 92 + * 93 + * WARNING: If you change this list, make sure to update the array of 94 + * names currently in arch/powerpc/mm/hugetlbpage.c or bad things will 95 + * happen 96 + */ 97 + #define MMU_PAGE_4K 0 98 + #define MMU_PAGE_16K 1 99 + #define MMU_PAGE_64K 2 100 + #define MMU_PAGE_64K_AP 3 /* "Admixed pages" (hash64 only) */ 101 + #define MMU_PAGE_256K 4 102 + #define MMU_PAGE_1M 5 103 + #define MMU_PAGE_8M 6 104 + #define MMU_PAGE_16M 7 105 + #define MMU_PAGE_256M 8 106 + #define MMU_PAGE_1G 9 107 + #define MMU_PAGE_16G 10 108 + #define MMU_PAGE_64G 11 109 + #define MMU_PAGE_COUNT 12 85 110 86 111 87 112 #if defined(CONFIG_PPC_STD_MMU_64) ··· 138 93 /* Motorola/Freescale 8xx software loaded TLB */ 139 94 # include <asm/mmu-8xx.h> 140 95 #endif 96 + 141 97 142 98 #endif /* __KERNEL__ */ 143 99 #endif /* _ASM_POWERPC_MMU_H_ */
+14 -1
arch/powerpc/include/asm/mmu_context.h
··· 14 14 /* 15 15 * Most if the context management is out of line 16 16 */ 17 - extern void mmu_context_init(void); 18 17 extern int init_new_context(struct task_struct *tsk, struct mm_struct *mm); 19 18 extern void destroy_context(struct mm_struct *mm); 20 19 ··· 21 22 extern void switch_stab(struct task_struct *tsk, struct mm_struct *mm); 22 23 extern void switch_slb(struct task_struct *tsk, struct mm_struct *mm); 23 24 extern void set_context(unsigned long id, pgd_t *pgd); 25 + 26 + #ifdef CONFIG_PPC_BOOK3S_64 27 + static inline void mmu_context_init(void) { } 28 + #else 29 + extern void mmu_context_init(void); 30 + #endif 24 31 25 32 /* 26 33 * switch_mm is the entry point called from the architecture independent ··· 43 38 tsk->thread.pgdir = next->pgd; 44 39 #endif /* CONFIG_PPC32 */ 45 40 41 + /* 64-bit Book3E keeps track of current PGD in the PACA */ 42 + #ifdef CONFIG_PPC_BOOK3E_64 43 + get_paca()->pgd = next->pgd; 44 + #endif 46 45 /* Nothing else to do if we aren't actually switching */ 47 46 if (prev == next) 48 47 return; ··· 93 84 static inline void enter_lazy_tlb(struct mm_struct *mm, 94 85 struct task_struct *tsk) 95 86 { 87 + /* 64-bit Book3E keeps track of current PGD in the PACA */ 88 + #ifdef CONFIG_PPC_BOOK3E_64 89 + get_paca()->pgd = NULL; 90 + #endif 96 91 } 97 92 98 93 #endif /* __KERNEL__ */
+3
arch/powerpc/include/asm/nvram.h
··· 107 107 /* Synchronize NVRAM */ 108 108 extern void nvram_sync(void); 109 109 110 + /* Determine NVRAM size */ 111 + extern ssize_t nvram_get_size(void); 112 + 110 113 /* Normal access to NVRAM */ 111 114 extern unsigned char nvram_read_byte(int i); 112 115 extern void nvram_write_byte(unsigned char c, int i);
+20 -3
arch/powerpc/include/asm/paca.h
··· 14 14 #define _ASM_POWERPC_PACA_H 15 15 #ifdef __KERNEL__ 16 16 17 - #include <asm/types.h> 18 - #include <asm/lppaca.h> 19 - #include <asm/mmu.h> 17 + #include <asm/types.h> 18 + #include <asm/lppaca.h> 19 + #include <asm/mmu.h> 20 + #include <asm/page.h> 21 + #include <asm/exception-64e.h> 20 22 21 23 register struct paca_struct *local_paca asm("r13"); 22 24 ··· 92 90 u16 slb_cache_ptr; 93 91 u16 slb_cache[SLB_CACHE_ENTRIES]; 94 92 #endif /* CONFIG_PPC_STD_MMU_64 */ 93 + 94 + #ifdef CONFIG_PPC_BOOK3E 95 + pgd_t *pgd; /* Current PGD */ 96 + pgd_t *kernel_pgd; /* Kernel PGD */ 97 + u64 exgen[8] __attribute__((aligned(0x80))); 98 + u64 extlb[EX_TLB_SIZE*3] __attribute__((aligned(0x80))); 99 + u64 exmc[8]; /* used for machine checks */ 100 + u64 excrit[8]; /* used for crit interrupts */ 101 + u64 exdbg[8]; /* used for debug interrupts */ 102 + 103 + /* Kernel stack pointers for use by special exceptions */ 104 + void *mc_kstack; 105 + void *crit_kstack; 106 + void *dbg_kstack; 107 + #endif /* CONFIG_PPC_BOOK3E */ 95 108 96 109 mm_context_t context; 97 110
+4
arch/powerpc/include/asm/page.h
··· 139 139 * Don't compare things with KERNELBASE or PAGE_OFFSET to test for 140 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 145 #define is_kernel_addr(x) ((x) >= PAGE_OFFSET) 146 + #endif 143 147 144 148 #ifndef __ASSEMBLY__ 145 149
+10
arch/powerpc/include/asm/page_64.h
··· 135 135 #endif /* __ASSEMBLY__ */ 136 136 #else 137 137 #define slice_init() 138 + #ifdef CONFIG_PPC_STD_MMU_64 138 139 #define get_slice_psize(mm, addr) ((mm)->context.user_psize) 139 140 #define slice_set_user_psize(mm, psize) \ 140 141 do { \ 141 142 (mm)->context.user_psize = (psize); \ 142 143 (mm)->context.sllp = SLB_VSID_USER | mmu_psize_defs[(psize)].sllp; \ 143 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 154 #define slice_set_range_psize(mm, start, len, psize) \ 145 155 slice_set_user_psize((mm), (psize)) 146 156 #define slice_mm_new_context(mm) 1
+16 -24
arch/powerpc/include/asm/pci-bridge.h
··· 77 77 78 78 int first_busno; 79 79 int last_busno; 80 - #ifndef CONFIG_PPC64 81 80 int self_busno; 82 - #endif 83 81 84 82 void __iomem *io_base_virt; 85 83 #ifdef CONFIG_PPC64 ··· 102 104 unsigned int __iomem *cfg_addr; 103 105 void __iomem *cfg_data; 104 106 105 - #ifndef CONFIG_PPC64 106 107 /* 107 108 * Used for variants of PCI indirect handling and possible quirks: 108 109 * SET_CFG_TYPE - used on 4xx or any PHB that does explicit type0/1 ··· 125 128 #define PPC_INDIRECT_TYPE_BIG_ENDIAN 0x00000010 126 129 #define PPC_INDIRECT_TYPE_BROKEN_MRM 0x00000020 127 130 u32 indirect_type; 128 - #endif /* !CONFIG_PPC64 */ 129 131 /* Currently, we limit ourselves to 1 IO range and 3 mem 130 132 * ranges since the common pci_bus structure can't handle more 131 133 */ ··· 141 145 void *private_data; 142 146 #endif /* CONFIG_PPC64 */ 143 147 }; 144 - 145 - #ifndef CONFIG_PPC64 146 - 147 - static inline struct pci_controller *pci_bus_to_host(const struct pci_bus *bus) 148 - { 149 - return bus->sysdata; 150 - } 151 - 152 - static inline int isa_vaddr_is_ioport(void __iomem *address) 153 - { 154 - /* No specific ISA handling on ppc32 at this stage, it 155 - * all goes through PCI 156 - */ 157 - return 0; 158 - } 159 148 160 149 /* These are used for config access before all the PCI probing 161 150 has been done. */ ··· 163 182 extern void setup_indirect_pci(struct pci_controller* hose, 164 183 resource_size_t cfg_addr, 165 184 resource_size_t cfg_data, u32 flags); 185 + 186 + #ifndef CONFIG_PPC64 187 + 188 + static inline struct pci_controller *pci_bus_to_host(const struct pci_bus *bus) 189 + { 190 + return bus->sysdata; 191 + } 192 + 193 + static inline int isa_vaddr_is_ioport(void __iomem *address) 194 + { 195 + /* No specific ISA handling on ppc32 at this stage, it 196 + * all goes through PCI 197 + */ 198 + return 0; 199 + } 200 + 166 201 #else /* CONFIG_PPC64 */ 167 202 168 203 /* ··· 280 283 281 284 extern int pcibios_unmap_io_space(struct pci_bus *bus); 282 285 extern int pcibios_map_io_space(struct pci_bus *bus); 283 - 284 - /* Return values for ppc_md.pci_probe_mode function */ 285 - #define PCI_PROBE_NONE -1 /* Don't look at this bus at all */ 286 - #define PCI_PROBE_NORMAL 0 /* Do normal PCI probing */ 287 - #define PCI_PROBE_DEVTREE 1 /* Instantiate from device tree */ 288 286 289 287 #ifdef CONFIG_NUMA 290 288 #define PHB_SET_NODE(PHB, NODE) ((PHB)->node = (NODE))
+9 -2
arch/powerpc/include/asm/pci.h
··· 22 22 23 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 30 #define PCIBIOS_MIN_IO 0x1000 26 31 #define PCIBIOS_MIN_MEM 0x10000000 27 32 ··· 66 61 } 67 62 68 63 #ifdef CONFIG_PCI 69 - extern void set_pci_dma_ops(struct dma_mapping_ops *dma_ops); 70 - extern struct dma_mapping_ops *get_pci_dma_ops(void); 64 + extern void set_pci_dma_ops(struct dma_map_ops *dma_ops); 65 + extern struct dma_map_ops *get_pci_dma_ops(void); 71 66 #else /* CONFIG_PCI */ 72 67 #define set_pci_dma_ops(d) 73 68 #define get_pci_dma_ops() NULL ··· 233 228 234 229 extern void pcibios_setup_bus_devices(struct pci_bus *bus); 235 230 extern void pcibios_setup_bus_self(struct pci_bus *bus); 231 + extern void pcibios_setup_phb_io_space(struct pci_controller *hose); 232 + extern void pcibios_scan_phb(struct pci_controller *hose, void *sysdata); 236 233 237 234 #endif /* __KERNEL__ */ 238 235 #endif /* __ASM_POWERPC_PCI_H */
+34 -12
arch/powerpc/include/asm/pgalloc.h
··· 4 4 5 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 16 static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) 8 17 { 9 18 free_page((unsigned long)pte); ··· 28 19 unsigned long val; 29 20 } pgtable_free_t; 30 21 31 - #define PGF_CACHENUM_MASK 0x7 22 + /* This needs to be big enough to allow for MMU_PAGE_COUNT + 2 to be stored 23 + * and small enough to fit in the low bits of any naturally aligned page 24 + * table cache entry. Arbitrarily set to 0x1f, that should give us some 25 + * room to grow 26 + */ 27 + #define PGF_CACHENUM_MASK 0x1f 32 28 33 29 static inline pgtable_free_t pgtable_free_cache(void *p, int cachenum, 34 30 unsigned long mask) ··· 49 35 #include <asm/pgalloc-32.h> 50 36 #endif 51 37 52 - extern void pgtable_free_tlb(struct mmu_gather *tlb, pgtable_free_t pgf); 53 - 54 38 #ifdef CONFIG_SMP 55 - #define __pte_free_tlb(tlb,ptepage,address) \ 56 - do { \ 57 - pgtable_page_dtor(ptepage); \ 58 - pgtable_free_tlb(tlb, pgtable_free_cache(page_address(ptepage), \ 59 - PTE_NONCACHE_NUM, PTE_TABLE_SIZE-1)); \ 60 - } while (0) 61 - #else 62 - #define __pte_free_tlb(tlb, pte, address) pte_free((tlb)->mm, (pte)) 63 - #endif 39 + extern void pgtable_free_tlb(struct mmu_gather *tlb, pgtable_free_t pgf); 40 + extern void pte_free_finish(void); 41 + #else /* CONFIG_SMP */ 42 + static inline void pgtable_free_tlb(struct mmu_gather *tlb, pgtable_free_t pgf) 43 + { 44 + pgtable_free(pgf); 45 + } 46 + static inline void pte_free_finish(void) { } 47 + #endif /* !CONFIG_SMP */ 64 48 49 + static inline void __pte_free_tlb(struct mmu_gather *tlb, struct page *ptepage, 50 + unsigned long address) 51 + { 52 + pgtable_free_t pgf = pgtable_free_cache(page_address(ptepage), 53 + PTE_NONCACHE_NUM, 54 + PTE_TABLE_SIZE-1); 55 + tlb_flush_pgtable(tlb, address); 56 + pgtable_page_dtor(ptepage); 57 + pgtable_free_tlb(tlb, pgf); 58 + } 65 59 66 60 #endif /* __KERNEL__ */ 67 61 #endif /* _ASM_POWERPC_PGALLOC_H */
+5 -4
arch/powerpc/include/asm/pgtable-ppc32.h
··· 111 111 #include <asm/pte-40x.h> 112 112 #elif defined(CONFIG_44x) 113 113 #include <asm/pte-44x.h> 114 + #elif defined(CONFIG_FSL_BOOKE) && defined(CONFIG_PTE_64BIT) 115 + #include <asm/pte-book3e.h> 114 116 #elif defined(CONFIG_FSL_BOOKE) 115 117 #include <asm/pte-fsl-booke.h> 116 118 #elif defined(CONFIG_8xx) ··· 188 186 #endif /* !PTE_ATOMIC_UPDATES */ 189 187 190 188 #ifdef CONFIG_44x 191 - if ((old & _PAGE_USER) && (old & _PAGE_HWEXEC)) 189 + if ((old & _PAGE_USER) && (old & _PAGE_EXEC)) 192 190 icache_44x_need_flush = 1; 193 191 #endif 194 192 return old; ··· 219 217 #endif /* !PTE_ATOMIC_UPDATES */ 220 218 221 219 #ifdef CONFIG_44x 222 - if ((old & _PAGE_USER) && (old & _PAGE_HWEXEC)) 220 + if ((old & _PAGE_USER) && (old & _PAGE_EXEC)) 223 221 icache_44x_need_flush = 1; 224 222 #endif 225 223 return old; ··· 269 267 static inline void __ptep_set_access_flags(pte_t *ptep, pte_t entry) 270 268 { 271 269 unsigned long bits = pte_val(entry) & 272 - (_PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_RW | 273 - _PAGE_HWEXEC | _PAGE_EXEC); 270 + (_PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_RW | _PAGE_EXEC); 274 271 pte_update(ptep, 0, bits); 275 272 } 276 273
+1 -3
arch/powerpc/include/asm/pgtable-ppc64-64k.h
··· 10 10 #define PGD_INDEX_SIZE 4 11 11 12 12 #ifndef __ASSEMBLY__ 13 - 14 13 #define PTE_TABLE_SIZE (sizeof(real_pte_t) << PTE_INDEX_SIZE) 15 14 #define PMD_TABLE_SIZE (sizeof(pmd_t) << PMD_INDEX_SIZE) 16 15 #define PGD_TABLE_SIZE (sizeof(pgd_t) << PGD_INDEX_SIZE) 16 + #endif /* __ASSEMBLY__ */ 17 17 18 18 #define PTRS_PER_PTE (1 << PTE_INDEX_SIZE) 19 19 #define PTRS_PER_PMD (1 << PMD_INDEX_SIZE) ··· 31 31 #define PGDIR_SHIFT (PMD_SHIFT + PMD_INDEX_SIZE) 32 32 #define PGDIR_SIZE (1UL << PGDIR_SHIFT) 33 33 #define PGDIR_MASK (~(PGDIR_SIZE-1)) 34 - 35 - #endif /* __ASSEMBLY__ */ 36 34 37 35 /* Bits to mask out from a PMD to get to the PTE page */ 38 36 #define PMD_MASKED_BITS 0x1ff
+47 -20
arch/powerpc/include/asm/pgtable-ppc64.h
··· 5 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 8 #ifdef CONFIG_PPC_64K_PAGES 14 9 #include <asm/pgtable-ppc64-64k.h> 15 10 #else ··· 33 38 #endif 34 39 35 40 /* 36 - * Define the address range of the vmalloc VM area. 41 + * Define the address range of the kernel non-linear virtual area 37 42 */ 38 - #define VMALLOC_START ASM_CONST(0xD000000000000000) 39 - #define VMALLOC_SIZE (PGTABLE_RANGE >> 1) 40 - #define VMALLOC_END (VMALLOC_START + VMALLOC_SIZE) 43 + 44 + #ifdef CONFIG_PPC_BOOK3E 45 + #define KERN_VIRT_START ASM_CONST(0x8000000000000000) 46 + #else 47 + #define KERN_VIRT_START ASM_CONST(0xD000000000000000) 48 + #endif 49 + #define KERN_VIRT_SIZE PGTABLE_RANGE 41 50 42 51 /* 43 - * Define the address ranges for MMIO and IO space : 52 + * The vmalloc space starts at the beginning of that region, and 53 + * occupies half of it on hash CPUs and a quarter of it on Book3E 54 + * (we keep a quarter for the virtual memmap) 55 + */ 56 + #define VMALLOC_START KERN_VIRT_START 57 + #ifdef CONFIG_PPC_BOOK3E 58 + #define VMALLOC_SIZE (KERN_VIRT_SIZE >> 2) 59 + #else 60 + #define VMALLOC_SIZE (KERN_VIRT_SIZE >> 1) 61 + #endif 62 + #define VMALLOC_END (VMALLOC_START + VMALLOC_SIZE) 63 + 64 + /* 65 + * The second half of the kernel virtual space is used for IO mappings, 66 + * it's itself carved into the PIO region (ISA and PHB IO space) and 67 + * the ioremap space 44 68 * 45 - * ISA_IO_BASE = VMALLOC_END, 64K reserved area 69 + * ISA_IO_BASE = KERN_IO_START, 64K reserved area 46 70 * PHB_IO_BASE = ISA_IO_BASE + 64K to ISA_IO_BASE + 2G, PHB IO spaces 47 71 * IOREMAP_BASE = ISA_IO_BASE + 2G to VMALLOC_START + PGTABLE_RANGE 48 72 */ 73 + #define KERN_IO_START (KERN_VIRT_START + (KERN_VIRT_SIZE >> 1)) 49 74 #define FULL_IO_SIZE 0x80000000ul 50 - #define ISA_IO_BASE (VMALLOC_END) 51 - #define ISA_IO_END (VMALLOC_END + 0x10000ul) 75 + #define ISA_IO_BASE (KERN_IO_START) 76 + #define ISA_IO_END (KERN_IO_START + 0x10000ul) 52 77 #define PHB_IO_BASE (ISA_IO_END) 53 - #define PHB_IO_END (VMALLOC_END + FULL_IO_SIZE) 78 + #define PHB_IO_END (KERN_IO_START + FULL_IO_SIZE) 54 79 #define IOREMAP_BASE (PHB_IO_END) 55 - #define IOREMAP_END (VMALLOC_START + PGTABLE_RANGE) 80 + #define IOREMAP_END (KERN_VIRT_START + KERN_VIRT_SIZE) 81 + 56 82 57 83 /* 58 84 * Region IDs ··· 84 68 85 69 #define VMALLOC_REGION_ID (REGION_ID(VMALLOC_START)) 86 70 #define KERNEL_REGION_ID (REGION_ID(PAGE_OFFSET)) 87 - #define VMEMMAP_REGION_ID (0xfUL) 71 + #define VMEMMAP_REGION_ID (0xfUL) /* Server only */ 88 72 #define USER_REGION_ID (0UL) 89 73 90 74 /* 91 - * Defines the address of the vmemap area, in its own region 75 + * Defines the address of the vmemap area, in its own region on 76 + * hash table CPUs and after the vmalloc space on Book3E 92 77 */ 78 + #ifdef CONFIG_PPC_BOOK3E 79 + #define VMEMMAP_BASE VMALLOC_END 80 + #define VMEMMAP_END KERN_IO_START 81 + #else 93 82 #define VMEMMAP_BASE (VMEMMAP_REGION_ID << REGION_SHIFT) 83 + #endif 94 84 #define vmemmap ((struct page *)VMEMMAP_BASE) 95 85 96 86 97 87 /* 98 88 * Include the PTE bits definitions 99 89 */ 90 + #ifdef CONFIG_PPC_BOOK3S 100 91 #include <asm/pte-hash64.h> 92 + #else 93 + #include <asm/pte-book3e.h> 94 + #endif 101 95 #include <asm/pte-common.h> 102 - 103 96 104 97 #ifdef CONFIG_PPC_MM_SLICES 105 98 #define HAVE_ARCH_UNMAPPED_AREA ··· 116 91 #endif /* CONFIG_PPC_MM_SLICES */ 117 92 118 93 #ifndef __ASSEMBLY__ 94 + 95 + #include <linux/stddef.h> 96 + #include <asm/tlbflush.h> 119 97 120 98 /* 121 99 * This is the default implementation of various PTE accessors, it's ··· 313 285 static inline void __ptep_set_access_flags(pte_t *ptep, pte_t entry) 314 286 { 315 287 unsigned long bits = pte_val(entry) & 316 - (_PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_RW | 317 - _PAGE_EXEC | _PAGE_HWEXEC); 288 + (_PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_RW | _PAGE_EXEC); 318 289 319 290 #ifdef PTE_ATOMIC_UPDATES 320 291 unsigned long old, tmp;
+14 -2
arch/powerpc/include/asm/pmc.h
··· 27 27 28 28 int reserve_pmc_hardware(perf_irq_t new_perf_irq); 29 29 void release_pmc_hardware(void); 30 + void ppc_enable_pmcs(void); 30 31 31 32 #ifdef CONFIG_PPC64 32 - void power4_enable_pmcs(void); 33 - void pasemi_enable_pmcs(void); 33 + #include <asm/lppaca.h> 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 46 #endif 35 47 36 48 #endif /* __KERNEL__ */
+6
arch/powerpc/include/asm/ppc-opcode.h
··· 48 48 #define PPC_INST_TLBIE 0x7c000264 49 49 #define PPC_INST_TLBILX 0x7c000024 50 50 #define PPC_INST_WAIT 0x7c00007c 51 + #define PPC_INST_TLBIVAX 0x7c000624 52 + #define PPC_INST_TLBSRX_DOT 0x7c0006a5 51 53 52 54 /* macros to insert fields into opcodes */ 53 55 #define __PPC_RA(a) (((a) & 0x1f) << 16) ··· 78 76 __PPC_WC(w)) 79 77 #define PPC_TLBIE(lp,a) stringify_in_c(.long PPC_INST_TLBIE | \ 80 78 __PPC_RB(a) | __PPC_RS(lp)) 79 + #define PPC_TLBSRX_DOT(a,b) stringify_in_c(.long PPC_INST_TLBSRX_DOT | \ 80 + __PPC_RA(a) | __PPC_RB(b)) 81 + #define PPC_TLBIVAX(a,b) stringify_in_c(.long PPC_INST_TLBIVAX | \ 82 + __PPC_RA(a) | __PPC_RB(b)) 81 83 82 84 /* 83 85 * Define what the VSX XX1 form instructions will look like, then add
-1
arch/powerpc/include/asm/ppc-pci.h
··· 39 39 40 40 extern void pci_devs_phb_init(void); 41 41 extern void pci_devs_phb_init_dynamic(struct pci_controller *phb); 42 - extern void scan_phb(struct pci_controller *hose); 43 42 44 43 /* From rtas_pci.h */ 45 44 extern void init_pci_config_tokens (void);
+16 -10
arch/powerpc/include/asm/ppc_asm.h
··· 98 98 #define REST_16FPRS(n, base) REST_8FPRS(n, base); REST_8FPRS(n+8, base) 99 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 102 #define SAVE_2VRS(n,b,base) SAVE_VR(n,b,base); SAVE_VR(n+1,b,base) 103 103 #define SAVE_4VRS(n,b,base) SAVE_2VRS(n,b,base); SAVE_2VRS(n+2,b,base) 104 104 #define SAVE_8VRS(n,b,base) SAVE_4VRS(n,b,base); SAVE_4VRS(n+4,b,base) 105 105 #define SAVE_16VRS(n,b,base) SAVE_8VRS(n,b,base); SAVE_8VRS(n+8,b,base) 106 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 108 #define REST_2VRS(n,b,base) REST_VR(n,b,base); REST_VR(n+1,b,base) 109 109 #define REST_4VRS(n,b,base) REST_2VRS(n,b,base); REST_2VRS(n+2,b,base) 110 110 #define REST_8VRS(n,b,base) REST_4VRS(n,b,base); REST_4VRS(n+4,b,base) ··· 112 112 #define REST_32VRS(n,b,base) REST_16VRS(n,b,base); REST_16VRS(n+16,b,base) 113 113 114 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 116 #define SAVE_2VSRS(n,b,base) SAVE_VSR(n,b,base); SAVE_VSR(n+1,b,base) 117 117 #define SAVE_4VSRS(n,b,base) SAVE_2VSRS(n,b,base); SAVE_2VSRS(n+2,b,base) 118 118 #define SAVE_8VSRS(n,b,base) SAVE_4VSRS(n,b,base); SAVE_4VSRS(n+4,b,base) 119 119 #define SAVE_16VSRS(n,b,base) SAVE_8VSRS(n,b,base); SAVE_8VSRS(n+8,b,base) 120 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 122 #define REST_2VSRS(n,b,base) REST_VSR(n,b,base); REST_VSR(n+1,b,base) 123 123 #define REST_4VSRS(n,b,base) REST_2VSRS(n,b,base); REST_2VSRS(n+2,b,base) 124 124 #define REST_8VSRS(n,b,base) REST_4VSRS(n,b,base); REST_4VSRS(n+4,b,base) 125 125 #define REST_16VSRS(n,b,base) REST_8VSRS(n,b,base); REST_8VSRS(n+8,b,base) 126 126 #define REST_32VSRS(n,b,base) REST_16VSRS(n,b,base); REST_16VSRS(n+16,b,base) 127 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 129 #define SAVE_2VSRSU(n,b,base) SAVE_VSRU(n,b,base); SAVE_VSRU(n+1,b,base) 130 130 #define SAVE_4VSRSU(n,b,base) SAVE_2VSRSU(n,b,base); SAVE_2VSRSU(n+2,b,base) 131 131 #define SAVE_8VSRSU(n,b,base) SAVE_4VSRSU(n,b,base); SAVE_4VSRSU(n+4,b,base) 132 132 #define SAVE_16VSRSU(n,b,base) SAVE_8VSRSU(n,b,base); SAVE_8VSRSU(n+8,b,base) 133 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 135 #define REST_2VSRSU(n,b,base) REST_VSRU(n,b,base); REST_VSRU(n+1,b,base) 136 136 #define REST_4VSRSU(n,b,base) REST_2VSRSU(n,b,base); REST_2VSRSU(n+2,b,base) 137 137 #define REST_8VSRSU(n,b,base) REST_4VSRSU(n,b,base); REST_4VSRSU(n+4,b,base) ··· 375 375 #define PPC440EP_ERR42 376 376 #endif 377 377 378 - 379 - #if defined(CONFIG_BOOKE) 378 + /* 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 387 #define toreal(rd) 381 388 #define fromreal(rd) 382 389 ··· 433 426 .previous 434 427 #endif 435 428 436 - #ifdef CONFIG_PPC64 429 + #ifdef CONFIG_PPC_BOOK3S_64 437 430 #define RFI rfid 438 431 #define MTMSRD(r) mtmsrd r 439 - 440 432 #else 441 433 #define FIX_SRR1(ra, rb) 442 434 #ifndef CONFIG_40x
+1 -1
arch/powerpc/include/asm/pte-40x.h
··· 46 46 #define _PAGE_RW 0x040 /* software: Writes permitted */ 47 47 #define _PAGE_DIRTY 0x080 /* software: dirty page */ 48 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 50 #define _PAGE_ACCESSED 0x400 /* software: R: page referenced */ 51 51 52 52 #define _PMD_PRESENT 0x400 /* PMD points to page of PTEs */
+1 -1
arch/powerpc/include/asm/pte-44x.h
··· 78 78 #define _PAGE_PRESENT 0x00000001 /* S: PTE valid */ 79 79 #define _PAGE_RW 0x00000002 /* S: Write permission */ 80 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 82 #define _PAGE_ACCESSED 0x00000008 /* S: Page referenced */ 83 83 #define _PAGE_DIRTY 0x00000010 /* S: Page dirty */ 84 84 #define _PAGE_SPECIAL 0x00000020 /* S: Special page */
-1
arch/powerpc/include/asm/pte-8xx.h
··· 36 36 /* These five software bits must be masked out when the entry is loaded 37 37 * into the TLB. 38 38 */ 39 - #define _PAGE_EXEC 0x0008 /* software: i-cache coherency required */ 40 39 #define _PAGE_GUARDED 0x0010 /* software: guarded access */ 41 40 #define _PAGE_DIRTY 0x0020 /* software: page changed */ 42 41 #define _PAGE_RW 0x0040 /* software: user write access allowed */
+84
arch/powerpc/include/asm/pte-book3e.h
··· 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 */
+14 -11
arch/powerpc/include/asm/pte-common.h
··· 13 13 #ifndef _PAGE_HWWRITE 14 14 #define _PAGE_HWWRITE 0 15 15 #endif 16 - #ifndef _PAGE_HWEXEC 17 - #define _PAGE_HWEXEC 0 18 - #endif 19 16 #ifndef _PAGE_EXEC 20 17 #define _PAGE_EXEC 0 21 18 #endif ··· 31 34 #ifndef _PAGE_4K_PFN 32 35 #define _PAGE_4K_PFN 0 33 36 #endif 37 + #ifndef _PAGE_SAO 38 + #define _PAGE_SAO 0 39 + #endif 34 40 #ifndef _PAGE_PSIZE 35 41 #define _PAGE_PSIZE 0 36 42 #endif ··· 45 45 #define PMD_PAGE_SIZE(pmd) bad_call_to_PMD_PAGE_SIZE() 46 46 #endif 47 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 52 #endif 50 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 58 #endif 53 59 #ifndef _PAGE_HPTEFLAGS 54 60 #define _PAGE_HPTEFLAGS _PAGE_HASHPTE ··· 99 93 #define PAGE_PROT_BITS (_PAGE_GUARDED | _PAGE_COHERENT | _PAGE_NO_CACHE | \ 100 94 _PAGE_WRITETHRU | _PAGE_ENDIAN | _PAGE_4K_PFN | \ 101 95 _PAGE_USER | _PAGE_ACCESSED | \ 102 - _PAGE_RW | _PAGE_HWWRITE | _PAGE_DIRTY | \ 103 - _PAGE_EXEC | _PAGE_HWEXEC) 96 + _PAGE_RW | _PAGE_HWWRITE | _PAGE_DIRTY | _PAGE_EXEC) 104 97 105 98 /* 106 99 * We define 2 sets of base prot bits, one for basic pages (ie, ··· 156 151 _PAGE_NO_CACHE) 157 152 #define PAGE_KERNEL_NCG __pgprot(_PAGE_BASE_NC | _PAGE_KERNEL_RW | \ 158 153 _PAGE_NO_CACHE | _PAGE_GUARDED) 159 - #define PAGE_KERNEL_X __pgprot(_PAGE_BASE | _PAGE_KERNEL_RW | _PAGE_EXEC | \ 160 - _PAGE_HWEXEC) 154 + #define PAGE_KERNEL_X __pgprot(_PAGE_BASE | _PAGE_KERNEL_RWX) 161 155 #define PAGE_KERNEL_RO __pgprot(_PAGE_BASE | _PAGE_KERNEL_RO) 162 - #define PAGE_KERNEL_ROX __pgprot(_PAGE_BASE | _PAGE_KERNEL_RO | _PAGE_EXEC | \ 163 - _PAGE_HWEXEC) 156 + #define PAGE_KERNEL_ROX __pgprot(_PAGE_BASE | _PAGE_KERNEL_ROX) 164 157 165 158 /* Protection used for kernel text. We want the debuggers to be able to 166 159 * set breakpoints anywhere, so don't write protect the kernel text
+1 -8
arch/powerpc/include/asm/pte-fsl-booke.h
··· 23 23 #define _PAGE_FILE 0x00002 /* S: when !present: nonlinear file mapping */ 24 24 #define _PAGE_RW 0x00004 /* S: Write permission (SW) */ 25 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 27 #define _PAGE_ACCESSED 0x00020 /* S: Page referenced */ 28 28 29 29 #define _PAGE_ENDIAN 0x00040 /* H: E bit */ ··· 32 32 #define _PAGE_NO_CACHE 0x00200 /* H: I bit */ 33 33 #define _PAGE_WRITETHRU 0x00400 /* H: W bit */ 34 34 #define _PAGE_SPECIAL 0x00800 /* S: Special page */ 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 35 43 36 #define _PMD_PRESENT 0 44 37 #define _PMD_PRESENT_MASK (PAGE_MASK)
-1
arch/powerpc/include/asm/pte-hash32.h
··· 26 26 #define _PAGE_WRITETHRU 0x040 /* W: cache write-through */ 27 27 #define _PAGE_DIRTY 0x080 /* C: page changed */ 28 28 #define _PAGE_ACCESSED 0x100 /* R: page referenced */ 29 - #define _PAGE_EXEC 0x200 /* software: i-cache coherency required */ 30 29 #define _PAGE_RW 0x400 /* software: user write access allowed */ 31 30 #define _PAGE_SPECIAL 0x800 /* software: Special page */ 32 31
+134 -7
arch/powerpc/include/asm/reg.h
··· 98 98 #define MSR_RI __MASK(MSR_RI_LG) /* Recoverable Exception */ 99 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 103 #define MSR_ MSR_ME | MSR_RI | MSR_IR | MSR_DR | MSR_ISF |MSR_HV 103 104 #define MSR_KERNEL MSR_ | MSR_SF 104 - 105 105 #define MSR_USER32 MSR_ | MSR_PR | MSR_EE 106 106 #define MSR_USER64 MSR_USER32 | MSR_SF 107 - 108 - #else /* 32-bit */ 107 + #elif defined(CONFIG_PPC_BOOK3S_32) || defined(CONFIG_8xx) 109 108 /* Default MSR for kernel mode. */ 110 - #ifndef MSR_KERNEL /* reg_booke.h also defines this */ 111 109 #define MSR_KERNEL (MSR_ME|MSR_RI|MSR_IR|MSR_DR) 112 - #endif 113 - 114 110 #define MSR_USER (MSR_KERNEL|MSR_PR|MSR_EE) 115 111 #endif 116 112 ··· 639 643 #define MMCR0_PMC2_CYCLES 0x1 640 644 #define MMCR0_PMC2_ITLB 0x7 641 645 #define MMCR0_PMC2_LOADMISSTIME 0x5 646 + #endif 647 + 648 + /* 649 + * SPRG usage: 650 + * 651 + * All 64-bit: 652 + * - SPRG1 stores PACA pointer 653 + * 654 + * 64-bit server: 655 + * - SPRG0 unused (reserved for HV on Power4) 656 + * - SPRG2 scratch for exception vectors 657 + * - SPRG3 unused (user visible) 658 + * 659 + * 64-bit embedded 660 + * - SPRG0 generic exception scratch 661 + * - SPRG2 TLB exception stack 662 + * - SPRG3 unused (user visible) 663 + * - SPRG4 unused (user visible) 664 + * - SPRG6 TLB miss scratch (user visible, sorry !) 665 + * - SPRG7 critical exception scratch 666 + * - SPRG8 machine check exception scratch 667 + * - SPRG9 debug exception scratch 668 + * 669 + * All 32-bit: 670 + * - SPRG3 current thread_info pointer 671 + * (virtual on BookE, physical on others) 672 + * 673 + * 32-bit classic: 674 + * - SPRG0 scratch for exception vectors 675 + * - SPRG1 scratch for exception vectors 676 + * - SPRG2 indicator that we are in RTAS 677 + * - SPRG4 (603 only) pseudo TLB LRU data 678 + * 679 + * 32-bit 40x: 680 + * - SPRG0 scratch for exception vectors 681 + * - SPRG1 scratch for exception vectors 682 + * - SPRG2 scratch for exception vectors 683 + * - SPRG4 scratch for exception vectors (not 403) 684 + * - SPRG5 scratch for exception vectors (not 403) 685 + * - SPRG6 scratch for exception vectors (not 403) 686 + * - SPRG7 scratch for exception vectors (not 403) 687 + * 688 + * 32-bit 440 and FSL BookE: 689 + * - SPRG0 scratch for exception vectors 690 + * - SPRG1 scratch for exception vectors (*) 691 + * - SPRG2 scratch for crit interrupts handler 692 + * - SPRG4 scratch for exception vectors 693 + * - SPRG5 scratch for exception vectors 694 + * - SPRG6 scratch for machine check handler 695 + * - SPRG7 scratch for exception vectors 696 + * - SPRG9 scratch for debug vectors (e500 only) 697 + * 698 + * Additionally, BookE separates "read" and "write" 699 + * of those registers. That allows to use the userspace 700 + * readable variant for reads, which can avoid a fault 701 + * with KVM type virtualization. 702 + * 703 + * (*) Under KVM, the host SPRG1 is used to point to 704 + * the current VCPU data structure 705 + * 706 + * 32-bit 8xx: 707 + * - SPRG0 scratch for exception vectors 708 + * - SPRG1 scratch for exception vectors 709 + * - SPRG2 apparently unused but initialized 710 + * 711 + */ 712 + #ifdef CONFIG_PPC64 713 + #define SPRN_SPRG_PACA SPRN_SPRG1 714 + #else 715 + #define SPRN_SPRG_THREAD SPRN_SPRG3 716 + #endif 717 + 718 + #ifdef CONFIG_PPC_BOOK3S_64 719 + #define SPRN_SPRG_SCRATCH0 SPRN_SPRG2 720 + #endif 721 + 722 + #ifdef CONFIG_PPC_BOOK3E_64 723 + #define SPRN_SPRG_MC_SCRATCH SPRN_SPRG8 724 + #define SPRN_SPRG_CRIT_SCRATCH SPRN_SPRG7 725 + #define SPRN_SPRG_DBG_SCRATCH SPRN_SPRG9 726 + #define SPRN_SPRG_TLB_EXFRAME SPRN_SPRG2 727 + #define SPRN_SPRG_TLB_SCRATCH SPRN_SPRG6 728 + #define SPRN_SPRG_GEN_SCRATCH SPRN_SPRG0 729 + #endif 730 + 731 + #ifdef CONFIG_PPC_BOOK3S_32 732 + #define SPRN_SPRG_SCRATCH0 SPRN_SPRG0 733 + #define SPRN_SPRG_SCRATCH1 SPRN_SPRG1 734 + #define SPRN_SPRG_RTAS SPRN_SPRG2 735 + #define SPRN_SPRG_603_LRU SPRN_SPRG4 736 + #endif 737 + 738 + #ifdef CONFIG_40x 739 + #define SPRN_SPRG_SCRATCH0 SPRN_SPRG0 740 + #define SPRN_SPRG_SCRATCH1 SPRN_SPRG1 741 + #define SPRN_SPRG_SCRATCH2 SPRN_SPRG2 742 + #define SPRN_SPRG_SCRATCH3 SPRN_SPRG4 743 + #define SPRN_SPRG_SCRATCH4 SPRN_SPRG5 744 + #define SPRN_SPRG_SCRATCH5 SPRN_SPRG6 745 + #define SPRN_SPRG_SCRATCH6 SPRN_SPRG7 746 + #endif 747 + 748 + #ifdef CONFIG_BOOKE 749 + #define SPRN_SPRG_RSCRATCH0 SPRN_SPRG0 750 + #define SPRN_SPRG_WSCRATCH0 SPRN_SPRG0 751 + #define SPRN_SPRG_RSCRATCH1 SPRN_SPRG1 752 + #define SPRN_SPRG_WSCRATCH1 SPRN_SPRG1 753 + #define SPRN_SPRG_RSCRATCH_CRIT SPRN_SPRG2 754 + #define SPRN_SPRG_WSCRATCH_CRIT SPRN_SPRG2 755 + #define SPRN_SPRG_RSCRATCH2 SPRN_SPRG4R 756 + #define SPRN_SPRG_WSCRATCH2 SPRN_SPRG4W 757 + #define SPRN_SPRG_RSCRATCH3 SPRN_SPRG5R 758 + #define SPRN_SPRG_WSCRATCH3 SPRN_SPRG5W 759 + #define SPRN_SPRG_RSCRATCH_MC SPRN_SPRG6R 760 + #define SPRN_SPRG_WSCRATCH_MC SPRN_SPRG6W 761 + #define SPRN_SPRG_RSCRATCH4 SPRN_SPRG7R 762 + #define SPRN_SPRG_WSCRATCH4 SPRN_SPRG7W 763 + #ifdef CONFIG_E200 764 + #define SPRN_SPRG_RSCRATCH_DBG SPRN_SPRG6R 765 + #define SPRN_SPRG_WSCRATCH_DBG SPRN_SPRG6W 766 + #else 767 + #define SPRN_SPRG_RSCRATCH_DBG SPRN_SPRG9 768 + #define SPRN_SPRG_WSCRATCH_DBG SPRN_SPRG9 769 + #endif 770 + #define SPRN_SPRG_RVCPU SPRN_SPRG1 771 + #define SPRN_SPRG_WVCPU SPRN_SPRG1 772 + #endif 773 + 774 + #ifdef CONFIG_8xx 775 + #define SPRN_SPRG_SCRATCH0 SPRN_SPRG0 776 + #define SPRN_SPRG_SCRATCH1 SPRN_SPRG1 642 777 #endif 643 778 644 779 /*
+41 -9
arch/powerpc/include/asm/reg_booke.h
··· 18 18 #define MSR_IS MSR_IR /* Instruction Space */ 19 19 #define MSR_DS MSR_DR /* Data Space */ 20 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_40x) 23 + #if defined(CONFIG_PPC_BOOK3E_64) 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 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 32 #define MSR_KERNEL (MSR_ME|MSR_RI|MSR_CE) 33 + #define MSR_USER (MSR_KERNEL|MSR_PR|MSR_EE) 27 34 #endif 28 35 29 36 /* Special Purpose Registers (SPRNs)*/ 30 37 #define SPRN_DECAR 0x036 /* Decrementer Auto Reload Register */ 31 38 #define SPRN_IVPR 0x03F /* Interrupt Vector Prefix Register */ 32 39 #define SPRN_USPRG0 0x100 /* User Special Purpose Register General 0 */ 40 + #define SPRN_SPRG3R 0x103 /* Special Purpose Register General 3 Read */ 33 41 #define SPRN_SPRG4R 0x104 /* Special Purpose Register General 4 Read */ 34 42 #define SPRN_SPRG5R 0x105 /* Special Purpose Register General 5 Read */ 35 43 #define SPRN_SPRG6R 0x106 /* Special Purpose Register General 6 Read */ ··· 46 38 #define SPRN_SPRG5W 0x115 /* Special Purpose Register General 5 Write */ 47 39 #define SPRN_SPRG6W 0x116 /* Special Purpose Register General 6 Write */ 48 40 #define SPRN_SPRG7W 0x117 /* Special Purpose Register General 7 Write */ 41 + #define SPRN_EPCR 0x133 /* Embedded Processor Control Register */ 49 42 #define SPRN_DBCR2 0x136 /* Debug Control Register 2 */ 50 43 #define SPRN_IAC3 0x13A /* Instruction Address Compare 3 */ 51 44 #define SPRN_IAC4 0x13B /* Instruction Address Compare 4 */ 52 45 #define SPRN_DVC1 0x13E /* Data Value Compare Register 1 */ 53 46 #define SPRN_DVC2 0x13F /* Data Value Compare Register 2 */ 47 + #define SPRN_MAS8 0x155 /* MMU Assist Register 8 */ 48 + #define SPRN_TLB0PS 0x158 /* TLB 0 Page Size Register */ 49 + #define SPRN_MAS5_MAS6 0x15c /* MMU Assist Register 5 || 6 */ 50 + #define SPRN_MAS8_MAS1 0x15d /* MMU Assist Register 8 || 1 */ 51 + #define SPRN_MAS7_MAS3 0x174 /* MMU Assist Register 7 || 3 */ 52 + #define SPRN_MAS0_MAS1 0x175 /* MMU Assist Register 0 || 1 */ 54 53 #define SPRN_IVOR0 0x190 /* Interrupt Vector Offset Register 0 */ 55 54 #define SPRN_IVOR1 0x191 /* Interrupt Vector Offset Register 1 */ 56 55 #define SPRN_IVOR2 0x192 /* Interrupt Vector Offset Register 2 */ ··· 108 93 #define SPRN_PID2 0x27A /* Process ID Register 2 */ 109 94 #define SPRN_TLB0CFG 0x2B0 /* TLB 0 Config Register */ 110 95 #define SPRN_TLB1CFG 0x2B1 /* TLB 1 Config Register */ 96 + #define SPRN_TLB2CFG 0x2B2 /* TLB 2 Config Register */ 97 + #define SPRN_TLB3CFG 0x2B3 /* TLB 3 Config Register */ 111 98 #define SPRN_EPR 0x2BE /* External Proxy Register */ 112 99 #define SPRN_CCR1 0x378 /* Core Configuration Register 1 */ 113 100 #define SPRN_ZPR 0x3B0 /* Zone Protection Register (40x) */ ··· 432 415 #define L2CSR0_L2LOA 0x00000080 /* L2 Cache Lock Overflow Allocate */ 433 416 #define L2CSR0_L2LO 0x00000020 /* L2 Cache Lock Overflow */ 434 417 435 - /* Bit definitions for MMUCSR0 */ 436 - #define MMUCSR0_TLB1FI 0x00000002 /* TLB1 Flash invalidate */ 437 - #define MMUCSR0_TLB0FI 0x00000004 /* TLB0 Flash invalidate */ 438 - #define MMUCSR0_TLB2FI 0x00000040 /* TLB2 Flash invalidate */ 439 - #define MMUCSR0_TLB3FI 0x00000020 /* TLB3 Flash invalidate */ 440 - 441 418 /* Bit definitions for SGR. */ 442 419 #define SGR_NORMAL 0 /* Speculative fetching allowed. */ 443 420 #define SGR_GUARDED 1 /* Speculative fetching disallowed. */ 421 + 422 + /* Bit definitions for EPCR */ 423 + #define SPRN_EPCR_EXTGS 0x80000000 /* External Input interrupt 424 + * directed to Guest state */ 425 + #define SPRN_EPCR_DTLBGS 0x40000000 /* Data TLB Error interrupt 426 + * directed to guest state */ 427 + #define SPRN_EPCR_ITLBGS 0x20000000 /* Instr. TLB error interrupt 428 + * directed to guest state */ 429 + #define SPRN_EPCR_DSIGS 0x10000000 /* Data Storage interrupt 430 + * directed to guest state */ 431 + #define SPRN_EPCR_ISIGS 0x08000000 /* Instr. Storage interrupt 432 + * directed to guest state */ 433 + #define SPRN_EPCR_DUVD 0x04000000 /* Disable Hypervisor Debug */ 434 + #define SPRN_EPCR_ICM 0x02000000 /* Interrupt computation mode 435 + * (copied to MSR:CM on intr) */ 436 + #define SPRN_EPCR_GICM 0x01000000 /* Guest Interrupt Comp. mode */ 437 + #define SPRN_EPCR_DGTMI 0x00800000 /* Disable TLB Guest Management 438 + * instructions */ 439 + #define SPRN_EPCR_DMIUH 0x00400000 /* Disable MAS Interrupt updates 440 + * for hypervisor */ 441 + 444 442 445 443 /* 446 444 * The IBM-403 is an even more odd special case, as it is much
+1 -1
arch/powerpc/include/asm/setup.h
··· 1 1 #ifndef _ASM_POWERPC_SETUP_H 2 2 #define _ASM_POWERPC_SETUP_H 3 3 4 - #define COMMAND_LINE_SIZE 512 4 + #include <asm-generic/setup.h> 5 5 6 6 #endif /* _ASM_POWERPC_SETUP_H */
+10
arch/powerpc/include/asm/smp.h
··· 148 148 extern void arch_send_call_function_single_ipi(int cpu); 149 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 161 #endif /* __ASSEMBLY__ */ 152 162 153 163 #endif /* __KERNEL__ */
+3 -5
arch/powerpc/include/asm/swiotlb.h
··· 13 13 14 14 #include <linux/swiotlb.h> 15 15 16 - extern struct dma_mapping_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); 16 + extern struct dma_map_ops swiotlb_dma_ops; 21 17 22 18 static inline void dma_mark_clean(void *addr, size_t size) {} 23 19 24 20 extern unsigned int ppc_swiotlb_enable; 25 21 int __init swiotlb_setup_bus_notifier(void); 22 + 23 + extern void pci_dma_dev_setup_swiotlb(struct pci_dev *pdev); 26 24 27 25 #endif /* __ASM_SWIOTLB_H */
+2 -2
arch/powerpc/include/asm/systbl.h
··· 95 95 SYSX(sys_ni_syscall,compat_sys_old_readdir,sys_old_readdir) 96 96 SYSCALL_SPU(mmap) 97 97 SYSCALL_SPU(munmap) 98 - SYSCALL_SPU(truncate) 99 - SYSCALL_SPU(ftruncate) 98 + COMPAT_SYS_SPU(truncate) 99 + COMPAT_SYS_SPU(ftruncate) 100 100 SYSCALL_SPU(fchmod) 101 101 SYSCALL_SPU(fchown) 102 102 COMPAT_SYS_SPU(getpriority)
+3 -35
arch/powerpc/include/asm/tlb.h
··· 25 25 26 26 #include <linux/pagemap.h> 27 27 28 - struct mmu_gather; 29 - 30 28 #define tlb_start_vma(tlb, vma) do { } while (0) 31 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 31 extern void tlb_flush(struct mmu_gather *tlb); 58 - 59 - #endif 60 32 61 33 /* Get the generic bits... */ 62 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 36 extern void flush_hash_entry(struct mm_struct *mm, pte_t *ptep, 70 37 unsigned long address); 71 38 72 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 43 if (pte_val(*ptep) & _PAGE_HASHPTE) 76 44 flush_hash_entry(tlb->mm, ptep, address); 45 + #endif 77 46 } 78 47 79 - #endif 80 48 #endif /* __KERNEL__ */ 81 49 #endif /* __ASM_POWERPC_TLB_H */
+9 -2
arch/powerpc/include/asm/tlbflush.h
··· 6 6 * 7 7 * - flush_tlb_mm(mm) flushes the specified mm context TLB's 8 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 10 * the local processor 11 11 * - local_flush_tlb_page(vma, vmaddr) flushes one page on the local processor 12 12 * - flush_tlb_page_nohash(vma, vmaddr) flushes one page if SW loaded TLB ··· 29 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 35 #define MMU_NO_CONTEXT ((unsigned int)-1) 35 36 ··· 41 40 extern void local_flush_tlb_mm(struct mm_struct *mm); 42 41 extern void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr); 43 42 43 + extern void __local_flush_tlb_page(struct mm_struct *mm, unsigned long vmaddr, 44 + int tsize, int ind); 45 + 44 46 #ifdef CONFIG_SMP 45 47 extern void flush_tlb_mm(struct mm_struct *mm); 46 48 extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr); 49 + extern void __flush_tlb_page(struct mm_struct *mm, unsigned long vmaddr, 50 + int tsize, int ind); 47 51 #else 48 52 #define flush_tlb_mm(mm) local_flush_tlb_mm(mm) 49 53 #define flush_tlb_page(vma,addr) local_flush_tlb_page(vma,addr) 54 + #define __flush_tlb_page(mm,addr,p,i) __local_flush_tlb_page(mm,addr,p,i) 50 55 #endif 51 56 #define flush_tlb_page_nohash(vma,addr) flush_tlb_page(vma,addr) 52 57
+1 -2
arch/powerpc/include/asm/vdso.h
··· 7 7 #define VDSO32_LBASE 0x100000 8 8 #define VDSO64_LBASE 0x100000 9 9 10 - /* Default map addresses */ 10 + /* Default map addresses for 32bit vDSO */ 11 11 #define VDSO32_MBASE VDSO32_LBASE 12 - #define VDSO64_MBASE VDSO64_LBASE 13 12 14 13 #define VDSO_VERSION_STRING LINUX_2.6.15 15 14
+13 -6
arch/powerpc/kernel/Makefile
··· 33 33 obj-y += vdso32/ 34 34 obj-$(CONFIG_PPC64) += setup_64.o sys_ppc32.o \ 35 35 signal_64.o ptrace32.o \ 36 - paca.o cpu_setup_ppc970.o \ 37 - cpu_setup_pa6t.o \ 38 - firmware.o nvram_64.o 36 + paca.o nvram_64.o firmware.o 37 + obj-$(CONFIG_PPC_BOOK3S_64) += cpu_setup_ppc970.o cpu_setup_pa6t.o 39 38 obj64-$(CONFIG_RELOCATABLE) += reloc_64.o 39 + obj-$(CONFIG_PPC_BOOK3E_64) += exceptions-64e.o 40 40 obj-$(CONFIG_PPC64) += vdso64/ 41 41 obj-$(CONFIG_ALTIVEC) += vecemu.o 42 42 obj-$(CONFIG_PPC_970_NAP) += idle_power4.o ··· 63 63 obj-$(CONFIG_44x) += cpu_setup_44x.o 64 64 obj-$(CONFIG_FSL_BOOKE) += cpu_setup_fsl_booke.o dbell.o 65 65 66 - extra-$(CONFIG_PPC_STD_MMU) := head_32.o 67 - extra-$(CONFIG_PPC64) := head_64.o 66 + extra-y := head_$(CONFIG_WORD_SIZE).o 67 + extra-$(CONFIG_PPC_BOOK3E_32) := head_new_booke.o 68 68 extra-$(CONFIG_40x) := head_40x.o 69 69 extra-$(CONFIG_44x) := head_44x.o 70 70 extra-$(CONFIG_FSL_BOOKE) := head_fsl_booke.o ··· 88 88 89 89 pci64-$(CONFIG_PPC64) += pci_dn.o isa-bridge.o 90 90 obj-$(CONFIG_PCI) += pci_$(CONFIG_WORD_SIZE).o $(pci64-y) \ 91 - pci-common.o 91 + pci-common.o pci_of_scan.o 92 92 obj-$(CONFIG_PCI_MSI) += msi.o 93 93 obj-$(CONFIG_KEXEC) += machine_kexec.o crash.o \ 94 94 machine_kexec_$(CONFIG_WORD_SIZE).o ··· 114 114 ifneq ($(CONFIG_XMON)$(CONFIG_KEXEC),) 115 115 obj-y += ppc_save_regs.o 116 116 endif 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 117 124 118 125 extra-$(CONFIG_PPC_FPU) += fpu.o 119 126 extra-$(CONFIG_ALTIVEC) += vector.o
+18 -1
arch/powerpc/kernel/asm-offsets.c
··· 52 52 #include <linux/kvm_host.h> 53 53 #endif 54 54 55 + #ifdef CONFIG_PPC32 55 56 #if defined(CONFIG_BOOKE) || defined(CONFIG_40x) 56 57 #include "head_booke.h" 58 + #endif 57 59 #endif 58 60 59 61 #if defined(CONFIG_FSL_BOOKE) ··· 142 140 context.high_slices_psize)); 143 141 DEFINE(MMUPSIZEDEFSIZE, sizeof(struct mmu_psize_def)); 144 142 #endif /* CONFIG_PPC_MM_SLICES */ 143 + 144 + #ifdef CONFIG_PPC_BOOK3E 145 + DEFINE(PACAPGD, offsetof(struct paca_struct, pgd)); 146 + DEFINE(PACA_KERNELPGD, offsetof(struct paca_struct, kernel_pgd)); 147 + DEFINE(PACA_EXGEN, offsetof(struct paca_struct, exgen)); 148 + DEFINE(PACA_EXTLB, offsetof(struct paca_struct, extlb)); 149 + DEFINE(PACA_EXMC, offsetof(struct paca_struct, exmc)); 150 + DEFINE(PACA_EXCRIT, offsetof(struct paca_struct, excrit)); 151 + DEFINE(PACA_EXDBG, offsetof(struct paca_struct, exdbg)); 152 + DEFINE(PACA_MC_STACK, offsetof(struct paca_struct, mc_kstack)); 153 + DEFINE(PACA_CRIT_STACK, offsetof(struct paca_struct, crit_kstack)); 154 + DEFINE(PACA_DBG_STACK, offsetof(struct paca_struct, dbg_kstack)); 155 + #endif /* CONFIG_PPC_BOOK3E */ 156 + 145 157 #ifdef CONFIG_PPC_STD_MMU_64 146 158 DEFINE(PACASTABREAL, offsetof(struct paca_struct, stab_real)); 147 159 DEFINE(PACASTABVIRT, offsetof(struct paca_struct, stab_addr)); ··· 278 262 DEFINE(_SRR1, STACK_FRAME_OVERHEAD+sizeof(struct pt_regs)+8); 279 263 #endif /* CONFIG_PPC64 */ 280 264 265 + #if defined(CONFIG_PPC32) 281 266 #if defined(CONFIG_BOOKE) || defined(CONFIG_40x) 282 267 DEFINE(EXC_LVL_SIZE, STACK_EXC_LVL_FRAME_SIZE); 283 268 DEFINE(MAS0, STACK_INT_FRAME_SIZE+offsetof(struct exception_regs, mas0)); ··· 297 280 DEFINE(_DSRR1, STACK_INT_FRAME_SIZE+offsetof(struct exception_regs, dsrr1)); 298 281 DEFINE(SAVED_KSP_LIMIT, STACK_INT_FRAME_SIZE+offsetof(struct exception_regs, saved_ksp_limit)); 299 282 #endif 300 - 283 + #endif 301 284 DEFINE(CLONE_VM, CLONE_VM); 302 285 DEFINE(CLONE_UNTRACED, CLONE_UNTRACED); 303 286
+1 -1
arch/powerpc/kernel/cpu_setup_6xx.S
··· 21 21 mflr r4 22 22 BEGIN_MMU_FTR_SECTION 23 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 25 END_MMU_FTR_SECTION_IFSET(MMU_FTR_NEED_DTLB_SW_LRU) 26 26 BEGIN_FTR_SECTION 27 27 bl __init_fpu_registers
+58 -4
arch/powerpc/kernel/cputable.c
··· 89 89 #define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\ 90 90 PPC_FEATURE_TRUE_LE | \ 91 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 95 #define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \ 93 96 PPC_FEATURE_BOOKE) 97 + #endif 94 98 95 99 static struct cpu_spec __initdata cpu_specs[] = { 96 - #ifdef CONFIG_PPC64 100 + #ifdef CONFIG_PPC_BOOK3S_64 97 101 { /* Power3 */ 98 102 .pvr_mask = 0xffff0000, 99 103 .pvr_value = 0x00400000, ··· 512 508 .machine_check = machine_check_generic, 513 509 .platform = "power4", 514 510 } 515 - #endif /* CONFIG_PPC64 */ 511 + #endif /* CONFIG_PPC_BOOK3S_64 */ 512 + 516 513 #ifdef CONFIG_PPC32 517 514 #if CLASSIC_PPC 518 515 { /* 601 */ ··· 1635 1630 .platform = "ppc440", 1636 1631 }, 1637 1632 { /* 460EX */ 1638 - .pvr_mask = 0xffff0002, 1633 + .pvr_mask = 0xffff0006, 1639 1634 .pvr_value = 0x13020002, 1640 1635 .cpu_name = "460EX", 1641 1636 .cpu_features = CPU_FTRS_440x6, ··· 1647 1642 .machine_check = machine_check_440A, 1648 1643 .platform = "ppc440", 1649 1644 }, 1645 + { /* 460EX Rev B */ 1646 + .pvr_mask = 0xffff0007, 1647 + .pvr_value = 0x13020004, 1648 + .cpu_name = "460EX Rev. B", 1649 + .cpu_features = CPU_FTRS_440x6, 1650 + .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, 1651 + .mmu_features = MMU_FTR_TYPE_44x, 1652 + .icache_bsize = 32, 1653 + .dcache_bsize = 32, 1654 + .cpu_setup = __setup_cpu_460ex, 1655 + .machine_check = machine_check_440A, 1656 + .platform = "ppc440", 1657 + }, 1650 1658 { /* 460GT */ 1651 - .pvr_mask = 0xffff0002, 1659 + .pvr_mask = 0xffff0006, 1652 1660 .pvr_value = 0x13020000, 1653 1661 .cpu_name = "460GT", 1662 + .cpu_features = CPU_FTRS_440x6, 1663 + .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, 1664 + .mmu_features = MMU_FTR_TYPE_44x, 1665 + .icache_bsize = 32, 1666 + .dcache_bsize = 32, 1667 + .cpu_setup = __setup_cpu_460gt, 1668 + .machine_check = machine_check_440A, 1669 + .platform = "ppc440", 1670 + }, 1671 + { /* 460GT Rev B */ 1672 + .pvr_mask = 0xffff0007, 1673 + .pvr_value = 0x13020005, 1674 + .cpu_name = "460GT Rev. B", 1654 1675 .cpu_features = CPU_FTRS_440x6, 1655 1676 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, 1656 1677 .mmu_features = MMU_FTR_TYPE_44x, ··· 1828 1797 } 1829 1798 #endif /* CONFIG_E500 */ 1830 1799 #endif /* CONFIG_PPC32 */ 1800 + 1801 + #ifdef CONFIG_PPC_BOOK3E_64 1802 + { /* This is a default entry to get going, to be replaced by 1803 + * a real one at some stage 1804 + */ 1805 + #define CPU_FTRS_BASE_BOOK3E (CPU_FTR_USE_TB | \ 1806 + CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_SMT | \ 1807 + CPU_FTR_NODSISRALIGN | CPU_FTR_NOEXECUTE) 1808 + .pvr_mask = 0x00000000, 1809 + .pvr_value = 0x00000000, 1810 + .cpu_name = "Book3E", 1811 + .cpu_features = CPU_FTRS_BASE_BOOK3E, 1812 + .cpu_user_features = COMMON_USER_PPC64, 1813 + .mmu_features = MMU_FTR_TYPE_3E | MMU_FTR_USE_TLBILX | 1814 + MMU_FTR_USE_TLBIVAX_BCAST | 1815 + MMU_FTR_LOCK_BCAST_INVAL, 1816 + .icache_bsize = 64, 1817 + .dcache_bsize = 64, 1818 + .num_pmcs = 0, 1819 + .machine_check = machine_check_generic, 1820 + .platform = "power6", 1821 + }, 1822 + #endif 1831 1823 }; 1832 1824 1833 1825 static struct cpu_spec the_cpu_spec;
+1 -1
arch/powerpc/kernel/dma-iommu.c
··· 89 89 return 1; 90 90 } 91 91 92 - struct dma_mapping_ops dma_iommu_ops = { 92 + struct dma_map_ops dma_iommu_ops = { 93 93 .alloc_coherent = dma_iommu_alloc_coherent, 94 94 .free_coherent = dma_iommu_free_coherent, 95 95 .map_sg = dma_iommu_map_sg,
+17 -36
arch/powerpc/kernel/dma-swiotlb.c
··· 25 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 28 * At the moment, all platforms that use this code only require 49 29 * swiotlb to be used if we're operating on HIGHMEM. Since 50 30 * we don't ever call anything other than map_sg, unmap_sg, 51 31 * map_page, and unmap_page on highmem, use normal dma_ops 52 32 * for everything else. 53 33 */ 54 - struct dma_mapping_ops swiotlb_dma_ops = { 34 + struct dma_map_ops swiotlb_dma_ops = { 55 35 .alloc_coherent = dma_direct_alloc_coherent, 56 36 .free_coherent = dma_direct_free_coherent, 57 37 .map_sg = swiotlb_map_sg_attrs, ··· 42 62 .sync_single_range_for_cpu = swiotlb_sync_single_range_for_cpu, 43 63 .sync_single_range_for_device = swiotlb_sync_single_range_for_device, 44 64 .sync_sg_for_cpu = swiotlb_sync_sg_for_cpu, 45 - .sync_sg_for_device = swiotlb_sync_sg_for_device 65 + .sync_sg_for_device = swiotlb_sync_sg_for_device, 66 + .mapping_error = swiotlb_dma_mapping_error, 46 67 }; 47 68 48 - struct dma_mapping_ops swiotlb_pci_dma_ops = { 49 - .alloc_coherent = dma_direct_alloc_coherent, 50 - .free_coherent = dma_direct_free_coherent, 51 - .map_sg = swiotlb_map_sg_attrs, 52 - .unmap_sg = swiotlb_unmap_sg_attrs, 53 - .dma_supported = swiotlb_dma_supported, 54 - .map_page = swiotlb_map_page, 55 - .unmap_page = swiotlb_unmap_page, 56 - .addr_needs_map = swiotlb_pci_addr_needs_map, 57 - .sync_single_range_for_cpu = swiotlb_sync_single_range_for_cpu, 58 - .sync_single_range_for_device = swiotlb_sync_single_range_for_device, 59 - .sync_sg_for_cpu = swiotlb_sync_sg_for_cpu, 60 - .sync_sg_for_device = swiotlb_sync_sg_for_device 61 - }; 69 + void pci_dma_dev_setup_swiotlb(struct pci_dev *pdev) 70 + { 71 + struct pci_controller *hose; 72 + struct dev_archdata *sd; 73 + 74 + hose = pci_bus_to_host(pdev->bus); 75 + sd = &pdev->dev.archdata; 76 + sd->max_direct_dma_addr = 77 + hose->dma_window_base_cur + hose->dma_window_size; 78 + } 62 79 63 80 static int ppc_swiotlb_bus_notify(struct notifier_block *nb, 64 81 unsigned long action, void *data) 65 82 { 66 83 struct device *dev = data; 84 + struct dev_archdata *sd; 67 85 68 86 /* We are only intereted in device addition */ 69 87 if (action != BUS_NOTIFY_ADD_DEVICE) 70 88 return 0; 89 + 90 + sd = &dev->archdata; 91 + sd->max_direct_dma_addr = 0; 71 92 72 93 /* May need to bounce if the device can't address all of DRAM */ 73 94 if (dma_get_mask(dev) < lmb_end_of_DRAM())
+12 -1
arch/powerpc/kernel/dma.c
··· 7 7 8 8 #include <linux/device.h> 9 9 #include <linux/dma-mapping.h> 10 + #include <linux/dma-debug.h> 10 11 #include <linux/lmb.h> 11 12 #include <asm/bug.h> 12 13 #include <asm/abs_addr.h> ··· 141 140 } 142 141 #endif 143 142 144 - struct dma_mapping_ops dma_direct_ops = { 143 + struct dma_map_ops dma_direct_ops = { 145 144 .alloc_coherent = dma_direct_alloc_coherent, 146 145 .free_coherent = dma_direct_free_coherent, 147 146 .map_sg = dma_direct_map_sg, ··· 157 156 #endif 158 157 }; 159 158 EXPORT_SYMBOL(dma_direct_ops); 159 + 160 + #define PREALLOC_DMA_DEBUG_ENTRIES (1 << 16) 161 + 162 + static int __init dma_init(void) 163 + { 164 + dma_debug_init(PREALLOC_DMA_DEBUG_ENTRIES); 165 + 166 + return 0; 167 + } 168 + fs_initcall(dma_init);
+10 -10
arch/powerpc/kernel/entry_32.S
··· 88 88 mfspr r0,SPRN_SRR1 89 89 stw r0,_SRR1(r11) 90 90 91 - mfspr r8,SPRN_SPRG3 91 + mfspr r8,SPRN_SPRG_THREAD 92 92 lwz r0,KSP_LIMIT(r8) 93 93 stw r0,SAVED_KSP_LIMIT(r11) 94 94 rlwimi r0,r1,0,0,(31-THREAD_SHIFT) ··· 108 108 mfspr r0,SPRN_SRR1 109 109 stw r0,crit_srr1@l(0) 110 110 111 - mfspr r8,SPRN_SPRG3 111 + mfspr r8,SPRN_SPRG_THREAD 112 112 lwz r0,KSP_LIMIT(r8) 113 113 stw r0,saved_ksp_limit@l(0) 114 114 rlwimi r0,r1,0,0,(31-THREAD_SHIFT) ··· 138 138 mfspr r2,SPRN_XER 139 139 stw r12,_CTR(r11) 140 140 stw r2,_XER(r11) 141 - mfspr r12,SPRN_SPRG3 141 + mfspr r12,SPRN_SPRG_THREAD 142 142 addi r2,r12,-THREAD 143 143 tovirt(r2,r2) /* set r2 to current */ 144 144 beq 2f /* if from user, fix up THREAD.regs */ ··· 680 680 681 681 tophys(r0,r4) 682 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 684 lwz r1,KSP(r4) /* Load new stack pointer */ 685 685 686 686 /* save the old current 'last' for return value */ ··· 1057 1057 #ifdef CONFIG_40x 1058 1058 .globl ret_from_crit_exc 1059 1059 ret_from_crit_exc: 1060 - mfspr r9,SPRN_SPRG3 1060 + mfspr r9,SPRN_SPRG_THREAD 1061 1061 lis r10,saved_ksp_limit@ha; 1062 1062 lwz r10,saved_ksp_limit@l(r10); 1063 1063 tovirt(r9,r9); ··· 1074 1074 #ifdef CONFIG_BOOKE 1075 1075 .globl ret_from_crit_exc 1076 1076 ret_from_crit_exc: 1077 - mfspr r9,SPRN_SPRG3 1077 + mfspr r9,SPRN_SPRG_THREAD 1078 1078 lwz r10,SAVED_KSP_LIMIT(r1) 1079 1079 stw r10,KSP_LIMIT(r9) 1080 1080 RESTORE_xSRR(SRR0,SRR1); ··· 1083 1083 1084 1084 .globl ret_from_debug_exc 1085 1085 ret_from_debug_exc: 1086 - mfspr r9,SPRN_SPRG3 1086 + mfspr r9,SPRN_SPRG_THREAD 1087 1087 lwz r10,SAVED_KSP_LIMIT(r1) 1088 1088 stw r10,KSP_LIMIT(r9) 1089 1089 lwz r9,THREAD_INFO-THREAD(r9) ··· 1097 1097 1098 1098 .globl ret_from_mcheck_exc 1099 1099 ret_from_mcheck_exc: 1100 - mfspr r9,SPRN_SPRG3 1100 + mfspr r9,SPRN_SPRG_THREAD 1101 1101 lwz r10,SAVED_KSP_LIMIT(r1) 1102 1102 stw r10,KSP_LIMIT(r9) 1103 1103 RESTORE_xSRR(SRR0,SRR1); ··· 1255 1255 MTMSRD(r0) /* don't get trashed */ 1256 1256 li r9,MSR_KERNEL & ~(MSR_IR|MSR_DR) 1257 1257 mtlr r6 1258 - mtspr SPRN_SPRG2,r7 1258 + mtspr SPRN_SPRG_RTAS,r7 1259 1259 mtspr SPRN_SRR0,r8 1260 1260 mtspr SPRN_SRR1,r9 1261 1261 RFI ··· 1265 1265 FIX_SRR1(r9,r0) 1266 1266 addi r1,r1,INT_FRAME_SIZE 1267 1267 li r0,0 1268 - mtspr SPRN_SPRG2,r0 1268 + mtspr SPRN_SPRG_RTAS,r0 1269 1269 mtspr SPRN_SRR0,r8 1270 1270 mtspr SPRN_SRR1,r9 1271 1271 RFI /* return to caller */
+63 -39
arch/powerpc/kernel/entry_64.S
··· 120 120 2: 121 121 END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES) 122 122 #endif /* CONFIG_PPC_ISERIES */ 123 + 124 + /* Hard enable interrupts */ 125 + #ifdef CONFIG_PPC_BOOK3E 126 + wrteei 1 127 + #else 123 128 mfmsr r11 124 129 ori r11,r11,MSR_EE 125 130 mtmsrd r11,1 131 + #endif /* CONFIG_PPC_BOOK3E */ 126 132 127 133 #ifdef SHOW_SYSCALLS 128 134 bl .do_show_syscall ··· 174 168 #endif 175 169 clrrdi r12,r1,THREAD_SHIFT 176 170 177 - /* disable interrupts so current_thread_info()->flags can't change, 178 - and so that we don't get interrupted after loading SRR0/1. */ 179 171 ld r8,_MSR(r1) 172 + #ifdef CONFIG_PPC_BOOK3S 173 + /* No MSR:RI on BookE */ 180 174 andi. r10,r8,MSR_RI 181 175 beq- unrecov_restore 176 + #endif 177 + 178 + /* Disable interrupts so current_thread_info()->flags can't change, 179 + * and so that we don't get interrupted after loading SRR0/1. 180 + */ 181 + #ifdef CONFIG_PPC_BOOK3E 182 + wrteei 0 183 + #else 182 184 mfmsr r10 183 185 rldicl r10,r10,48,1 184 186 rotldi r10,r10,16 185 187 mtmsrd r10,1 188 + #endif /* CONFIG_PPC_BOOK3E */ 189 + 186 190 ld r9,TI_FLAGS(r12) 187 191 li r11,-_LAST_ERRNO 188 192 andi. r0,r9,(_TIF_SYSCALL_T_OR_A|_TIF_SINGLESTEP|_TIF_USER_WORK_MASK|_TIF_PERSYSCALL_MASK) ··· 210 194 * userspace and we take an exception after restoring r13, 211 195 * we end up corrupting the userspace r13 value. 212 196 */ 197 + #ifdef CONFIG_PPC_BOOK3S 198 + /* No MSR:RI on BookE */ 213 199 li r12,MSR_RI 214 200 andc r11,r10,r12 215 201 mtmsrd r11,1 /* clear MSR.RI */ 202 + #endif /* CONFIG_PPC_BOOK3S */ 203 + 216 204 beq- 1f 217 205 ACCOUNT_CPU_USER_EXIT(r11, r12) 218 206 ld r13,GPR13(r1) /* only restore r13 if returning to usermode */ ··· 226 206 mtcr r5 227 207 mtspr SPRN_SRR0,r7 228 208 mtspr SPRN_SRR1,r8 229 - rfid 209 + RFI 230 210 b . /* prevent speculative execution */ 231 211 232 212 syscall_error: ··· 296 276 beq .ret_from_except_lite 297 277 298 278 /* Re-enable interrupts */ 279 + #ifdef CONFIG_PPC_BOOK3E 280 + wrteei 1 281 + #else 299 282 mfmsr r10 300 283 ori r10,r10,MSR_EE 301 284 mtmsrd r10,1 285 + #endif /* CONFIG_PPC_BOOK3E */ 302 286 303 287 bl .save_nvgprs 304 288 addi r3,r1,STACK_FRAME_OVERHEAD ··· 404 380 and. r0,r0,r22 405 381 beq+ 1f 406 382 andc r22,r22,r0 407 - mtmsrd r22 383 + MTMSRD(r22) 408 384 isync 409 385 1: std r20,_NIP(r1) 410 386 mfcr r23 ··· 423 399 std r6,PACACURRENT(r13) /* Set new 'current' */ 424 400 425 401 ld r8,KSP(r4) /* new stack pointer */ 402 + #ifdef CONFIG_PPC_BOOK3S 426 403 BEGIN_FTR_SECTION 427 404 BEGIN_FTR_SECTION_NESTED(95) 428 405 clrrdi r6,r8,28 /* get its ESID */ ··· 470 445 slbie r6 /* Workaround POWER5 < DD2.1 issue */ 471 446 slbmte r7,r0 472 447 isync 473 - 474 448 2: 449 + #endif /* !CONFIG_PPC_BOOK3S */ 450 + 475 451 clrrdi r7,r8,THREAD_SHIFT /* base of new stack */ 476 452 /* Note: this uses SWITCH_FRAME_SIZE rather than INT_FRAME_SIZE 477 453 because we don't need to leave the 288-byte ABI gap at the ··· 516 490 * can't change between when we test it and when we return 517 491 * from the interrupt. 518 492 */ 493 + #ifdef CONFIG_PPC_BOOK3E 494 + wrteei 0 495 + #else 519 496 mfmsr r10 /* Get current interrupt state */ 520 497 rldicl r9,r10,48,1 /* clear MSR_EE */ 521 498 rotldi r9,r9,16 522 499 mtmsrd r9,1 /* Update machine state */ 500 + #endif /* CONFIG_PPC_BOOK3E */ 523 501 524 502 #ifdef CONFIG_PREEMPT 525 503 clrrdi r9,r1,THREAD_SHIFT /* current_thread_info() */ ··· 570 540 rldicl r4,r3,49,63 /* r0 = (r3 >> 15) & 1 */ 571 541 stb r4,PACAHARDIRQEN(r13) 572 542 543 + #ifdef CONFIG_PPC_BOOK3E 544 + b .exception_return_book3e 545 + #else 573 546 ld r4,_CTR(r1) 574 547 ld r0,_LINK(r1) 575 548 mtctr r4 ··· 620 587 621 588 rfid 622 589 b . /* prevent speculative execution */ 590 + 591 + #endif /* CONFIG_PPC_BOOK3E */ 623 592 624 593 iseries_check_pending_irqs: 625 594 #ifdef CONFIG_PPC_ISERIES ··· 673 638 li r0,1 674 639 stb r0,PACASOFTIRQEN(r13) 675 640 stb r0,PACAHARDIRQEN(r13) 641 + #ifdef CONFIG_PPC_BOOK3E 642 + wrteei 1 643 + bl .preempt_schedule 644 + wrteei 0 645 + #else 676 646 ori r10,r10,MSR_EE 677 647 mtmsrd r10,1 /* reenable interrupts */ 678 648 bl .preempt_schedule ··· 686 646 rldicl r10,r10,48,1 /* disable interrupts again */ 687 647 rotldi r10,r10,16 688 648 mtmsrd r10,1 649 + #endif /* CONFIG_PPC_BOOK3E */ 689 650 ld r4,TI_FLAGS(r9) 690 651 andi. r0,r4,_TIF_NEED_RESCHED 691 652 bne 1b ··· 695 654 user_work: 696 655 #endif 697 656 /* Enable interrupts */ 657 + #ifdef CONFIG_PPC_BOOK3E 658 + wrteei 1 659 + #else 698 660 ori r10,r10,MSR_EE 699 661 mtmsrd r10,1 662 + #endif /* CONFIG_PPC_BOOK3E */ 700 663 701 664 andi. r0,r4,_TIF_NEED_RESCHED 702 665 beq 1f ··· 807 762 808 763 _STATIC(rtas_return_loc) 809 764 /* relocation is off at this point */ 810 - mfspr r4,SPRN_SPRG3 /* Get PACA */ 765 + mfspr r4,SPRN_SPRG_PACA /* Get PACA */ 811 766 clrldi r4,r4,2 /* convert to realmode address */ 812 767 813 768 bcl 20,31,$+4 ··· 838 793 REST_8GPRS(14, r1) /* Restore the non-volatiles */ 839 794 REST_10GPRS(22, r1) /* ditto */ 840 795 841 - mfspr r13,SPRN_SPRG3 796 + mfspr r13,SPRN_SPRG_PACA 842 797 843 798 ld r4,_CCR(r1) 844 799 mtcr r4 ··· 868 823 * of all registers that it saves. We therefore save those registers 869 824 * PROM might touch to the stack. (r0, r3-r13 are caller saved) 870 825 */ 871 - SAVE_8GPRS(2, r1) 826 + SAVE_GPR(2, r1) 872 827 SAVE_GPR(13, r1) 873 828 SAVE_8GPRS(14, r1) 874 829 SAVE_10GPRS(22, r1) 875 - mfcr r4 876 - std r4,_CCR(r1) 877 - mfctr r5 878 - std r5,_CTR(r1) 879 - mfspr r6,SPRN_XER 880 - std r6,_XER(r1) 881 - mfdar r7 882 - std r7,_DAR(r1) 883 - mfdsisr r8 884 - std r8,_DSISR(r1) 885 - mfsrr0 r9 886 - std r9,_SRR0(r1) 887 - mfsrr1 r10 888 - std r10,_SRR1(r1) 830 + mfcr r10 889 831 mfmsr r11 832 + std r10,_CCR(r1) 890 833 std r11,_MSR(r1) 891 834 892 835 /* Get the PROM entrypoint */ 893 - ld r0,GPR4(r1) 894 - mtlr r0 836 + mtlr r4 895 837 896 838 /* Switch MSR to 32 bits mode 897 839 */ 840 + #ifdef CONFIG_PPC_BOOK3E 841 + rlwinm r11,r11,0,1,31 842 + mtmsr r11 843 + #else /* CONFIG_PPC_BOOK3E */ 898 844 mfmsr r11 899 845 li r12,1 900 846 rldicr r12,r12,MSR_SF_LG,(63-MSR_SF_LG) ··· 894 858 rldicr r12,r12,MSR_ISF_LG,(63-MSR_ISF_LG) 895 859 andc r11,r11,r12 896 860 mtmsrd r11 861 + #endif /* CONFIG_PPC_BOOK3E */ 897 862 isync 898 863 899 - /* Restore arguments & enter PROM here... */ 900 - ld r3,GPR3(r1) 864 + /* Enter PROM here... */ 901 865 blrl 902 866 903 867 /* Just make sure that r1 top 32 bits didn't get ··· 907 871 908 872 /* Restore the MSR (back to 64 bits) */ 909 873 ld r0,_MSR(r1) 910 - mtmsrd r0 874 + MTMSRD(r0) 911 875 isync 912 876 913 877 /* Restore other registers */ ··· 917 881 REST_10GPRS(22, r1) 918 882 ld r4,_CCR(r1) 919 883 mtcr r4 920 - ld r5,_CTR(r1) 921 - mtctr r5 922 - ld r6,_XER(r1) 923 - mtspr SPRN_XER,r6 924 - ld r7,_DAR(r1) 925 - mtdar r7 926 - ld r8,_DSISR(r1) 927 - mtdsisr r8 928 - ld r9,_SRR0(r1) 929 - mtsrr0 r9 930 - ld r10,_SRR1(r1) 931 - mtsrr1 r10 932 884 933 885 addi r1,r1,PROM_FRAME_SIZE 934 886 ld r0,16(r1)
+1001
arch/powerpc/kernel/exceptions-64e.S
··· 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
+40 -38
arch/powerpc/kernel/exceptions-64s.S
··· 12 12 * 13 13 */ 14 14 15 + #include <asm/exception-64s.h> 16 + 15 17 /* 16 18 * We layout physical memory as follows: 17 19 * 0x0000 - 0x00ff : Secondary processor spin code ··· 22 20 * 0x6000 - 0x6fff : Initial (CPU0) segment table 23 21 * 0x7000 - 0x7fff : FWNMI data area 24 22 * 0x8000 - : Early init and support code 25 - */ 26 - 27 - 28 - /* 29 - * SPRG Usage 30 - * 31 - * Register Definition 32 - * 33 - * SPRG0 reserved for hypervisor 34 - * SPRG1 temp - used to save gpr 35 - * SPRG2 temp - used to save gpr 36 - * SPRG3 virt addr of paca 37 23 */ 38 24 39 25 /* ··· 41 51 . = 0x200 42 52 _machine_check_pSeries: 43 53 HMT_MEDIUM 44 - mtspr SPRN_SPRG1,r13 /* save r13 */ 54 + mtspr SPRN_SPRG_SCRATCH0,r13 /* save r13 */ 45 55 EXCEPTION_PROLOG_PSERIES(PACA_EXMC, machine_check_common) 46 56 47 57 . = 0x300 48 58 .globl data_access_pSeries 49 59 data_access_pSeries: 50 60 HMT_MEDIUM 51 - mtspr SPRN_SPRG1,r13 61 + mtspr SPRN_SPRG_SCRATCH0,r13 52 62 BEGIN_FTR_SECTION 53 - mtspr SPRN_SPRG2,r12 54 - mfspr r13,SPRN_DAR 55 - mfspr r12,SPRN_DSISR 56 - srdi r13,r13,60 57 - rlwimi r13,r12,16,0x20 58 - mfcr r12 59 - cmpwi r13,0x2c 63 + mfspr r13,SPRN_SPRG_PACA 64 + std r9,PACA_EXSLB+EX_R9(r13) 65 + std r10,PACA_EXSLB+EX_R10(r13) 66 + mfspr r10,SPRN_DAR 67 + mfspr r9,SPRN_DSISR 68 + srdi r10,r10,60 69 + rlwimi r10,r9,16,0x20 70 + mfcr r9 71 + cmpwi r10,0x2c 60 72 beq do_stab_bolted_pSeries 61 - mtcrf 0x80,r12 62 - mfspr r12,SPRN_SPRG2 63 - END_FTR_SECTION_IFCLR(CPU_FTR_SLB) 73 + ld r10,PACA_EXSLB+EX_R10(r13) 74 + std r11,PACA_EXGEN+EX_R11(r13) 75 + ld r11,PACA_EXSLB+EX_R9(r13) 76 + std r12,PACA_EXGEN+EX_R12(r13) 77 + mfspr r12,SPRN_SPRG_SCRATCH0 78 + std r10,PACA_EXGEN+EX_R10(r13) 79 + std r11,PACA_EXGEN+EX_R9(r13) 80 + std r12,PACA_EXGEN+EX_R13(r13) 81 + EXCEPTION_PROLOG_PSERIES_1(data_access_common) 82 + FTR_SECTION_ELSE 64 83 EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, data_access_common) 84 + ALT_FTR_SECTION_END_IFCLR(CPU_FTR_SLB) 65 85 66 86 . = 0x380 67 87 .globl data_access_slb_pSeries 68 88 data_access_slb_pSeries: 69 89 HMT_MEDIUM 70 - mtspr SPRN_SPRG1,r13 71 - mfspr r13,SPRN_SPRG3 /* get paca address into r13 */ 90 + mtspr SPRN_SPRG_SCRATCH0,r13 91 + mfspr r13,SPRN_SPRG_PACA /* get paca address into r13 */ 72 92 std r3,PACA_EXSLB+EX_R3(r13) 73 93 mfspr r3,SPRN_DAR 74 94 std r9,PACA_EXSLB+EX_R9(r13) /* save r9 - r12 */ ··· 91 91 std r10,PACA_EXSLB+EX_R10(r13) 92 92 std r11,PACA_EXSLB+EX_R11(r13) 93 93 std r12,PACA_EXSLB+EX_R12(r13) 94 - mfspr r10,SPRN_SPRG1 94 + mfspr r10,SPRN_SPRG_SCRATCH0 95 95 std r10,PACA_EXSLB+EX_R13(r13) 96 96 mfspr r12,SPRN_SRR1 /* and SRR1 */ 97 97 #ifndef CONFIG_RELOCATABLE ··· 115 115 .globl instruction_access_slb_pSeries 116 116 instruction_access_slb_pSeries: 117 117 HMT_MEDIUM 118 - mtspr SPRN_SPRG1,r13 119 - mfspr r13,SPRN_SPRG3 /* get paca address into r13 */ 118 + mtspr SPRN_SPRG_SCRATCH0,r13 119 + mfspr r13,SPRN_SPRG_PACA /* get paca address into r13 */ 120 120 std r3,PACA_EXSLB+EX_R3(r13) 121 121 mfspr r3,SPRN_SRR0 /* SRR0 is faulting address */ 122 122 std r9,PACA_EXSLB+EX_R9(r13) /* save r9 - r12 */ ··· 129 129 std r10,PACA_EXSLB+EX_R10(r13) 130 130 std r11,PACA_EXSLB+EX_R11(r13) 131 131 std r12,PACA_EXSLB+EX_R12(r13) 132 - mfspr r10,SPRN_SPRG1 132 + mfspr r10,SPRN_SPRG_SCRATCH0 133 133 std r10,PACA_EXSLB+EX_R13(r13) 134 134 mfspr r12,SPRN_SRR1 /* and SRR1 */ 135 135 #ifndef CONFIG_RELOCATABLE ··· 159 159 beq- 1f 160 160 END_FTR_SECTION_IFSET(CPU_FTR_REAL_LE) 161 161 mr r9,r13 162 - mfspr r13,SPRN_SPRG3 162 + mfspr r13,SPRN_SPRG_PACA 163 163 mfspr r11,SPRN_SRR0 164 164 ld r12,PACAKBASE(r13) 165 165 ld r10,PACAKMSR(r13) ··· 228 228 rotldi r10,r10,16 229 229 mtspr SPRN_SRR1,r10 230 230 ld r10,PACA_EXGEN+EX_R10(r13) 231 - mfspr r13,SPRN_SPRG1 231 + mfspr r13,SPRN_SPRG_SCRATCH0 232 232 rfid 233 233 b . 234 234 235 235 .align 7 236 236 do_stab_bolted_pSeries: 237 - mtcrf 0x80,r12 238 - mfspr r12,SPRN_SPRG2 239 - EXCEPTION_PROLOG_PSERIES(PACA_EXSLB, .do_stab_bolted) 237 + std r11,PACA_EXSLB+EX_R11(r13) 238 + std r12,PACA_EXSLB+EX_R12(r13) 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 243 #ifdef CONFIG_PPC_PSERIES 242 244 /* ··· 248 246 .align 7 249 247 system_reset_fwnmi: 250 248 HMT_MEDIUM 251 - mtspr SPRN_SPRG1,r13 /* save r13 */ 249 + mtspr SPRN_SPRG_SCRATCH0,r13 /* save r13 */ 252 250 EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, system_reset_common) 253 251 254 252 .globl machine_check_fwnmi 255 253 .align 7 256 254 machine_check_fwnmi: 257 255 HMT_MEDIUM 258 - mtspr SPRN_SPRG1,r13 /* save r13 */ 256 + mtspr SPRN_SPRG_SCRATCH0,r13 /* save r13 */ 259 257 EXCEPTION_PROLOG_PSERIES(PACA_EXMC, machine_check_common) 260 258 261 259 #endif /* CONFIG_PPC_PSERIES */ ··· 270 268 std r10,PACA_EXGEN+EX_R10(r13) 271 269 std r11,PACA_EXGEN+EX_R11(r13) 272 270 std r12,PACA_EXGEN+EX_R12(r13) 273 - mfspr r10,SPRG1 271 + mfspr r10,SPRG_SCRATCH0 274 272 ld r11,PACA_EXSLB+EX_R9(r13) 275 273 ld r12,PACA_EXSLB+EX_R3(r13) 276 274 std r10,PACA_EXGEN+EX_R13(r13)
+1 -1
arch/powerpc/kernel/fpu.S
··· 91 91 #endif /* CONFIG_SMP */ 92 92 /* enable use of FP after return */ 93 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 95 lwz r4,THREAD_FPEXC_MODE(r5) 96 96 ori r9,r9,MSR_FP /* enable FP for current */ 97 97 or r9,r9,r4
+20 -20
arch/powerpc/kernel/head_32.S
··· 244 244 * task's thread_struct. 245 245 */ 246 246 #define EXCEPTION_PROLOG \ 247 - mtspr SPRN_SPRG0,r10; \ 248 - mtspr SPRN_SPRG1,r11; \ 247 + mtspr SPRN_SPRG_SCRATCH0,r10; \ 248 + mtspr SPRN_SPRG_SCRATCH1,r11; \ 249 249 mfcr r10; \ 250 250 EXCEPTION_PROLOG_1; \ 251 251 EXCEPTION_PROLOG_2 ··· 255 255 andi. r11,r11,MSR_PR; \ 256 256 tophys(r11,r1); /* use tophys(r1) if kernel */ \ 257 257 beq 1f; \ 258 - mfspr r11,SPRN_SPRG3; \ 258 + mfspr r11,SPRN_SPRG_THREAD; \ 259 259 lwz r11,THREAD_INFO-THREAD(r11); \ 260 260 addi r11,r11,THREAD_SIZE; \ 261 261 tophys(r11,r11); \ ··· 267 267 stw r10,_CCR(r11); /* save registers */ \ 268 268 stw r12,GPR12(r11); \ 269 269 stw r9,GPR9(r11); \ 270 - mfspr r10,SPRN_SPRG0; \ 270 + mfspr r10,SPRN_SPRG_SCRATCH0; \ 271 271 stw r10,GPR10(r11); \ 272 - mfspr r12,SPRN_SPRG1; \ 272 + mfspr r12,SPRN_SPRG_SCRATCH1; \ 273 273 stw r12,GPR11(r11); \ 274 274 mflr r10; \ 275 275 stw r10,_LINK(r11); \ ··· 355 355 * -- paulus. 356 356 */ 357 357 . = 0x200 358 - mtspr SPRN_SPRG0,r10 359 - mtspr SPRN_SPRG1,r11 358 + mtspr SPRN_SPRG_SCRATCH0,r10 359 + mtspr SPRN_SPRG_SCRATCH1,r11 360 360 mfcr r10 361 361 #ifdef CONFIG_PPC_CHRP 362 - mfspr r11,SPRN_SPRG2 362 + mfspr r11,SPRN_SPRG_RTAS 363 363 cmpwi 0,r11,0 364 364 bne 7f 365 365 #endif /* CONFIG_PPC_CHRP */ ··· 367 367 7: EXCEPTION_PROLOG_2 368 368 addi r3,r1,STACK_FRAME_OVERHEAD 369 369 #ifdef CONFIG_PPC_CHRP 370 - mfspr r4,SPRN_SPRG2 370 + mfspr r4,SPRN_SPRG_RTAS 371 371 cmpwi cr1,r4,0 372 372 bne cr1,1f 373 373 #endif ··· 485 485 mfspr r3,SPRN_IMISS 486 486 lis r1,PAGE_OFFSET@h /* check if kernel address */ 487 487 cmplw 0,r1,r3 488 - mfspr r2,SPRN_SPRG3 488 + mfspr r2,SPRN_SPRG_THREAD 489 489 li r1,_PAGE_USER|_PAGE_PRESENT /* low addresses tested as user */ 490 490 lwz r2,PGDIR(r2) 491 491 bge- 112f ··· 559 559 mfspr r3,SPRN_DMISS 560 560 lis r1,PAGE_OFFSET@h /* check if kernel address */ 561 561 cmplw 0,r1,r3 562 - mfspr r2,SPRN_SPRG3 562 + mfspr r2,SPRN_SPRG_THREAD 563 563 li r1,_PAGE_USER|_PAGE_PRESENT /* low addresses tested as user */ 564 564 lwz r2,PGDIR(r2) 565 565 bge- 112f ··· 598 598 mtcrf 0x80,r2 599 599 BEGIN_MMU_FTR_SECTION 600 600 li r0,1 601 - mfspr r1,SPRN_SPRG4 601 + mfspr r1,SPRN_SPRG_603_LRU 602 602 rlwinm r2,r3,20,27,31 /* Get Address bits 15:19 */ 603 603 slw r0,r0,r2 604 604 xor r1,r0,r1 605 605 srw r0,r1,r2 606 - mtspr SPRN_SPRG4,r1 606 + mtspr SPRN_SPRG_603_LRU,r1 607 607 mfspr r2,SPRN_SRR1 608 608 rlwimi r2,r0,31-14,14,14 609 609 mtspr SPRN_SRR1,r2 ··· 643 643 mfspr r3,SPRN_DMISS 644 644 lis r1,PAGE_OFFSET@h /* check if kernel address */ 645 645 cmplw 0,r1,r3 646 - mfspr r2,SPRN_SPRG3 646 + mfspr r2,SPRN_SPRG_THREAD 647 647 li r1,_PAGE_RW|_PAGE_USER|_PAGE_PRESENT /* access flags */ 648 648 lwz r2,PGDIR(r2) 649 649 bge- 112f ··· 678 678 mtcrf 0x80,r2 679 679 BEGIN_MMU_FTR_SECTION 680 680 li r0,1 681 - mfspr r1,SPRN_SPRG4 681 + mfspr r1,SPRN_SPRG_603_LRU 682 682 rlwinm r2,r3,20,27,31 /* Get Address bits 15:19 */ 683 683 slw r0,r0,r2 684 684 xor r1,r0,r1 685 685 srw r0,r1,r2 686 - mtspr SPRN_SPRG4,r1 686 + mtspr SPRN_SPRG_603_LRU,r1 687 687 mfspr r2,SPRN_SRR1 688 688 rlwimi r2,r0,31-14,14,14 689 689 mtspr SPRN_SRR1,r2 ··· 864 864 tophys(r4,r2) 865 865 addi r4,r4,THREAD /* phys address of our thread_struct */ 866 866 CLR_TOP32(r4) 867 - mtspr SPRN_SPRG3,r4 867 + mtspr SPRN_SPRG_THREAD,r4 868 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 871 /* enable MMU and jump to start_secondary */ 872 872 li r4,MSR_KERNEL ··· 947 947 tophys(r4,r2) 948 948 addi r4,r4,THREAD /* init task's THREAD */ 949 949 CLR_TOP32(r4) 950 - mtspr SPRN_SPRG3,r4 950 + mtspr SPRN_SPRG_THREAD,r4 951 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 954 /* stack */ 955 955 lis r1,init_thread_union@ha
+62 -62
arch/powerpc/kernel/head_40x.S
··· 103 103 104 104 /* 105 105 * Exception vector entry code. This code runs with address translation 106 - * turned off (i.e. using physical addresses). We assume SPRG3 has the 107 - * physical address of the current task thread_struct. 106 + * turned off (i.e. using physical addresses). We assume SPRG_THREAD has 107 + * the physical address of the current task thread_struct. 108 108 * Note that we have to have decremented r1 before we write to any fields 109 109 * of the exception frame, since a critical interrupt could occur at any 110 110 * time, and it will write to the area immediately below the current r1. 111 111 */ 112 112 #define NORMAL_EXCEPTION_PROLOG \ 113 - mtspr SPRN_SPRG0,r10; /* save two registers to work with */\ 114 - mtspr SPRN_SPRG1,r11; \ 115 - mtspr SPRN_SPRG2,r1; \ 113 + mtspr SPRN_SPRG_SCRATCH0,r10; /* save two registers to work with */\ 114 + mtspr SPRN_SPRG_SCRATCH1,r11; \ 115 + mtspr SPRN_SPRG_SCRATCH2,r1; \ 116 116 mfcr r10; /* save CR in r10 for now */\ 117 117 mfspr r11,SPRN_SRR1; /* check whether user or kernel */\ 118 118 andi. r11,r11,MSR_PR; \ 119 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 121 lwz r1,THREAD_INFO-THREAD(r1); /* this thread's kernel stack */\ 122 122 addi r1,r1,THREAD_SIZE; \ 123 123 1: subi r1,r1,INT_FRAME_SIZE; /* Allocate an exception frame */\ ··· 125 125 stw r10,_CCR(r11); /* save various registers */\ 126 126 stw r12,GPR12(r11); \ 127 127 stw r9,GPR9(r11); \ 128 - mfspr r10,SPRN_SPRG0; \ 128 + mfspr r10,SPRN_SPRG_SCRATCH0; \ 129 129 stw r10,GPR10(r11); \ 130 - mfspr r12,SPRN_SPRG1; \ 130 + mfspr r12,SPRN_SPRG_SCRATCH1; \ 131 131 stw r12,GPR11(r11); \ 132 132 mflr r10; \ 133 133 stw r10,_LINK(r11); \ 134 - mfspr r10,SPRN_SPRG2; \ 134 + mfspr r10,SPRN_SPRG_SCRATCH2; \ 135 135 mfspr r12,SPRN_SRR0; \ 136 136 stw r10,GPR1(r11); \ 137 137 mfspr r9,SPRN_SRR1; \ ··· 160 160 lwz r11,critirq_ctx@l(r11); \ 161 161 beq 1f; \ 162 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 164 lwz r11,THREAD_INFO-THREAD(r11); /* this thread's kernel stack */\ 165 165 1: addi r11,r11,THREAD_SIZE-INT_FRAME_SIZE; /* Alloc an excpt frm */\ 166 166 tophys(r11,r11); \ ··· 265 265 * and exit. Otherwise, we call heavywight functions to do the work. 266 266 */ 267 267 START_EXCEPTION(0x0300, DataStorage) 268 - mtspr SPRN_SPRG0, r10 /* Save some working registers */ 269 - mtspr SPRN_SPRG1, r11 268 + mtspr SPRN_SPRG_SCRATCH0, r10 /* Save some working registers */ 269 + mtspr SPRN_SPRG_SCRATCH1, r11 270 270 #ifdef CONFIG_403GCX 271 271 stw r12, 0(r0) 272 272 stw r9, 4(r0) ··· 275 275 stw r11, 8(r0) 276 276 stw r12, 12(r0) 277 277 #else 278 - mtspr SPRN_SPRG4, r12 279 - mtspr SPRN_SPRG5, r9 278 + mtspr SPRN_SPRG_SCRATCH3, r12 279 + mtspr SPRN_SPRG_SCRATCH4, r9 280 280 mfcr r11 281 281 mfspr r12, SPRN_PID 282 - mtspr SPRN_SPRG7, r11 283 - mtspr SPRN_SPRG6, r12 282 + mtspr SPRN_SPRG_SCRATCH6, r11 283 + mtspr SPRN_SPRG_SCRATCH5, r12 284 284 #endif 285 285 286 286 /* First, check if it was a zone fault (which means a user ··· 308 308 /* Get the PGD for the current thread. 309 309 */ 310 310 3: 311 - mfspr r11,SPRN_SPRG3 311 + mfspr r11,SPRN_SPRG_THREAD 312 312 lwz r11,PGDIR(r11) 313 313 4: 314 314 tophys(r11, r11) ··· 355 355 lwz r9, 4(r0) 356 356 lwz r12, 0(r0) 357 357 #else 358 - mfspr r12, SPRN_SPRG6 359 - mfspr r11, SPRN_SPRG7 358 + mfspr r12, SPRN_SPRG_SCRATCH5 359 + mfspr r11, SPRN_SPRG_SCRATCH6 360 360 mtspr SPRN_PID, r12 361 361 mtcr r11 362 - mfspr r9, SPRN_SPRG5 363 - mfspr r12, SPRN_SPRG4 362 + mfspr r9, SPRN_SPRG_SCRATCH4 363 + mfspr r12, SPRN_SPRG_SCRATCH3 364 364 #endif 365 - mfspr r11, SPRN_SPRG1 366 - mfspr r10, SPRN_SPRG0 365 + mfspr r11, SPRN_SPRG_SCRATCH1 366 + mfspr r10, SPRN_SPRG_SCRATCH0 367 367 PPC405_ERR77_SYNC 368 368 rfi /* Should sync shadow TLBs */ 369 369 b . /* prevent prefetch past rfi */ ··· 380 380 lwz r9, 4(r0) 381 381 lwz r12, 0(r0) 382 382 #else 383 - mfspr r12, SPRN_SPRG6 384 - mfspr r11, SPRN_SPRG7 383 + mfspr r12, SPRN_SPRG_SCRATCH5 384 + mfspr r11, SPRN_SPRG_SCRATCH6 385 385 mtspr SPRN_PID, r12 386 386 mtcr r11 387 - mfspr r9, SPRN_SPRG5 388 - mfspr r12, SPRN_SPRG4 387 + mfspr r9, SPRN_SPRG_SCRATCH4 388 + mfspr r12, SPRN_SPRG_SCRATCH3 389 389 #endif 390 - mfspr r11, SPRN_SPRG1 391 - mfspr r10, SPRN_SPRG0 390 + mfspr r11, SPRN_SPRG_SCRATCH1 391 + mfspr r10, SPRN_SPRG_SCRATCH0 392 392 b DataAccess 393 393 394 394 /* ··· 466 466 * load TLB entries from the page table if they exist. 467 467 */ 468 468 START_EXCEPTION(0x1100, DTLBMiss) 469 - mtspr SPRN_SPRG0, r10 /* Save some working registers */ 470 - mtspr SPRN_SPRG1, r11 469 + mtspr SPRN_SPRG_SCRATCH0, r10 /* Save some working registers */ 470 + mtspr SPRN_SPRG_SCRATCH1, r11 471 471 #ifdef CONFIG_403GCX 472 472 stw r12, 0(r0) 473 473 stw r9, 4(r0) ··· 476 476 stw r11, 8(r0) 477 477 stw r12, 12(r0) 478 478 #else 479 - mtspr SPRN_SPRG4, r12 480 - mtspr SPRN_SPRG5, r9 479 + mtspr SPRN_SPRG_SCRATCH3, r12 480 + mtspr SPRN_SPRG_SCRATCH4, r9 481 481 mfcr r11 482 482 mfspr r12, SPRN_PID 483 - mtspr SPRN_SPRG7, r11 484 - mtspr SPRN_SPRG6, r12 483 + mtspr SPRN_SPRG_SCRATCH6, r11 484 + mtspr SPRN_SPRG_SCRATCH5, r12 485 485 #endif 486 486 mfspr r10, SPRN_DEAR /* Get faulting address */ 487 487 ··· 500 500 /* Get the PGD for the current thread. 501 501 */ 502 502 3: 503 - mfspr r11,SPRN_SPRG3 503 + mfspr r11,SPRN_SPRG_THREAD 504 504 lwz r11,PGDIR(r11) 505 505 4: 506 506 tophys(r11, r11) ··· 550 550 lwz r9, 4(r0) 551 551 lwz r12, 0(r0) 552 552 #else 553 - mfspr r12, SPRN_SPRG6 554 - mfspr r11, SPRN_SPRG7 553 + mfspr r12, SPRN_SPRG_SCRATCH5 554 + mfspr r11, SPRN_SPRG_SCRATCH6 555 555 mtspr SPRN_PID, r12 556 556 mtcr r11 557 - mfspr r9, SPRN_SPRG5 558 - mfspr r12, SPRN_SPRG4 557 + mfspr r9, SPRN_SPRG_SCRATCH4 558 + mfspr r12, SPRN_SPRG_SCRATCH3 559 559 #endif 560 - mfspr r11, SPRN_SPRG1 561 - mfspr r10, SPRN_SPRG0 560 + mfspr r11, SPRN_SPRG_SCRATCH1 561 + mfspr r10, SPRN_SPRG_SCRATCH0 562 562 b DataAccess 563 563 564 564 /* 0x1200 - Instruction TLB Miss Exception ··· 566 566 * registers and bailout to a different point. 567 567 */ 568 568 START_EXCEPTION(0x1200, ITLBMiss) 569 - mtspr SPRN_SPRG0, r10 /* Save some working registers */ 570 - mtspr SPRN_SPRG1, r11 569 + mtspr SPRN_SPRG_SCRATCH0, r10 /* Save some working registers */ 570 + mtspr SPRN_SPRG_SCRATCH1, r11 571 571 #ifdef CONFIG_403GCX 572 572 stw r12, 0(r0) 573 573 stw r9, 4(r0) ··· 576 576 stw r11, 8(r0) 577 577 stw r12, 12(r0) 578 578 #else 579 - mtspr SPRN_SPRG4, r12 580 - mtspr SPRN_SPRG5, r9 579 + mtspr SPRN_SPRG_SCRATCH3, r12 580 + mtspr SPRN_SPRG_SCRATCH4, r9 581 581 mfcr r11 582 582 mfspr r12, SPRN_PID 583 - mtspr SPRN_SPRG7, r11 584 - mtspr SPRN_SPRG6, r12 583 + mtspr SPRN_SPRG_SCRATCH6, r11 584 + mtspr SPRN_SPRG_SCRATCH5, r12 585 585 #endif 586 586 mfspr r10, SPRN_SRR0 /* Get faulting address */ 587 587 ··· 600 600 /* Get the PGD for the current thread. 601 601 */ 602 602 3: 603 - mfspr r11,SPRN_SPRG3 603 + mfspr r11,SPRN_SPRG_THREAD 604 604 lwz r11,PGDIR(r11) 605 605 4: 606 606 tophys(r11, r11) ··· 650 650 lwz r9, 4(r0) 651 651 lwz r12, 0(r0) 652 652 #else 653 - mfspr r12, SPRN_SPRG6 654 - mfspr r11, SPRN_SPRG7 653 + mfspr r12, SPRN_SPRG_SCRATCH5 654 + mfspr r11, SPRN_SPRG_SCRATCH6 655 655 mtspr SPRN_PID, r12 656 656 mtcr r11 657 - mfspr r9, SPRN_SPRG5 658 - mfspr r12, SPRN_SPRG4 657 + mfspr r9, SPRN_SPRG_SCRATCH4 658 + mfspr r12, SPRN_SPRG_SCRATCH3 659 659 #endif 660 - mfspr r11, SPRN_SPRG1 661 - mfspr r10, SPRN_SPRG0 660 + mfspr r11, SPRN_SPRG_SCRATCH1 661 + mfspr r10, SPRN_SPRG_SCRATCH0 662 662 b InstructionAccess 663 663 664 664 EXCEPTION(0x1300, Trap_13, unknown_exception, EXC_XFER_EE) ··· 803 803 lwz r9, 4(r0) 804 804 lwz r12, 0(r0) 805 805 #else 806 - mfspr r12, SPRN_SPRG6 807 - mfspr r11, SPRN_SPRG7 806 + mfspr r12, SPRN_SPRG_SCRATCH5 807 + mfspr r11, SPRN_SPRG_SCRATCH6 808 808 mtspr SPRN_PID, r12 809 809 mtcr r11 810 - mfspr r9, SPRN_SPRG5 811 - mfspr r12, SPRN_SPRG4 810 + mfspr r9, SPRN_SPRG_SCRATCH4 811 + mfspr r12, SPRN_SPRG_SCRATCH3 812 812 #endif 813 - mfspr r11, SPRN_SPRG1 814 - mfspr r10, SPRN_SPRG0 813 + mfspr r11, SPRN_SPRG_SCRATCH1 814 + mfspr r10, SPRN_SPRG_SCRATCH0 815 815 PPC405_ERR77_SYNC 816 816 rfi /* Should sync shadow TLBs */ 817 817 b . /* prevent prefetch past rfi */ ··· 835 835 /* ptr to phys current thread */ 836 836 tophys(r4,r2) 837 837 addi r4,r4,THREAD /* init task's THREAD */ 838 - mtspr SPRN_SPRG3,r4 838 + mtspr SPRN_SPRG_THREAD,r4 839 839 840 840 /* stack */ 841 841 lis r1,init_thread_union@ha
+29 -29
arch/powerpc/kernel/head_44x.S
··· 239 239 240 240 /* ptr to current thread */ 241 241 addi r4,r2,THREAD /* init task's THREAD */ 242 - mtspr SPRN_SPRG3,r4 242 + mtspr SPRN_SPRG_THREAD,r4 243 243 244 244 /* stack */ 245 245 lis r1,init_thread_union@h ··· 350 350 351 351 /* Data TLB Error Interrupt */ 352 352 START_EXCEPTION(DataTLBError) 353 - mtspr SPRN_SPRG0, r10 /* Save some working registers */ 354 - mtspr SPRN_SPRG1, r11 355 - mtspr SPRN_SPRG4W, r12 356 - mtspr SPRN_SPRG5W, r13 353 + mtspr SPRN_SPRG_WSCRATCH0, r10 /* Save some working registers */ 354 + mtspr SPRN_SPRG_WSCRATCH1, r11 355 + mtspr SPRN_SPRG_WSCRATCH2, r12 356 + mtspr SPRN_SPRG_WSCRATCH3, r13 357 357 mfcr r11 358 - mtspr SPRN_SPRG7W, r11 358 + mtspr SPRN_SPRG_WSCRATCH4, r11 359 359 mfspr r10, SPRN_DEAR /* Get faulting address */ 360 360 361 361 /* If we are faulting a kernel address, we have to use the ··· 374 374 375 375 /* Get the PGD for the current thread */ 376 376 3: 377 - mfspr r11,SPRN_SPRG3 377 + mfspr r11,SPRN_SPRG_THREAD 378 378 lwz r11,PGDIR(r11) 379 379 380 380 /* Load PID into MMUCR TID */ ··· 446 446 /* The bailout. Restore registers to pre-exception conditions 447 447 * and call the heavyweights to help us out. 448 448 */ 449 - mfspr r11, SPRN_SPRG7R 449 + mfspr r11, SPRN_SPRG_RSCRATCH4 450 450 mtcr r11 451 - mfspr r13, SPRN_SPRG5R 452 - mfspr r12, SPRN_SPRG4R 453 - mfspr r11, SPRN_SPRG1 454 - mfspr r10, SPRN_SPRG0 451 + mfspr r13, SPRN_SPRG_RSCRATCH3 452 + mfspr r12, SPRN_SPRG_RSCRATCH2 453 + mfspr r11, SPRN_SPRG_RSCRATCH1 454 + mfspr r10, SPRN_SPRG_RSCRATCH0 455 455 b DataStorage 456 456 457 457 /* Instruction TLB Error Interrupt */ ··· 461 461 * to a different point. 462 462 */ 463 463 START_EXCEPTION(InstructionTLBError) 464 - mtspr SPRN_SPRG0, r10 /* Save some working registers */ 465 - mtspr SPRN_SPRG1, r11 466 - mtspr SPRN_SPRG4W, r12 467 - mtspr SPRN_SPRG5W, r13 464 + mtspr SPRN_SPRG_WSCRATCH0, r10 /* Save some working registers */ 465 + mtspr SPRN_SPRG_WSCRATCH1, r11 466 + mtspr SPRN_SPRG_WSCRATCH2, r12 467 + mtspr SPRN_SPRG_WSCRATCH3, r13 468 468 mfcr r11 469 - mtspr SPRN_SPRG7W, r11 469 + mtspr SPRN_SPRG_WSCRATCH4, r11 470 470 mfspr r10, SPRN_SRR0 /* Get faulting address */ 471 471 472 472 /* If we are faulting a kernel address, we have to use the ··· 485 485 486 486 /* Get the PGD for the current thread */ 487 487 3: 488 - mfspr r11,SPRN_SPRG3 488 + mfspr r11,SPRN_SPRG_THREAD 489 489 lwz r11,PGDIR(r11) 490 490 491 491 /* Load PID into MMUCR TID */ ··· 497 497 mtspr SPRN_MMUCR,r12 498 498 499 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 502 /* Compute pgdir/pmd offset */ 503 503 rlwinm r12, r10, PPC44x_PGD_OFF_SHIFT, PPC44x_PGD_OFF_MASK_BIT, 29 ··· 542 542 /* The bailout. Restore registers to pre-exception conditions 543 543 * and call the heavyweights to help us out. 544 544 */ 545 - mfspr r11, SPRN_SPRG7R 545 + mfspr r11, SPRN_SPRG_RSCRATCH4 546 546 mtcr r11 547 - mfspr r13, SPRN_SPRG5R 548 - mfspr r12, SPRN_SPRG4R 549 - mfspr r11, SPRN_SPRG1 550 - mfspr r10, SPRN_SPRG0 547 + mfspr r13, SPRN_SPRG_RSCRATCH3 548 + mfspr r12, SPRN_SPRG_RSCRATCH2 549 + mfspr r11, SPRN_SPRG_RSCRATCH1 550 + mfspr r10, SPRN_SPRG_RSCRATCH0 551 551 b InstructionStorage 552 552 553 553 /* Debug Interrupt */ ··· 593 593 594 594 /* Done...restore registers and get out of here. 595 595 */ 596 - mfspr r11, SPRN_SPRG7R 596 + mfspr r11, SPRN_SPRG_RSCRATCH4 597 597 mtcr r11 598 - mfspr r13, SPRN_SPRG5R 599 - mfspr r12, SPRN_SPRG4R 600 - mfspr r11, SPRN_SPRG1 601 - mfspr r10, SPRN_SPRG0 598 + mfspr r13, SPRN_SPRG_RSCRATCH3 599 + mfspr r12, SPRN_SPRG_RSCRATCH2 600 + mfspr r11, SPRN_SPRG_RSCRATCH1 601 + mfspr r10, SPRN_SPRG_RSCRATCH0 602 602 rfi /* Force context change */ 603 603 604 604 /*
+70 -13
arch/powerpc/kernel/head_64.S
··· 36 36 #include <asm/thread_info.h> 37 37 #include <asm/firmware.h> 38 38 #include <asm/page_64.h> 39 - #include <asm/exception.h> 40 39 #include <asm/irqflags.h> 41 40 42 41 /* The physical memory is layed out such that the secondary processor ··· 121 122 */ 122 123 .globl __secondary_hold 123 124 __secondary_hold: 125 + #ifndef CONFIG_PPC_BOOK3E 124 126 mfmsr r24 125 127 ori r24,r24,MSR_RI 126 128 mtmsrd r24 /* RI on */ 127 - 129 + #endif 128 130 /* Grab our physical cpu number */ 129 131 mr r24,r3 130 132 ··· 144 144 ld r4,0(r4) /* deref function descriptor */ 145 145 mtctr r4 146 146 mr r3,r24 147 + li r4,0 147 148 bctr 148 149 #else 149 150 BUG_OPCODE ··· 165 164 #include "exceptions-64s.S" 166 165 #endif 167 166 167 + _GLOBAL(generic_secondary_thread_init) 168 + mr r24,r3 169 + 170 + /* turn on 64-bit mode */ 171 + bl .enable_64b_mode 172 + 173 + /* get a valid TOC pointer, wherever we're mapped at */ 174 + bl .relative_toc 175 + 176 + #ifdef CONFIG_PPC_BOOK3E 177 + /* Book3E initialization */ 178 + mr r3,r24 179 + bl .book3e_secondary_thread_init 180 + #endif 181 + b generic_secondary_common_init 168 182 169 183 /* 170 184 * On pSeries and most other platforms, secondary processors spin 171 185 * in the following code. 172 186 * At entry, r3 = this processor's number (physical cpu id) 187 + * 188 + * On Book3E, r4 = 1 to indicate that the initial TLB entry for 189 + * this core already exists (setup via some other mechanism such 190 + * as SCOM before entry). 173 191 */ 174 192 _GLOBAL(generic_secondary_smp_init) 175 193 mr r24,r3 176 - 194 + mr r25,r4 195 + 177 196 /* turn on 64-bit mode */ 178 197 bl .enable_64b_mode 179 198 180 - /* get the TOC pointer (real address) */ 199 + /* get a valid TOC pointer, wherever we're mapped at */ 181 200 bl .relative_toc 182 201 202 + #ifdef CONFIG_PPC_BOOK3E 203 + /* Book3E initialization */ 204 + mr r3,r24 205 + mr r4,r25 206 + bl .book3e_secondary_core_init 207 + #endif 208 + 209 + generic_secondary_common_init: 183 210 /* Set up a paca value for this processor. Since we have the 184 211 * physical cpu id in r24, we need to search the pacas to find 185 212 * which logical id maps to our physical one. ··· 225 196 mr r3,r24 /* not found, copy phys to r3 */ 226 197 b .kexec_wait /* next kernel might do better */ 227 198 228 - 2: mtspr SPRN_SPRG3,r13 /* Save vaddr of paca in SPRG3 */ 199 + 2: mtspr SPRN_SPRG_PACA,r13 /* Save vaddr of paca in an SPRG */ 200 + #ifdef CONFIG_PPC_BOOK3E 201 + addi r12,r13,PACA_EXTLB /* and TLB exc frame in another */ 202 + mtspr SPRN_SPRG_TLB_EXFRAME,r12 203 + #endif 204 + 229 205 /* From now on, r24 is expected to be logical cpuid */ 230 206 mr r24,r5 231 207 3: HMT_LOW ··· 266 232 * Turn the MMU off. 267 233 * Assumes we're mapped EA == RA if the MMU is on. 268 234 */ 235 + #ifdef CONFIG_PPC_BOOK3S 269 236 _STATIC(__mmu_off) 270 237 mfmsr r3 271 238 andi. r0,r3,MSR_IR|MSR_DR ··· 278 243 sync 279 244 rfid 280 245 b . /* prevent speculative execution */ 246 + #endif 281 247 282 248 283 249 /* ··· 316 280 mr r31,r3 317 281 mr r30,r4 318 282 283 + #ifdef CONFIG_PPC_BOOK3E 284 + bl .start_initialization_book3e 285 + b .__after_prom_start 286 + #else 319 287 /* Setup some critical 970 SPRs before switching MMU off */ 320 288 mfspr r0,SPRN_PVR 321 289 srwi r0,r0,16 ··· 337 297 /* Switch off MMU if not already off */ 338 298 bl .__mmu_off 339 299 b .__after_prom_start 300 + #endif /* CONFIG_PPC_BOOK3E */ 340 301 341 302 _INIT_STATIC(__boot_from_prom) 342 303 #ifdef CONFIG_PPC_OF_BOOT_TRAMPOLINE ··· 400 359 * Note: This process overwrites the OF exception vectors. 401 360 */ 402 361 li r3,0 /* target addr */ 362 + #ifdef CONFIG_PPC_BOOK3E 363 + tovirt(r3,r3) /* on booke, we already run at PAGE_OFFSET */ 364 + #endif 403 365 mr. r4,r26 /* In some cases the loader may */ 404 366 beq 9f /* have already put us at zero */ 405 367 li r6,0x100 /* Start offset, the first 0x100 */ 406 368 /* bytes were copied earlier. */ 369 + #ifdef CONFIG_PPC_BOOK3E 370 + tovirt(r6,r6) /* on booke, we already run at PAGE_OFFSET */ 371 + #endif 407 372 408 373 #ifdef CONFIG_CRASH_DUMP 409 374 /* ··· 532 485 LOAD_REG_ADDR(r4,paca) /* Get base vaddr of paca array */ 533 486 mulli r13,r24,PACA_SIZE /* Calculate vaddr of right paca */ 534 487 add r13,r13,r4 /* for this processor. */ 535 - mtspr SPRN_SPRG3,r13 /* Save vaddr of paca in SPRG3 */ 488 + mtspr SPRN_SPRG_PACA,r13 /* Save vaddr of paca in an SPRG*/ 536 489 537 490 /* Create a temp kernel stack for use before relocation is on. */ 538 491 ld r1,PACAEMERGSP(r13) ··· 550 503 * 1. Processor number 551 504 * 2. Segment table pointer (virtual address) 552 505 * On entry the following are set: 553 - * r1 = stack pointer. vaddr for iSeries, raddr (temp stack) for pSeries 554 - * r24 = cpu# (in Linux terms) 555 - * r13 = paca virtual address 556 - * SPRG3 = paca virtual address 506 + * r1 = stack pointer. vaddr for iSeries, raddr (temp stack) for pSeries 507 + * r24 = cpu# (in Linux terms) 508 + * r13 = paca virtual address 509 + * SPRG_PACA = paca virtual address 557 510 */ 511 + .section ".text"; 512 + .align 2 ; 513 + 558 514 .globl __secondary_start 559 515 __secondary_start: 560 516 /* Set thread priority to MEDIUM */ ··· 594 544 595 545 mtspr SPRN_SRR0,r3 596 546 mtspr SPRN_SRR1,r4 597 - rfid 547 + RFI 598 548 b . /* prevent speculative execution */ 599 549 600 550 /* ··· 615 565 */ 616 566 _GLOBAL(enable_64b_mode) 617 567 mfmsr r11 /* grab the current MSR */ 568 + #ifdef CONFIG_PPC_BOOK3E 569 + oris r11,r11,0x8000 /* CM bit set, we'll set ICM later */ 570 + mtmsr r11 571 + #else /* CONFIG_PPC_BOOK3E */ 618 572 li r12,(MSR_SF | MSR_ISF)@highest 619 573 sldi r12,r12,48 620 574 or r11,r11,r12 621 575 mtmsrd r11 622 576 isync 577 + #endif 623 578 blr 624 579 625 580 /* ··· 668 613 bdnz 3b 669 614 4: 670 615 616 + #ifndef CONFIG_PPC_BOOK3E 671 617 mfmsr r6 672 618 ori r6,r6,MSR_RI 673 619 mtmsrd r6 /* RI on */ 620 + #endif 674 621 675 622 #ifdef CONFIG_RELOCATABLE 676 623 /* Save the physical address we're running at in kernstart_addr */ ··· 699 642 700 643 /* Restore parameters passed from prom_init/kexec */ 701 644 mr r3,r31 702 - bl .early_setup /* also sets r13 and SPRG3 */ 645 + bl .early_setup /* also sets r13 and SPRG_PACA */ 703 646 704 647 LOAD_REG_ADDR(r3, .start_here_common) 705 648 ld r4,PACAKMSR(r13) 706 649 mtspr SPRN_SRR0,r3 707 650 mtspr SPRN_SRR1,r4 708 - rfid 651 + RFI 709 652 b . /* prevent speculative execution */ 710 653 711 654 /* This is where all platforms converge execution */
+7 -6
arch/powerpc/kernel/head_8xx.S
··· 110 110 * task's thread_struct. 111 111 */ 112 112 #define EXCEPTION_PROLOG \ 113 - mtspr SPRN_SPRG0,r10; \ 114 - mtspr SPRN_SPRG1,r11; \ 113 + mtspr SPRN_SPRG_SCRATCH0,r10; \ 114 + mtspr SPRN_SPRG_SCRATCH1,r11; \ 115 115 mfcr r10; \ 116 116 EXCEPTION_PROLOG_1; \ 117 117 EXCEPTION_PROLOG_2 ··· 121 121 andi. r11,r11,MSR_PR; \ 122 122 tophys(r11,r1); /* use tophys(r1) if kernel */ \ 123 123 beq 1f; \ 124 - mfspr r11,SPRN_SPRG3; \ 124 + mfspr r11,SPRN_SPRG_THREAD; \ 125 125 lwz r11,THREAD_INFO-THREAD(r11); \ 126 126 addi r11,r11,THREAD_SIZE; \ 127 127 tophys(r11,r11); \ ··· 133 133 stw r10,_CCR(r11); /* save registers */ \ 134 134 stw r12,GPR12(r11); \ 135 135 stw r9,GPR9(r11); \ 136 - mfspr r10,SPRN_SPRG0; \ 136 + mfspr r10,SPRN_SPRG_SCRATCH0; \ 137 137 stw r10,GPR10(r11); \ 138 - mfspr r12,SPRN_SPRG1; \ 138 + mfspr r12,SPRN_SPRG_SCRATCH1; \ 139 139 stw r12,GPR11(r11); \ 140 140 mflr r10; \ 141 141 stw r10,_LINK(r11); \ ··· 603 603 /* ptr to phys current thread */ 604 604 tophys(r4,r2) 605 605 addi r4,r4,THREAD /* init task's THREAD */ 606 - mtspr SPRN_SPRG3,r4 606 + mtspr SPRN_SPRG_THREAD,r4 607 607 li r3,0 608 + /* XXX What is that for ? SPRG2 appears otherwise unused on 8xx */ 608 609 mtspr SPRN_SPRG2,r3 /* 0 => r1 has kernel sp */ 609 610 610 611 /* stack */
+20 -30
arch/powerpc/kernel/head_booke.h
··· 20 20 #endif 21 21 22 22 #define NORMAL_EXCEPTION_PROLOG \ 23 - mtspr SPRN_SPRG0,r10; /* save two registers to work with */\ 24 - mtspr SPRN_SPRG1,r11; \ 25 - mtspr SPRN_SPRG4W,r1; \ 23 + mtspr SPRN_SPRG_WSCRATCH0,r10;/* save two registers to work with */\ 24 + mtspr SPRN_SPRG_WSCRATCH1,r11; \ 25 + mtspr SPRN_SPRG_WSCRATCH2,r1; \ 26 26 mfcr r10; /* save CR in r10 for now */\ 27 27 mfspr r11,SPRN_SRR1; /* check whether user or kernel */\ 28 28 andi. r11,r11,MSR_PR; \ 29 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 31 lwz r1,THREAD_INFO-THREAD(r1); /* this thread's kernel stack */\ 32 32 ALLOC_STACK_FRAME(r1, THREAD_SIZE); \ 33 33 1: subi r1,r1,INT_FRAME_SIZE; /* Allocate an exception frame */\ ··· 35 35 stw r10,_CCR(r11); /* save various registers */\ 36 36 stw r12,GPR12(r11); \ 37 37 stw r9,GPR9(r11); \ 38 - mfspr r10,SPRN_SPRG0; \ 38 + mfspr r10,SPRN_SPRG_RSCRATCH0; \ 39 39 stw r10,GPR10(r11); \ 40 - mfspr r12,SPRN_SPRG1; \ 40 + mfspr r12,SPRN_SPRG_RSCRATCH1; \ 41 41 stw r12,GPR11(r11); \ 42 42 mflr r10; \ 43 43 stw r10,_LINK(r11); \ 44 - mfspr r10,SPRN_SPRG4R; \ 44 + mfspr r10,SPRN_SPRG_RSCRATCH2; \ 45 45 mfspr r12,SPRN_SRR0; \ 46 46 stw r10,GPR1(r11); \ 47 47 mfspr r9,SPRN_SRR1; \ ··· 69 69 * providing configurations that micro-optimize space usage. 70 70 */ 71 71 72 - /* CRIT_SPRG only used in critical exception handling */ 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 72 + #define MC_STACK_BASE mcheckirq_ctx 78 73 #define CRIT_STACK_BASE critirq_ctx 79 74 80 75 /* only on e500mc/e200 */ 81 - #define DEBUG_STACK_BASE dbgirq_ctx 82 - #ifdef CONFIG_E200 83 - #define DEBUG_SPRG SPRN_SPRG6W 84 - #else 85 - #define DEBUG_SPRG SPRN_SPRG9 86 - #endif 76 + #define DBG_STACK_BASE dbgirq_ctx 87 77 88 78 #define EXC_LVL_FRAME_OVERHEAD (THREAD_SIZE - INT_FRAME_SIZE - EXC_LVL_SIZE) 89 79 ··· 100 110 * critical/machine check exception stack at low physical addresses. 101 111 */ 102 112 #define EXC_LEVEL_EXCEPTION_PROLOG(exc_level, exc_level_srr0, exc_level_srr1) \ 103 - mtspr exc_level##_SPRG,r8; \ 113 + mtspr SPRN_SPRG_WSCRATCH_##exc_level,r8; \ 104 114 BOOKE_LOAD_EXC_LEVEL_STACK(exc_level);/* r8 points to the exc_level stack*/ \ 105 115 stw r9,GPR9(r8); /* save various registers */\ 106 116 mfcr r9; /* save CR in r9 for now */\ ··· 109 119 stw r9,_CCR(r8); /* save CR on stack */\ 110 120 mfspr r10,exc_level_srr1; /* check whether user or kernel */\ 111 121 andi. r10,r10,MSR_PR; \ 112 - mfspr r11,SPRN_SPRG3; /* if from user, start at top of */\ 122 + mfspr r11,SPRN_SPRG_THREAD; /* if from user, start at top of */\ 113 123 lwz r11,THREAD_INFO-THREAD(r11); /* this thread's kernel stack */\ 114 124 addi r11,r11,EXC_LVL_FRAME_OVERHEAD; /* allocate stack frame */\ 115 125 beq 1f; \ ··· 130 140 lwz r9,TI_TASK-EXC_LVL_FRAME_OVERHEAD(r11); \ 131 141 stw r9,TI_TASK-EXC_LVL_FRAME_OVERHEAD(r8); \ 132 142 mr r11,r8; \ 133 - 2: mfspr r8,exc_level##_SPRG; \ 143 + 2: mfspr r8,SPRN_SPRG_RSCRATCH_##exc_level; \ 134 144 stw r12,GPR12(r11); /* save various registers */\ 135 145 mflr r10; \ 136 146 stw r10,_LINK(r11); \ ··· 151 161 #define CRITICAL_EXCEPTION_PROLOG \ 152 162 EXC_LEVEL_EXCEPTION_PROLOG(CRIT, SPRN_CSRR0, SPRN_CSRR1) 153 163 #define DEBUG_EXCEPTION_PROLOG \ 154 - EXC_LEVEL_EXCEPTION_PROLOG(DEBUG, SPRN_DSRR0, SPRN_DSRR1) 164 + EXC_LEVEL_EXCEPTION_PROLOG(DBG, SPRN_DSRR0, SPRN_DSRR1) 155 165 #define MCHECK_EXCEPTION_PROLOG \ 156 - EXC_LEVEL_EXCEPTION_PROLOG(MCHECK, SPRN_MCSRR0, SPRN_MCSRR1) 166 + EXC_LEVEL_EXCEPTION_PROLOG(MC, SPRN_MCSRR0, SPRN_MCSRR1) 157 167 158 168 /* 159 169 * Exception vectors. ··· 272 282 mtspr SPRN_DSRR1,r9; \ 273 283 lwz r9,GPR9(r11); \ 274 284 lwz r12,GPR12(r11); \ 275 - mtspr DEBUG_SPRG,r8; \ 276 - BOOKE_LOAD_EXC_LEVEL_STACK(DEBUG); /* r8 points to the debug stack */ \ 285 + mtspr SPRN_SPRG_WSCRATCH_DBG,r8; \ 286 + BOOKE_LOAD_EXC_LEVEL_STACK(DBG); /* r8 points to the debug stack */ \ 277 287 lwz r10,GPR10(r8); \ 278 288 lwz r11,GPR11(r8); \ 279 - mfspr r8,DEBUG_SPRG; \ 289 + mfspr r8,SPRN_SPRG_RSCRATCH_DBG; \ 280 290 \ 281 - PPC_RFDI; \ 291 + PPC_RFDI; \ 282 292 b .; \ 283 293 \ 284 294 /* continue normal handling for a debug exception... */ \ ··· 325 335 mtspr SPRN_CSRR1,r9; \ 326 336 lwz r9,GPR9(r11); \ 327 337 lwz r12,GPR12(r11); \ 328 - mtspr CRIT_SPRG,r8; \ 338 + mtspr SPRN_SPRG_WSCRATCH_CRIT,r8; \ 329 339 BOOKE_LOAD_EXC_LEVEL_STACK(CRIT); /* r8 points to the debug stack */ \ 330 340 lwz r10,GPR10(r8); \ 331 341 lwz r11,GPR11(r8); \ 332 - mfspr r8,CRIT_SPRG; \ 342 + mfspr r8,SPRN_SPRG_RSCRATCH_CRIT; \ 333 343 \ 334 344 rfci; \ 335 345 b .; \
+57 -43
arch/powerpc/kernel/head_fsl_booke.S
··· 361 361 362 362 /* ptr to current thread */ 363 363 addi r4,r2,THREAD /* init task's THREAD */ 364 - mtspr SPRN_SPRG3,r4 364 + mtspr SPRN_SPRG_THREAD,r4 365 365 366 366 /* stack */ 367 367 lis r1,init_thread_union@h ··· 532 532 533 533 /* Data TLB Error Interrupt */ 534 534 START_EXCEPTION(DataTLBError) 535 - mtspr SPRN_SPRG0, r10 /* Save some working registers */ 536 - mtspr SPRN_SPRG1, r11 537 - mtspr SPRN_SPRG4W, r12 538 - mtspr SPRN_SPRG5W, r13 535 + mtspr SPRN_SPRG_WSCRATCH0, r10 /* Save some working registers */ 536 + mtspr SPRN_SPRG_WSCRATCH1, r11 537 + mtspr SPRN_SPRG_WSCRATCH2, r12 538 + mtspr SPRN_SPRG_WSCRATCH3, r13 539 539 mfcr r11 540 - mtspr SPRN_SPRG7W, r11 540 + mtspr SPRN_SPRG_WSCRATCH4, r11 541 541 mfspr r10, SPRN_DEAR /* Get faulting address */ 542 542 543 543 /* If we are faulting a kernel address, we have to use the ··· 557 557 558 558 /* Get the PGD for the current thread */ 559 559 3: 560 - mfspr r11,SPRN_SPRG3 560 + mfspr r11,SPRN_SPRG_THREAD 561 561 lwz r11,PGDIR(r11) 562 562 563 563 4: ··· 575 575 * place or can we save a couple of instructions here ? 576 576 */ 577 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 582 li r13,_PAGE_PRESENT|_PAGE_ACCESSED 583 + #endif 579 584 rlwimi r13,r12,11,29,29 580 585 581 586 FIND_PTE ··· 603 598 /* The bailout. Restore registers to pre-exception conditions 604 599 * and call the heavyweights to help us out. 605 600 */ 606 - mfspr r11, SPRN_SPRG7R 601 + mfspr r11, SPRN_SPRG_RSCRATCH4 607 602 mtcr r11 608 - mfspr r13, SPRN_SPRG5R 609 - mfspr r12, SPRN_SPRG4R 610 - mfspr r11, SPRN_SPRG1 611 - mfspr r10, SPRN_SPRG0 603 + mfspr r13, SPRN_SPRG_RSCRATCH3 604 + mfspr r12, SPRN_SPRG_RSCRATCH2 605 + mfspr r11, SPRN_SPRG_RSCRATCH1 606 + mfspr r10, SPRN_SPRG_RSCRATCH0 612 607 b DataStorage 613 608 614 609 /* Instruction TLB Error Interrupt */ ··· 618 613 * to a different point. 619 614 */ 620 615 START_EXCEPTION(InstructionTLBError) 621 - mtspr SPRN_SPRG0, r10 /* Save some working registers */ 622 - mtspr SPRN_SPRG1, r11 623 - mtspr SPRN_SPRG4W, r12 624 - mtspr SPRN_SPRG5W, r13 616 + mtspr SPRN_SPRG_WSCRATCH0, r10 /* Save some working registers */ 617 + mtspr SPRN_SPRG_WSCRATCH1, r11 618 + mtspr SPRN_SPRG_WSCRATCH2, r12 619 + mtspr SPRN_SPRG_WSCRATCH3, r13 625 620 mfcr r11 626 - mtspr SPRN_SPRG7W, r11 621 + mtspr SPRN_SPRG_WSCRATCH4, r11 627 622 mfspr r10, SPRN_SRR0 /* Get faulting address */ 628 623 629 624 /* If we are faulting a kernel address, we have to use the ··· 643 638 644 639 /* Get the PGD for the current thread */ 645 640 3: 646 - mfspr r11,SPRN_SPRG3 641 + mfspr r11,SPRN_SPRG_THREAD 647 642 lwz r11,PGDIR(r11) 648 643 649 644 4: 650 645 /* Make up the required permissions */ 651 - li r13,_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_HWEXEC 646 + #ifdef CONFIG_PTE_64BIT 647 + li r13,_PAGE_PRESENT | _PAGE_EXEC 648 + oris r13,r13,_PAGE_ACCESSED@h 649 + #else 650 + li r13,_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_EXEC 651 + #endif 652 652 653 653 FIND_PTE 654 654 andc. r13,r13,r11 /* Check permission */ ··· 676 666 /* The bailout. Restore registers to pre-exception conditions 677 667 * and call the heavyweights to help us out. 678 668 */ 679 - mfspr r11, SPRN_SPRG7R 669 + mfspr r11, SPRN_SPRG_RSCRATCH4 680 670 mtcr r11 681 - mfspr r13, SPRN_SPRG5R 682 - mfspr r12, SPRN_SPRG4R 683 - mfspr r11, SPRN_SPRG1 684 - mfspr r10, SPRN_SPRG0 671 + mfspr r13, SPRN_SPRG_RSCRATCH3 672 + mfspr r12, SPRN_SPRG_RSCRATCH2 673 + mfspr r11, SPRN_SPRG_RSCRATCH1 674 + mfspr r10, SPRN_SPRG_RSCRATCH0 685 675 b InstructionStorage 686 676 687 677 #ifdef CONFIG_SPE ··· 743 733 744 734 mfspr r12, SPRN_MAS2 745 735 #ifdef CONFIG_PTE_64BIT 746 - rlwimi r12, r11, 26, 24, 31 /* extract ...WIMGE from pte */ 736 + rlwimi r12, r11, 32-19, 27, 31 /* extract WIMGE from pte */ 747 737 #else 748 738 rlwimi r12, r11, 26, 27, 31 /* extract WIMGE from pte */ 749 739 #endif ··· 752 742 #endif 753 743 mtspr SPRN_MAS2, r12 754 744 755 - li r10, (_PAGE_HWEXEC | _PAGE_PRESENT) 745 + #ifdef CONFIG_PTE_64BIT 746 + rlwinm r12, r11, 32-2, 26, 31 /* Move in perm bits */ 747 + andi. r10, r11, _PAGE_DIRTY 748 + bne 1f 749 + li r10, MAS3_SW | MAS3_UW 750 + andc r12, r12, r10 751 + 1: rlwimi r12, r13, 20, 0, 11 /* grab RPN[32:43] */ 752 + rlwimi r12, r11, 20, 12, 19 /* grab RPN[44:51] */ 753 + mtspr SPRN_MAS3, r12 754 + BEGIN_MMU_FTR_SECTION 755 + srwi r10, r13, 12 /* grab RPN[12:31] */ 756 + mtspr SPRN_MAS7, r10 757 + END_MMU_FTR_SECTION_IFSET(MMU_FTR_BIG_PHYS) 758 + #else 759 + li r10, (_PAGE_EXEC | _PAGE_PRESENT) 756 760 rlwimi r10, r11, 31, 29, 29 /* extract _PAGE_DIRTY into SW */ 757 761 and r12, r11, r10 758 762 andi. r10, r11, _PAGE_USER /* Test for _PAGE_USER */ 759 763 slwi r10, r12, 1 760 764 or r10, r10, r12 761 765 iseleq r12, r12, r10 762 - 763 - #ifdef CONFIG_PTE_64BIT 764 - rlwimi r12, r13, 24, 0, 7 /* grab RPN[32:39] */ 765 - rlwimi r12, r11, 24, 8, 19 /* grab RPN[40:51] */ 766 - mtspr SPRN_MAS3, r12 767 - BEGIN_MMU_FTR_SECTION 768 - srwi r10, r13, 8 /* grab RPN[8:31] */ 769 - mtspr SPRN_MAS7, r10 770 - END_MMU_FTR_SECTION_IFSET(MMU_FTR_BIG_PHYS) 771 - #else 772 766 rlwimi r11, r12, 0, 20, 31 /* Extract RPN from PTE and merge with perms */ 773 767 mtspr SPRN_MAS3, r11 774 768 #endif ··· 804 790 tlbwe 805 791 806 792 /* Done...restore registers and get out of here. */ 807 - mfspr r11, SPRN_SPRG7R 793 + mfspr r11, SPRN_SPRG_RSCRATCH4 808 794 mtcr r11 809 - mfspr r13, SPRN_SPRG5R 810 - mfspr r12, SPRN_SPRG4R 811 - mfspr r11, SPRN_SPRG1 812 - mfspr r10, SPRN_SPRG0 795 + mfspr r13, SPRN_SPRG_RSCRATCH3 796 + mfspr r12, SPRN_SPRG_RSCRATCH2 797 + mfspr r11, SPRN_SPRG_RSCRATCH1 798 + mfspr r10, SPRN_SPRG_RSCRATCH0 813 799 rfi /* Force context change */ 814 800 815 801 #ifdef CONFIG_SPE ··· 853 839 #endif /* !CONFIG_SMP */ 854 840 /* enable use of SPE after return */ 855 841 oris r9,r9,MSR_SPE@h 856 - mfspr r5,SPRN_SPRG3 /* current task's THREAD (phys) */ 842 + mfspr r5,SPRN_SPRG_THREAD /* current task's THREAD (phys) */ 857 843 li r4,1 858 844 li r10,THREAD_ACC 859 845 stw r4,THREAD_USED_SPE(r5) ··· 1132 1118 1133 1119 /* ptr to current thread */ 1134 1120 addi r4,r2,THREAD /* address of our thread_struct */ 1135 - mtspr SPRN_SPRG3,r4 1121 + mtspr SPRN_SPRG_THREAD,r4 1136 1122 1137 1123 /* Setup the defaults for TLB entries */ 1138 1124 li r4,(MAS4_TSIZED(BOOK3E_PAGESZ_4K))@l
+1 -1
arch/powerpc/kernel/ibmebus.c
··· 127 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 131 .alloc_coherent = ibmebus_alloc_coherent, 132 132 .free_coherent = ibmebus_free_coherent, 133 133 .map_sg = ibmebus_map_sg,
+3
arch/powerpc/kernel/lparcfg.c
··· 35 35 #include <asm/prom.h> 36 36 #include <asm/vdso_datapage.h> 37 37 #include <asm/vio.h> 38 + #include <asm/mmu.h> 38 39 39 40 #define MODULE_VERS "1.8" 40 41 #define MODULE_NAME "lparcfg" ··· 537 536 partition_potential_processors); 538 537 539 538 seq_printf(m, "shared_processor_mode=%d\n", lppaca[0].shared_proc); 539 + 540 + seq_printf(m, "slb_size=%d\n", mmu_slb_size); 540 541 541 542 return 0; 542 543 }
+7
arch/powerpc/kernel/misc_32.S
··· 342 342 addi r3,r3,L1_CACHE_BYTES 343 343 bdnz 1b 344 344 sync /* wait for dcbst's to get to ram */ 345 + #ifndef CONFIG_44x 345 346 mtctr r4 346 347 2: icbi 0,r6 347 348 addi r6,r6,L1_CACHE_BYTES 348 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 356 sync /* additional sync needed on g4 */ 350 357 isync 351 358 blr
+1 -1
arch/powerpc/kernel/of_platform.c
··· 276 276 #endif /* CONFIG_EEH */ 277 277 278 278 /* Scan the bus */ 279 - scan_phb(phb); 279 + pcibios_scan_phb(phb, dev->node); 280 280 if (phb->bus == NULL) 281 281 return -ENXIO; 282 282
+3
arch/powerpc/kernel/paca.c
··· 13 13 #include <asm/lppaca.h> 14 14 #include <asm/paca.h> 15 15 #include <asm/sections.h> 16 + #include <asm/pgtable.h> 16 17 17 18 /* This symbol is provided by the linker - let it fill in the paca 18 19 * field correctly */ ··· 88 87 89 88 #ifdef CONFIG_PPC_BOOK3S 90 89 new_paca->lppaca_ptr = &lppaca[cpu]; 90 + #else 91 + new_paca->kernel_pgd = swapper_pg_dir; 91 92 #endif 92 93 new_paca->lock_token = 0x8000; 93 94 new_paca->paca_index = cpu;
+122 -11
arch/powerpc/kernel/pci-common.c
··· 50 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 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 62 return pci_dma_ops; 63 63 } ··· 176 176 } 177 177 EXPORT_SYMBOL(pci_domain_nr); 178 178 179 - #ifdef CONFIG_PPC_OF 180 - 181 179 /* This routine is meant to be used early during boot, when the 182 180 * PCI bus numbers have not yet been assigned, and you need to 183 181 * issue PCI config cycles to an OF device. ··· 208 210 return sprintf(buf, "%s", np->full_name); 209 211 } 210 212 static DEVICE_ATTR(devspec, S_IRUGO, pci_show_devspec, NULL); 211 - #endif /* CONFIG_PPC_OF */ 212 213 213 214 /* Add sysfs properties */ 214 215 int pcibios_add_platform_entries(struct pci_dev *pdev) 215 216 { 216 - #ifdef CONFIG_PPC_OF 217 217 return device_create_file(&pdev->dev, &dev_attr_devspec); 218 - #else 219 - return 0; 220 - #endif /* CONFIG_PPC_OF */ 221 - 222 218 } 223 219 224 220 char __devinit *pcibios_setup(char *str) ··· 1618 1626 1619 1627 } 1620 1628 1629 + /* 1630 + * Null PCI config access functions, for the case when we can't 1631 + * find a hose. 1632 + */ 1633 + #define NULL_PCI_OP(rw, size, type) \ 1634 + static int \ 1635 + null_##rw##_config_##size(struct pci_dev *dev, int offset, type val) \ 1636 + { \ 1637 + return PCIBIOS_DEVICE_NOT_FOUND; \ 1638 + } 1639 + 1640 + static int 1641 + null_read_config(struct pci_bus *bus, unsigned int devfn, int offset, 1642 + int len, u32 *val) 1643 + { 1644 + return PCIBIOS_DEVICE_NOT_FOUND; 1645 + } 1646 + 1647 + static int 1648 + null_write_config(struct pci_bus *bus, unsigned int devfn, int offset, 1649 + int len, u32 val) 1650 + { 1651 + return PCIBIOS_DEVICE_NOT_FOUND; 1652 + } 1653 + 1654 + static struct pci_ops null_pci_ops = 1655 + { 1656 + .read = null_read_config, 1657 + .write = null_write_config, 1658 + }; 1659 + 1660 + /* 1661 + * These functions are used early on before PCI scanning is done 1662 + * and all of the pci_dev and pci_bus structures have been created. 1663 + */ 1664 + static struct pci_bus * 1665 + fake_pci_bus(struct pci_controller *hose, int busnr) 1666 + { 1667 + static struct pci_bus bus; 1668 + 1669 + if (hose == 0) { 1670 + printk(KERN_ERR "Can't find hose for PCI bus %d!\n", busnr); 1671 + } 1672 + bus.number = busnr; 1673 + bus.sysdata = hose; 1674 + bus.ops = hose? hose->ops: &null_pci_ops; 1675 + return &bus; 1676 + } 1677 + 1678 + #define EARLY_PCI_OP(rw, size, type) \ 1679 + int early_##rw##_config_##size(struct pci_controller *hose, int bus, \ 1680 + int devfn, int offset, type value) \ 1681 + { \ 1682 + return pci_bus_##rw##_config_##size(fake_pci_bus(hose, bus), \ 1683 + devfn, offset, value); \ 1684 + } 1685 + 1686 + EARLY_PCI_OP(read, byte, u8 *) 1687 + EARLY_PCI_OP(read, word, u16 *) 1688 + EARLY_PCI_OP(read, dword, u32 *) 1689 + EARLY_PCI_OP(write, byte, u8) 1690 + EARLY_PCI_OP(write, word, u16) 1691 + EARLY_PCI_OP(write, dword, u32) 1692 + 1693 + extern int pci_bus_find_capability (struct pci_bus *bus, unsigned int devfn, int cap); 1694 + int early_find_capability(struct pci_controller *hose, int bus, int devfn, 1695 + int cap) 1696 + { 1697 + return pci_bus_find_capability(fake_pci_bus(hose, bus), devfn, cap); 1698 + } 1699 + 1700 + /** 1701 + * pci_scan_phb - Given a pci_controller, setup and scan the PCI bus 1702 + * @hose: Pointer to the PCI host controller instance structure 1703 + * @sysdata: value to use for sysdata pointer. ppc32 and ppc64 differ here 1704 + * 1705 + * Note: the 'data' pointer is a temporary measure. As 32 and 64 bit 1706 + * pci code gets merged, this parameter should become unnecessary because 1707 + * both will use the same value. 1708 + */ 1709 + void __devinit pcibios_scan_phb(struct pci_controller *hose, void *sysdata) 1710 + { 1711 + struct pci_bus *bus; 1712 + struct device_node *node = hose->dn; 1713 + int mode; 1714 + 1715 + pr_debug("PCI: Scanning PHB %s\n", 1716 + node ? node->full_name : "<NO NAME>"); 1717 + 1718 + /* Create an empty bus for the toplevel */ 1719 + bus = pci_create_bus(hose->parent, hose->first_busno, hose->ops, 1720 + sysdata); 1721 + if (bus == NULL) { 1722 + pr_err("Failed to create bus for PCI domain %04x\n", 1723 + hose->global_number); 1724 + return; 1725 + } 1726 + bus->secondary = hose->first_busno; 1727 + hose->bus = bus; 1728 + 1729 + /* Get some IO space for the new PHB */ 1730 + pcibios_setup_phb_io_space(hose); 1731 + 1732 + /* Wire up PHB bus resources */ 1733 + pcibios_setup_phb_resources(hose); 1734 + 1735 + /* Get probe mode and perform scan */ 1736 + mode = PCI_PROBE_NORMAL; 1737 + if (node && ppc_md.pci_probe_mode) 1738 + mode = ppc_md.pci_probe_mode(bus); 1739 + pr_debug(" probe mode: %d\n", mode); 1740 + if (mode == PCI_PROBE_DEVTREE) { 1741 + bus->subordinate = hose->last_busno; 1742 + of_scan_bus(node, bus); 1743 + } 1744 + 1745 + if (mode == PCI_PROBE_NORMAL) 1746 + hose->last_busno = bus->subordinate = pci_scan_child_bus(bus); 1747 + }
+2 -103
arch/powerpc/kernel/pci_32.c
··· 34 34 void pcibios_make_OF_bus_map(void); 35 35 36 36 static void fixup_cpc710_pci64(struct pci_dev* dev); 37 - #ifdef CONFIG_PPC_OF 38 37 static u8* pci_to_OF_bus_map; 39 - #endif 40 38 41 39 /* By default, we don't re-assign bus numbers. We do this only on 42 40 * some pmacs ··· 81 83 } 82 84 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CPC710_PCI64, fixup_cpc710_pci64); 83 85 84 - #ifdef CONFIG_PPC_OF 85 86 /* 86 87 * Functions below are used on OpenFirmware machines. 87 88 */ ··· 354 357 } 355 358 } 356 359 357 - #else /* CONFIG_PPC_OF */ 358 - void pcibios_make_OF_bus_map(void) 360 + void __devinit pcibios_setup_phb_io_space(struct pci_controller *hose) 359 361 { 360 - } 361 - #endif /* CONFIG_PPC_OF */ 362 - 363 - static void __devinit pcibios_scan_phb(struct pci_controller *hose) 364 - { 365 - struct pci_bus *bus; 366 - struct device_node *node = hose->dn; 367 362 unsigned long io_offset; 368 363 struct resource *res = &hose->io_resource; 369 - 370 - pr_debug("PCI: Scanning PHB %s\n", 371 - node ? node->full_name : "<NO NAME>"); 372 - 373 - /* Create an empty bus for the toplevel */ 374 - bus = pci_create_bus(hose->parent, hose->first_busno, hose->ops, hose); 375 - if (bus == NULL) { 376 - printk(KERN_ERR "Failed to create bus for PCI domain %04x\n", 377 - hose->global_number); 378 - return; 379 - } 380 - bus->secondary = hose->first_busno; 381 - hose->bus = bus; 382 364 383 365 /* Fixup IO space offset */ 384 366 io_offset = (unsigned long)hose->io_base_virt - isa_io_base; 385 367 res->start = (res->start + io_offset) & 0xffffffffu; 386 368 res->end = (res->end + io_offset) & 0xffffffffu; 387 - 388 - /* Wire up PHB bus resources */ 389 - pcibios_setup_phb_resources(hose); 390 - 391 - /* Scan children */ 392 - hose->last_busno = bus->subordinate = pci_scan_child_bus(bus); 393 369 } 394 370 395 371 static int __init pcibios_init(void) ··· 380 410 if (pci_assign_all_buses) 381 411 hose->first_busno = next_busno; 382 412 hose->last_busno = 0xff; 383 - pcibios_scan_phb(hose); 413 + pcibios_scan_phb(hose, hose); 384 414 pci_bus_add_devices(hose->bus); 385 415 if (pci_assign_all_buses || next_busno <= hose->last_busno) 386 416 next_busno = hose->last_busno + pcibios_assign_bus_offset; ··· 448 478 return result; 449 479 } 450 480 451 - /* 452 - * Null PCI config access functions, for the case when we can't 453 - * find a hose. 454 - */ 455 - #define NULL_PCI_OP(rw, size, type) \ 456 - static int \ 457 - null_##rw##_config_##size(struct pci_dev *dev, int offset, type val) \ 458 - { \ 459 - return PCIBIOS_DEVICE_NOT_FOUND; \ 460 - } 461 481 462 - static int 463 - null_read_config(struct pci_bus *bus, unsigned int devfn, int offset, 464 - int len, u32 *val) 465 - { 466 - return PCIBIOS_DEVICE_NOT_FOUND; 467 - } 468 - 469 - static int 470 - null_write_config(struct pci_bus *bus, unsigned int devfn, int offset, 471 - int len, u32 val) 472 - { 473 - return PCIBIOS_DEVICE_NOT_FOUND; 474 - } 475 - 476 - static struct pci_ops null_pci_ops = 477 - { 478 - .read = null_read_config, 479 - .write = null_write_config, 480 - }; 481 - 482 - /* 483 - * These functions are used early on before PCI scanning is done 484 - * and all of the pci_dev and pci_bus structures have been created. 485 - */ 486 - static struct pci_bus * 487 - fake_pci_bus(struct pci_controller *hose, int busnr) 488 - { 489 - static struct pci_bus bus; 490 - 491 - if (hose == 0) { 492 - hose = pci_bus_to_hose(busnr); 493 - if (hose == 0) 494 - printk(KERN_ERR "Can't find hose for PCI bus %d!\n", busnr); 495 - } 496 - bus.number = busnr; 497 - bus.sysdata = hose; 498 - bus.ops = hose? hose->ops: &null_pci_ops; 499 - return &bus; 500 - } 501 - 502 - #define EARLY_PCI_OP(rw, size, type) \ 503 - int early_##rw##_config_##size(struct pci_controller *hose, int bus, \ 504 - int devfn, int offset, type value) \ 505 - { \ 506 - return pci_bus_##rw##_config_##size(fake_pci_bus(hose, bus), \ 507 - devfn, offset, value); \ 508 - } 509 - 510 - EARLY_PCI_OP(read, byte, u8 *) 511 - EARLY_PCI_OP(read, word, u16 *) 512 - EARLY_PCI_OP(read, dword, u32 *) 513 - EARLY_PCI_OP(write, byte, u8) 514 - EARLY_PCI_OP(write, word, u16) 515 - EARLY_PCI_OP(write, dword, u32) 516 - 517 - extern int pci_bus_find_capability (struct pci_bus *bus, unsigned int devfn, int cap); 518 - int early_find_capability(struct pci_controller *hose, int bus, int devfn, 519 - int cap) 520 - { 521 - return pci_bus_find_capability(fake_pci_bus(hose, bus), devfn, cap); 522 - }
+6 -329
arch/powerpc/kernel/pci_64.c
··· 43 43 unsigned long pci_io_base = ISA_IO_BASE; 44 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", &reglen); 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 46 static int __init pcibios_init(void) 375 47 { 376 48 struct pci_controller *hose, *tmp; ··· 64 392 65 393 /* Scan all of the recorded PCI controllers. */ 66 394 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) { 67 - scan_phb(hose); 395 + pcibios_scan_phb(hose, hose->dn); 68 396 pci_bus_add_devices(hose->bus); 69 397 } 70 398 ··· 197 525 return 0; 198 526 } 199 527 EXPORT_SYMBOL_GPL(pcibios_map_io_space); 528 + 529 + void __devinit pcibios_setup_phb_io_space(struct pci_controller *hose) 530 + { 531 + pcibios_map_io_space(hose->bus); 532 + } 200 533 201 534 #define IOBASE_BRIDGE_NUMBER 0 202 535 #define IOBASE_MEMORY 1
+358
arch/powerpc/kernel/pci_of_scan.c
··· 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", &reglen); 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 +
+35 -33
arch/powerpc/kernel/perf_counter.c
··· 32 32 unsigned long mmcr[3]; 33 33 struct perf_counter *limited_counter[MAX_LIMITED_HWCOUNTERS]; 34 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 39 DEFINE_PER_CPU(struct cpu_hw_counters, cpu_hw_counters); 37 40 ··· 65 62 { 66 63 return 0; 67 64 } 68 - static inline void perf_set_pmu_inuse(int inuse) { } 69 65 static inline void perf_get_data_addr(struct pt_regs *regs, u64 *addrp) { } 70 66 static inline u32 perf_get_misc_flags(struct pt_regs *regs) 71 67 { ··· 93 91 return 4 * (slot - 1); 94 92 } 95 93 return 0; 96 - } 97 - 98 - static inline void perf_set_pmu_inuse(int inuse) 99 - { 100 - get_lppaca()->pmcregs_in_use = inuse; 101 94 } 102 95 103 96 /* ··· 242 245 * and see if any combination of alternative codes is feasible. 243 246 * The feasible set is returned in event[]. 244 247 */ 245 - static int power_check_constraints(u64 event[], unsigned int cflags[], 248 + static int power_check_constraints(struct cpu_hw_counters *cpuhw, 249 + u64 event[], unsigned int cflags[], 246 250 int n_ev) 247 251 { 248 252 unsigned long mask, value, nv; 249 - u64 alternatives[MAX_HWCOUNTERS][MAX_EVENT_ALTERNATIVES]; 250 - unsigned long amasks[MAX_HWCOUNTERS][MAX_EVENT_ALTERNATIVES]; 251 - unsigned long avalues[MAX_HWCOUNTERS][MAX_EVENT_ALTERNATIVES]; 252 253 unsigned long smasks[MAX_HWCOUNTERS], svalues[MAX_HWCOUNTERS]; 253 254 int n_alt[MAX_HWCOUNTERS], choice[MAX_HWCOUNTERS]; 254 255 int i, j; ··· 261 266 if ((cflags[i] & PPMU_LIMITED_PMC_REQD) 262 267 && !ppmu->limited_pmc_event(event[i])) { 263 268 ppmu->get_alternatives(event[i], cflags[i], 264 - alternatives[i]); 265 - event[i] = alternatives[i][0]; 269 + cpuhw->alternatives[i]); 270 + event[i] = cpuhw->alternatives[i][0]; 266 271 } 267 - if (ppmu->get_constraint(event[i], &amasks[i][0], 268 - &avalues[i][0])) 272 + if (ppmu->get_constraint(event[i], &cpuhw->amasks[i][0], 273 + &cpuhw->avalues[i][0])) 269 274 return -1; 270 275 } 271 276 value = mask = 0; 272 277 for (i = 0; i < n_ev; ++i) { 273 - nv = (value | avalues[i][0]) + (value & avalues[i][0] & addf); 278 + nv = (value | cpuhw->avalues[i][0]) + 279 + (value & cpuhw->avalues[i][0] & addf); 274 280 if ((((nv + tadd) ^ value) & mask) != 0 || 275 - (((nv + tadd) ^ avalues[i][0]) & amasks[i][0]) != 0) 281 + (((nv + tadd) ^ cpuhw->avalues[i][0]) & 282 + cpuhw->amasks[i][0]) != 0) 276 283 break; 277 284 value = nv; 278 - mask |= amasks[i][0]; 285 + mask |= cpuhw->amasks[i][0]; 279 286 } 280 287 if (i == n_ev) 281 288 return 0; /* all OK */ ··· 288 291 for (i = 0; i < n_ev; ++i) { 289 292 choice[i] = 0; 290 293 n_alt[i] = ppmu->get_alternatives(event[i], cflags[i], 291 - alternatives[i]); 294 + cpuhw->alternatives[i]); 292 295 for (j = 1; j < n_alt[i]; ++j) 293 - ppmu->get_constraint(alternatives[i][j], 294 - &amasks[i][j], &avalues[i][j]); 296 + ppmu->get_constraint(cpuhw->alternatives[i][j], 297 + &cpuhw->amasks[i][j], 298 + &cpuhw->avalues[i][j]); 295 299 } 296 300 297 301 /* enumerate all possibilities and see if any will work */ ··· 311 313 * where k > j, will satisfy the constraints. 312 314 */ 313 315 while (++j < n_alt[i]) { 314 - nv = (value | avalues[i][j]) + 315 - (value & avalues[i][j] & addf); 316 + nv = (value | cpuhw->avalues[i][j]) + 317 + (value & cpuhw->avalues[i][j] & addf); 316 318 if ((((nv + tadd) ^ value) & mask) == 0 && 317 - (((nv + tadd) ^ avalues[i][j]) 318 - & amasks[i][j]) == 0) 319 + (((nv + tadd) ^ cpuhw->avalues[i][j]) 320 + & cpuhw->amasks[i][j]) == 0) 319 321 break; 320 322 } 321 323 if (j >= n_alt[i]) { ··· 337 339 svalues[i] = value; 338 340 smasks[i] = mask; 339 341 value = nv; 340 - mask |= amasks[i][j]; 342 + mask |= cpuhw->amasks[i][j]; 341 343 ++i; 342 344 j = -1; 343 345 } ··· 345 347 346 348 /* OK, we have a feasible combination, tell the caller the solution */ 347 349 for (i = 0; i < n_ev; ++i) 348 - event[i] = alternatives[i][choice[i]]; 350 + event[i] = cpuhw->alternatives[i][choice[i]]; 349 351 return 0; 350 352 } 351 353 ··· 529 531 * Check if we ever enabled the PMU on this cpu. 530 532 */ 531 533 if (!cpuhw->pmcs_enabled) { 532 - if (ppc_md.enable_pmcs) 533 - ppc_md.enable_pmcs(); 534 + ppc_enable_pmcs(); 534 535 cpuhw->pmcs_enabled = 1; 535 536 } 536 537 ··· 591 594 mtspr(SPRN_MMCRA, cpuhw->mmcr[2] & ~MMCRA_SAMPLE_ENABLE); 592 595 mtspr(SPRN_MMCR1, cpuhw->mmcr[1]); 593 596 if (cpuhw->n_counters == 0) 594 - perf_set_pmu_inuse(0); 597 + ppc_set_pmu_inuse(0); 595 598 goto out_enable; 596 599 } 597 600 ··· 624 627 * bit set and set the hardware counters to their initial values. 625 628 * Then unfreeze the counters. 626 629 */ 627 - perf_set_pmu_inuse(1); 630 + ppc_set_pmu_inuse(1); 628 631 mtspr(SPRN_MMCRA, cpuhw->mmcr[2] & ~MMCRA_SAMPLE_ENABLE); 629 632 mtspr(SPRN_MMCR1, cpuhw->mmcr[1]); 630 633 mtspr(SPRN_MMCR0, (cpuhw->mmcr[0] & ~(MMCR0_PMC1CE | MMCR0_PMCjCE)) ··· 749 752 return -EAGAIN; 750 753 if (check_excludes(cpuhw->counter, cpuhw->flags, n0, n)) 751 754 return -EAGAIN; 752 - i = power_check_constraints(cpuhw->events, cpuhw->flags, n + n0); 755 + i = power_check_constraints(cpuhw, cpuhw->events, cpuhw->flags, n + n0); 753 756 if (i < 0) 754 757 return -EAGAIN; 755 758 cpuhw->n_counters = n0 + n; ··· 804 807 cpuhw->flags[n0] = counter->hw.counter_base; 805 808 if (check_excludes(cpuhw->counter, cpuhw->flags, n0, 1)) 806 809 goto out; 807 - if (power_check_constraints(cpuhw->events, cpuhw->flags, n0 + 1)) 810 + if (power_check_constraints(cpuhw, cpuhw->events, cpuhw->flags, n0 + 1)) 808 811 goto out; 809 812 810 813 counter->hw.config = cpuhw->events[n0]; ··· 1009 1012 unsigned int cflags[MAX_HWCOUNTERS]; 1010 1013 int n; 1011 1014 int err; 1015 + struct cpu_hw_counters *cpuhw; 1012 1016 1013 1017 if (!ppmu) 1014 1018 return ERR_PTR(-ENXIO); ··· 1088 1090 cflags[n] = flags; 1089 1091 if (check_excludes(ctrs, cflags, n, 1)) 1090 1092 return ERR_PTR(-EINVAL); 1091 - if (power_check_constraints(events, cflags, n + 1)) 1093 + 1094 + cpuhw = &get_cpu_var(cpu_hw_counters); 1095 + err = power_check_constraints(cpuhw, events, cflags, n + 1); 1096 + put_cpu_var(cpu_hw_counters); 1097 + if (err) 1092 1098 return ERR_PTR(-EINVAL); 1093 1099 1094 1100 counter->hw.config = events[n];
+9 -7
arch/powerpc/kernel/process.c
··· 284 284 return ppc_md.set_dabr(dabr); 285 285 286 286 /* XXX should we have a CPU_FTR_HAS_DABR ? */ 287 - #if defined(CONFIG_PPC64) || defined(CONFIG_6xx) 287 + #if defined(CONFIG_BOOKE) 288 + mtspr(SPRN_DAC1, dabr); 289 + #elif defined(CONFIG_PPC_BOOK3S) 288 290 mtspr(SPRN_DABR, dabr); 289 291 #endif 290 292 291 - #if defined(CONFIG_BOOKE) 292 - mtspr(SPRN_DAC1, dabr); 293 - #endif 294 293 295 294 return 0; 296 295 } ··· 371 372 372 373 #endif /* CONFIG_SMP */ 373 374 374 - if (unlikely(__get_cpu_var(current_dabr) != new->thread.dabr)) 375 - set_dabr(new->thread.dabr); 376 - 377 375 #if defined(CONFIG_BOOKE) 378 376 /* If new thread DAC (HW breakpoint) is the same then leave it */ 379 377 if (new->thread.dabr) 380 378 set_dabr(new->thread.dabr); 379 + #else 380 + if (unlikely(__get_cpu_var(current_dabr) != new->thread.dabr)) 381 + set_dabr(new->thread.dabr); 381 382 #endif 383 + 382 384 383 385 new_thread = &new->thread; 384 386 old_thread = &current->thread; ··· 664 664 sp_vsid |= SLB_VSID_KERNEL | llp; 665 665 p->thread.ksp_vsid = sp_vsid; 666 666 } 667 + #endif /* CONFIG_PPC_STD_MMU_64 */ 667 668 668 669 /* 669 670 * The PPC64 ABI makes use of a TOC to contain function ··· 672 671 * to the TOC entry. The first entry is a pointer to the actual 673 672 * function. 674 673 */ 674 + #ifdef CONFIG_PPC64 675 675 kregs->nip = *((unsigned long *)ret_from_fork); 676 676 #else 677 677 kregs->nip = (unsigned long)ret_from_fork;
+101 -6
arch/powerpc/kernel/prom_init.c
··· 190 190 191 191 static char __initdata prom_cmd_line[COMMAND_LINE_SIZE]; 192 192 193 + static unsigned long __initdata prom_memory_limit; 194 + 193 195 static unsigned long __initdata alloc_top; 194 196 static unsigned long __initdata alloc_top_high; 195 197 static unsigned long __initdata alloc_bottom; ··· 486 484 return call_prom("interpret", 1, 1, (u32)(unsigned long) cmd); 487 485 } 488 486 487 + /* We can't use the standard versions because of RELOC headaches. */ 488 + #define isxdigit(c) (('0' <= (c) && (c) <= '9') \ 489 + || ('a' <= (c) && (c) <= 'f') \ 490 + || ('A' <= (c) && (c) <= 'F')) 491 + 492 + #define isdigit(c) ('0' <= (c) && (c) <= '9') 493 + #define islower(c) ('a' <= (c) && (c) <= 'z') 494 + #define toupper(c) (islower(c) ? ((c) - 'a' + 'A') : (c)) 495 + 496 + unsigned long prom_strtoul(const char *cp, const char **endp) 497 + { 498 + unsigned long result = 0, base = 10, value; 499 + 500 + if (*cp == '0') { 501 + base = 8; 502 + cp++; 503 + if (toupper(*cp) == 'X') { 504 + cp++; 505 + base = 16; 506 + } 507 + } 508 + 509 + while (isxdigit(*cp) && 510 + (value = isdigit(*cp) ? *cp - '0' : toupper(*cp) - 'A' + 10) < base) { 511 + result = result * base + value; 512 + cp++; 513 + } 514 + 515 + if (endp) 516 + *endp = cp; 517 + 518 + return result; 519 + } 520 + 521 + unsigned long prom_memparse(const char *ptr, const char **retptr) 522 + { 523 + unsigned long ret = prom_strtoul(ptr, retptr); 524 + int shift = 0; 525 + 526 + /* 527 + * We can't use a switch here because GCC *may* generate a 528 + * jump table which won't work, because we're not running at 529 + * the address we're linked at. 530 + */ 531 + if ('G' == **retptr || 'g' == **retptr) 532 + shift = 30; 533 + 534 + if ('M' == **retptr || 'm' == **retptr) 535 + shift = 20; 536 + 537 + if ('K' == **retptr || 'k' == **retptr) 538 + shift = 10; 539 + 540 + if (shift) { 541 + ret <<= shift; 542 + (*retptr)++; 543 + } 544 + 545 + return ret; 546 + } 547 + 489 548 /* 490 549 * Early parsing of the command line passed to the kernel, used for 491 550 * "mem=x" and the options that affect the iommu ··· 554 491 static void __init early_cmdline_parse(void) 555 492 { 556 493 struct prom_t *_prom = &RELOC(prom); 557 - #ifdef CONFIG_PPC64 558 494 const char *opt; 559 - #endif 495 + 560 496 char *p; 561 497 int l = 0; 562 498 ··· 583 521 RELOC(prom_iommu_force_on) = 1; 584 522 } 585 523 #endif 524 + opt = strstr(RELOC(prom_cmd_line), RELOC("mem=")); 525 + if (opt) { 526 + opt += 4; 527 + RELOC(prom_memory_limit) = prom_memparse(opt, (const char **)&opt); 528 + #ifdef CONFIG_PPC64 529 + /* Align to 16 MB == size of ppc64 large page */ 530 + RELOC(prom_memory_limit) = ALIGN(RELOC(prom_memory_limit), 0x1000000); 531 + #endif 532 + } 586 533 } 587 534 588 535 #ifdef CONFIG_PPC_PSERIES ··· 1098 1027 } 1099 1028 1100 1029 /* 1030 + * If prom_memory_limit is set we reduce the upper limits *except* for 1031 + * alloc_top_high. This must be the real top of RAM so we can put 1032 + * TCE's up there. 1033 + */ 1034 + 1035 + RELOC(alloc_top_high) = RELOC(ram_top); 1036 + 1037 + if (RELOC(prom_memory_limit)) { 1038 + if (RELOC(prom_memory_limit) <= RELOC(alloc_bottom)) { 1039 + prom_printf("Ignoring mem=%x <= alloc_bottom.\n", 1040 + RELOC(prom_memory_limit)); 1041 + RELOC(prom_memory_limit) = 0; 1042 + } else if (RELOC(prom_memory_limit) >= RELOC(ram_top)) { 1043 + prom_printf("Ignoring mem=%x >= ram_top.\n", 1044 + RELOC(prom_memory_limit)); 1045 + RELOC(prom_memory_limit) = 0; 1046 + } else { 1047 + RELOC(ram_top) = RELOC(prom_memory_limit); 1048 + RELOC(rmo_top) = min(RELOC(rmo_top), RELOC(prom_memory_limit)); 1049 + } 1050 + } 1051 + 1052 + /* 1101 1053 * Setup our top alloc point, that is top of RMO or top of 1102 1054 * segment 0 when running non-LPAR. 1103 1055 * Some RS64 machines have buggy firmware where claims up at ··· 1135 1041 RELOC(alloc_top_high) = RELOC(ram_top); 1136 1042 1137 1043 prom_printf("memory layout at init:\n"); 1044 + prom_printf(" memory_limit : %x (16 MB aligned)\n", RELOC(prom_memory_limit)); 1138 1045 prom_printf(" alloc_bottom : %x\n", RELOC(alloc_bottom)); 1139 1046 prom_printf(" alloc_top : %x\n", RELOC(alloc_top)); 1140 1047 prom_printf(" alloc_top_hi : %x\n", RELOC(alloc_top_high)); ··· 1354 1259 * 1355 1260 * -- Cort 1356 1261 */ 1357 - extern char __secondary_hold; 1358 - extern unsigned long __secondary_hold_spinloop; 1359 - extern unsigned long __secondary_hold_acknowledge; 1360 - 1361 1262 /* 1362 1263 * We want to reference the copy of __secondary_hold_* in the 1363 1264 * 0 - 0x100 address range ··· 2490 2399 /* 2491 2400 * Fill in some infos for use by the kernel later on 2492 2401 */ 2402 + if (RELOC(prom_memory_limit)) 2403 + prom_setprop(_prom->chosen, "/chosen", "linux,memory-limit", 2404 + &RELOC(prom_memory_limit), 2405 + sizeof(prom_memory_limit)); 2493 2406 #ifdef CONFIG_PPC64 2494 2407 if (RELOC(prom_iommu_off)) 2495 2408 prom_setprop(_prom->chosen, "/chosen", "linux,iommu-off",
+6 -1
arch/powerpc/kernel/rtas.c
··· 39 39 #include <asm/smp.h> 40 40 #include <asm/atomic.h> 41 41 #include <asm/time.h> 42 + #include <asm/mmu.h> 42 43 43 44 struct rtas_t rtas = { 44 45 .lock = __RAW_SPIN_LOCK_UNLOCKED ··· 714 713 { 715 714 long rc = H_SUCCESS; 716 715 unsigned long msr_save; 716 + u16 slb_size = mmu_slb_size; 717 717 int cpu; 718 718 struct rtas_suspend_me_data *data = 719 719 (struct rtas_suspend_me_data *)info; ··· 737 735 /* All other cpus are in H_JOIN, this cpu does 738 736 * the suspend. 739 737 */ 738 + slb_set_size(SLB_MIN_SIZE); 740 739 printk(KERN_DEBUG "calling ibm,suspend-me on cpu %i\n", 741 740 smp_processor_id()); 742 741 data->error = rtas_call(data->token, 0, 1, NULL); 743 742 744 - if (data->error) 743 + if (data->error) { 745 744 printk(KERN_DEBUG "ibm,suspend-me returned %d\n", 746 745 data->error); 746 + slb_set_size(slb_size); 747 + } 747 748 } else { 748 749 printk(KERN_ERR "H_JOIN on cpu %i failed with rc = %ld\n", 749 750 smp_processor_id(), rc);
+8
arch/powerpc/kernel/setup_32.c
··· 210 210 } 211 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 221 void nvram_sync(void) 214 222 { 215 223 if (ppc_md.nvram_sync)
+29 -5
arch/powerpc/kernel/setup_64.c
··· 63 63 #include <asm/udbg.h> 64 64 #include <asm/kexec.h> 65 65 #include <asm/swiotlb.h> 66 + #include <asm/mmu_context.h> 66 67 67 68 #include "setup.h" 68 69 ··· 144 143 #define check_smt_enabled() 145 144 #endif /* CONFIG_SMP */ 146 145 147 - /* Put the paca pointer into r13 and SPRG3 */ 146 + /* Put the paca pointer into r13 and SPRG_PACA */ 148 147 void __init setup_paca(int cpu) 149 148 { 150 149 local_paca = &paca[cpu]; 151 - mtspr(SPRN_SPRG3, local_paca); 150 + mtspr(SPRN_SPRG_PACA, local_paca); 151 + #ifdef CONFIG_PPC_BOOK3E 152 + mtspr(SPRN_SPRG_TLB_EXFRAME, local_paca->extlb); 153 + #endif 152 154 } 153 155 154 156 /* ··· 235 231 #endif /* CONFIG_SMP */ 236 232 237 233 #if defined(CONFIG_SMP) || defined(CONFIG_KEXEC) 238 - extern unsigned long __secondary_hold_spinloop; 239 - extern void generic_secondary_smp_init(void); 240 - 241 234 void smp_release_cpus(void) 242 235 { 243 236 unsigned long *ptr; ··· 455 454 #define irqstack_early_init() 456 455 #endif 457 456 457 + #ifdef CONFIG_PPC_BOOK3E 458 + static void __init exc_lvl_early_init(void) 459 + { 460 + unsigned int i; 461 + 462 + for_each_possible_cpu(i) { 463 + critirq_ctx[i] = (struct thread_info *) 464 + __va(lmb_alloc(THREAD_SIZE, THREAD_SIZE)); 465 + dbgirq_ctx[i] = (struct thread_info *) 466 + __va(lmb_alloc(THREAD_SIZE, THREAD_SIZE)); 467 + mcheckirq_ctx[i] = (struct thread_info *) 468 + __va(lmb_alloc(THREAD_SIZE, THREAD_SIZE)); 469 + } 470 + } 471 + #else 472 + #define exc_lvl_early_init() 473 + #endif 474 + 458 475 /* 459 476 * Stack space used when we detect a bad kernel stack pointer, and 460 477 * early in SMP boots before relocation is enabled. ··· 532 513 init_mm.brk = klimit; 533 514 534 515 irqstack_early_init(); 516 + exc_lvl_early_init(); 535 517 emergency_stack_init(); 536 518 537 519 #ifdef CONFIG_PPC_STD_MMU_64 ··· 555 535 #endif 556 536 557 537 paging_init(); 538 + 539 + /* Initialize the MMU context management stuff */ 540 + mmu_context_init(); 541 + 558 542 ppc64_boot_msg(0x15, "Setup Done"); 559 543 } 560 544
+9 -6
arch/powerpc/kernel/smp.c
··· 269 269 cpu_callin_map[boot_cpuid] = 1; 270 270 271 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 276 else 274 277 max_cpus = 1; 275 278 ··· 415 412 * CPUs can take much longer to come up in the 416 413 * hotplug case. Wait five seconds. 417 414 */ 418 - for (c = 25; c && !cpu_callin_map[cpu]; c--) { 419 - msleep(200); 420 - } 415 + for (c = 5000; c && !cpu_callin_map[cpu]; c--) 416 + msleep(1); 421 417 #endif 422 418 423 419 if (!cpu_callin_map[cpu]) { ··· 496 494 preempt_disable(); 497 495 cpu_callin_map[cpu] = 1; 498 496 499 - smp_ops->setup_cpu(cpu); 497 + if (smp_ops->setup_cpu) 498 + smp_ops->setup_cpu(cpu); 500 499 if (smp_ops->take_timebase) 501 500 smp_ops->take_timebase(); 502 501 ··· 560 557 old_mask = current->cpus_allowed; 561 558 set_cpus_allowed(current, cpumask_of_cpu(boot_cpuid)); 562 559 563 - if (smp_ops) 560 + if (smp_ops && smp_ops->setup_cpu) 564 561 smp_ops->setup_cpu(boot_cpuid); 565 562 566 563 set_cpus_allowed(current, old_mask);
+12
arch/powerpc/kernel/sys_ppc32.c
··· 343 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 358 /* Note: it is necessary to treat bufsiz as an unsigned int, 347 359 * with the corresponding cast to a signed int to insure that the 348 360 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
+3
arch/powerpc/kernel/sysfs.c
··· 17 17 #include <asm/prom.h> 18 18 #include <asm/machdep.h> 19 19 #include <asm/smp.h> 20 + #include <asm/pmc.h> 20 21 21 22 #include "cacheinfo.h" 22 23 ··· 124 123 125 124 void ppc_enable_pmcs(void) 126 125 { 126 + ppc_set_pmu_inuse(1); 127 + 127 128 /* Only need to enable them once */ 128 129 if (__get_cpu_var(pmcs_enabled)) 129 130 return;
+24 -9
arch/powerpc/kernel/time.c
··· 479 479 unsigned long tb_ticks = tb - iSeries_recal_tb; 480 480 unsigned long titan_usec = (titan - iSeries_recal_titan) >> 12; 481 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 484 long tick_diff = new_tb_ticks_per_jiffy - tb_ticks_per_jiffy; 484 485 char sign = '+'; 485 486 /* make sure tb_ticks_per_sec and tb_ticks_per_jiffy are consistent */ ··· 727 726 return found; 728 727 } 729 728 729 + /* should become __cpuinit when secondary_cpu_time_init also is */ 730 + void start_cpu_decrementer(void) 731 + { 732 + #if defined(CONFIG_BOOKE) || defined(CONFIG_40x) 733 + /* Clear any pending timer interrupts */ 734 + mtspr(SPRN_TSR, TSR_ENW | TSR_WIS | TSR_DIS | TSR_FIS); 735 + 736 + /* Enable decrementer interrupt */ 737 + mtspr(SPRN_TCR, TCR_DIE); 738 + #endif /* defined(CONFIG_BOOKE) || defined(CONFIG_40x) */ 739 + } 740 + 730 741 void __init generic_calibrate_decr(void) 731 742 { 732 743 ppc_tb_freq = DEFAULT_TB_FREQ; /* hardcoded default */ ··· 758 745 printk(KERN_ERR "WARNING: Estimating processor frequency " 759 746 "(not found)\n"); 760 747 } 761 - 762 - #if defined(CONFIG_BOOKE) || defined(CONFIG_40x) 763 - /* Clear any pending timer interrupts */ 764 - mtspr(SPRN_TSR, TSR_ENW | TSR_WIS | TSR_DIS | TSR_FIS); 765 - 766 - /* Enable decrementer interrupt */ 767 - mtspr(SPRN_TCR, TCR_DIE); 768 - #endif 769 748 } 770 749 771 750 int update_persistent_clock(struct timespec now) ··· 918 913 919 914 void secondary_cpu_time_init(void) 920 915 { 916 + /* Start the decrementer on CPUs that have manual control 917 + * such as BookE 918 + */ 919 + start_cpu_decrementer(); 920 + 921 921 /* FIME: Should make unrelatred change to move snapshot_timebase 922 922 * call here ! */ 923 923 register_decrementer_clockevent(smp_processor_id()); ··· 1025 1015 vdso_data->tb_to_xs = tb_to_xs; 1026 1016 1027 1017 write_sequnlock_irqrestore(&xtime_lock, flags); 1018 + 1019 + /* Start the decrementer on CPUs that have manual control 1020 + * such as BookE 1021 + */ 1022 + start_cpu_decrementer(); 1028 1023 1029 1024 /* Register the clocksource, if we're not running on iSeries */ 1030 1025 if (!firmware_has_feature(FW_FEATURE_ISERIES))
+6 -1
arch/powerpc/kernel/vdso.c
··· 203 203 } else { 204 204 vdso_pagelist = vdso64_pagelist; 205 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 213 #else 209 214 vdso_pagelist = vdso32_pagelist;
+1
arch/powerpc/kernel/vdso32/Makefile
··· 12 12 targets := $(obj-vdso32) vdso32.so vdso32.so.dbg 13 13 obj-vdso32 := $(addprefix $(obj)/, $(obj-vdso32)) 14 14 15 + GCOV_PROFILE := n 15 16 16 17 EXTRA_CFLAGS := -shared -fno-common -fno-builtin 17 18 EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso32.so.1 \
+2
arch/powerpc/kernel/vdso64/Makefile
··· 7 7 targets := $(obj-vdso64) vdso64.so vdso64.so.dbg 8 8 obj-vdso64 := $(addprefix $(obj)/, $(obj-vdso64)) 9 9 10 + GCOV_PROFILE := n 11 + 10 12 EXTRA_CFLAGS := -shared -fno-common -fno-builtin 11 13 EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso64.so.1 \ 12 14 $(call ld-option, -Wl$(comma)--hash-style=sysv)
+1 -1
arch/powerpc/kernel/vector.S
··· 65 65 1: 66 66 /* enable use of VMX after return */ 67 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 69 oris r9,r9,MSR_VEC@h 70 70 #else 71 71 ld r4,PACACURRENT(r13)
+1 -1
arch/powerpc/kernel/vio.c
··· 601 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 605 .alloc_coherent = vio_dma_iommu_alloc_coherent, 606 606 .free_coherent = vio_dma_iommu_free_coherent, 607 607 .map_sg = vio_dma_iommu_map_sg,
+4 -4
arch/powerpc/kernel/vmlinux.lds.S
··· 239 239 } 240 240 #endif 241 241 242 - . = ALIGN(PAGE_SIZE); 243 - _edata = .; 244 - PROVIDE32 (edata = .); 245 - 246 242 /* The initial task and kernel stack */ 247 243 #ifdef CONFIG_PPC32 248 244 . = ALIGN(8192); ··· 271 275 . = ALIGN(PAGE_SIZE); 272 276 __nosave_end = .; 273 277 } 278 + 279 + . = ALIGN(PAGE_SIZE); 280 + _edata = .; 281 + PROVIDE32 (edata = .); 274 282 275 283 /* 276 284 * And finally the bss
+9 -9
arch/powerpc/kvm/booke_interrupts.S
··· 56 56 .macro KVM_HANDLER ivor_nr 57 57 _GLOBAL(kvmppc_handler_\ivor_nr) 58 58 /* Get pointer to vcpu and record exit number. */ 59 - mtspr SPRN_SPRG0, r4 60 - mfspr r4, SPRN_SPRG1 59 + mtspr SPRN_SPRG_WSCRATCH0, r4 60 + mfspr r4, SPRN_SPRG_RVCPU 61 61 stw r5, VCPU_GPR(r5)(r4) 62 62 stw r6, VCPU_GPR(r6)(r4) 63 63 mfctr r5 ··· 95 95 96 96 97 97 /* Registers: 98 - * SPRG0: guest r4 98 + * SPRG_SCRATCH0: guest r4 99 99 * r4: vcpu pointer 100 100 * r5: KVM exit number 101 101 */ ··· 181 181 stw r3, VCPU_LR(r4) 182 182 mfxer r3 183 183 stw r3, VCPU_XER(r4) 184 - mfspr r3, SPRN_SPRG0 184 + mfspr r3, SPRN_SPRG_RSCRATCH0 185 185 stw r3, VCPU_GPR(r4)(r4) 186 186 mfspr r3, SPRN_SRR0 187 187 stw r3, VCPU_PC(r4) ··· 374 374 mtspr SPRN_IVPR, r8 375 375 376 376 /* Save vcpu pointer for the exception handlers. */ 377 - mtspr SPRN_SPRG1, r4 377 + mtspr SPRN_SPRG_WVCPU, r4 378 378 379 379 /* Can't switch the stack pointer until after IVPR is switched, 380 380 * because host interrupt handlers would get confused. */ ··· 384 384 /* Host interrupt handlers may have clobbered these guest-readable 385 385 * SPRGs, so we need to reload them here with the guest's values. */ 386 386 lwz r3, VCPU_SPRG4(r4) 387 - mtspr SPRN_SPRG4, r3 387 + mtspr SPRN_SPRG4W, r3 388 388 lwz r3, VCPU_SPRG5(r4) 389 - mtspr SPRN_SPRG5, r3 389 + mtspr SPRN_SPRG5W, r3 390 390 lwz r3, VCPU_SPRG6(r4) 391 - mtspr SPRN_SPRG6, r3 391 + mtspr SPRN_SPRG6W, r3 392 392 lwz r3, VCPU_SPRG7(r4) 393 - mtspr SPRN_SPRG7, r3 393 + mtspr SPRN_SPRG7W, r3 394 394 395 395 #ifdef CONFIG_KVM_EXIT_TIMING 396 396 /* save enter time */
+2 -2
arch/powerpc/mm/40x_mmu.c
··· 105 105 106 106 while (s >= LARGE_PAGE_SIZE_16M) { 107 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 110 pmdp = pmd_offset(pud_offset(pgd_offset_k(v), v), v); 111 111 pmd_val(*pmdp++) = val; ··· 120 120 121 121 while (s >= LARGE_PAGE_SIZE_4M) { 122 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 125 pmdp = pmd_offset(pud_offset(pgd_offset_k(v), v), v); 126 126 pmd_val(*pmdp) = val;
+1
arch/powerpc/mm/Makefile
··· 13 13 pgtable_$(CONFIG_WORD_SIZE).o 14 14 obj-$(CONFIG_PPC_MMU_NOHASH) += mmu_context_nohash.o tlb_nohash.o \ 15 15 tlb_nohash_low.o 16 + obj-$(CONFIG_PPC_BOOK3E) += tlb_low_$(CONFIG_WORD_SIZE)e.o 16 17 obj-$(CONFIG_PPC64) += mmap_64.o 17 18 hash64-$(CONFIG_PPC_NATIVE) := hash_native_64.o 18 19 obj-$(CONFIG_PPC_STD_MMU_64) += hash_utils_64.o \
+1 -1
arch/powerpc/mm/fsl_booke_mmu.c
··· 161 161 unsigned long virt = PAGE_OFFSET; 162 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 165 settlbcam(tlbcam_index, virt, phys, cam[tlbcam_index], PAGE_KERNEL_X, 0); 166 166 virt += cam[tlbcam_index]; 167 167 phys += cam[tlbcam_index];
+2 -2
arch/powerpc/mm/hash_low_32.S
··· 40 40 * The address is in r4, and r3 contains an access flag: 41 41 * _PAGE_RW (0x400) if a write. 42 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 45 * Returns to the caller if the access is illegal or there is no 46 46 * mapping for the address. Otherwise it places an appropriate PTE ··· 68 68 /* Get PTE (linux-style) and check access */ 69 69 lis r0,KERNELBASE@h /* check if kernel address */ 70 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 72 ori r3,r3,_PAGE_USER|_PAGE_PRESENT /* test low addresses as user */ 73 73 lwz r5,PGDIR(r8) /* virt page-table root */ 74 74 blt+ 112f /* assume user more likely */
+6 -2
arch/powerpc/mm/hugetlbpage.c
··· 57 57 #define HUGEPTE_CACHE_NAME(psize) (huge_pgtable_cache_name[psize]) 58 58 59 59 static const char *huge_pgtable_cache_name[MMU_PAGE_COUNT] = { 60 - "unused_4K", "hugepte_cache_64K", "unused_64K_AP", 61 - "hugepte_cache_1M", "hugepte_cache_16M", "hugepte_cache_16G" 60 + [MMU_PAGE_64K] = "hugepte_cache_64K", 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 66 /* Flag to mark huge PD pointers. This means pmd_bad() and pud_bad() ··· 701 699 * same as the base page size. */ 702 700 if (mmu_huge_psizes[psize] || 703 701 mmu_psize_defs[psize].shift == PAGE_SHIFT) 702 + return; 703 + if (WARN_ON(HUGEPTE_CACHE_NAME(psize) == NULL)) 704 704 return; 705 705 hugetlb_add_hstate(mmu_psize_defs[psize].shift - PAGE_SHIFT); 706 706
-2
arch/powerpc/mm/init_32.c
··· 54 54 #endif 55 55 #define MAX_LOW_MEM CONFIG_LOWMEM_SIZE 56 56 57 - DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); 58 - 59 57 phys_addr_t total_memory; 60 58 phys_addr_t total_lowmem; 61 59
+48 -7
arch/powerpc/mm/init_64.c
··· 205 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 249 int __meminit vmemmap_populate(struct page *start_page, 209 250 unsigned long nr_pages, int node) 210 251 { ··· 256 215 /* Align to the page size of the linear mapping. */ 257 216 start = _ALIGN_DOWN(start, page_size); 258 217 218 + pr_debug("vmemmap_populate page %p, %ld pages, node %d\n", 219 + start_page, nr_pages, node); 220 + pr_debug(" -> map %lx..%lx\n", start, end); 221 + 259 222 for (; start < end; start += page_size) { 260 - int mapped; 261 223 void *p; 262 224 263 225 if (vmemmap_populated(start, page_size)) ··· 270 226 if (!p) 271 227 return -ENOMEM; 272 228 273 - pr_debug("vmemmap %08lx allocated at %p, physical %08lx.\n", 274 - start, p, __pa(p)); 229 + pr_debug(" * %016lx..%016lx allocated at %p\n", 230 + start, start + page_size, p); 275 231 276 - mapped = htab_bolt_mapping(start, start + page_size, __pa(p), 277 - pgprot_val(PAGE_KERNEL), 278 - mmu_vmemmap_psize, mmu_kernel_ssize); 279 - BUG_ON(mapped < 0); 232 + vmemmap_create_mapping(start, page_size, __pa(p)); 280 233 } 281 234 282 235 return 0;
+64 -32
arch/powerpc/mm/mmu_context_nohash.c
··· 25 25 * also clear mm->cpu_vm_mask bits when processes are migrated 26 26 */ 27 27 28 - #undef DEBUG 29 - #define DEBUG_STEAL_ONLY 30 - #undef DEBUG_MAP_CONSISTENCY 31 - /*#define DEBUG_CLAMP_LAST_CONTEXT 15 */ 28 + #define DEBUG_MAP_CONSISTENCY 29 + #define DEBUG_CLAMP_LAST_CONTEXT 31 30 + //#define DEBUG_HARDER 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 43 #include <linux/kernel.h> 34 44 #include <linux/mm.h> ··· 81 71 static unsigned int steal_context_smp(unsigned int id) 82 72 { 83 73 struct mm_struct *mm; 84 - unsigned int cpu, max; 74 + unsigned int cpu, max, i; 85 75 86 76 max = last_context - first_context; 87 77 ··· 99 89 id = first_context; 100 90 continue; 101 91 } 102 - pr_devel("[%d] steal context %d from mm @%p\n", 103 - smp_processor_id(), id, mm); 92 + pr_hardcont(" | steal %d from 0x%p", id, mm); 104 93 105 94 /* Mark this mm has having no context anymore */ 106 95 mm->context.id = MMU_NO_CONTEXT; 107 96 108 - /* Mark it stale on all CPUs that used this mm */ 109 - for_each_cpu(cpu, mm_cpumask(mm)) 110 - __set_bit(id, stale_map[cpu]); 97 + /* Mark it stale on all CPUs that used this mm. For threaded 98 + * implementations, we set it on all threads on each core 99 + * represented in the mask. A future implementation will use 100 + * a core map instead but this will do for now. 101 + */ 102 + for_each_cpu(cpu, mm_cpumask(mm)) { 103 + for (i = cpu_first_thread_in_core(cpu); 104 + i <= cpu_last_thread_in_core(cpu); i++) 105 + __set_bit(id, stale_map[i]); 106 + cpu = i - 1; 107 + } 111 108 return id; 112 109 } 113 110 ··· 143 126 /* Pick up the victim mm */ 144 127 mm = context_mm[id]; 145 128 146 - pr_devel("[%d] steal context %d from mm @%p\n", cpu, id, mm); 129 + pr_hardcont(" | steal %d from 0x%p", id, mm); 147 130 148 131 /* Flush the TLB for that context */ 149 132 local_flush_tlb_mm(mm); ··· 190 173 191 174 void switch_mmu_context(struct mm_struct *prev, struct mm_struct *next) 192 175 { 193 - unsigned int id, cpu = smp_processor_id(); 176 + unsigned int i, id, cpu = smp_processor_id(); 194 177 unsigned long *map; 195 178 196 179 /* No lockless fast path .. yet */ 197 180 spin_lock(&context_lock); 198 181 199 - #ifndef DEBUG_STEAL_ONLY 200 - pr_devel("[%d] activating context for mm @%p, active=%d, id=%d\n", 201 - cpu, next, next->context.active, next->context.id); 202 - #endif 182 + pr_hard("[%d] activating context for mm @%p, active=%d, id=%d", 183 + cpu, next, next->context.active, next->context.id); 203 184 204 185 #ifdef CONFIG_SMP 205 186 /* Mark us active and the previous one not anymore */ 206 187 next->context.active++; 207 188 if (prev) { 208 - #ifndef DEBUG_STEAL_ONLY 209 - pr_devel(" old context %p active was: %d\n", 210 - prev, prev->context.active); 211 - #endif 189 + pr_hardcont(" (old=0x%p a=%d)", prev, prev->context.active); 212 190 WARN_ON(prev->context.active < 1); 213 191 prev->context.active--; 214 192 } ··· 213 201 214 202 /* If we already have a valid assigned context, skip all that */ 215 203 id = next->context.id; 216 - if (likely(id != MMU_NO_CONTEXT)) 204 + if (likely(id != MMU_NO_CONTEXT)) { 205 + #ifdef DEBUG_MAP_CONSISTENCY 206 + if (context_mm[id] != next) 207 + pr_err("MMU: mm 0x%p has id %d but context_mm[%d] says 0x%p\n", 208 + next, id, id, context_mm[id]); 209 + #endif 217 210 goto ctxt_ok; 211 + } 218 212 219 213 /* We really don't have a context, let's try to acquire one */ 220 214 id = next_context; ··· 253 235 next_context = id + 1; 254 236 context_mm[id] = next; 255 237 next->context.id = id; 256 - 257 - #ifndef DEBUG_STEAL_ONLY 258 - pr_devel("[%d] picked up new id %d, nrf is now %d\n", 259 - cpu, id, nr_free_contexts); 260 - #endif 238 + pr_hardcont(" | new id=%d,nrf=%d", id, nr_free_contexts); 261 239 262 240 context_check_map(); 263 241 ctxt_ok: ··· 262 248 * local TLB for it and unmark it before we use it 263 249 */ 264 250 if (test_bit(id, stale_map[cpu])) { 265 - pr_devel("[%d] flushing stale context %d for mm @%p !\n", 266 - cpu, id, next); 251 + pr_hardcont(" | stale flush %d [%d..%d]", 252 + id, cpu_first_thread_in_core(cpu), 253 + cpu_last_thread_in_core(cpu)); 254 + 267 255 local_flush_tlb_mm(next); 268 256 269 257 /* XXX This clear should ultimately be part of local_flush_tlb_mm */ 270 - __clear_bit(id, stale_map[cpu]); 258 + for (i = cpu_first_thread_in_core(cpu); 259 + i <= cpu_last_thread_in_core(cpu); i++) { 260 + __clear_bit(id, stale_map[i]); 261 + } 271 262 } 272 263 273 264 /* Flick the MMU and release lock */ 265 + pr_hardcont(" -> %d\n", id); 274 266 set_context(id, next->pgd); 275 267 spin_unlock(&context_lock); 276 268 } ··· 286 266 */ 287 267 int init_new_context(struct task_struct *t, struct mm_struct *mm) 288 268 { 269 + pr_hard("initing context for mm @%p\n", mm); 270 + 289 271 mm->context.id = MMU_NO_CONTEXT; 290 272 mm->context.active = 0; 291 273 ··· 327 305 unsigned long action, void *hcpu) 328 306 { 329 307 unsigned int cpu = (unsigned int)(long)hcpu; 330 - 308 + #ifdef CONFIG_HOTPLUG_CPU 309 + struct task_struct *p; 310 + #endif 331 311 /* We don't touch CPU 0 map, it's allocated at aboot and kept 332 312 * around forever 333 313 */ ··· 348 324 pr_devel("MMU: Freeing stale context map for CPU %d\n", cpu); 349 325 kfree(stale_map[cpu]); 350 326 stale_map[cpu] = NULL; 351 - break; 352 - #endif 327 + 328 + /* We also clear the cpu_vm_mask bits of CPUs going away */ 329 + read_lock(&tasklist_lock); 330 + for_each_process(p) { 331 + if (p->mm) 332 + cpu_mask_clear_cpu(cpu, mm_cpumask(p->mm)); 333 + } 334 + read_unlock(&tasklist_lock); 335 + break; 336 + #endif /* CONFIG_HOTPLUG_CPU */ 353 337 } 354 338 return NOTIFY_OK; 355 339 }
+32 -5
arch/powerpc/mm/mmu_decl.h
··· 36 36 { 37 37 asm volatile ("sync; tlbia; isync" : : : "memory"); 38 38 } 39 + #define _tlbil_pid_noind(pid) _tlbil_pid(pid) 40 + 39 41 #else /* CONFIG_40x || CONFIG_8xx */ 40 42 extern void _tlbil_all(void); 41 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 49 #endif /* !(CONFIG_40x || CONFIG_8xx) */ 43 50 44 51 /* 45 52 * On 8xx, we directly inline tlbie, on others, it's extern 46 53 */ 47 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 58 asm volatile ("tlbie %0; sync" : : "r" (address) : "memory"); 51 59 } 52 - #else /* CONFIG_8xx */ 53 - extern void _tlbil_va(unsigned long address, unsigned int pid); 60 + #elif defined(CONFIG_PPC_BOOK3E) 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 70 #endif /* CONIFG_8xx */ 55 71 56 72 /* ··· 74 58 * implementation. When that becomes the case, this will be 75 59 * an extern. 76 60 */ 77 - static inline void _tlbivax_bcast(unsigned long address, unsigned int pid) 61 + #ifdef CONFIG_PPC_BOOK3E 62 + extern void _tlbivax_bcast(unsigned long address, unsigned int pid, 63 + unsigned int tsize, unsigned int ind); 64 + #else 65 + static inline void _tlbivax_bcast(unsigned long address, unsigned int pid, 66 + unsigned int tsize, unsigned int ind) 78 67 { 79 68 BUG(); 80 69 } 70 + #endif 81 71 82 72 #else /* CONFIG_PPC_MMU_NOHASH */ 83 73 ··· 121 99 struct hash_pte; 122 100 extern struct hash_pte *Hash, *Hash_end; 123 101 extern unsigned long Hash_size, Hash_mask; 124 - #endif 102 + 103 + #endif /* CONFIG_PPC32 */ 104 + 105 + #ifdef CONFIG_PPC64 106 + extern int map_kernel_page(unsigned long ea, unsigned long pa, int flags); 107 + #endif /* CONFIG_PPC64 */ 125 108 126 109 extern unsigned long ioremap_bot; 127 110 extern unsigned long __max_low_memory;
+128 -51
arch/powerpc/mm/pgtable.c
··· 30 30 #include <asm/tlbflush.h> 31 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 43 static DEFINE_PER_CPU(struct pte_freelist_batch *, pte_freelist_cur); 34 44 static unsigned long pte_freelist_forced_free; 35 45 ··· 126 116 *batchp = NULL; 127 117 } 128 118 129 - /* 130 - * Handle i/d cache flushing, called from set_pte_at() or ptep_set_access_flags() 131 - */ 132 - static pte_t do_dcache_icache_coherency(pte_t pte) 133 - { 134 - unsigned long pfn = pte_pfn(pte); 135 - struct page *page; 136 - 137 - if (unlikely(!pfn_valid(pfn))) 138 - return pte; 139 - page = pfn_to_page(pfn); 140 - 141 - if (!PageReserved(page) && !test_bit(PG_arch_1, &page->flags)) { 142 - pr_devel("do_dcache_icache_coherency... flushing\n"); 143 - flush_dcache_icache_page(page); 144 - set_bit(PG_arch_1, &page->flags); 145 - } 146 - else 147 - pr_devel("do_dcache_icache_coherency... already clean\n"); 148 - return __pte(pte_val(pte) | _PAGE_HWEXEC); 149 - } 119 + #endif /* CONFIG_SMP */ 150 120 151 121 static inline int is_exec_fault(void) 152 122 { ··· 135 145 136 146 /* We only try to do i/d cache coherency on stuff that looks like 137 147 * reasonably "normal" PTEs. We currently require a PTE to be present 138 - * and we avoid _PAGE_SPECIAL and _PAGE_NO_CACHE 148 + * and we avoid _PAGE_SPECIAL and _PAGE_NO_CACHE. We also only do that 149 + * on userspace PTEs 139 150 */ 140 151 static inline int pte_looks_normal(pte_t pte) 141 152 { 142 153 return (pte_val(pte) & 143 - (_PAGE_PRESENT | _PAGE_SPECIAL | _PAGE_NO_CACHE)) == 144 - (_PAGE_PRESENT); 154 + (_PAGE_PRESENT | _PAGE_SPECIAL | _PAGE_NO_CACHE | _PAGE_USER)) == 155 + (_PAGE_PRESENT | _PAGE_USER); 145 156 } 146 157 147 - #if defined(CONFIG_PPC_STD_MMU) 158 + struct page * maybe_pte_to_page(pte_t pte) 159 + { 160 + unsigned long pfn = pte_pfn(pte); 161 + struct page *page; 162 + 163 + if (unlikely(!pfn_valid(pfn))) 164 + return NULL; 165 + page = pfn_to_page(pfn); 166 + if (PageReserved(page)) 167 + return NULL; 168 + return page; 169 + } 170 + 171 + #if defined(CONFIG_PPC_STD_MMU) || _PAGE_EXEC == 0 172 + 148 173 /* Server-style MMU handles coherency when hashing if HW exec permission 149 - * is supposed per page (currently 64-bit only). Else, we always flush 150 - * valid PTEs in set_pte. 174 + * is supposed per page (currently 64-bit only). If not, then, we always 175 + * flush the cache for valid PTEs in set_pte. Embedded CPU without HW exec 176 + * support falls into the same category. 151 177 */ 152 - static inline int pte_need_exec_flush(pte_t pte, int set_pte) 178 + 179 + static pte_t set_pte_filter(pte_t pte) 153 180 { 154 - return set_pte && pte_looks_normal(pte) && 155 - !(cpu_has_feature(CPU_FTR_COHERENT_ICACHE) || 156 - cpu_has_feature(CPU_FTR_NOEXECUTE)); 181 + pte = __pte(pte_val(pte) & ~_PAGE_HPTEFLAGS); 182 + if (pte_looks_normal(pte) && !(cpu_has_feature(CPU_FTR_COHERENT_ICACHE) || 183 + cpu_has_feature(CPU_FTR_NOEXECUTE))) { 184 + struct page *pg = maybe_pte_to_page(pte); 185 + if (!pg) 186 + return pte; 187 + if (!test_bit(PG_arch_1, &pg->flags)) { 188 + flush_dcache_icache_page(pg); 189 + set_bit(PG_arch_1, &pg->flags); 190 + } 191 + } 192 + return pte; 157 193 } 158 - #elif _PAGE_HWEXEC == 0 159 - /* Embedded type MMU without HW exec support (8xx only so far), we flush 160 - * the cache for any present PTE 194 + 195 + static pte_t set_access_flags_filter(pte_t pte, struct vm_area_struct *vma, 196 + int dirty) 197 + { 198 + return pte; 199 + } 200 + 201 + #else /* defined(CONFIG_PPC_STD_MMU) || _PAGE_EXEC == 0 */ 202 + 203 + /* Embedded type MMU with HW exec support. This is a bit more complicated 204 + * as we don't have two bits to spare for _PAGE_EXEC and _PAGE_HWEXEC so 205 + * instead we "filter out" the exec permission for non clean pages. 161 206 */ 162 - static inline int pte_need_exec_flush(pte_t pte, int set_pte) 207 + static pte_t set_pte_filter(pte_t pte) 163 208 { 164 - return set_pte && pte_looks_normal(pte); 209 + struct page *pg; 210 + 211 + /* No exec permission in the first place, move on */ 212 + if (!(pte_val(pte) & _PAGE_EXEC) || !pte_looks_normal(pte)) 213 + return pte; 214 + 215 + /* If you set _PAGE_EXEC on weird pages you're on your own */ 216 + pg = maybe_pte_to_page(pte); 217 + if (unlikely(!pg)) 218 + return pte; 219 + 220 + /* If the page clean, we move on */ 221 + if (test_bit(PG_arch_1, &pg->flags)) 222 + return pte; 223 + 224 + /* If it's an exec fault, we flush the cache and make it clean */ 225 + if (is_exec_fault()) { 226 + flush_dcache_icache_page(pg); 227 + set_bit(PG_arch_1, &pg->flags); 228 + return pte; 229 + } 230 + 231 + /* Else, we filter out _PAGE_EXEC */ 232 + return __pte(pte_val(pte) & ~_PAGE_EXEC); 165 233 } 166 - #else 167 - /* Other embedded CPUs with HW exec support per-page, we flush on exec 168 - * fault if HWEXEC is not set 169 - */ 170 - static inline int pte_need_exec_flush(pte_t pte, int set_pte) 234 + 235 + static pte_t set_access_flags_filter(pte_t pte, struct vm_area_struct *vma, 236 + int dirty) 171 237 { 172 - return pte_looks_normal(pte) && is_exec_fault() && 173 - !(pte_val(pte) & _PAGE_HWEXEC); 238 + struct page *pg; 239 + 240 + /* So here, we only care about exec faults, as we use them 241 + * to recover lost _PAGE_EXEC and perform I$/D$ coherency 242 + * if necessary. Also if _PAGE_EXEC is already set, same deal, 243 + * we just bail out 244 + */ 245 + if (dirty || (pte_val(pte) & _PAGE_EXEC) || !is_exec_fault()) 246 + return pte; 247 + 248 + #ifdef CONFIG_DEBUG_VM 249 + /* So this is an exec fault, _PAGE_EXEC is not set. If it was 250 + * an error we would have bailed out earlier in do_page_fault() 251 + * but let's make sure of it 252 + */ 253 + if (WARN_ON(!(vma->vm_flags & VM_EXEC))) 254 + return pte; 255 + #endif /* CONFIG_DEBUG_VM */ 256 + 257 + /* If you set _PAGE_EXEC on weird pages you're on your own */ 258 + pg = maybe_pte_to_page(pte); 259 + if (unlikely(!pg)) 260 + goto bail; 261 + 262 + /* If the page is already clean, we move on */ 263 + if (test_bit(PG_arch_1, &pg->flags)) 264 + goto bail; 265 + 266 + /* Clean the page and set PG_arch_1 */ 267 + flush_dcache_icache_page(pg); 268 + set_bit(PG_arch_1, &pg->flags); 269 + 270 + bail: 271 + return __pte(pte_val(pte) | _PAGE_EXEC); 174 272 } 175 - #endif 273 + 274 + #endif /* !(defined(CONFIG_PPC_STD_MMU) || _PAGE_EXEC == 0) */ 176 275 177 276 /* 178 277 * set_pte stores a linux PTE into the linux page table. 179 278 */ 180 - void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pte) 279 + void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, 280 + pte_t pte) 181 281 { 182 282 #ifdef CONFIG_DEBUG_VM 183 283 WARN_ON(pte_present(*ptep)); ··· 276 196 * this context might not have been activated yet when this 277 197 * is called. 278 198 */ 279 - pte = __pte(pte_val(pte) & ~_PAGE_HPTEFLAGS); 280 - if (pte_need_exec_flush(pte, 1)) 281 - pte = do_dcache_icache_coherency(pte); 199 + pte = set_pte_filter(pte); 282 200 283 201 /* Perform the setting of the PTE */ 284 202 __set_pte_at(mm, addr, ptep, pte, 0); ··· 293 215 pte_t *ptep, pte_t entry, int dirty) 294 216 { 295 217 int changed; 296 - if (!dirty && pte_need_exec_flush(entry, 0)) 297 - entry = do_dcache_icache_coherency(entry); 218 + entry = set_access_flags_filter(entry, vma, dirty); 298 219 changed = !pte_same(*(ptep), entry); 299 220 if (changed) { 300 221 if (!(vma->vm_flags & VM_HUGETLB)) ··· 319 242 BUG_ON(pud_none(*pud)); 320 243 pmd = pmd_offset(pud, addr); 321 244 BUG_ON(!pmd_present(*pmd)); 322 - BUG_ON(!spin_is_locked(pte_lockptr(mm, pmd))); 245 + assert_spin_locked(pte_lockptr(mm, pmd)); 323 246 } 324 247 #endif /* CONFIG_DEBUG_VM */ 325 248
+1 -1
arch/powerpc/mm/pgtable_32.c
··· 142 142 flags |= _PAGE_DIRTY | _PAGE_HWWRITE; 143 143 144 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 147 return __ioremap_caller(addr, size, flags, __builtin_return_address(0)); 148 148 }
+54 -5
arch/powerpc/mm/pgtable_64.c
··· 33 33 #include <linux/stddef.h> 34 34 #include <linux/vmalloc.h> 35 35 #include <linux/init.h> 36 + #include <linux/bootmem.h> 37 + #include <linux/lmb.h> 36 38 37 39 #include <asm/pgalloc.h> 38 40 #include <asm/page.h> ··· 57 55 58 56 unsigned long ioremap_bot = IOREMAP_BASE; 59 57 58 + 59 + #ifdef CONFIG_PPC_MMU_NOHASH 60 + static void *early_alloc_pgtable(unsigned long size) 61 + { 62 + void *pt; 63 + 64 + if (init_bootmem_done) 65 + pt = __alloc_bootmem(size, size, __pa(MAX_DMA_ADDRESS)); 66 + else 67 + pt = __va(lmb_alloc_base(size, size, 68 + __pa(MAX_DMA_ADDRESS))); 69 + memset(pt, 0, size); 70 + 71 + return pt; 72 + } 73 + #endif /* CONFIG_PPC_MMU_NOHASH */ 74 + 60 75 /* 61 - * map_io_page currently only called by __ioremap 62 - * map_io_page adds an entry to the ioremap page table 76 + * map_kernel_page currently only called by __ioremap 77 + * map_kernel_page adds an entry to the ioremap page table 63 78 * and adds an entry to the HPT, possibly bolting it 64 79 */ 65 - static int map_io_page(unsigned long ea, unsigned long pa, int flags) 80 + int map_kernel_page(unsigned long ea, unsigned long pa, int flags) 66 81 { 67 82 pgd_t *pgdp; 68 83 pud_t *pudp; 69 84 pmd_t *pmdp; 70 85 pte_t *ptep; 71 86 72 - if (mem_init_done) { 87 + if (slab_is_available()) { 73 88 pgdp = pgd_offset_k(ea); 74 89 pudp = pud_alloc(&init_mm, pgdp, ea); 75 90 if (!pudp) ··· 100 81 set_pte_at(&init_mm, ea, ptep, pfn_pte(pa >> PAGE_SHIFT, 101 82 __pgprot(flags))); 102 83 } else { 84 + #ifdef CONFIG_PPC_MMU_NOHASH 85 + /* Warning ! This will blow up if bootmem is not initialized 86 + * which our ppc64 code is keen to do that, we'll need to 87 + * fix it and/or be more careful 88 + */ 89 + pgdp = pgd_offset_k(ea); 90 + #ifdef PUD_TABLE_SIZE 91 + if (pgd_none(*pgdp)) { 92 + pudp = early_alloc_pgtable(PUD_TABLE_SIZE); 93 + BUG_ON(pudp == NULL); 94 + pgd_populate(&init_mm, pgdp, pudp); 95 + } 96 + #endif /* PUD_TABLE_SIZE */ 97 + pudp = pud_offset(pgdp, ea); 98 + if (pud_none(*pudp)) { 99 + pmdp = early_alloc_pgtable(PMD_TABLE_SIZE); 100 + BUG_ON(pmdp == NULL); 101 + pud_populate(&init_mm, pudp, pmdp); 102 + } 103 + pmdp = pmd_offset(pudp, ea); 104 + if (!pmd_present(*pmdp)) { 105 + ptep = early_alloc_pgtable(PAGE_SIZE); 106 + BUG_ON(ptep == NULL); 107 + pmd_populate_kernel(&init_mm, pmdp, ptep); 108 + } 109 + ptep = pte_offset_kernel(pmdp, ea); 110 + set_pte_at(&init_mm, ea, ptep, pfn_pte(pa >> PAGE_SHIFT, 111 + __pgprot(flags))); 112 + #else /* CONFIG_PPC_MMU_NOHASH */ 103 113 /* 104 114 * If the mm subsystem is not fully up, we cannot create a 105 115 * linux page table entry for this mapping. Simply bolt an ··· 141 93 "memory at %016lx !\n", pa); 142 94 return -ENOMEM; 143 95 } 96 + #endif /* !CONFIG_PPC_MMU_NOHASH */ 144 97 } 145 98 return 0; 146 99 } ··· 173 124 WARN_ON(size & ~PAGE_MASK); 174 125 175 126 for (i = 0; i < size; i += PAGE_SIZE) 176 - if (map_io_page((unsigned long)ea+i, pa+i, flags)) 127 + if (map_kernel_page((unsigned long)ea+i, pa+i, flags)) 177 128 return NULL; 178 129 179 130 return (void __iomem *)ea;
+24 -22
arch/powerpc/mm/slb.c
··· 191 191 unsigned long slbie_data = 0; 192 192 unsigned long pc = KSTK_EIP(tsk); 193 193 unsigned long stack = KSTK_ESP(tsk); 194 - unsigned long unmapped_base; 194 + unsigned long exec_base; 195 195 196 196 /* 197 197 * We need interrupts hard-disabled here, not just soft-disabled, ··· 227 227 228 228 /* 229 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)) 232 - unmapped_base = TASK_UNMAPPED_BASE_USER32; 233 - else 234 - unmapped_base = TASK_UNMAPPED_BASE_USER64; 233 + exec_base = 0x10000000; 235 234 236 - if (is_kernel_addr(pc)) 235 + if (is_kernel_addr(pc) || is_kernel_addr(stack) || 236 + is_kernel_addr(exec_base)) 237 237 return; 238 + 238 239 slb_allocate(pc); 239 240 240 - if (esids_match(pc,stack)) 241 - return; 241 + if (!esids_match(pc, stack)) 242 + slb_allocate(stack); 242 243 243 - if (is_kernel_addr(stack)) 244 - return; 245 - slb_allocate(stack); 246 - 247 - if (esids_match(pc,unmapped_base) || esids_match(stack,unmapped_base)) 248 - return; 249 - 250 - if (is_kernel_addr(unmapped_base)) 251 - return; 252 - slb_allocate(unmapped_base); 244 + if (!esids_match(pc, exec_base) && 245 + !esids_match(stack, exec_base)) 246 + slb_allocate(exec_base); 253 247 } 254 248 255 249 static inline void patch_slb_encoding(unsigned int *insn_addr, 256 250 unsigned int immed) 257 251 { 258 - /* Assume the instruction had a "0" immediate value, just 259 - * "or" in the new value 260 - */ 261 - *insn_addr |= immed; 252 + *insn_addr = (*insn_addr & 0xffff0000) | immed; 262 253 flush_icache_range((unsigned long)insn_addr, 4+ 263 254 (unsigned long)insn_addr); 255 + } 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); 264 266 } 265 267 266 268 void slb_initialize(void)
+3
arch/powerpc/mm/tlb_hash32.c
··· 71 71 */ 72 72 _tlbia(); 73 73 } 74 + 75 + /* Push out batch of freed page tables */ 76 + pte_free_finish(); 74 77 } 75 78 76 79 /*
+15 -5
arch/powerpc/mm/tlb_hash64.c
··· 33 33 34 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 37 * A linux PTE was changed and the corresponding hash table entry 43 38 * neesd to be flushed. This function will either perform the flush ··· 147 152 else 148 153 flush_hash_range(i, local); 149 154 batch->index = 0; 155 + } 156 + 157 + void tlb_flush(struct mmu_gather *tlb) 158 + { 159 + struct ppc64_tlb_batch *tlbbatch = &__get_cpu_var(ppc64_tlb_batch); 160 + 161 + /* If there's a TLB batch pending, then we must flush it because the 162 + * pages are going to be freed and we really don't want to have a CPU 163 + * access a freed page because it has a stale TLB 164 + */ 165 + if (tlbbatch->index) 166 + __flush_tlb_pending(tlbbatch); 167 + 168 + /* Push out batch of freed page tables */ 169 + pte_free_finish(); 150 170 } 151 171 152 172 /**
+770
arch/powerpc/mm/tlb_low_64e.S
··· 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
+253 -15
arch/powerpc/mm/tlb_nohash.c
··· 7 7 * 8 8 * -- BenH 9 9 * 10 - * Copyright 2008 Ben Herrenschmidt <benh@kernel.crashing.org> 11 - * IBM Corp. 10 + * Copyright 2008,2009 Ben Herrenschmidt <benh@kernel.crashing.org> 11 + * IBM Corp. 12 12 * 13 13 * Derived from arch/ppc/mm/init.c: 14 14 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) ··· 34 34 #include <linux/pagemap.h> 35 35 #include <linux/preempt.h> 36 36 #include <linux/spinlock.h> 37 + #include <linux/lmb.h> 37 38 38 39 #include <asm/tlbflush.h> 39 40 #include <asm/tlb.h> 41 + #include <asm/code-patching.h> 40 42 41 43 #include "mmu_decl.h" 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 */ 42 101 43 102 /* 44 103 * Base TLB flushing operations: ··· 126 67 } 127 68 EXPORT_SYMBOL(local_flush_tlb_mm); 128 69 129 - void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr) 70 + void __local_flush_tlb_page(struct mm_struct *mm, unsigned long vmaddr, 71 + int tsize, int ind) 130 72 { 131 73 unsigned int pid; 132 74 133 75 preempt_disable(); 134 - pid = vma ? vma->vm_mm->context.id : 0; 76 + pid = mm ? mm->context.id : 0; 135 77 if (pid != MMU_NO_CONTEXT) 136 - _tlbil_va(vmaddr, pid); 78 + _tlbil_va(vmaddr, pid, tsize, ind); 137 79 preempt_enable(); 138 80 } 139 - EXPORT_SYMBOL(local_flush_tlb_page); 140 81 82 + void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr) 83 + { 84 + __local_flush_tlb_page(vma ? vma->vm_mm : NULL, vmaddr, 85 + mmu_get_tsize(mmu_virtual_psize), 0); 86 + } 87 + EXPORT_SYMBOL(local_flush_tlb_page); 141 88 142 89 /* 143 90 * And here are the SMP non-local implementations ··· 152 87 153 88 static DEFINE_SPINLOCK(tlbivax_lock); 154 89 90 + static int mm_is_core_local(struct mm_struct *mm) 91 + { 92 + return cpumask_subset(mm_cpumask(mm), 93 + topology_thread_cpumask(smp_processor_id())); 94 + } 95 + 155 96 struct tlb_flush_param { 156 97 unsigned long addr; 157 98 unsigned int pid; 99 + unsigned int tsize; 100 + unsigned int ind; 158 101 }; 159 102 160 103 static void do_flush_tlb_mm_ipi(void *param) ··· 176 103 { 177 104 struct tlb_flush_param *p = param; 178 105 179 - _tlbil_va(p->addr, p->pid); 106 + _tlbil_va(p->addr, p->pid, p->tsize, p->ind); 180 107 } 181 108 182 109 ··· 204 131 pid = mm->context.id; 205 132 if (unlikely(pid == MMU_NO_CONTEXT)) 206 133 goto no_context; 207 - if (!cpumask_equal(mm_cpumask(mm), cpumask_of(smp_processor_id()))) { 134 + if (!mm_is_core_local(mm)) { 208 135 struct tlb_flush_param p = { .pid = pid }; 209 136 /* Ignores smp_processor_id() even if set. */ 210 137 smp_call_function_many(mm_cpumask(mm), ··· 216 143 } 217 144 EXPORT_SYMBOL(flush_tlb_mm); 218 145 219 - void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr) 146 + void __flush_tlb_page(struct mm_struct *mm, unsigned long vmaddr, 147 + int tsize, int ind) 220 148 { 221 149 struct cpumask *cpu_mask; 222 150 unsigned int pid; 223 151 224 152 preempt_disable(); 225 - pid = vma ? vma->vm_mm->context.id : 0; 153 + pid = mm ? mm->context.id : 0; 226 154 if (unlikely(pid == MMU_NO_CONTEXT)) 227 155 goto bail; 228 - cpu_mask = mm_cpumask(vma->vm_mm); 229 - if (!cpumask_equal(cpu_mask, cpumask_of(smp_processor_id()))) { 156 + cpu_mask = mm_cpumask(mm); 157 + if (!mm_is_core_local(mm)) { 230 158 /* If broadcast tlbivax is supported, use it */ 231 159 if (mmu_has_feature(MMU_FTR_USE_TLBIVAX_BCAST)) { 232 160 int lock = mmu_has_feature(MMU_FTR_LOCK_BCAST_INVAL); 233 161 if (lock) 234 162 spin_lock(&tlbivax_lock); 235 - _tlbivax_bcast(vmaddr, pid); 163 + _tlbivax_bcast(vmaddr, pid, tsize, ind); 236 164 if (lock) 237 165 spin_unlock(&tlbivax_lock); 238 166 goto bail; 239 167 } else { 240 - struct tlb_flush_param p = { .pid = pid, .addr = vmaddr }; 168 + struct tlb_flush_param p = { 169 + .pid = pid, 170 + .addr = vmaddr, 171 + .tsize = tsize, 172 + .ind = ind, 173 + }; 241 174 /* Ignores smp_processor_id() even if set in cpu_mask */ 242 175 smp_call_function_many(cpu_mask, 243 176 do_flush_tlb_page_ipi, &p, 1); 244 177 } 245 178 } 246 - _tlbil_va(vmaddr, pid); 179 + _tlbil_va(vmaddr, pid, tsize, ind); 247 180 bail: 248 181 preempt_enable(); 182 + } 183 + 184 + void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr) 185 + { 186 + __flush_tlb_page(vma ? vma->vm_mm : NULL, vmaddr, 187 + mmu_get_tsize(mmu_virtual_psize), 0); 249 188 } 250 189 EXPORT_SYMBOL(flush_tlb_page); 251 190 ··· 292 207 flush_tlb_mm(vma->vm_mm); 293 208 } 294 209 EXPORT_SYMBOL(flush_tlb_range); 210 + 211 + void tlb_flush(struct mmu_gather *tlb) 212 + { 213 + flush_tlb_mm(tlb->mm); 214 + 215 + /* Push out batch of freed page tables */ 216 + pte_free_finish(); 217 + } 218 + 219 + /* 220 + * Below are functions specific to the 64-bit variant of Book3E though that 221 + * may change in the future 222 + */ 223 + 224 + #ifdef CONFIG_PPC64 225 + 226 + /* 227 + * Handling of virtual linear page tables or indirect TLB entries 228 + * flushing when PTE pages are freed 229 + */ 230 + void tlb_flush_pgtable(struct mmu_gather *tlb, unsigned long address) 231 + { 232 + int tsize = mmu_psize_defs[mmu_pte_psize].enc; 233 + 234 + if (book3e_htw_enabled) { 235 + unsigned long start = address & PMD_MASK; 236 + unsigned long end = address + PMD_SIZE; 237 + unsigned long size = 1UL << mmu_psize_defs[mmu_pte_psize].shift; 238 + 239 + /* This isn't the most optimal, ideally we would factor out the 240 + * while preempt & CPU mask mucking around, or even the IPI but 241 + * it will do for now 242 + */ 243 + while (start < end) { 244 + __flush_tlb_page(tlb->mm, start, tsize, 1); 245 + start += size; 246 + } 247 + } else { 248 + unsigned long rmask = 0xf000000000000000ul; 249 + unsigned long rid = (address & rmask) | 0x1000000000000000ul; 250 + unsigned long vpte = address & ~rmask; 251 + 252 + #ifdef CONFIG_PPC_64K_PAGES 253 + vpte = (vpte >> (PAGE_SHIFT - 4)) & ~0xfffful; 254 + #else 255 + vpte = (vpte >> (PAGE_SHIFT - 3)) & ~0xffful; 256 + #endif 257 + vpte |= rid; 258 + __flush_tlb_page(tlb->mm, vpte, tsize, 0); 259 + } 260 + } 261 + 262 + /* 263 + * Early initialization of the MMU TLB code 264 + */ 265 + static void __early_init_mmu(int boot_cpu) 266 + { 267 + extern unsigned int interrupt_base_book3e; 268 + extern unsigned int exc_data_tlb_miss_htw_book3e; 269 + extern unsigned int exc_instruction_tlb_miss_htw_book3e; 270 + 271 + unsigned int *ibase = &interrupt_base_book3e; 272 + unsigned int mas4; 273 + 274 + /* XXX This will have to be decided at runtime, but right 275 + * now our boot and TLB miss code hard wires it. Ideally 276 + * we should find out a suitable page size and patch the 277 + * TLB miss code (either that or use the PACA to store 278 + * the value we want) 279 + */ 280 + mmu_linear_psize = MMU_PAGE_1G; 281 + 282 + /* XXX This should be decided at runtime based on supported 283 + * page sizes in the TLB, but for now let's assume 16M is 284 + * always there and a good fit (which it probably is) 285 + */ 286 + mmu_vmemmap_psize = MMU_PAGE_16M; 287 + 288 + /* Check if HW tablewalk is present, and if yes, enable it by: 289 + * 290 + * - patching the TLB miss handlers to branch to the 291 + * one dedicates to it 292 + * 293 + * - setting the global book3e_htw_enabled 294 + * 295 + * - Set MAS4:INDD and default page size 296 + */ 297 + 298 + /* XXX This code only checks for TLB 0 capabilities and doesn't 299 + * check what page size combos are supported by the HW. It 300 + * also doesn't handle the case where a separate array holds 301 + * the IND entries from the array loaded by the PT. 302 + */ 303 + if (boot_cpu) { 304 + unsigned int tlb0cfg = mfspr(SPRN_TLB0CFG); 305 + 306 + /* Check if HW loader is supported */ 307 + if ((tlb0cfg & TLBnCFG_IND) && 308 + (tlb0cfg & TLBnCFG_PT)) { 309 + patch_branch(ibase + (0x1c0 / 4), 310 + (unsigned long)&exc_data_tlb_miss_htw_book3e, 0); 311 + patch_branch(ibase + (0x1e0 / 4), 312 + (unsigned long)&exc_instruction_tlb_miss_htw_book3e, 0); 313 + book3e_htw_enabled = 1; 314 + } 315 + pr_info("MMU: Book3E Page Tables %s\n", 316 + book3e_htw_enabled ? "Enabled" : "Disabled"); 317 + } 318 + 319 + /* Set MAS4 based on page table setting */ 320 + 321 + mas4 = 0x4 << MAS4_WIMGED_SHIFT; 322 + if (book3e_htw_enabled) { 323 + mas4 |= mas4 | MAS4_INDD; 324 + #ifdef CONFIG_PPC_64K_PAGES 325 + mas4 |= BOOK3E_PAGESZ_256M << MAS4_TSIZED_SHIFT; 326 + mmu_pte_psize = MMU_PAGE_256M; 327 + #else 328 + mas4 |= BOOK3E_PAGESZ_1M << MAS4_TSIZED_SHIFT; 329 + mmu_pte_psize = MMU_PAGE_1M; 330 + #endif 331 + } else { 332 + #ifdef CONFIG_PPC_64K_PAGES 333 + mas4 |= BOOK3E_PAGESZ_64K << MAS4_TSIZED_SHIFT; 334 + #else 335 + mas4 |= BOOK3E_PAGESZ_4K << MAS4_TSIZED_SHIFT; 336 + #endif 337 + mmu_pte_psize = mmu_virtual_psize; 338 + } 339 + mtspr(SPRN_MAS4, mas4); 340 + 341 + /* Set the global containing the top of the linear mapping 342 + * for use by the TLB miss code 343 + */ 344 + linear_map_top = lmb_end_of_DRAM(); 345 + 346 + /* A sync won't hurt us after mucking around with 347 + * the MMU configuration 348 + */ 349 + mb(); 350 + } 351 + 352 + void __init early_init_mmu(void) 353 + { 354 + __early_init_mmu(1); 355 + } 356 + 357 + void __cpuinit early_init_mmu_secondary(void) 358 + { 359 + __early_init_mmu(0); 360 + } 361 + 362 + #endif /* CONFIG_PPC64 */
+82 -5
arch/powerpc/mm/tlb_nohash_low.S
··· 39 39 /* 40 40 * 40x implementation needs only tlbil_va 41 41 */ 42 - _GLOBAL(_tlbil_va) 42 + _GLOBAL(__tlbil_va) 43 43 /* We run the search with interrupts disabled because we have to change 44 44 * the PID and I don't want to preempt when that happens. 45 45 */ ··· 71 71 * 440 implementation uses tlbsx/we for tlbil_va and a full sweep 72 72 * of the TLB for everything else. 73 73 */ 74 - _GLOBAL(_tlbil_va) 74 + _GLOBAL(__tlbil_va) 75 75 mfspr r5,SPRN_MMUCR 76 76 rlwimi r5,r4,0,24,31 /* Set TID */ 77 77 ··· 124 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 128 * Flush MMU TLB on the local processor 131 129 */ ··· 168 170 * Flush MMU TLB for a particular address, but only on the local processor 169 171 * (no broadcast) 170 172 */ 171 - _GLOBAL(_tlbil_va) 173 + _GLOBAL(__tlbil_va) 172 174 mfmsr r10 173 175 wrteei 0 174 176 slwi r4,r4,16 ··· 188 190 msync 189 191 isync 190 192 1: wrtee r10 193 + blr 194 + #elif defined(CONFIG_PPC_BOOK3E) 195 + /* 196 + * New Book3E (>= 2.06) implementation 197 + * 198 + * Note: We may be able to get away without the interrupt masking stuff 199 + * if we save/restore MAS6 on exceptions that might modify it 200 + */ 201 + _GLOBAL(_tlbil_pid) 202 + slwi r4,r3,MAS6_SPID_SHIFT 203 + mfmsr r10 204 + wrteei 0 205 + mtspr SPRN_MAS6,r4 206 + PPC_TLBILX_PID(0,0) 207 + wrtee r10 208 + msync 209 + isync 210 + blr 211 + 212 + _GLOBAL(_tlbil_pid_noind) 213 + slwi r4,r3,MAS6_SPID_SHIFT 214 + mfmsr r10 215 + ori r4,r4,MAS6_SIND 216 + wrteei 0 217 + mtspr SPRN_MAS6,r4 218 + PPC_TLBILX_PID(0,0) 219 + wrtee r10 220 + msync 221 + isync 222 + blr 223 + 224 + _GLOBAL(_tlbil_all) 225 + PPC_TLBILX_ALL(0,0) 226 + msync 227 + isync 228 + blr 229 + 230 + _GLOBAL(_tlbil_va) 231 + mfmsr r10 232 + wrteei 0 233 + cmpwi cr0,r6,0 234 + slwi r4,r4,MAS6_SPID_SHIFT 235 + rlwimi r4,r5,MAS6_ISIZE_SHIFT,MAS6_ISIZE_MASK 236 + beq 1f 237 + rlwimi r4,r6,MAS6_SIND_SHIFT,MAS6_SIND 238 + 1: mtspr SPRN_MAS6,r4 /* assume AS=0 for now */ 239 + PPC_TLBILX_VA(0,r3) 240 + msync 241 + isync 242 + wrtee r10 243 + blr 244 + 245 + _GLOBAL(_tlbivax_bcast) 246 + mfmsr r10 247 + wrteei 0 248 + cmpwi cr0,r6,0 249 + slwi r4,r4,MAS6_SPID_SHIFT 250 + rlwimi r4,r5,MAS6_ISIZE_SHIFT,MAS6_ISIZE_MASK 251 + beq 1f 252 + rlwimi r4,r6,MAS6_SIND_SHIFT,MAS6_SIND 253 + 1: mtspr SPRN_MAS6,r4 /* assume AS=0 for now */ 254 + PPC_TLBIVAX(0,r3) 255 + eieio 256 + tlbsync 257 + sync 258 + wrtee r10 259 + blr 260 + 261 + _GLOBAL(set_context) 262 + #ifdef CONFIG_BDI_SWITCH 263 + /* Context switch the PTE pointer for the Abatron BDI2000. 264 + * The PGDIR is the second parameter. 265 + */ 266 + lis r5, abatron_pteptrs@h 267 + ori r5, r5, abatron_pteptrs@l 268 + stw r4, 0x4(r5) 269 + #endif 270 + mtspr SPRN_PID,r3 271 + isync /* Force context change */ 191 272 blr 192 273 #else 193 274 #error Unsupported processor type !
+10
arch/powerpc/platforms/40x/Kconfig
··· 40 40 help 41 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 53 config KILAUEA 44 54 bool "Kilauea" 45 55 depends on 40x
+2 -1
arch/powerpc/platforms/40x/ppc40x_simple.c
··· 54 54 "amcc,acadia", 55 55 "amcc,haleakala", 56 56 "amcc,kilauea", 57 - "amcc,makalu" 57 + "amcc,makalu", 58 + "est,hotfoot" 58 59 }; 59 60 60 61 static int __init ppc40x_probe(void)
+12
arch/powerpc/platforms/44x/Kconfig
··· 129 129 help 130 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 144 config YOSEMITE 133 145 bool "Yosemite" 134 146 depends on 44x
+1
arch/powerpc/platforms/44x/ppc44x_simple.c
··· 55 55 "amcc,canyonlands", 56 56 "amcc,glacier", 57 57 "ibm,ebony", 58 + "amcc,eiger", 58 59 "amcc,katmai", 59 60 "amcc,rainier", 60 61 "amcc,redwood",
+60 -9
arch/powerpc/platforms/82xx/mgcoge.c
··· 50 50 static __initdata struct cpm_pin mgcoge_pins[] = { 51 51 52 52 /* SMC2 */ 53 - {1, 8, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, 54 - {1, 9, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, 53 + {0, 8, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, 54 + {0, 9, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, 55 55 56 56 /* SCC4 */ 57 - {3, 25, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, 58 - {3, 24, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, 59 - {3, 9, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, 60 - {3, 8, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, 61 - {4, 22, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, 62 - {4, 21, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, 57 + {2, 25, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, 58 + {2, 24, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, 59 + {2, 9, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, 60 + {2, 8, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, 61 + {3, 22, CPM_PIN_INPUT | 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 112 static void __init init_ioports(void) ··· 115 68 116 69 for (i = 0; i < ARRAY_SIZE(mgcoge_pins); i++) { 117 70 const struct cpm_pin *pin = &mgcoge_pins[i]; 118 - cpm2_set_pin(pin->port - 1, pin->pin, pin->flags); 71 + cpm2_set_pin(pin->port, pin->pin, pin->flags); 119 72 } 120 73 121 74 cpm2_smc_clk_setup(CPM_CLK_SMC2, CPM_BRG8); 122 75 cpm2_clk_setup(CPM_CLK_SCC4, CPM_CLK7, CPM_CLK_RX); 123 76 cpm2_clk_setup(CPM_CLK_SCC4, CPM_CLK8, CPM_CLK_TX); 77 + cpm2_clk_setup(CPM_CLK_FCC1, CPM_CLK10, CPM_CLK_RX); 78 + cpm2_clk_setup(CPM_CLK_FCC1, CPM_CLK9, CPM_CLK_TX); 79 + cpm2_clk_setup(CPM_CLK_FCC2, CPM_CLK13, CPM_CLK_RX); 80 + cpm2_clk_setup(CPM_CLK_FCC2, CPM_CLK14, CPM_CLK_TX); 124 81 } 125 82 126 83 static void __init mgcoge_setup_arch(void)
+21 -1
arch/powerpc/platforms/82xx/mpc8272_ads.c
··· 29 29 #include <sysdev/fsl_soc.h> 30 30 #include <sysdev/cpm2_pic.h> 31 31 32 - #include "pq2ads.h" 33 32 #include "pq2.h" 34 33 35 34 static void __init mpc8272_ads_pic_init(void) ··· 99 100 /* I2C */ 100 101 {3, 14, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_OPENDRAIN}, 101 102 {3, 15, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_OPENDRAIN}, 103 + 104 + /* USB */ 105 + {2, 10, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, 106 + {2, 11, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, 107 + {2, 20, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, 108 + {2, 24, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, 109 + {3, 23, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, 110 + {3, 24, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, 111 + {3, 25, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, 102 112 }; 103 113 104 114 static void __init init_ioports(void) ··· 121 113 122 114 cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_RX); 123 115 cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_TX); 116 + cpm2_clk_setup(CPM_CLK_SCC3, CPM_CLK8, CPM_CLK_RX); 117 + cpm2_clk_setup(CPM_CLK_SCC3, CPM_CLK8, CPM_CLK_TX); 124 118 cpm2_clk_setup(CPM_CLK_SCC4, CPM_BRG4, CPM_CLK_RX); 125 119 cpm2_clk_setup(CPM_CLK_SCC4, CPM_BRG4, CPM_CLK_TX); 126 120 cpm2_clk_setup(CPM_CLK_FCC1, CPM_CLK11, CPM_CLK_RX); ··· 154 144 return; 155 145 } 156 146 147 + #define BCSR1_FETHIEN 0x08000000 148 + #define BCSR1_FETH_RST 0x04000000 149 + #define BCSR1_RS232_EN1 0x02000000 150 + #define BCSR1_RS232_EN2 0x01000000 151 + #define BCSR3_USB_nEN 0x80000000 152 + #define BCSR3_FETHIEN2 0x10000000 153 + #define BCSR3_FETH2_RST 0x08000000 154 + 157 155 clrbits32(&bcsr[1], BCSR1_RS232_EN1 | BCSR1_RS232_EN2 | BCSR1_FETHIEN); 158 156 setbits32(&bcsr[1], BCSR1_FETH_RST); 159 157 160 158 clrbits32(&bcsr[3], BCSR3_FETHIEN2); 161 159 setbits32(&bcsr[3], BCSR3_FETH2_RST); 160 + 161 + clrbits32(&bcsr[3], BCSR3_USB_nEN); 162 162 163 163 iounmap(bcsr); 164 164
+2 -2
arch/powerpc/platforms/83xx/Kconfig
··· 75 75 This option enables support for the MPC837x MDS Processor Board. 76 76 77 77 config MPC837x_RDB 78 - bool "Freescale MPC837x RDB" 78 + bool "Freescale MPC837x RDB/WLAN" 79 79 select DEFAULT_UIMAGE 80 80 select PPC_MPC837x 81 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 84 config SBC834x 85 85 bool "Wind River SBC834x"
+26 -2
arch/powerpc/platforms/83xx/mpc837x_rdb.c
··· 17 17 #include <asm/time.h> 18 18 #include <asm/ipic.h> 19 19 #include <asm/udbg.h> 20 + #include <sysdev/fsl_soc.h> 20 21 #include <sysdev/fsl_pci.h> 21 22 22 23 #include "mpc83xx.h" 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 + } 23 45 24 46 /* ************************************************************************ 25 47 * ··· 64 42 mpc83xx_add_bridge(np); 65 43 #endif 66 44 mpc837x_usb_cfg(); 45 + mpc837x_rdb_sd_cfg(); 67 46 } 68 47 69 48 static struct of_device_id mpc837x_ids[] = { ··· 109 86 110 87 return of_flat_dt_is_compatible(root, "fsl,mpc8377rdb") || 111 88 of_flat_dt_is_compatible(root, "fsl,mpc8378rdb") || 112 - of_flat_dt_is_compatible(root, "fsl,mpc8379rdb"); 89 + of_flat_dt_is_compatible(root, "fsl,mpc8379rdb") || 90 + of_flat_dt_is_compatible(root, "fsl,mpc8377wlan"); 113 91 } 114 92 115 93 define_machine(mpc837x_rdb) { 116 - .name = "MPC837x RDB", 94 + .name = "MPC837x RDB/WLAN", 117 95 .probe = mpc837x_rdb_probe, 118 96 .setup_arch = mpc837x_rdb_setup_arch, 119 97 .init_IRQ = mpc837x_rdb_init_IRQ,
+4
arch/powerpc/platforms/83xx/mpc83xx.h
··· 30 30 #define MPC8315_SICRL_USB_ULPI 0x00000054 31 31 #define MPC837X_SICRL_USB_MASK 0xf0000000 32 32 #define MPC837X_SICRL_USB_ULPI 0x50000000 33 + #define MPC837X_SICRL_USBB_MASK 0x30000000 34 + #define MPC837X_SICRL_SD 0x20000000 33 35 34 36 /* system i/o configuration register high */ 35 37 #define MPC83XX_SICRH_OFFS 0x118 ··· 40 38 #define MPC831X_SICRH_USB_ULPI 0x000000a0 41 39 #define MPC8315_SICRH_USB_MASK 0x0000ff00 42 40 #define MPC8315_SICRH_USB_ULPI 0x00000000 41 + #define MPC837X_SICRH_SPI_MASK 0x00000003 42 + #define MPC837X_SICRH_SD 0x00000001 43 43 44 44 /* USB Control Register */ 45 45 #define FSL_USB2_CONTROL_OFFS 0x500
+9
arch/powerpc/platforms/85xx/Kconfig
··· 55 55 help 56 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 67 config SOCRATES 59 68 bool "Socrates" 60 69 select DEFAULT_UIMAGE
+1
arch/powerpc/platforms/85xx/Makefile
··· 9 9 obj-$(CONFIG_MPC8536_DS) += mpc8536_ds.o 10 10 obj-$(CONFIG_MPC85xx_DS) += mpc85xx_ds.o 11 11 obj-$(CONFIG_MPC85xx_MDS) += mpc85xx_mds.o 12 + obj-$(CONFIG_MPC85xx_RDB) += mpc85xx_rdb.o 12 13 obj-$(CONFIG_STX_GP3) += stx_gp3.o 13 14 obj-$(CONFIG_TQM85xx) += tqm85xx.o 14 15 obj-$(CONFIG_SBC8560) += sbc8560.o
+2 -1
arch/powerpc/platforms/85xx/mpc8536_ds.c
··· 96 96 #ifdef CONFIG_SWIOTLB 97 97 if (lmb_end_of_DRAM() > max) { 98 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 102 #endif 102 103
+2 -1
arch/powerpc/platforms/85xx/mpc85xx_ds.c
··· 192 192 #ifdef CONFIG_SWIOTLB 193 193 if (lmb_end_of_DRAM() > max) { 194 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 198 #endif 198 199
+6 -1
arch/powerpc/platforms/85xx/mpc85xx_mds.c
··· 47 47 #include <asm/udbg.h> 48 48 #include <sysdev/fsl_soc.h> 49 49 #include <sysdev/fsl_pci.h> 50 + #include <sysdev/simple_gpio.h> 50 51 #include <asm/qe.h> 51 52 #include <asm/qe_ic.h> 52 53 #include <asm/mpic.h> ··· 255 254 #ifdef CONFIG_SWIOTLB 256 255 if (lmb_end_of_DRAM() > max) { 257 256 ppc_swiotlb_enable = 1; 258 - set_pci_dma_ops(&swiotlb_pci_dma_ops); 257 + set_pci_dma_ops(&swiotlb_dma_ops); 258 + ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb; 259 259 } 260 260 #endif 261 261 } ··· 306 304 307 305 static int __init mpc85xx_publish_devices(void) 308 306 { 307 + if (machine_is(mpc8569_mds)) 308 + simple_gpiochip_init("fsl,mpc8569mds-bcsr-gpio"); 309 + 309 310 /* Publish the QE devices */ 310 311 of_platform_bus_probe(NULL, mpc85xx_ids, NULL); 311 312
+141
arch/powerpc/platforms/85xx/mpc85xx_rdb.c
··· 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 + };
+38 -1
arch/powerpc/platforms/85xx/sbc8560.c
··· 267 267 268 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 307 define_machine(sbc8560) { 271 308 .name = "SBC8560", 272 309 .probe = sbc8560_probe, ··· 311 274 .init_IRQ = sbc8560_pic_init, 312 275 .show_cpuinfo = sbc8560_show_cpuinfo, 313 276 .get_irq = mpic_get_irq, 314 - .restart = fsl_rstcr_restart, 277 + .restart = sbc8560_rstcr_restart, 315 278 .calibrate_decr = generic_calibrate_decr, 316 279 .progress = udbg_progress, 317 280 };
-23
arch/powerpc/platforms/85xx/smp.c
··· 25 25 26 26 #include <sysdev/fsl_soc.h> 27 27 28 - extern volatile unsigned long __secondary_hold_acknowledge; 29 28 extern void __early_start(void); 30 29 31 30 #define BOOT_ENTRY_ADDR_UPPER 0 ··· 79 80 } 80 81 81 82 static void __init 82 - smp_85xx_basic_setup(int cpu_nr) 83 - { 84 - /* Clear any pending timer interrupts */ 85 - mtspr(SPRN_TSR, TSR_ENW | TSR_WIS | TSR_DIS | TSR_FIS); 86 - 87 - /* Enable decrementer interrupt */ 88 - mtspr(SPRN_TCR, TCR_DIE); 89 - } 90 - 91 - static void __init 92 83 smp_85xx_setup_cpu(int cpu_nr) 93 84 { 94 85 mpic_setup_this_cpu(); 95 - 96 - smp_85xx_basic_setup(cpu_nr); 97 86 } 98 87 99 88 struct smp_ops_t smp_85xx_ops = { 100 89 .kick_cpu = smp_85xx_kick_cpu, 101 90 }; 102 91 103 - static int __init smp_dummy_probe(void) 104 - { 105 - return NR_CPUS; 106 - } 107 - 108 92 void __init mpc85xx_smp_init(void) 109 93 { 110 94 struct device_node *np; 111 - 112 - smp_85xx_ops.message_pass = NULL; 113 95 114 96 np = of_find_node_by_type(NULL, "open-pic"); 115 97 if (np) { 116 98 smp_85xx_ops.probe = smp_mpic_probe; 117 99 smp_85xx_ops.setup_cpu = smp_85xx_setup_cpu; 118 100 smp_85xx_ops.message_pass = smp_mpic_message_pass; 119 - } else { 120 - smp_85xx_ops.probe = smp_dummy_probe; 121 - smp_85xx_ops.setup_cpu = smp_85xx_basic_setup; 122 101 } 123 102 124 103 if (cpu_has_feature(CPU_FTR_DBELL))
+30 -7
arch/powerpc/platforms/86xx/gef_ppc9a.c
··· 102 102 { 103 103 unsigned int reg; 104 104 105 - reg = ioread32(ppc9a_regs); 106 - return (reg >> 8) & 0xff; 105 + reg = ioread32be(ppc9a_regs); 106 + return (reg >> 16) & 0xff; 107 107 } 108 108 109 109 /* Return the board (software) revision */ ··· 111 111 { 112 112 unsigned int reg; 113 113 114 - reg = ioread32(ppc9a_regs); 115 - return (reg >> 16) & 0xff; 114 + reg = ioread32be(ppc9a_regs); 115 + return (reg >> 8) & 0xff; 116 116 } 117 117 118 118 /* Return the FPGA revision */ ··· 120 120 { 121 121 unsigned int reg; 122 122 123 - reg = ioread32(ppc9a_regs); 124 - return (reg >> 24) & 0xf; 123 + reg = ioread32be(ppc9a_regs); 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 145 static void gef_ppc9a_show_cpuinfo(struct seq_file *m) ··· 149 131 seq_printf(m, "Vendor\t\t: GE Fanuc Intelligent Platforms\n"); 150 132 151 133 seq_printf(m, "Revision\t: %u%c\n", gef_ppc9a_get_pcb_rev(), 152 - ('A' + gef_ppc9a_get_board_rev() - 1)); 134 + ('A' + gef_ppc9a_get_board_rev())); 153 135 seq_printf(m, "FPGA Revision\t: %u\n", gef_ppc9a_get_fpga_rev()); 154 136 155 137 seq_printf(m, "SVR\t\t: 0x%x\n", svid); 138 + 139 + seq_printf(m, "VME geo. addr\t: %u\n", gef_ppc9a_get_vme_geo_addr()); 140 + 141 + seq_printf(m, "VME syscon\t: %s\n", 142 + gef_ppc9a_get_vme_is_syscon() ? "yes" : "no"); 156 143 } 157 144 158 145 static void __init gef_ppc9a_nec_fixup(struct pci_dev *pdev)
+2 -1
arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
··· 105 105 #ifdef CONFIG_SWIOTLB 106 106 if (lmb_end_of_DRAM() > max) { 107 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 111 #endif 111 112 }
-1
arch/powerpc/platforms/86xx/mpc86xx_smp.c
··· 27 27 #include "mpc86xx.h" 28 28 29 29 extern void __secondary_start_mpc86xx(void); 30 - extern unsigned long __secondary_hold_acknowledge; 31 30 32 31 #define MCM_PORT_CONFIG_OFFSET 0x10 33 32
+33 -5
arch/powerpc/platforms/Kconfig.cputype
··· 57 57 58 58 endchoice 59 59 60 - config PPC_BOOK3S_64 61 - def_bool y 60 + choice 61 + prompt "Processor Type" 62 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 73 select PPC_FPU 74 + 75 + config PPC_BOOK3E_64 76 + bool "Embedded processors" 77 + select PPC_FPU # Make it a choice ? 78 + 79 + endchoice 64 80 65 81 config PPC_BOOK3S 66 82 def_bool y 67 83 depends on PPC_BOOK3S_32 || PPC_BOOK3S_64 84 + 85 + config PPC_BOOK3E 86 + def_bool y 87 + depends on PPC_BOOK3E_64 68 88 69 89 config POWER4_ONLY 70 90 bool "Optimize for POWER4" ··· 145 125 146 126 config BOOKE 147 127 bool 148 - depends on E200 || E500 || 44x 128 + depends on E200 || E500 || 44x || PPC_BOOK3E 149 129 default y 150 130 151 131 config FSL_BOOKE ··· 243 223 def_bool y 244 224 depends on !PPC_STD_MMU 245 225 226 + config PPC_MMU_NOHASH_32 227 + def_bool y 228 + depends on PPC_MMU_NOHASH && PPC32 229 + 230 + config PPC_MMU_NOHASH_64 231 + def_bool y 232 + depends on PPC_MMU_NOHASH && PPC64 233 + 246 234 config PPC_BOOK3E_MMU 247 235 def_bool y 248 - depends on FSL_BOOKE 236 + depends on FSL_BOOKE || PPC_BOOK3E 249 237 250 238 config PPC_MM_SLICES 251 239 bool ··· 285 257 This enables the powerpc-specific perf_counter back-end. 286 258 287 259 config SMP 288 - depends on PPC_STD_MMU || FSL_BOOKE 260 + depends on PPC_BOOK3S || PPC_BOOK3E || FSL_BOOKE 289 261 bool "Symmetric multi-processing support" 290 262 ---help--- 291 263 This enables support for systems with more than one CPU. If you have
+4 -2
arch/powerpc/platforms/amigaone/setup.c
··· 110 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 115 request_region(0x00, 0x20, "dma1"); 116 116 request_region(0x40, 0x20, "timer"); 117 117 request_region(0x80, 0x10, "dma page reg"); 118 118 request_region(0xc0, 0x20, "dma2"); 119 + 120 + return 0; 119 121 } 122 + machine_device_initcall(amigaone, request_isa_regions); 120 123 121 124 void amigaone_restart(char *cmd) 122 125 { ··· 164 161 .name = "AmigaOne", 165 162 .probe = amigaone_probe, 166 163 .setup_arch = amigaone_setup_arch, 167 - .init = amigaone_init, 168 164 .show_cpuinfo = amigaone_show_cpuinfo, 169 165 .init_IRQ = amigaone_init_IRQ, 170 166 .restart = amigaone_restart,
-7
arch/powerpc/platforms/cell/Kconfig
··· 80 80 uses 4K pages. This can improve performances of applications 81 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 83 config SPU_BASE 91 84 bool 92 85 default n
+1 -2
arch/powerpc/platforms/cell/celleb_setup.c
··· 80 80 81 81 static int __init celleb_machine_type_hack(char *ptr) 82 82 { 83 - strncpy(celleb_machine_type, ptr, sizeof(celleb_machine_type)); 84 - celleb_machine_type[sizeof(celleb_machine_type)-1] = 0; 83 + strlcpy(celleb_machine_type, ptr, sizeof(celleb_machine_type)); 85 84 return 0; 86 85 } 87 86
+1 -1
arch/powerpc/platforms/cell/iommu.c
··· 642 642 643 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 646 .alloc_coherent = dma_fixed_alloc_coherent, 647 647 .free_coherent = dma_fixed_free_coherent, 648 648 .map_sg = dma_fixed_map_sg,
-2
arch/powerpc/platforms/cell/smp.c
··· 58 58 */ 59 59 static cpumask_t of_spin_map; 60 60 61 - extern void generic_secondary_smp_init(unsigned long); 62 - 63 61 /** 64 62 * smp_startup_cpu() - start the given cpu 65 63 *
+2 -1
arch/powerpc/platforms/cell/spufs/Makefile
··· 4 4 spufs-y += sched.o backing_ops.o hw_ops.o run.o gang.o 5 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 10 # Rules to build switch.o with the help of SPU tool chain 10 11 SPU_CROSS := spu-
+1
arch/powerpc/platforms/cell/spufs/context.c
··· 28 28 #include <asm/spu.h> 29 29 #include <asm/spu_csa.h> 30 30 #include "spufs.h" 31 + #include "sputrace.h" 31 32 32 33 33 34 atomic_t nr_spu_contexts = ATOMIC_INIT(0);
+1
arch/powerpc/platforms/cell/spufs/file.c
··· 38 38 #include <asm/uaccess.h> 39 39 40 40 #include "spufs.h" 41 + #include "sputrace.h" 41 42 42 43 #define SPUFS_MMAP_4K (PAGE_SIZE == 0x1000) 43 44
+2
arch/powerpc/platforms/cell/spufs/sched.c
··· 47 47 #include <asm/spu_csa.h> 48 48 #include <asm/spu_priv1.h> 49 49 #include "spufs.h" 50 + #define CREATE_TRACE_POINTS 51 + #include "sputrace.h" 50 52 51 53 struct spu_prio_array { 52 54 DECLARE_BITMAP(bitmap, MAX_PRIO);
-5
arch/powerpc/platforms/cell/spufs/spufs.h
··· 373 373 extern void spuctx_switch_state(struct spu_context *ctx, 374 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 376 #endif
-272
arch/powerpc/platforms/cell/spufs/sputrace.c
··· 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");
+39
arch/powerpc/platforms/cell/spufs/sputrace.h
··· 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>
+35 -24
arch/powerpc/platforms/iseries/exception.S
··· 47 47 LOAD_REG_ADDR(r13, paca) 48 48 mulli r0,r23,PACA_SIZE 49 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 51 mfmsr r24 52 52 ori r24,r24,MSR_RI 53 53 mtmsrd r24 /* RI on */ ··· 116 116 #endif /* CONFIG_SMP */ 117 117 li r0,-1 /* r0=-1 indicates a Hypervisor call */ 118 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 120 b 2b /* If SMP not configured, secondaries 121 121 * loop forever */ 122 122 ··· 126 126 127 127 .globl data_access_iSeries 128 128 data_access_iSeries: 129 - mtspr SPRN_SPRG1,r13 129 + mtspr SPRN_SPRG_SCRATCH0,r13 130 130 BEGIN_FTR_SECTION 131 - mtspr SPRN_SPRG2,r12 132 - mfspr r13,SPRN_DAR 133 - mfspr r12,SPRN_DSISR 134 - srdi r13,r13,60 135 - rlwimi r13,r12,16,0x20 136 - mfcr r12 137 - cmpwi r13,0x2c 131 + mfspr r13,SPRN_SPRG_PACA 132 + std r9,PACA_EXSLB+EX_R9(r13) 133 + std r10,PACA_EXSLB+EX_R10(r13) 134 + mfspr r10,SPRN_DAR 135 + mfspr r9,SPRN_DSISR 136 + srdi r10,r10,60 137 + rlwimi r10,r9,16,0x20 138 + mfcr r9 139 + cmpwi r10,0x2c 138 140 beq .do_stab_bolted_iSeries 139 - mtcrf 0x80,r12 140 - mfspr r12,SPRN_SPRG2 141 - END_FTR_SECTION_IFCLR(CPU_FTR_SLB) 141 + ld r10,PACA_EXSLB+EX_R10(r13) 142 + std r11,PACA_EXGEN+EX_R11(r13) 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 151 EXCEPTION_PROLOG_1(PACA_EXGEN) 143 152 EXCEPTION_PROLOG_ISERIES_1 153 + ALT_FTR_SECTION_END_IFCLR(CPU_FTR_SLB) 144 154 b data_access_common 145 155 146 156 .do_stab_bolted_iSeries: 147 - mtcrf 0x80,r12 148 - mfspr r12,SPRN_SPRG2 149 - EXCEPTION_PROLOG_1(PACA_EXSLB) 157 + std r11,PACA_EXSLB+EX_R11(r13) 158 + std r12,PACA_EXSLB+EX_R12(r13) 159 + mfspr r10,SPRN_SPRG_SCRATCH0 160 + std r10,PACA_EXSLB+EX_R13(r13) 150 161 EXCEPTION_PROLOG_ISERIES_1 151 162 b .do_stab_bolted 152 163 153 164 .globl data_access_slb_iSeries 154 165 data_access_slb_iSeries: 155 - mtspr SPRN_SPRG1,r13 /* save r13 */ 156 - mfspr r13,SPRN_SPRG3 /* get paca address into r13 */ 166 + mtspr SPRN_SPRG_SCRATCH0,r13 /* save r13 */ 167 + mfspr r13,SPRN_SPRG_PACA /* get paca address into r13 */ 157 168 std r3,PACA_EXSLB+EX_R3(r13) 158 169 mfspr r3,SPRN_DAR 159 170 std r9,PACA_EXSLB+EX_R9(r13) ··· 176 165 std r10,PACA_EXSLB+EX_R10(r13) 177 166 std r11,PACA_EXSLB+EX_R11(r13) 178 167 std r12,PACA_EXSLB+EX_R12(r13) 179 - mfspr r10,SPRN_SPRG1 168 + mfspr r10,SPRN_SPRG_SCRATCH0 180 169 std r10,PACA_EXSLB+EX_R13(r13) 181 170 ld r12,PACALPPACAPTR(r13) 182 171 ld r12,LPPACASRR1(r12) ··· 186 175 187 176 .globl instruction_access_slb_iSeries 188 177 instruction_access_slb_iSeries: 189 - mtspr SPRN_SPRG1,r13 /* save r13 */ 190 - mfspr r13,SPRN_SPRG3 /* get paca address into r13 */ 178 + mtspr SPRN_SPRG_SCRATCH0,r13 /* save r13 */ 179 + mfspr r13,SPRN_SPRG_PACA /* get paca address into r13 */ 191 180 std r3,PACA_EXSLB+EX_R3(r13) 192 181 ld r3,PACALPPACAPTR(r13) 193 182 ld r3,LPPACASRR0(r3) /* get SRR0 value */ ··· 200 189 std r10,PACA_EXSLB+EX_R10(r13) 201 190 std r11,PACA_EXSLB+EX_R11(r13) 202 191 std r12,PACA_EXSLB+EX_R12(r13) 203 - mfspr r10,SPRN_SPRG1 192 + mfspr r10,SPRN_SPRG_SCRATCH0 204 193 std r10,PACA_EXSLB+EX_R13(r13) 205 194 ld r12,PACALPPACAPTR(r13) 206 195 ld r12,LPPACASRR1(r12) ··· 211 200 std r10,PACA_EXGEN+EX_R10(r13) 212 201 std r11,PACA_EXGEN+EX_R11(r13) 213 202 std r12,PACA_EXGEN+EX_R12(r13) 214 - mfspr r10,SPRG1 203 + mfspr r10,SPRG_SCRATCH0 215 204 ld r11,PACA_EXSLB+EX_R9(r13) 216 205 ld r12,PACA_EXSLB+EX_R3(r13) 217 206 std r10,PACA_EXGEN+EX_R13(r13) ··· 232 221 .globl system_call_iSeries 233 222 system_call_iSeries: 234 223 mr r9,r13 235 - mfspr r13,SPRN_SPRG3 224 + mfspr r13,SPRN_SPRG_PACA 236 225 EXCEPTION_PROLOG_ISERIES_1 237 226 b system_call_common 238 227
+3 -3
arch/powerpc/platforms/iseries/exception.h
··· 24 24 * as published by the Free Software Foundation; either version 25 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 29 #define EXCEPTION_PROLOG_ISERIES_1 \ 30 30 mfmsr r10; \ ··· 38 38 .globl label##_iSeries; \ 39 39 label##_iSeries: \ 40 40 HMT_MEDIUM; \ 41 - mtspr SPRN_SPRG1,r13; /* save r13 */ \ 41 + mtspr SPRN_SPRG_SCRATCH0,r13; /* save r13 */ \ 42 42 EXCEPTION_PROLOG_1(area); \ 43 43 EXCEPTION_PROLOG_ISERIES_1; \ 44 44 b label##_common ··· 47 47 .globl label##_iSeries; \ 48 48 label##_iSeries: \ 49 49 HMT_MEDIUM; \ 50 - mtspr SPRN_SPRG1,r13; /* save r13 */ \ 50 + mtspr SPRN_SPRG_SCRATCH0,r13; /* save r13 */ \ 51 51 EXCEPTION_PROLOG_1(PACA_EXGEN); \ 52 52 lbz r10,PACASOFTIRQEN(r13); \ 53 53 cmpwi 0,r10,0; \
+1 -1
arch/powerpc/platforms/iseries/mf.c
··· 872 872 count = 256 - off; 873 873 874 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 876 return -ENOMEM; 877 877 memset(page, 0, off + count); 878 878 memset(&vsp_cmd, 0, sizeof(vsp_cmd));
+1 -1
arch/powerpc/platforms/pasemi/idle.c
··· 90 90 static int __init idle_param(char *p) 91 91 { 92 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 94 if (!strcmp(modes[i].name, p)) { 95 95 current_mode = i; 96 96 break;
-8
arch/powerpc/platforms/powermac/cpufreq_32.c
··· 44 44 */ 45 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 47 extern void low_choose_7447a_dfs(int dfs); 56 48 extern void low_choose_750fx_pll(int pll); 57 49 extern void low_sleep_handler(void);
+10 -3
arch/powerpc/platforms/powermac/feature.c
··· 2419 2419 dt = of_find_node_by_name(NULL, "device-tree"); 2420 2420 if (dt != NULL) 2421 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 2423 if (strcmp(model, pmac_mb_defs[i].model_string) == 0) { 2424 2424 pmac_mb = pmac_mb_defs[i]; 2425 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 2429 if (machine_is_compatible(pmac_mb_defs[i].model_string)) { 2430 2430 pmac_mb = pmac_mb_defs[i]; 2431 2431 goto found; ··· 2589 2589 if (address == 0) 2590 2590 return; 2591 2591 uninorth_base = ioremap(address, 0x40000); 2592 + if (uninorth_base == NULL) 2593 + return; 2592 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 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 2603 printk(KERN_INFO "Found %s memory controller & host bridge" 2597 2604 " @ 0x%08x revision: 0x%02x\n", uninorth_maj == 3 ? "U3" :
+61
arch/powerpc/platforms/powermac/pci.c
··· 1286 1286 } 1287 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);
+1 -1
arch/powerpc/platforms/powermac/smp.c
··· 408 408 /* reset the entry point so if we get another intr we won't 409 409 * try to startup again */ 410 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 412 printk(KERN_ERR "Couldn't get primary IPI interrupt"); 413 413 } 414 414
+1 -1
arch/powerpc/platforms/ps3/mm.c
··· 23 23 #include <linux/memory_hotplug.h> 24 24 #include <linux/lmb.h> 25 25 26 + #include <asm/cell-regs.h> 26 27 #include <asm/firmware.h> 27 - #include <asm/iommu.h> 28 28 #include <asm/prom.h> 29 29 #include <asm/udbg.h> 30 30 #include <asm/lv1call.h>
+3 -3
arch/powerpc/platforms/ps3/system-bus.c
··· 27 27 #include <asm/udbg.h> 28 28 #include <asm/lv1call.h> 29 29 #include <asm/firmware.h> 30 - #include <asm/iommu.h> 30 + #include <asm/cell-regs.h> 31 31 32 32 #include "platform.h" 33 33 ··· 694 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 698 .alloc_coherent = ps3_alloc_coherent, 699 699 .free_coherent = ps3_free_coherent, 700 700 .map_sg = ps3_sb_map_sg, ··· 704 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 708 .alloc_coherent = ps3_alloc_coherent, 709 709 .free_coherent = ps3_free_coherent, 710 710 .map_sg = ps3_ioc0_map_sg,
+1 -1
arch/powerpc/platforms/pseries/pci_dlpar.c
··· 151 151 if (dn->child) 152 152 eeh_add_device_tree_early(dn); 153 153 154 - scan_phb(phb); 154 + pcibios_scan_phb(phb, dn); 155 155 pcibios_finish_adding_to_bus(phb->bus); 156 156 157 157 return phb;
+8 -1
arch/powerpc/platforms/pseries/reconfig.c
··· 20 20 #include <asm/machdep.h> 21 21 #include <asm/uaccess.h> 22 22 #include <asm/pSeries_reconfig.h> 23 + #include <asm/mmu.h> 23 24 24 25 25 26 ··· 440 439 if (!newprop) 441 440 return -ENOMEM; 442 441 442 + if (!strcmp(name, "slb-size") || !strcmp(name, "ibm,slb-size")) 443 + slb_set_size(*(int *)value); 444 + 443 445 oldprop = of_find_property(np, name,NULL); 444 - if (!oldprop) 446 + if (!oldprop) { 447 + if (strlen(name)) 448 + return prom_add_property(np, newprop); 445 449 return -ENODEV; 450 + } 446 451 447 452 rc = prom_update_property(np, newprop, oldprop); 448 453 if (rc)
-4
arch/powerpc/platforms/pseries/setup.c
··· 223 223 set = 1UL << 63; 224 224 reset = 0; 225 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 228 static void __init pseries_discover_pic(void)
-2
arch/powerpc/platforms/pseries/smp.c
··· 56 56 */ 57 57 static cpumask_t of_spin_map; 58 58 59 - extern void generic_secondary_smp_init(unsigned long); 60 - 61 59 /** 62 60 * smp_startup_cpu() - start the given cpu 63 61 *
+14 -4
arch/powerpc/sysdev/fsl_rio.c
··· 1057 1057 law_start, law_size); 1058 1058 1059 1059 ops = kmalloc(sizeof(struct rio_ops), GFP_KERNEL); 1060 + if (!ops) { 1061 + rc = -ENOMEM; 1062 + goto err_ops; 1063 + } 1060 1064 ops->lcread = fsl_local_config_read; 1061 1065 ops->lcwrite = fsl_local_config_write; 1062 1066 ops->cread = fsl_rio_config_read; ··· 1068 1064 ops->dsend = fsl_rio_doorbell_send; 1069 1065 1070 1066 port = kzalloc(sizeof(struct rio_mport), GFP_KERNEL); 1067 + if (!port) { 1068 + rc = -ENOMEM; 1069 + goto err_port; 1070 + } 1071 1071 port->id = 0; 1072 1072 port->index = 0; 1073 1073 ··· 1079 1071 if (!priv) { 1080 1072 printk(KERN_ERR "Can't alloc memory for 'priv'\n"); 1081 1073 rc = -ENOMEM; 1082 - goto err; 1074 + goto err_priv; 1083 1075 } 1084 1076 1085 1077 INIT_LIST_HEAD(&port->dbells); ··· 1177 1169 1178 1170 return 0; 1179 1171 err: 1180 - if (priv) 1181 - iounmap(priv->regs_win); 1182 - kfree(ops); 1172 + iounmap(priv->regs_win); 1183 1173 kfree(priv); 1174 + err_priv: 1184 1175 kfree(port); 1176 + err_port: 1177 + kfree(ops); 1178 + err_ops: 1185 1179 return rc; 1186 1180 } 1187 1181
+4 -2
arch/powerpc/sysdev/fsl_soc.c
··· 37 37 #include <asm/irq.h> 38 38 #include <asm/time.h> 39 39 #include <asm/prom.h> 40 + #include <asm/machdep.h> 40 41 #include <sysdev/fsl_soc.h> 41 42 #include <mm/mmu_decl.h> 42 43 #include <asm/cpm2.h> ··· 384 383 if (!rstcr) 385 384 printk (KERN_EMERG "Error: reset control register " 386 385 "not mapped!\n"); 387 - } else 388 - printk (KERN_INFO "rstcr compatible register does not exist!\n"); 386 + } else if (ppc_md.restart == fsl_rstcr_restart) 387 + printk(KERN_ERR "No RSTCR register, warm reboot won't work\n"); 388 + 389 389 if (np) 390 390 of_node_put(np); 391 391 return 0;
+6 -1
arch/powerpc/sysdev/ipic.c
··· 735 735 ipic->irqhost = irq_alloc_host(node, IRQ_HOST_MAP_LINEAR, 736 736 NR_IPIC_INTS, 737 737 &ipic_host_ops, 0); 738 - if (ipic->irqhost == NULL) 738 + if (ipic->irqhost == NULL) { 739 + kfree(ipic); 739 740 return NULL; 741 + } 740 742 741 743 ipic->regs = ioremap(res.start, res.end - res.start + 1); 742 744 ··· 782 780 783 781 primary_ipic = ipic; 784 782 irq_set_default_host(primary_ipic->irqhost); 783 + 784 + ipic_write(ipic->regs, IPIC_SIMSR_H, 0); 785 + ipic_write(ipic->regs, IPIC_SIMSR_L, 0); 785 786 786 787 printk ("IPIC (%d IRQ sources) at %p\n", NR_IPIC_INTS, 787 788 primary_ipic->regs);
+32
arch/powerpc/sysdev/mmio_nvram.c
··· 53 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 73 static ssize_t mmio_nvram_write(char *buf, size_t count, loff_t *index) 57 74 { 58 75 unsigned long flags; ··· 87 70 88 71 *index += count; 89 72 return count; 73 + } 74 + 75 + void mmio_nvram_write_val(int addr, unsigned char val) 76 + { 77 + unsigned long flags; 78 + 79 + if (addr < mmio_nvram_len) { 80 + spin_lock_irqsave(&mmio_nvram_lock, flags); 81 + 82 + iowrite8(val, mmio_nvram_start + addr); 83 + 84 + spin_unlock_irqrestore(&mmio_nvram_lock, flags); 85 + } 90 86 } 91 87 92 88 static ssize_t mmio_nvram_get_size(void) ··· 144 114 printk(KERN_INFO "mmio NVRAM, %luk at 0x%lx mapped to %p\n", 145 115 mmio_nvram_len >> 10, nvram_addr, mmio_nvram_start); 146 116 117 + ppc_md.nvram_read_val = mmio_nvram_read_val; 118 + ppc_md.nvram_write_val = mmio_nvram_write_val; 147 119 ppc_md.nvram_read = mmio_nvram_read; 148 120 ppc_md.nvram_write = mmio_nvram_write; 149 121 ppc_md.nvram_size = mmio_nvram_get_size;
+8 -5
arch/powerpc/sysdev/mpic.c
··· 230 230 { 231 231 unsigned int isu = src_no >> mpic->isu_shift; 232 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 237 #ifdef CONFIG_MPIC_BROKEN_REGREAD 235 238 if (reg == 0) 236 - return mpic->isu_reg0_shadow[idx]; 237 - else 239 + val = (val & (MPIC_VECPRI_MASK | MPIC_VECPRI_ACTIVITY)) | 240 + mpic->isu_reg0_shadow[src_no]; 238 241 #endif 239 - return _mpic_read(mpic->reg_type, &mpic->isus[isu], 240 - reg + (idx * MPIC_INFO(IRQ_STRIDE))); 242 + return val; 241 243 } 242 244 243 245 static inline void _mpic_irq_write(struct mpic *mpic, unsigned int src_no, ··· 253 251 254 252 #ifdef CONFIG_MPIC_BROKEN_REGREAD 255 253 if (reg == 0) 256 - mpic->isu_reg0_shadow[idx] = value; 254 + mpic->isu_reg0_shadow[src_no] = 255 + value & ~(MPIC_VECPRI_MASK | MPIC_VECPRI_ACTIVITY); 257 256 #endif 258 257 } 259 258
+2 -2
arch/powerpc/sysdev/qe_lib/gpio.c
··· 105 105 struct qe_gpio_chip *qe_gc = to_qe_gpio_chip(mm_gc); 106 106 unsigned long flags; 107 107 108 + qe_gpio_set(gc, gpio, val); 109 + 108 110 spin_lock_irqsave(&qe_gc->lock, flags); 109 111 110 112 __par_io_config_pin(mm_gc->regs, gpio, QE_PIO_DIR_OUT, 0, 0, 0); 111 113 112 114 spin_unlock_irqrestore(&qe_gc->lock, flags); 113 - 114 - qe_gpio_set(gc, gpio, val); 115 115 116 116 return 0; 117 117 }
+4 -1
arch/powerpc/sysdev/qe_lib/qe_ic.c
··· 339 339 340 340 qe_ic->irqhost = irq_alloc_host(node, IRQ_HOST_MAP_LINEAR, 341 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 344 return; 345 + } 344 346 345 347 qe_ic->regs = ioremap(res.start, res.end - res.start + 1); 346 348 ··· 354 352 355 353 if (qe_ic->virq_low == NO_IRQ) { 356 354 printk(KERN_ERR "Failed to map QE_IC low IRQ\n"); 355 + kfree(qe_ic); 357 356 return; 358 357 } 359 358
+2
arch/powerpc/xmon/Makefile
··· 2 2 3 3 subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror 4 4 5 + GCOV_PROFILE := n 6 + 5 7 ifdef CONFIG_PPC64 6 8 EXTRA_CFLAGS += -mno-minimal-toc 7 9 endif
+1 -1
arch/powerpc/xmon/xmon.c
··· 2570 2570 printf("%s", after); 2571 2571 } 2572 2572 2573 - #ifdef CONFIG_PPC64 2573 + #ifdef CONFIG_PPC_BOOK3S_64 2574 2574 static void dump_slb(void) 2575 2575 { 2576 2576 int i;
+1 -1
drivers/block/ps3vram.c
··· 13 13 #include <linux/proc_fs.h> 14 14 #include <linux/seq_file.h> 15 15 16 + #include <asm/cell-regs.h> 16 17 #include <asm/firmware.h> 17 - #include <asm/iommu.h> 18 18 #include <asm/lv1call.h> 19 19 #include <asm/ps3.h> 20 20 #include <asm/ps3gpu.h>
+33 -16
drivers/char/agp/uninorth-agp.c
··· 7 7 #include <linux/pagemap.h> 8 8 #include <linux/agp_backend.h> 9 9 #include <linux/delay.h> 10 + #include <linux/vmalloc.h> 10 11 #include <asm/uninorth.h> 11 12 #include <asm/pci-bridge.h> 12 13 #include <asm/prom.h> ··· 28 27 static int uninorth_rev; 29 28 static int is_u3; 30 29 30 + #define DEFAULT_APERTURE_SIZE 256 31 + #define DEFAULT_APERTURE_STRING "256" 31 32 static char *aperture = NULL; 32 33 33 34 static int uninorth_fetch_size(void) ··· 58 55 59 56 if (!size) { 60 57 for (i = 0; i < agp_bridge->driver->num_aperture_sizes; i++) 61 - if (values[i].size == 32) 58 + if (values[i].size == DEFAULT_APERTURE_SIZE) 62 59 break; 63 60 } 64 61 ··· 182 179 } 183 180 (void)in_le32((volatile u32*)&agp_bridge->gatt_table[pg_start]); 184 181 mb(); 185 - flush_dcache_range((unsigned long)&agp_bridge->gatt_table[pg_start], 186 - (unsigned long)&agp_bridge->gatt_table[pg_start + mem->page_count]); 187 182 188 183 uninorth_tlbflush(mem); 189 184 return 0; ··· 225 224 (unsigned long)__va(page_to_phys(mem->pages[i]))+0x1000); 226 225 } 227 226 mb(); 228 - flush_dcache_range((unsigned long)gp, (unsigned long) &gp[i]); 229 227 uninorth_tlbflush(mem); 230 228 231 229 return 0; ··· 243 243 for (i = 0; i < mem->page_count; ++i) 244 244 gp[i] = 0; 245 245 mb(); 246 - flush_dcache_range((unsigned long)gp, (unsigned long) &gp[i]); 247 246 uninorth_tlbflush(mem); 248 247 249 248 return 0; ··· 395 396 int i; 396 397 void *temp; 397 398 struct page *page; 399 + struct page **pages; 398 400 399 401 /* We can't handle 2 level gatt's */ 400 402 if (bridge->driver->size_type == LVL2_APER_SIZE) ··· 424 424 if (table == NULL) 425 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 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 435 SetPageReserved(page); 436 + pages[i] = page; 437 + } 431 438 432 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 448 bridge->gatt_bus_addr = virt_to_phys(table); 435 449 436 450 for (i = 0; i < num_entries; i++) 437 451 bridge->gatt_table[i] = 0; 438 452 439 - flush_dcache_range((unsigned long)table, (unsigned long)table_end); 440 - 441 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 462 static int uninorth_free_gatt_table(struct agp_bridge_data *bridge) ··· 474 456 * from the table. 475 457 */ 476 458 459 + vunmap(bridge->gatt_table); 477 460 table = (char *) bridge->gatt_table_real; 478 461 table_end = table + ((PAGE_SIZE * (1 << page_order)) - 1); 479 462 ··· 493 474 494 475 /* Setup function */ 495 476 496 - static const struct aper_size_info_32 uninorth_sizes[7] = 477 + static const struct aper_size_info_32 uninorth_sizes[] = 497 478 { 498 - #if 0 /* Not sure uninorth supports that high aperture sizes */ 499 479 {256, 65536, 6, 64}, 500 480 {128, 32768, 5, 32}, 501 481 {64, 16384, 4, 16}, 502 - #endif 503 482 {32, 8192, 3, 8}, 504 483 {16, 4096, 2, 4}, 505 484 {8, 2048, 1, 2}, ··· 508 491 * Not sure that u3 supports that high aperture sizes but it 509 492 * would strange if it did not :) 510 493 */ 511 - static const struct aper_size_info_32 u3_sizes[8] = 494 + static const struct aper_size_info_32 u3_sizes[] = 512 495 { 513 496 {512, 131072, 7, 128}, 514 497 {256, 65536, 6, 64}, ··· 524 507 .owner = THIS_MODULE, 525 508 .aperture_sizes = (void *)uninorth_sizes, 526 509 .size_type = U32_APER_SIZE, 527 - .num_aperture_sizes = 4, 510 + .num_aperture_sizes = ARRAY_SIZE(uninorth_sizes), 528 511 .configure = uninorth_configure, 529 512 .fetch_size = uninorth_fetch_size, 530 513 .cleanup = uninorth_cleanup, ··· 551 534 .owner = THIS_MODULE, 552 535 .aperture_sizes = (void *)u3_sizes, 553 536 .size_type = U32_APER_SIZE, 554 - .num_aperture_sizes = 8, 537 + .num_aperture_sizes = ARRAY_SIZE(u3_sizes), 555 538 .configure = uninorth_configure, 556 539 .fetch_size = uninorth_fetch_size, 557 540 .cleanup = uninorth_cleanup, ··· 734 717 MODULE_PARM_DESC(aperture, 735 718 "Aperture size, must be power of two between 4MB and an\n" 736 719 "\t\tupper limit specific to the UniNorth revision.\n" 737 - "\t\tDefault: 32M"); 720 + "\t\tDefault: " DEFAULT_APERTURE_STRING "M"); 738 721 739 722 MODULE_AUTHOR("Ben Herrenschmidt & Paul Mackerras"); 740 723 MODULE_LICENSE("GPL");
+20 -7
drivers/char/generic_nvram.c
··· 2 2 * Generic /dev/nvram driver for architectures providing some 3 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 7 * Note that an additional hook is supported for PowerMac only 8 8 * for getting the nvram "partition" informations ··· 28 28 29 29 #define NVRAM_SIZE 8192 30 30 31 + static ssize_t nvram_len; 32 + 31 33 static loff_t nvram_llseek(struct file *file, loff_t offset, int origin) 32 34 { 33 35 lock_kernel(); ··· 38 36 offset += file->f_pos; 39 37 break; 40 38 case 2: 41 - offset += NVRAM_SIZE; 39 + offset += nvram_len; 42 40 break; 43 41 } 44 42 if (offset < 0) { ··· 58 56 59 57 if (!access_ok(VERIFY_WRITE, buf, count)) 60 58 return -EFAULT; 61 - if (*ppos >= NVRAM_SIZE) 59 + if (*ppos >= nvram_len) 62 60 return 0; 63 - for (i = *ppos; count > 0 && i < NVRAM_SIZE; ++i, ++p, --count) 61 + for (i = *ppos; count > 0 && i < nvram_len; ++i, ++p, --count) 64 62 if (__put_user(nvram_read_byte(i), p)) 65 63 return -EFAULT; 66 64 *ppos = i; ··· 76 74 77 75 if (!access_ok(VERIFY_READ, buf, count)) 78 76 return -EFAULT; 79 - if (*ppos >= NVRAM_SIZE) 77 + if (*ppos >= nvram_len) 80 78 return 0; 81 - for (i = *ppos; count > 0 && i < NVRAM_SIZE; ++i, ++p, --count) { 79 + for (i = *ppos; count > 0 && i < nvram_len; ++i, ++p, --count) { 82 80 if (__get_user(c, p)) 83 81 return -EFAULT; 84 82 nvram_write_byte(c, i); ··· 135 133 136 134 int __init nvram_init(void) 137 135 { 136 + int ret = 0; 137 + 138 138 printk(KERN_INFO "Generic non-volatile memory driver v%s\n", 139 139 NVRAM_VERSION); 140 - return misc_register(&nvram_dev); 140 + ret = misc_register(&nvram_dev); 141 + if (ret != 0) 142 + goto out; 143 + 144 + nvram_len = nvram_get_size(); 145 + if (nvram_len < 0) 146 + nvram_len = NVRAM_SIZE; 147 + 148 + out: 149 + return ret; 141 150 } 142 151 143 152 void __exit nvram_cleanup(void)
-2
drivers/char/hvc_console.c
··· 516 516 struct winsize ws; 517 517 518 518 hp = container_of(work, struct hvc_struct, tty_resize); 519 - if (!hp) 520 - return; 521 519 522 520 spin_lock_irqsave(&hp->lock, hvc_flags); 523 521 if (!hp->tty) {
+2 -2
drivers/char/hvc_vio.c
··· 120 120 } 121 121 }; 122 122 123 - static int hvc_vio_init(void) 123 + static int __init hvc_vio_init(void) 124 124 { 125 125 int rc; 126 126 ··· 134 134 } 135 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 139 vio_unregister_driver(&hvc_vio_driver); 140 140 }
+2 -1
drivers/char/hvsi.c
··· 1230 1230 1231 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 1234 int ret; 1235 1235 1236 1236 if (console->index < 0 || console->index >= hvsi_count) 1237 1237 return -1; 1238 + hp = &hvsi_ports[console->index]; 1238 1239 1239 1240 /* give the FSP a chance to change the baud rate when we re-open */ 1240 1241 hvsi_close_protocol(hp);
+4 -2
drivers/macintosh/macio_asic.c
··· 294 294 int i = 0, j = 0; 295 295 296 296 for (;;) { 297 - struct resource *res = &dev->interrupt[j]; 297 + struct resource *res; 298 298 299 299 if (j >= MACIO_DEV_COUNT_IRQS) 300 300 break; 301 + res = &dev->interrupt[j]; 301 302 irq = irq_of_parse_and_map(np, i++); 302 303 if (irq == NO_IRQ) 303 304 break; ··· 322 321 int index; 323 322 324 323 for (index = 0; of_address_to_resource(np, index, &r) == 0; index++) { 325 - struct resource *res = &dev->resource[index]; 324 + struct resource *res; 326 325 if (index >= MACIO_DEV_COUNT_RESOURCES) 327 326 break; 327 + res = &dev->resource[index]; 328 328 *res = r; 329 329 res->name = dev_name(&dev->ofdev.dev); 330 330
+2 -2
drivers/macintosh/therm_windtunnel.c
··· 239 239 * to be on the safe side (OSX doesn't)... 240 240 */ 241 241 if( x.overheat_temp == (80 << 8) ) { 242 - x.overheat_temp = 65 << 8; 243 - x.overheat_hyst = 60 << 8; 242 + x.overheat_temp = 75 << 8; 243 + x.overheat_hyst = 70 << 8; 244 244 write_reg( x.thermostat, 2, x.overheat_hyst, 2 ); 245 245 write_reg( x.thermostat, 3, x.overheat_temp, 2 ); 246 246
+62 -3
drivers/ps3/ps3stor_lib.c
··· 23 23 #include <asm/lv1call.h> 24 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 86 static int ps3stor_probe_access(struct ps3_storage_device *dev) 28 87 { ··· 149 90 int error, res, alignment; 150 91 enum ps3_dma_page_size page_size; 151 92 152 - error = ps3_open_hv_device(&dev->sbd); 93 + error = ps3stor_open_hv_device(&dev->sbd); 153 94 if (error) { 154 95 dev_err(&dev->sbd.core, 155 96 "%s:%u: ps3_open_hv_device failed %d\n", __func__, ··· 225 166 fail_sb_event_receive_port_destroy: 226 167 ps3_sb_event_receive_port_destroy(&dev->sbd, dev->irq); 227 168 fail_close_device: 228 - ps3_close_hv_device(&dev->sbd); 169 + ps3stor_close_hv_device(&dev->sbd); 229 170 fail: 230 171 return error; 231 172 } ··· 252 193 "%s:%u: destroy event receive port failed %d\n", 253 194 __func__, __LINE__, error); 254 195 255 - error = ps3_close_hv_device(&dev->sbd); 196 + error = ps3stor_close_hv_device(&dev->sbd); 256 197 if (error) 257 198 dev_err(&dev->sbd.core, 258 199 "%s:%u: ps3_close_hv_device failed %d\n", __func__,
+1 -1
drivers/video/ps3fb.c
··· 32 32 #include <linux/init.h> 33 33 34 34 #include <asm/abs_addr.h> 35 - #include <asm/iommu.h> 35 + #include <asm/cell-regs.h> 36 36 #include <asm/lv1call.h> 37 37 #include <asm/ps3av.h> 38 38 #include <asm/ps3fb.h>
+1
include/linux/dma-mapping.h
··· 58 58 enum dma_data_direction dir); 59 59 int (*mapping_error)(struct device *dev, dma_addr_t dma_addr); 60 60 int (*dma_supported)(struct device *dev, u64 mask); 61 + int (*set_dma_mask)(struct device *dev, u64 mask); 61 62 int is_phys; 62 63 }; 63 64
+1
include/linux/pci_ids.h
··· 881 881 #define PCI_DEVICE_ID_APPLE_SH_SUNGEM 0x0051 882 882 #define PCI_DEVICE_ID_APPLE_U3L_AGP 0x0058 883 883 #define PCI_DEVICE_ID_APPLE_U3H_AGP 0x0059 884 + #define PCI_DEVICE_ID_APPLE_U4_PCIE 0x005b 884 885 #define PCI_DEVICE_ID_APPLE_IPID2_AGP 0x0066 885 886 #define PCI_DEVICE_ID_APPLE_IPID2_ATA 0x0069 886 887 #define PCI_DEVICE_ID_APPLE_IPID2_FW 0x006a
+1 -1
kernel/gcov/Kconfig
··· 34 34 config GCOV_PROFILE_ALL 35 35 bool "Profile entire Kernel" 36 36 depends on GCOV_KERNEL 37 - depends on S390 || X86 37 + depends on S390 || X86 || (PPC && EXPERIMENTAL) 38 38 default n 39 39 ---help--- 40 40 This options activates profiling for the entire kernel.
+1 -1
lib/Kconfig.debug
··· 338 338 339 339 config DEBUG_KMEMLEAK 340 340 bool "Kernel memory leak detector" 341 - depends on DEBUG_KERNEL && EXPERIMENTAL && (X86 || ARM) && \ 341 + depends on DEBUG_KERNEL && EXPERIMENTAL && (X86 || ARM || PPC) && \ 342 342 !MEMORY_HOTPLUG 343 343 select DEBUG_FS if SYSFS 344 344 select STACKTRACE if STACKTRACE_SUPPORT