diff options
author | Paul Mackerras <paulus@samba.org> | 2006-12-03 23:59:07 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-12-03 23:59:07 -0500 |
commit | 79acbb3ff2d8095b692e1502b9eb2ccec348de26 (patch) | |
tree | 6ab773e5a8f9de2cd6443362b21d0d6fffe3b35e /arch/powerpc/platforms/iseries | |
parent | 19a79859e168640f8e16d7b216d211c1c52b687a (diff) | |
parent | 2b5f6dcce5bf94b9b119e9ed8d537098ec61c3d2 (diff) |
Merge branch 'linux-2.6' into for-linus
Diffstat (limited to 'arch/powerpc/platforms/iseries')
-rw-r--r-- | arch/powerpc/platforms/iseries/iommu.c | 11 | ||||
-rw-r--r-- | arch/powerpc/platforms/iseries/setup.c | 5 |
2 files changed, 7 insertions, 9 deletions
diff --git a/arch/powerpc/platforms/iseries/iommu.c b/arch/powerpc/platforms/iseries/iommu.c index f4cbbcf8773a..218817d13c5c 100644 --- a/arch/powerpc/platforms/iseries/iommu.c +++ b/arch/powerpc/platforms/iseries/iommu.c | |||
@@ -43,9 +43,6 @@ static void tce_build_iSeries(struct iommu_table *tbl, long index, long npages, | |||
43 | u64 rc; | 43 | u64 rc; |
44 | u64 tce, rpn; | 44 | u64 tce, rpn; |
45 | 45 | ||
46 | index <<= TCE_PAGE_FACTOR; | ||
47 | npages <<= TCE_PAGE_FACTOR; | ||
48 | |||
49 | while (npages--) { | 46 | while (npages--) { |
50 | rpn = virt_to_abs(uaddr) >> TCE_SHIFT; | 47 | rpn = virt_to_abs(uaddr) >> TCE_SHIFT; |
51 | tce = (rpn & TCE_RPN_MASK) << TCE_RPN_SHIFT; | 48 | tce = (rpn & TCE_RPN_MASK) << TCE_RPN_SHIFT; |
@@ -75,9 +72,6 @@ static void tce_free_iSeries(struct iommu_table *tbl, long index, long npages) | |||
75 | { | 72 | { |
76 | u64 rc; | 73 | u64 rc; |
77 | 74 | ||
78 | npages <<= TCE_PAGE_FACTOR; | ||
79 | index <<= TCE_PAGE_FACTOR; | ||
80 | |||
81 | while (npages--) { | 75 | while (npages--) { |
82 | rc = HvCallXm_setTce((u64)tbl->it_index, (u64)index, 0); | 76 | rc = HvCallXm_setTce((u64)tbl->it_index, (u64)index, 0); |
83 | if (rc) | 77 | if (rc) |
@@ -136,10 +130,9 @@ void iommu_table_getparms_iSeries(unsigned long busno, | |||
136 | panic("PCI_DMA: parms->size is zero, parms is 0x%p", parms); | 130 | panic("PCI_DMA: parms->size is zero, parms is 0x%p", parms); |
137 | 131 | ||
138 | /* itc_size is in pages worth of table, it_size is in # of entries */ | 132 | /* itc_size is in pages worth of table, it_size is in # of entries */ |
139 | tbl->it_size = ((parms->itc_size * TCE_PAGE_SIZE) / | 133 | tbl->it_size = (parms->itc_size * TCE_PAGE_SIZE) / TCE_ENTRY_SIZE; |
140 | TCE_ENTRY_SIZE) >> TCE_PAGE_FACTOR; | ||
141 | tbl->it_busno = parms->itc_busno; | 134 | tbl->it_busno = parms->itc_busno; |
142 | tbl->it_offset = parms->itc_offset >> TCE_PAGE_FACTOR; | 135 | tbl->it_offset = parms->itc_offset; |
143 | tbl->it_index = parms->itc_index; | 136 | tbl->it_index = parms->itc_index; |
144 | tbl->it_blocksize = 1; | 137 | tbl->it_blocksize = 1; |
145 | tbl->it_type = virtbus ? TCE_VB : TCE_PCI; | 138 | tbl->it_type = virtbus ? TCE_VB : TCE_PCI; |
diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c index 08d14734617a..cd8965ec9ddb 100644 --- a/arch/powerpc/platforms/iseries/setup.c +++ b/arch/powerpc/platforms/iseries/setup.c | |||
@@ -662,6 +662,11 @@ void * __init iSeries_early_setup(void) | |||
662 | { | 662 | { |
663 | unsigned long phys_mem_size; | 663 | unsigned long phys_mem_size; |
664 | 664 | ||
665 | /* Identify CPU type. This is done again by the common code later | ||
666 | * on but calling this function multiple times is fine. | ||
667 | */ | ||
668 | identify_cpu(0); | ||
669 | |||
665 | powerpc_firmware_features |= FW_FEATURE_ISERIES; | 670 | powerpc_firmware_features |= FW_FEATURE_ISERIES; |
666 | powerpc_firmware_features |= FW_FEATURE_LPAR; | 671 | powerpc_firmware_features |= FW_FEATURE_LPAR; |
667 | 672 | ||