diff options
-rw-r--r-- | arch/powerpc/kernel/lparcfg.c | 1 | ||||
-rw-r--r-- | arch/powerpc/kernel/setup_64.c | 1 | ||||
-rw-r--r-- | arch/powerpc/lib/Makefile | 1 | ||||
-rw-r--r-- | arch/powerpc/lib/e2a.c | 116 | ||||
-rw-r--r-- | arch/powerpc/mm/tlb_64.c | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/iseries/dt.c | 42 | ||||
-rw-r--r-- | arch/powerpc/platforms/iseries/hvlpconfig.c | 13 | ||||
-rw-r--r-- | arch/powerpc/platforms/iseries/iommu.c | 17 | ||||
-rw-r--r-- | arch/powerpc/platforms/iseries/it_exp_vpd_panel.h (renamed from include/asm-powerpc/iseries/it_exp_vpd_panel.h) | 6 | ||||
-rw-r--r-- | arch/powerpc/platforms/iseries/it_lp_naca.h (renamed from include/asm-powerpc/iseries/it_lp_naca.h) | 6 | ||||
-rw-r--r-- | arch/powerpc/platforms/iseries/lpardata.c | 6 | ||||
-rw-r--r-- | arch/powerpc/platforms/iseries/lpevents.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/iseries/setup.c | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/iseries/viopath.c | 27 | ||||
-rw-r--r-- | arch/powerpc/platforms/iseries/vpdinfo.c | 22 | ||||
-rw-r--r-- | include/asm-powerpc/iseries/hv_call_xm.h | 17 | ||||
-rw-r--r-- | include/asm-powerpc/iseries/hv_lp_config.h | 13 | ||||
-rw-r--r-- | include/asm-powerpc/system.h | 5 |
18 files changed, 113 insertions, 184 deletions
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c index 23f34daa044a..2d94b372d49b 100644 --- a/arch/powerpc/kernel/lparcfg.c +++ b/arch/powerpc/kernel/lparcfg.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <asm/rtas.h> | 32 | #include <asm/rtas.h> |
33 | #include <asm/system.h> | 33 | #include <asm/system.h> |
34 | #include <asm/time.h> | 34 | #include <asm/time.h> |
35 | #include <asm/iseries/it_exp_vpd_panel.h> | ||
36 | #include <asm/prom.h> | 35 | #include <asm/prom.h> |
37 | #include <asm/vdso_datapage.h> | 36 | #include <asm/vdso_datapage.h> |
38 | 37 | ||
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index fd1785e4c9bb..e2447aef3a8f 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c | |||
@@ -56,7 +56,6 @@ | |||
56 | #include <asm/page.h> | 56 | #include <asm/page.h> |
57 | #include <asm/mmu.h> | 57 | #include <asm/mmu.h> |
58 | #include <asm/lmb.h> | 58 | #include <asm/lmb.h> |
59 | #include <asm/iseries/it_lp_naca.h> | ||
60 | #include <asm/firmware.h> | 59 | #include <asm/firmware.h> |
61 | #include <asm/xmon.h> | 60 | #include <asm/xmon.h> |
62 | #include <asm/udbg.h> | 61 | #include <asm/udbg.h> |
diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile index ff7096458249..336dd191f768 100644 --- a/arch/powerpc/lib/Makefile +++ b/arch/powerpc/lib/Makefile | |||
@@ -14,7 +14,6 @@ endif | |||
14 | obj-$(CONFIG_PPC64) += checksum_64.o copypage_64.o copyuser_64.o \ | 14 | obj-$(CONFIG_PPC64) += checksum_64.o copypage_64.o copyuser_64.o \ |
15 | memcpy_64.o usercopy_64.o mem_64.o string.o \ | 15 | memcpy_64.o usercopy_64.o mem_64.o string.o \ |
16 | strcase.o | 16 | strcase.o |
17 | obj-$(CONFIG_PPC_ISERIES) += e2a.o | ||
18 | obj-$(CONFIG_XMON) += sstep.o | 17 | obj-$(CONFIG_XMON) += sstep.o |
19 | 18 | ||
20 | ifeq ($(CONFIG_PPC64),y) | 19 | ifeq ($(CONFIG_PPC64),y) |
diff --git a/arch/powerpc/lib/e2a.c b/arch/powerpc/lib/e2a.c deleted file mode 100644 index 4b72ed8fd50e..000000000000 --- a/arch/powerpc/lib/e2a.c +++ /dev/null | |||
@@ -1,116 +0,0 @@ | |||
1 | /* | ||
2 | * EBCDIC to ASCII conversion | ||
3 | * | ||
4 | * This function moved here from arch/powerpc/platforms/iseries/viopath.c | ||
5 | * | ||
6 | * (C) Copyright 2000-2004 IBM Corporation | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License as | ||
10 | * published by the Free Software Foundation; either version 2 of the | ||
11 | * License, or (at your option) anyu later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, but | ||
14 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | * General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software Foundation, | ||
20 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | * | ||
22 | */ | ||
23 | |||
24 | #include <linux/module.h> | ||
25 | |||
26 | unsigned char e2a(unsigned char x) | ||
27 | { | ||
28 | switch (x) { | ||
29 | case 0xF0: | ||
30 | return '0'; | ||
31 | case 0xF1: | ||
32 | return '1'; | ||
33 | case 0xF2: | ||
34 | return '2'; | ||
35 | case 0xF3: | ||
36 | return '3'; | ||
37 | case 0xF4: | ||
38 | return '4'; | ||
39 | case 0xF5: | ||
40 | return '5'; | ||
41 | case 0xF6: | ||
42 | return '6'; | ||
43 | case 0xF7: | ||
44 | return '7'; | ||
45 | case 0xF8: | ||
46 | return '8'; | ||
47 | case 0xF9: | ||
48 | return '9'; | ||
49 | case 0xC1: | ||
50 | return 'A'; | ||
51 | case 0xC2: | ||
52 | return 'B'; | ||
53 | case 0xC3: | ||
54 | return 'C'; | ||
55 | case 0xC4: | ||
56 | return 'D'; | ||
57 | case 0xC5: | ||
58 | return 'E'; | ||
59 | case 0xC6: | ||
60 | return 'F'; | ||
61 | case 0xC7: | ||
62 | return 'G'; | ||
63 | case 0xC8: | ||
64 | return 'H'; | ||
65 | case 0xC9: | ||
66 | return 'I'; | ||
67 | case 0xD1: | ||
68 | return 'J'; | ||
69 | case 0xD2: | ||
70 | return 'K'; | ||
71 | case 0xD3: | ||
72 | return 'L'; | ||
73 | case 0xD4: | ||
74 | return 'M'; | ||
75 | case 0xD5: | ||
76 | return 'N'; | ||
77 | case 0xD6: | ||
78 | return 'O'; | ||
79 | case 0xD7: | ||
80 | return 'P'; | ||
81 | case 0xD8: | ||
82 | return 'Q'; | ||
83 | case 0xD9: | ||
84 | return 'R'; | ||
85 | case 0xE2: | ||
86 | return 'S'; | ||
87 | case 0xE3: | ||
88 | return 'T'; | ||
89 | case 0xE4: | ||
90 | return 'U'; | ||
91 | case 0xE5: | ||
92 | return 'V'; | ||
93 | case 0xE6: | ||
94 | return 'W'; | ||
95 | case 0xE7: | ||
96 | return 'X'; | ||
97 | case 0xE8: | ||
98 | return 'Y'; | ||
99 | case 0xE9: | ||
100 | return 'Z'; | ||
101 | } | ||
102 | return ' '; | ||
103 | } | ||
104 | EXPORT_SYMBOL(e2a); | ||
105 | |||
106 | unsigned char* strne2a(unsigned char *dest, const unsigned char *src, size_t n) | ||
107 | { | ||
108 | int i; | ||
109 | |||
110 | n = strnlen(src, n); | ||
111 | |||
112 | for (i = 0; i < n; i++) | ||
113 | dest[i] = e2a(src[i]); | ||
114 | |||
115 | return dest; | ||
116 | } | ||
diff --git a/arch/powerpc/mm/tlb_64.c b/arch/powerpc/mm/tlb_64.c index f6eef78efd29..b58baa65c4a7 100644 --- a/arch/powerpc/mm/tlb_64.c +++ b/arch/powerpc/mm/tlb_64.c | |||
@@ -146,6 +146,7 @@ void hpte_update(struct mm_struct *mm, unsigned long addr, | |||
146 | psize = mmu_huge_psize; | 146 | psize = mmu_huge_psize; |
147 | #else | 147 | #else |
148 | BUG(); | 148 | BUG(); |
149 | psize = pte_pagesize_index(pte); /* shutup gcc */ | ||
149 | #endif | 150 | #endif |
150 | } else | 151 | } else |
151 | psize = pte_pagesize_index(pte); | 152 | psize = pte_pagesize_index(pte); |
diff --git a/arch/powerpc/platforms/iseries/dt.c b/arch/powerpc/platforms/iseries/dt.c index 894b534669d0..e305deee7f44 100644 --- a/arch/powerpc/platforms/iseries/dt.c +++ b/arch/powerpc/platforms/iseries/dt.c | |||
@@ -1,5 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2005-2006 Michael Ellerman, IBM Corporation | 2 | * Copyright (C) 2005-2006 Michael Ellerman, IBM Corporation |
3 | * Copyright (C) 2000-2004, IBM Corporation | ||
3 | * | 4 | * |
4 | * Description: | 5 | * Description: |
5 | * This file contains all the routines to build a flattened device | 6 | * This file contains all the routines to build a flattened device |
@@ -33,13 +34,13 @@ | |||
33 | #include <asm/iseries/hv_types.h> | 34 | #include <asm/iseries/hv_types.h> |
34 | #include <asm/iseries/hv_lp_config.h> | 35 | #include <asm/iseries/hv_lp_config.h> |
35 | #include <asm/iseries/hv_call_xm.h> | 36 | #include <asm/iseries/hv_call_xm.h> |
36 | #include <asm/iseries/it_exp_vpd_panel.h> | ||
37 | #include <asm/udbg.h> | 37 | #include <asm/udbg.h> |
38 | 38 | ||
39 | #include "processor_vpd.h" | 39 | #include "processor_vpd.h" |
40 | #include "call_hpt.h" | 40 | #include "call_hpt.h" |
41 | #include "call_pci.h" | 41 | #include "call_pci.h" |
42 | #include "pci.h" | 42 | #include "pci.h" |
43 | #include "it_exp_vpd_panel.h" | ||
43 | 44 | ||
44 | #ifdef DEBUG | 45 | #ifdef DEBUG |
45 | #define DBG(fmt...) udbg_printf(fmt) | 46 | #define DBG(fmt...) udbg_printf(fmt) |
@@ -76,6 +77,43 @@ static char __initdata device_type_pci[] = "pci"; | |||
76 | static char __initdata device_type_vdevice[] = "vdevice"; | 77 | static char __initdata device_type_vdevice[] = "vdevice"; |
77 | static char __initdata device_type_vscsi[] = "vscsi"; | 78 | static char __initdata device_type_vscsi[] = "vscsi"; |
78 | 79 | ||
80 | |||
81 | /* EBCDIC to ASCII conversion routines */ | ||
82 | |||
83 | static unsigned char __init e2a(unsigned char x) | ||
84 | { | ||
85 | switch (x) { | ||
86 | case 0x81 ... 0x89: | ||
87 | return x - 0x81 + 'a'; | ||
88 | case 0x91 ... 0x99: | ||
89 | return x - 0x91 + 'j'; | ||
90 | case 0xA2 ... 0xA9: | ||
91 | return x - 0xA2 + 's'; | ||
92 | case 0xC1 ... 0xC9: | ||
93 | return x - 0xC1 + 'A'; | ||
94 | case 0xD1 ... 0xD9: | ||
95 | return x - 0xD1 + 'J'; | ||
96 | case 0xE2 ... 0xE9: | ||
97 | return x - 0xE2 + 'S'; | ||
98 | case 0xF0 ... 0xF9: | ||
99 | return x - 0xF0 + '0'; | ||
100 | } | ||
101 | return ' '; | ||
102 | } | ||
103 | |||
104 | static unsigned char * __init strne2a(unsigned char *dest, | ||
105 | const unsigned char *src, size_t n) | ||
106 | { | ||
107 | int i; | ||
108 | |||
109 | n = strnlen(src, n); | ||
110 | |||
111 | for (i = 0; i < n; i++) | ||
112 | dest[i] = e2a(src[i]); | ||
113 | |||
114 | return dest; | ||
115 | } | ||
116 | |||
79 | static struct iseries_flat_dt * __init dt_init(void) | 117 | static struct iseries_flat_dt * __init dt_init(void) |
80 | { | 118 | { |
81 | struct iseries_flat_dt *dt; | 119 | struct iseries_flat_dt *dt; |
diff --git a/arch/powerpc/platforms/iseries/hvlpconfig.c b/arch/powerpc/platforms/iseries/hvlpconfig.c index 663a1affb4bb..f0475f0b1853 100644 --- a/arch/powerpc/platforms/iseries/hvlpconfig.c +++ b/arch/powerpc/platforms/iseries/hvlpconfig.c | |||
@@ -18,9 +18,22 @@ | |||
18 | 18 | ||
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #include <asm/iseries/hv_lp_config.h> | 20 | #include <asm/iseries/hv_lp_config.h> |
21 | #include "it_lp_naca.h" | ||
21 | 22 | ||
22 | HvLpIndex HvLpConfig_getLpIndex_outline(void) | 23 | HvLpIndex HvLpConfig_getLpIndex_outline(void) |
23 | { | 24 | { |
24 | return HvLpConfig_getLpIndex(); | 25 | return HvLpConfig_getLpIndex(); |
25 | } | 26 | } |
26 | EXPORT_SYMBOL(HvLpConfig_getLpIndex_outline); | 27 | EXPORT_SYMBOL(HvLpConfig_getLpIndex_outline); |
28 | |||
29 | HvLpIndex HvLpConfig_getLpIndex(void) | ||
30 | { | ||
31 | return itLpNaca.xLpIndex; | ||
32 | } | ||
33 | EXPORT_SYMBOL(HvLpConfig_getLpIndex); | ||
34 | |||
35 | HvLpIndex HvLpConfig_getPrimaryLpIndex(void) | ||
36 | { | ||
37 | return itLpNaca.xPrimaryLpIndex; | ||
38 | } | ||
39 | EXPORT_SYMBOL_GPL(HvLpConfig_getPrimaryLpIndex); | ||
diff --git a/arch/powerpc/platforms/iseries/iommu.c b/arch/powerpc/platforms/iseries/iommu.c index e3bd2015f2c9..2c3dbcd4613c 100644 --- a/arch/powerpc/platforms/iseries/iommu.c +++ b/arch/powerpc/platforms/iseries/iommu.c | |||
@@ -88,6 +88,23 @@ static void tce_free_iSeries(struct iommu_table *tbl, long index, long npages) | |||
88 | } | 88 | } |
89 | 89 | ||
90 | /* | 90 | /* |
91 | * Structure passed to HvCallXm_getTceTableParms | ||
92 | */ | ||
93 | struct iommu_table_cb { | ||
94 | unsigned long itc_busno; /* Bus number for this tce table */ | ||
95 | unsigned long itc_start; /* Will be NULL for secondary */ | ||
96 | unsigned long itc_totalsize; /* Size (in pages) of whole table */ | ||
97 | unsigned long itc_offset; /* Index into real tce table of the | ||
98 | start of our section */ | ||
99 | unsigned long itc_size; /* Size (in pages) of our section */ | ||
100 | unsigned long itc_index; /* Index of this tce table */ | ||
101 | unsigned short itc_maxtables; /* Max num of tables for partition */ | ||
102 | unsigned char itc_virtbus; /* Flag to indicate virtual bus */ | ||
103 | unsigned char itc_slotno; /* IOA Tce Slot Index */ | ||
104 | unsigned char itc_rsvd[4]; | ||
105 | }; | ||
106 | |||
107 | /* | ||
91 | * Call Hv with the architected data structure to get TCE table info. | 108 | * Call Hv with the architected data structure to get TCE table info. |
92 | * info. Put the returned data into the Linux representation of the | 109 | * info. Put the returned data into the Linux representation of the |
93 | * TCE table data. | 110 | * TCE table data. |
diff --git a/include/asm-powerpc/iseries/it_exp_vpd_panel.h b/arch/powerpc/platforms/iseries/it_exp_vpd_panel.h index 304a609ae21a..6de9097b7f57 100644 --- a/include/asm-powerpc/iseries/it_exp_vpd_panel.h +++ b/arch/powerpc/platforms/iseries/it_exp_vpd_panel.h | |||
@@ -15,8 +15,8 @@ | |||
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | */ | 17 | */ |
18 | #ifndef _ASM_POWERPC_ISERIES_IT_EXT_VPD_PANEL_H | 18 | #ifndef _PLATFORMS_ISERIES_IT_EXT_VPD_PANEL_H |
19 | #define _ASM_POWERPC_ISERIES_IT_EXT_VPD_PANEL_H | 19 | #define _PLATFORMS_ISERIES_IT_EXT_VPD_PANEL_H |
20 | 20 | ||
21 | /* | 21 | /* |
22 | * This struct maps the panel information | 22 | * This struct maps the panel information |
@@ -48,4 +48,4 @@ struct ItExtVpdPanel { | |||
48 | 48 | ||
49 | extern struct ItExtVpdPanel xItExtVpdPanel; | 49 | extern struct ItExtVpdPanel xItExtVpdPanel; |
50 | 50 | ||
51 | #endif /* _ASM_POWERPC_ISERIES_IT_EXT_VPD_PANEL_H */ | 51 | #endif /* _PLATFORMS_ISERIES_IT_EXT_VPD_PANEL_H */ |
diff --git a/include/asm-powerpc/iseries/it_lp_naca.h b/arch/powerpc/platforms/iseries/it_lp_naca.h index 4fdcf052927f..9bbf58986819 100644 --- a/include/asm-powerpc/iseries/it_lp_naca.h +++ b/arch/powerpc/platforms/iseries/it_lp_naca.h | |||
@@ -15,8 +15,8 @@ | |||
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | */ | 17 | */ |
18 | #ifndef _ASM_POWERPC_ISERIES_IT_LP_NACA_H | 18 | #ifndef _PLATFORMS_ISERIES_IT_LP_NACA_H |
19 | #define _ASM_POWERPC_ISERIES_IT_LP_NACA_H | 19 | #define _PLATFORMS_ISERIES_IT_LP_NACA_H |
20 | 20 | ||
21 | #include <linux/types.h> | 21 | #include <linux/types.h> |
22 | 22 | ||
@@ -77,4 +77,4 @@ extern struct ItLpNaca itLpNaca; | |||
77 | #define ITLPNACA_HWSYNCEDTBS 0x20 /* Hardware synced TBs */ | 77 | #define ITLPNACA_HWSYNCEDTBS 0x20 /* Hardware synced TBs */ |
78 | #define ITLPNACA_HMTINT 0x10 /* Utilize MHT for interrupts */ | 78 | #define ITLPNACA_HMTINT 0x10 /* Utilize MHT for interrupts */ |
79 | 79 | ||
80 | #endif /* _ASM_POWERPC_ISERIES_IT_LP_NACA_H */ | 80 | #endif /* _PLATFORMS_ISERIES_IT_LP_NACA_H */ |
diff --git a/arch/powerpc/platforms/iseries/lpardata.c b/arch/powerpc/platforms/iseries/lpardata.c index a7769445d6c7..8162049bb04d 100644 --- a/arch/powerpc/platforms/iseries/lpardata.c +++ b/arch/powerpc/platforms/iseries/lpardata.c | |||
@@ -13,12 +13,10 @@ | |||
13 | #include <asm/processor.h> | 13 | #include <asm/processor.h> |
14 | #include <asm/ptrace.h> | 14 | #include <asm/ptrace.h> |
15 | #include <asm/abs_addr.h> | 15 | #include <asm/abs_addr.h> |
16 | #include <asm/iseries/it_lp_naca.h> | ||
17 | #include <asm/lppaca.h> | 16 | #include <asm/lppaca.h> |
18 | #include <asm/iseries/it_lp_reg_save.h> | 17 | #include <asm/iseries/it_lp_reg_save.h> |
19 | #include <asm/paca.h> | 18 | #include <asm/paca.h> |
20 | #include <asm/iseries/lpar_map.h> | 19 | #include <asm/iseries/lpar_map.h> |
21 | #include <asm/iseries/it_exp_vpd_panel.h> | ||
22 | #include <asm/iseries/it_lp_queue.h> | 20 | #include <asm/iseries/it_lp_queue.h> |
23 | 21 | ||
24 | #include "naca.h" | 22 | #include "naca.h" |
@@ -27,6 +25,8 @@ | |||
27 | #include "ipl_parms.h" | 25 | #include "ipl_parms.h" |
28 | #include "processor_vpd.h" | 26 | #include "processor_vpd.h" |
29 | #include "release_data.h" | 27 | #include "release_data.h" |
28 | #include "it_exp_vpd_panel.h" | ||
29 | #include "it_lp_naca.h" | ||
30 | 30 | ||
31 | /* The HvReleaseData is the root of the information shared between | 31 | /* The HvReleaseData is the root of the information shared between |
32 | * the hypervisor and Linux. | 32 | * the hypervisor and Linux. |
@@ -127,14 +127,12 @@ struct ItLpNaca itLpNaca = { | |||
127 | (u64)instruction_access_slb_iSeries /* 0x480 I-SLB */ | 127 | (u64)instruction_access_slb_iSeries /* 0x480 I-SLB */ |
128 | } | 128 | } |
129 | }; | 129 | }; |
130 | EXPORT_SYMBOL(itLpNaca); | ||
131 | 130 | ||
132 | /* May be filled in by the hypervisor so cannot end up in the BSS */ | 131 | /* May be filled in by the hypervisor so cannot end up in the BSS */ |
133 | struct ItIplParmsReal xItIplParmsReal __attribute__((__section__(".data"))); | 132 | struct ItIplParmsReal xItIplParmsReal __attribute__((__section__(".data"))); |
134 | 133 | ||
135 | /* May be filled in by the hypervisor so cannot end up in the BSS */ | 134 | /* May be filled in by the hypervisor so cannot end up in the BSS */ |
136 | struct ItExtVpdPanel xItExtVpdPanel __attribute__((__section__(".data"))); | 135 | struct ItExtVpdPanel xItExtVpdPanel __attribute__((__section__(".data"))); |
137 | EXPORT_SYMBOL(xItExtVpdPanel); | ||
138 | 136 | ||
139 | #define maxPhysicalProcessors 32 | 137 | #define maxPhysicalProcessors 32 |
140 | 138 | ||
diff --git a/arch/powerpc/platforms/iseries/lpevents.c b/arch/powerpc/platforms/iseries/lpevents.c index 2a9f81ea27d6..98c1c2440aad 100644 --- a/arch/powerpc/platforms/iseries/lpevents.c +++ b/arch/powerpc/platforms/iseries/lpevents.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <asm/iseries/it_lp_queue.h> | 20 | #include <asm/iseries/it_lp_queue.h> |
21 | #include <asm/iseries/hv_lp_event.h> | 21 | #include <asm/iseries/hv_lp_event.h> |
22 | #include <asm/iseries/hv_call_event.h> | 22 | #include <asm/iseries/hv_call_event.h> |
23 | #include <asm/iseries/it_lp_naca.h> | 23 | #include "it_lp_naca.h" |
24 | 24 | ||
25 | /* | 25 | /* |
26 | * The LpQueue is used to pass event data from the hypervisor to | 26 | * The LpQueue is used to pass event data from the hypervisor to |
diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c index c9605d773a77..7f1953066ff8 100644 --- a/arch/powerpc/platforms/iseries/setup.c +++ b/arch/powerpc/platforms/iseries/setup.c | |||
@@ -59,6 +59,7 @@ | |||
59 | #include "irq.h" | 59 | #include "irq.h" |
60 | #include "vpd_areas.h" | 60 | #include "vpd_areas.h" |
61 | #include "processor_vpd.h" | 61 | #include "processor_vpd.h" |
62 | #include "it_lp_naca.h" | ||
62 | #include "main_store.h" | 63 | #include "main_store.h" |
63 | #include "call_sm.h" | 64 | #include "call_sm.h" |
64 | #include "call_hpt.h" | 65 | #include "call_hpt.h" |
diff --git a/arch/powerpc/platforms/iseries/viopath.c b/arch/powerpc/platforms/iseries/viopath.c index 622a30149b48..efeb6ae9df64 100644 --- a/arch/powerpc/platforms/iseries/viopath.c +++ b/arch/powerpc/platforms/iseries/viopath.c | |||
@@ -41,8 +41,8 @@ | |||
41 | 41 | ||
42 | #include <asm/system.h> | 42 | #include <asm/system.h> |
43 | #include <asm/uaccess.h> | 43 | #include <asm/uaccess.h> |
44 | #include <asm/prom.h> | ||
44 | #include <asm/iseries/hv_types.h> | 45 | #include <asm/iseries/hv_types.h> |
45 | #include <asm/iseries/it_exp_vpd_panel.h> | ||
46 | #include <asm/iseries/hv_lp_event.h> | 46 | #include <asm/iseries/hv_lp_event.h> |
47 | #include <asm/iseries/hv_lp_config.h> | 47 | #include <asm/iseries/hv_lp_config.h> |
48 | #include <asm/iseries/mf.h> | 48 | #include <asm/iseries/mf.h> |
@@ -116,6 +116,7 @@ static int proc_viopath_show(struct seq_file *m, void *v) | |||
116 | dma_addr_t handle; | 116 | dma_addr_t handle; |
117 | HvLpEvent_Rc hvrc; | 117 | HvLpEvent_Rc hvrc; |
118 | DECLARE_MUTEX_LOCKED(Semaphore); | 118 | DECLARE_MUTEX_LOCKED(Semaphore); |
119 | struct device_node *node; | ||
119 | 120 | ||
120 | buf = kmalloc(HW_PAGE_SIZE, GFP_KERNEL); | 121 | buf = kmalloc(HW_PAGE_SIZE, GFP_KERNEL); |
121 | if (!buf) | 122 | if (!buf) |
@@ -143,20 +144,26 @@ static int proc_viopath_show(struct seq_file *m, void *v) | |||
143 | 144 | ||
144 | buf[HW_PAGE_SIZE-1] = '\0'; | 145 | buf[HW_PAGE_SIZE-1] = '\0'; |
145 | seq_printf(m, "%s", buf); | 146 | seq_printf(m, "%s", buf); |
146 | seq_printf(m, "AVAILABLE_VETH=%x\n", vlanMap); | ||
147 | seq_printf(m, "SRLNBR=%c%c%c%c%c%c%c\n", | ||
148 | e2a(xItExtVpdPanel.mfgID[2]), | ||
149 | e2a(xItExtVpdPanel.mfgID[3]), | ||
150 | e2a(xItExtVpdPanel.systemSerial[1]), | ||
151 | e2a(xItExtVpdPanel.systemSerial[2]), | ||
152 | e2a(xItExtVpdPanel.systemSerial[3]), | ||
153 | e2a(xItExtVpdPanel.systemSerial[4]), | ||
154 | e2a(xItExtVpdPanel.systemSerial[5])); | ||
155 | 147 | ||
156 | dma_unmap_single(iSeries_vio_dev, handle, HW_PAGE_SIZE, | 148 | dma_unmap_single(iSeries_vio_dev, handle, HW_PAGE_SIZE, |
157 | DMA_FROM_DEVICE); | 149 | DMA_FROM_DEVICE); |
158 | kfree(buf); | 150 | kfree(buf); |
159 | 151 | ||
152 | seq_printf(m, "AVAILABLE_VETH=%x\n", vlanMap); | ||
153 | |||
154 | node = of_find_node_by_path("/"); | ||
155 | buf = NULL; | ||
156 | if (node != NULL) | ||
157 | buf = get_property(node, "system-id", NULL); | ||
158 | |||
159 | if (buf == NULL) | ||
160 | seq_printf(m, "SRLNBR=<UNKNOWN>\n"); | ||
161 | else | ||
162 | /* Skip "IBM," on front of serial number, see dt.c */ | ||
163 | seq_printf(m, "SRLNBR=%s\n", buf + 4); | ||
164 | |||
165 | of_node_put(node); | ||
166 | |||
160 | return 0; | 167 | return 0; |
161 | } | 168 | } |
162 | 169 | ||
diff --git a/arch/powerpc/platforms/iseries/vpdinfo.c b/arch/powerpc/platforms/iseries/vpdinfo.c index 23a6d1e5b429..9f83878a0c2e 100644 --- a/arch/powerpc/platforms/iseries/vpdinfo.c +++ b/arch/powerpc/platforms/iseries/vpdinfo.c | |||
@@ -188,7 +188,7 @@ static void __init iSeries_Parse_Vpd(u8 *VpdData, int VpdDataLen, | |||
188 | { | 188 | { |
189 | u8 *TagPtr = VpdData; | 189 | u8 *TagPtr = VpdData; |
190 | int DataLen = VpdDataLen - 3; | 190 | int DataLen = VpdDataLen - 3; |
191 | u8 PhbId; | 191 | u8 PhbId = 0xff; |
192 | 192 | ||
193 | while ((*TagPtr != VpdEndOfAreaTag) && (DataLen > 0)) { | 193 | while ((*TagPtr != VpdEndOfAreaTag) && (DataLen > 0)) { |
194 | int AreaLen = *(TagPtr + 1) + (*(TagPtr + 2) * 256); | 194 | int AreaLen = *(TagPtr + 1) + (*(TagPtr + 2) * 256); |
@@ -205,15 +205,16 @@ static void __init iSeries_Parse_Vpd(u8 *VpdData, int VpdDataLen, | |||
205 | } | 205 | } |
206 | } | 206 | } |
207 | 207 | ||
208 | static void __init iSeries_Get_Location_Code(u16 bus, HvAgentId agent, | 208 | static int __init iSeries_Get_Location_Code(u16 bus, HvAgentId agent, |
209 | u8 *frame, char card[4]) | 209 | u8 *frame, char card[4]) |
210 | { | 210 | { |
211 | int status = 0; | ||
211 | int BusVpdLen = 0; | 212 | int BusVpdLen = 0; |
212 | u8 *BusVpdPtr = kmalloc(BUS_VPDSIZE, GFP_KERNEL); | 213 | u8 *BusVpdPtr = kmalloc(BUS_VPDSIZE, GFP_KERNEL); |
213 | 214 | ||
214 | if (BusVpdPtr == NULL) { | 215 | if (BusVpdPtr == NULL) { |
215 | printk("PCI: Bus VPD Buffer allocation failure.\n"); | 216 | printk("PCI: Bus VPD Buffer allocation failure.\n"); |
216 | return; | 217 | return 0; |
217 | } | 218 | } |
218 | BusVpdLen = HvCallPci_getBusVpd(bus, iseries_hv_addr(BusVpdPtr), | 219 | BusVpdLen = HvCallPci_getBusVpd(bus, iseries_hv_addr(BusVpdPtr), |
219 | BUS_VPDSIZE); | 220 | BUS_VPDSIZE); |
@@ -228,8 +229,10 @@ static void __init iSeries_Get_Location_Code(u16 bus, HvAgentId agent, | |||
228 | goto out_free; | 229 | goto out_free; |
229 | } | 230 | } |
230 | iSeries_Parse_Vpd(BusVpdPtr, BusVpdLen, agent, frame, card); | 231 | iSeries_Parse_Vpd(BusVpdPtr, BusVpdLen, agent, frame, card); |
232 | status = 1; | ||
231 | out_free: | 233 | out_free: |
232 | kfree(BusVpdPtr); | 234 | kfree(BusVpdPtr); |
235 | return status; | ||
233 | } | 236 | } |
234 | 237 | ||
235 | /* | 238 | /* |
@@ -246,7 +249,7 @@ void __init iSeries_Device_Information(struct pci_dev *PciDev, int count) | |||
246 | struct device_node *DevNode = PciDev->sysdata; | 249 | struct device_node *DevNode = PciDev->sysdata; |
247 | struct pci_dn *pdn; | 250 | struct pci_dn *pdn; |
248 | u16 bus; | 251 | u16 bus; |
249 | u8 frame; | 252 | u8 frame = 0; |
250 | char card[4]; | 253 | char card[4]; |
251 | HvSubBusNumber subbus; | 254 | HvSubBusNumber subbus; |
252 | HvAgentId agent; | 255 | HvAgentId agent; |
@@ -262,10 +265,11 @@ void __init iSeries_Device_Information(struct pci_dev *PciDev, int count) | |||
262 | subbus = pdn->bussubno; | 265 | subbus = pdn->bussubno; |
263 | agent = ISERIES_PCI_AGENTID(ISERIES_GET_DEVICE_FROM_SUBBUS(subbus), | 266 | agent = ISERIES_PCI_AGENTID(ISERIES_GET_DEVICE_FROM_SUBBUS(subbus), |
264 | ISERIES_GET_FUNCTION_FROM_SUBBUS(subbus)); | 267 | ISERIES_GET_FUNCTION_FROM_SUBBUS(subbus)); |
265 | iSeries_Get_Location_Code(bus, agent, &frame, card); | ||
266 | 268 | ||
267 | printk("%d. PCI: Bus%3d, Device%3d, Vendor %04X Frame%3d, Card %4s ", | 269 | if (iSeries_Get_Location_Code(bus, agent, &frame, card)) { |
268 | count, bus, PCI_SLOT(PciDev->devfn), PciDev->vendor, | 270 | printk("%d. PCI: Bus%3d, Device%3d, Vendor %04X Frame%3d, " |
269 | frame, card); | 271 | "Card %4s 0x%04X\n", count, bus, |
270 | printk("0x%04X\n", (int)(PciDev->class >> 8)); | 272 | PCI_SLOT(PciDev->devfn), PciDev->vendor, frame, |
273 | card, (int)(PciDev->class >> 8)); | ||
274 | } | ||
271 | } | 275 | } |
diff --git a/include/asm-powerpc/iseries/hv_call_xm.h b/include/asm-powerpc/iseries/hv_call_xm.h index ca9202cb01ed..392ac3f54df0 100644 --- a/include/asm-powerpc/iseries/hv_call_xm.h +++ b/include/asm-powerpc/iseries/hv_call_xm.h | |||
@@ -16,23 +16,6 @@ | |||
16 | #define HvCallXmSetTce HvCallXm + 11 | 16 | #define HvCallXmSetTce HvCallXm + 11 |
17 | #define HvCallXmSetTces HvCallXm + 13 | 17 | #define HvCallXmSetTces HvCallXm + 13 |
18 | 18 | ||
19 | /* | ||
20 | * Structure passed to HvCallXm_getTceTableParms | ||
21 | */ | ||
22 | struct iommu_table_cb { | ||
23 | unsigned long itc_busno; /* Bus number for this tce table */ | ||
24 | unsigned long itc_start; /* Will be NULL for secondary */ | ||
25 | unsigned long itc_totalsize; /* Size (in pages) of whole table */ | ||
26 | unsigned long itc_offset; /* Index into real tce table of the | ||
27 | start of our section */ | ||
28 | unsigned long itc_size; /* Size (in pages) of our section */ | ||
29 | unsigned long itc_index; /* Index of this tce table */ | ||
30 | unsigned short itc_maxtables; /* Max num of tables for partition */ | ||
31 | unsigned char itc_virtbus; /* Flag to indicate virtual bus */ | ||
32 | unsigned char itc_slotno; /* IOA Tce Slot Index */ | ||
33 | unsigned char itc_rsvd[4]; | ||
34 | }; | ||
35 | |||
36 | static inline void HvCallXm_getTceTableParms(u64 cb) | 19 | static inline void HvCallXm_getTceTableParms(u64 cb) |
37 | { | 20 | { |
38 | HvCall1(HvCallXmGetTceTableParms, cb); | 21 | HvCall1(HvCallXmGetTceTableParms, cb); |
diff --git a/include/asm-powerpc/iseries/hv_lp_config.h b/include/asm-powerpc/iseries/hv_lp_config.h index df8b20739719..a006fd1e4a2c 100644 --- a/include/asm-powerpc/iseries/hv_lp_config.h +++ b/include/asm-powerpc/iseries/hv_lp_config.h | |||
@@ -25,7 +25,6 @@ | |||
25 | 25 | ||
26 | #include <asm/iseries/hv_call_sc.h> | 26 | #include <asm/iseries/hv_call_sc.h> |
27 | #include <asm/iseries/hv_types.h> | 27 | #include <asm/iseries/hv_types.h> |
28 | #include <asm/iseries/it_lp_naca.h> | ||
29 | 28 | ||
30 | enum { | 29 | enum { |
31 | HvCallCfg_Cur = 0, | 30 | HvCallCfg_Cur = 0, |
@@ -44,16 +43,8 @@ enum { | |||
44 | #define HvCallCfgGetHostingLpIndex HvCallCfg + 32 | 43 | #define HvCallCfgGetHostingLpIndex HvCallCfg + 32 |
45 | 44 | ||
46 | extern HvLpIndex HvLpConfig_getLpIndex_outline(void); | 45 | extern HvLpIndex HvLpConfig_getLpIndex_outline(void); |
47 | 46 | extern HvLpIndex HvLpConfig_getLpIndex(void); | |
48 | static inline HvLpIndex HvLpConfig_getLpIndex(void) | 47 | extern HvLpIndex HvLpConfig_getPrimaryLpIndex(void); |
49 | { | ||
50 | return itLpNaca.xLpIndex; | ||
51 | } | ||
52 | |||
53 | static inline HvLpIndex HvLpConfig_getPrimaryLpIndex(void) | ||
54 | { | ||
55 | return itLpNaca.xPrimaryLpIndex; | ||
56 | } | ||
57 | 48 | ||
58 | static inline u64 HvLpConfig_getMsChunks(void) | 49 | static inline u64 HvLpConfig_getMsChunks(void) |
59 | { | 50 | { |
diff --git a/include/asm-powerpc/system.h b/include/asm-powerpc/system.h index d075725bf444..5deb7bc7bb1f 100644 --- a/include/asm-powerpc/system.h +++ b/include/asm-powerpc/system.h | |||
@@ -169,11 +169,6 @@ extern u32 booke_wdt_enabled; | |||
169 | extern u32 booke_wdt_period; | 169 | extern u32 booke_wdt_period; |
170 | #endif /* CONFIG_BOOKE_WDT */ | 170 | #endif /* CONFIG_BOOKE_WDT */ |
171 | 171 | ||
172 | /* EBCDIC -> ASCII conversion for [0-9A-Z] on iSeries */ | ||
173 | extern unsigned char e2a(unsigned char); | ||
174 | extern unsigned char* strne2a(unsigned char *dest, | ||
175 | const unsigned char *src, size_t n); | ||
176 | |||
177 | struct device_node; | 172 | struct device_node; |
178 | extern void note_scsi_host(struct device_node *, void *); | 173 | extern void note_scsi_host(struct device_node *, void *); |
179 | 174 | ||