diff options
author | Nathan Fontenot <nfont@linux.vnet.ibm.com> | 2013-04-24 01:53:10 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-04-26 02:08:21 -0400 |
commit | 530b5e1475e5bab5d5e5d03438004ad609068146 (patch) | |
tree | 671a1086b47efab3383e847c67452a4eba8d8fe8 /arch/powerpc/kernel/prom_init.c | |
parent | 49c68a8518b4c109b01fd0b15dbb08c64fab911d (diff) |
powerpc/pseries: Move architecture vector definitions to prom.h
As part of handling of PRRN events we need to check vector 5 of the
architecture vector bits reported in the device tree to ensure PRRN event
handling is enabled. To do this firmware_has_feature() is updated (in a
subsequent patch) to make this check vector 5 bits. To avoid having to
re-define bits in the architecture vector the bit definitions are moved
to prom.h.
Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/prom_init.c')
-rw-r--r-- | arch/powerpc/kernel/prom_init.c | 75 |
1 files changed, 6 insertions, 69 deletions
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index 13f8d168b3f1..4a9e50cf8ab9 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -627,16 +627,11 @@ static void __init early_cmdline_parse(void) | |||
627 | 627 | ||
628 | #if defined(CONFIG_PPC_PSERIES) || defined(CONFIG_PPC_POWERNV) | 628 | #if defined(CONFIG_PPC_PSERIES) || defined(CONFIG_PPC_POWERNV) |
629 | /* | 629 | /* |
630 | * There are two methods for telling firmware what our capabilities are. | 630 | * The architecture vector has an array of PVR mask/value pairs, |
631 | * Newer machines have an "ibm,client-architecture-support" method on the | 631 | * followed by # option vectors - 1, followed by the option vectors. |
632 | * root node. For older machines, we have to call the "process-elf-header" | 632 | * |
633 | * method in the /packages/elf-loader node, passing it a fake 32-bit | 633 | * See prom.h for the definition of the bits specified in the |
634 | * ELF header containing a couple of PT_NOTE sections that contain | 634 | * architecture vector. |
635 | * structures that contain various information. | ||
636 | */ | ||
637 | |||
638 | /* | ||
639 | * New method - extensible architecture description vector. | ||
640 | * | 635 | * |
641 | * Because the description vector contains a mix of byte and word | 636 | * Because the description vector contains a mix of byte and word |
642 | * values, we declare it as an unsigned char array, and use this | 637 | * values, we declare it as an unsigned char array, and use this |
@@ -645,65 +640,7 @@ static void __init early_cmdline_parse(void) | |||
645 | #define W(x) ((x) >> 24) & 0xff, ((x) >> 16) & 0xff, \ | 640 | #define W(x) ((x) >> 24) & 0xff, ((x) >> 16) & 0xff, \ |
646 | ((x) >> 8) & 0xff, (x) & 0xff | 641 | ((x) >> 8) & 0xff, (x) & 0xff |
647 | 642 | ||
648 | /* Option vector bits - generic bits in byte 1 */ | 643 | unsigned char ibm_architecture_vec[] = { |
649 | #define OV_IGNORE 0x80 /* ignore this vector */ | ||
650 | #define OV_CESSATION_POLICY 0x40 /* halt if unsupported option present*/ | ||
651 | |||
652 | /* Option vector 1: processor architectures supported */ | ||
653 | #define OV1_PPC_2_00 0x80 /* set if we support PowerPC 2.00 */ | ||
654 | #define OV1_PPC_2_01 0x40 /* set if we support PowerPC 2.01 */ | ||
655 | #define OV1_PPC_2_02 0x20 /* set if we support PowerPC 2.02 */ | ||
656 | #define OV1_PPC_2_03 0x10 /* set if we support PowerPC 2.03 */ | ||
657 | #define OV1_PPC_2_04 0x08 /* set if we support PowerPC 2.04 */ | ||
658 | #define OV1_PPC_2_05 0x04 /* set if we support PowerPC 2.05 */ | ||
659 | #define OV1_PPC_2_06 0x02 /* set if we support PowerPC 2.06 */ | ||
660 | #define OV1_PPC_2_07 0x01 /* set if we support PowerPC 2.07 */ | ||
661 | |||
662 | /* Option vector 2: Open Firmware options supported */ | ||
663 | #define OV2_REAL_MODE 0x20 /* set if we want OF in real mode */ | ||
664 | |||
665 | /* Option vector 3: processor options supported */ | ||
666 | #define OV3_FP 0x80 /* floating point */ | ||
667 | #define OV3_VMX 0x40 /* VMX/Altivec */ | ||
668 | #define OV3_DFP 0x20 /* decimal FP */ | ||
669 | |||
670 | /* Option vector 4: IBM PAPR implementation */ | ||
671 | #define OV4_MIN_ENT_CAP 0x01 /* minimum VP entitled capacity */ | ||
672 | |||
673 | /* Option vector 5: PAPR/OF options supported */ | ||
674 | #define OV5_LPAR 0x80 /* logical partitioning supported */ | ||
675 | #define OV5_SPLPAR 0x40 /* shared-processor LPAR supported */ | ||
676 | /* ibm,dynamic-reconfiguration-memory property supported */ | ||
677 | #define OV5_DRCONF_MEMORY 0x20 | ||
678 | #define OV5_LARGE_PAGES 0x10 /* large pages supported */ | ||
679 | #define OV5_DONATE_DEDICATE_CPU 0x02 /* donate dedicated CPU support */ | ||
680 | /* PCIe/MSI support. Without MSI full PCIe is not supported */ | ||
681 | #ifdef CONFIG_PCI_MSI | ||
682 | #define OV5_MSI 0x01 /* PCIe/MSI support */ | ||
683 | #else | ||
684 | #define OV5_MSI 0x00 | ||
685 | #endif /* CONFIG_PCI_MSI */ | ||
686 | #ifdef CONFIG_PPC_SMLPAR | ||
687 | #define OV5_CMO 0x80 /* Cooperative Memory Overcommitment */ | ||
688 | #define OV5_XCMO 0x40 /* Page Coalescing */ | ||
689 | #else | ||
690 | #define OV5_CMO 0x00 | ||
691 | #define OV5_XCMO 0x00 | ||
692 | #endif | ||
693 | #define OV5_TYPE1_AFFINITY 0x80 /* Type 1 NUMA affinity */ | ||
694 | #define OV5_PFO_HW_RNG 0x80 /* PFO Random Number Generator */ | ||
695 | #define OV5_PFO_HW_842 0x40 /* PFO Compression Accelerator */ | ||
696 | #define OV5_PFO_HW_ENCR 0x20 /* PFO Encryption Accelerator */ | ||
697 | #define OV5_SUB_PROCESSORS 0x01 /* 1,2,or 4 Sub-Processors supported */ | ||
698 | |||
699 | /* Option Vector 6: IBM PAPR hints */ | ||
700 | #define OV6_LINUX 0x02 /* Linux is our OS */ | ||
701 | |||
702 | /* | ||
703 | * The architecture vector has an array of PVR mask/value pairs, | ||
704 | * followed by # option vectors - 1, followed by the option vectors. | ||
705 | */ | ||
706 | static unsigned char ibm_architecture_vec[] = { | ||
707 | W(0xfffe0000), W(0x003a0000), /* POWER5/POWER5+ */ | 644 | W(0xfffe0000), W(0x003a0000), /* POWER5/POWER5+ */ |
708 | W(0xffff0000), W(0x003e0000), /* POWER6 */ | 645 | W(0xffff0000), W(0x003e0000), /* POWER6 */ |
709 | W(0xffff0000), W(0x003f0000), /* POWER7 */ | 646 | W(0xffff0000), W(0x003f0000), /* POWER7 */ |