aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-05 14:16:12 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-05 14:16:12 -0400
commit5f3d2f2e1a63679cf1c4a4210f2f1cc2f335bef6 (patch)
tree9189bd6c81fe5f982a7ae45d2f3d900176658509 /drivers
parent283dbd82055eb70ff3b469f812d9c695f18c9641 (diff)
parentd900bd7366463fd96a907b2c212242e2b68b27d8 (diff)
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Pull powerpc updates from Benjamin Herrenschmidt: "Some highlights in addition to the usual batch of fixes: - 64TB address space support for 64-bit processes by Aneesh Kumar - Gavin Shan did a major cleanup & re-organization of our EEH support code (IBM fancy PCI error handling & recovery infrastructure) which paves the way for supporting different platform backends, along with some rework of the PCIe code for the PowerNV platform in order to remove home made resource allocations and instead use the generic code (which is possible after some small improvements to it done by Gavin). - Uprobes support by Ananth N Mavinakayanahalli - A pile of embedded updates from Freescale folks, including new SoC and board supports, more KVM stuff including preparing for 64-bit BookE KVM support, ePAPR 1.1 updates, etc..." Fixup trivial conflicts in drivers/scsi/ipr.c * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (146 commits) powerpc/iommu: Fix multiple issues with IOMMU pools code powerpc: Fix VMX fix for memcpy case driver/mtd:IFC NAND:Initialise internal SRAM before any write powerpc/fsl-pci: use 'Header Type' to identify PCIE mode powerpc/eeh: Don't release eeh_mutex in eeh_phb_pe_get powerpc: Remove tlb batching hack for nighthawk powerpc: Set paca->data_offset = 0 for boot cpu powerpc/perf: Sample only if SIAR-Valid bit is set in P7+ powerpc/fsl-pci: fix warning when CONFIG_SWIOTLB is disabled powerpc/mpc85xx: Update interrupt handling for IFC controller powerpc/85xx: Enable USB support in p1023rds_defconfig powerpc/smp: Do not disable IPI interrupts during suspend powerpc/eeh: Fix crash on converting OF node to edev powerpc/eeh: Lock module while handling EEH event powerpc/kprobe: Don't emulate store when kprobe stwu r1 powerpc/kprobe: Complete kprobe and migrate exception frame powerpc/kprobe: Introduce a new thread flag powerpc: Remove unused __get_user64() and __put_user64() powerpc/eeh: Global mutex to protect PE tree powerpc/eeh: Remove EEH PE for normal PCI hotplug ...
Diffstat (limited to 'drivers')
-rw-r--r--drivers/crypto/nx/nx.c17
-rw-r--r--drivers/edac/mpc85xx_edac.c43
-rw-r--r--drivers/infiniband/hw/ehca/ehca_cq.c2
-rw-r--r--drivers/infiniband/hw/ehca/ehca_eq.c2
-rw-r--r--drivers/infiniband/hw/ehca/ehca_mrmw.c45
-rw-r--r--drivers/infiniband/hw/ehca/ehca_qp.c6
-rw-r--r--drivers/infiniband/hw/ehca/ehca_reqs.c2
-rw-r--r--drivers/infiniband/hw/ehca/ehca_tools.h1
-rw-r--r--drivers/infiniband/hw/ehca/hcp_if.c12
-rw-r--r--drivers/infiniband/hw/ehca/ipz_pt_fn.c2
-rw-r--r--drivers/macintosh/smu.c3
-rw-r--r--drivers/mtd/nand/fsl_ifc_nand.c56
-rw-r--r--drivers/net/ethernet/ibm/ehea/ehea.h1
-rw-r--r--drivers/net/ethernet/ibm/ehea/ehea_phyp.c12
-rw-r--r--drivers/net/ethernet/ibm/ehea/ehea_qmr.c14
-rw-r--r--drivers/pci/hotplug/rpadlpar_core.c2
-rw-r--r--drivers/scsi/ipr.c18
-rw-r--r--drivers/tty/hvc/hvc_console.c33
-rw-r--r--drivers/tty/hvc/hvc_vio.c123
-rw-r--r--drivers/video/ps3fb.c3
20 files changed, 229 insertions, 168 deletions
diff --git a/drivers/crypto/nx/nx.c b/drivers/crypto/nx/nx.c
index d7f179cc2e98..638110efae9b 100644
--- a/drivers/crypto/nx/nx.c
+++ b/drivers/crypto/nx/nx.c
@@ -34,7 +34,6 @@
34#include <linux/device.h> 34#include <linux/device.h>
35#include <linux/of.h> 35#include <linux/of.h>
36#include <asm/pSeries_reconfig.h> 36#include <asm/pSeries_reconfig.h>
37#include <asm/abs_addr.h>
38#include <asm/hvcall.h> 37#include <asm/hvcall.h>
39#include <asm/vio.h> 38#include <asm/vio.h>
40 39
@@ -104,10 +103,10 @@ struct nx_sg *nx_build_sg_list(struct nx_sg *sg_head,
104 /* determine the start and end for this address range - slightly 103 /* determine the start and end for this address range - slightly
105 * different if this is in VMALLOC_REGION */ 104 * different if this is in VMALLOC_REGION */
106 if (is_vmalloc_addr(start_addr)) 105 if (is_vmalloc_addr(start_addr))
107 sg_addr = phys_to_abs(page_to_phys(vmalloc_to_page(start_addr))) 106 sg_addr = page_to_phys(vmalloc_to_page(start_addr))
108 + offset_in_page(sg_addr); 107 + offset_in_page(sg_addr);
109 else 108 else
110 sg_addr = virt_to_abs(sg_addr); 109 sg_addr = __pa(sg_addr);
111 110
112 end_addr = sg_addr + len; 111 end_addr = sg_addr + len;
113 112
@@ -265,17 +264,17 @@ void nx_ctx_init(struct nx_crypto_ctx *nx_ctx, unsigned int function)
265 nx_ctx->csbcpb->csb.valid |= NX_CSB_VALID_BIT; 264 nx_ctx->csbcpb->csb.valid |= NX_CSB_VALID_BIT;
266 265
267 nx_ctx->op.flags = function; 266 nx_ctx->op.flags = function;
268 nx_ctx->op.csbcpb = virt_to_abs(nx_ctx->csbcpb); 267 nx_ctx->op.csbcpb = __pa(nx_ctx->csbcpb);
269 nx_ctx->op.in = virt_to_abs(nx_ctx->in_sg); 268 nx_ctx->op.in = __pa(nx_ctx->in_sg);
270 nx_ctx->op.out = virt_to_abs(nx_ctx->out_sg); 269 nx_ctx->op.out = __pa(nx_ctx->out_sg);
271 270
272 if (nx_ctx->csbcpb_aead) { 271 if (nx_ctx->csbcpb_aead) {
273 nx_ctx->csbcpb_aead->csb.valid |= NX_CSB_VALID_BIT; 272 nx_ctx->csbcpb_aead->csb.valid |= NX_CSB_VALID_BIT;
274 273
275 nx_ctx->op_aead.flags = function; 274 nx_ctx->op_aead.flags = function;
276 nx_ctx->op_aead.csbcpb = virt_to_abs(nx_ctx->csbcpb_aead); 275 nx_ctx->op_aead.csbcpb = __pa(nx_ctx->csbcpb_aead);
277 nx_ctx->op_aead.in = virt_to_abs(nx_ctx->in_sg); 276 nx_ctx->op_aead.in = __pa(nx_ctx->in_sg);
278 nx_ctx->op_aead.out = virt_to_abs(nx_ctx->out_sg); 277 nx_ctx->op_aead.out = __pa(nx_ctx->out_sg);
279 } 278 }
280} 279}
281 280
diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_edac.c
index a1e791ec25d3..4fe66fa183ec 100644
--- a/drivers/edac/mpc85xx_edac.c
+++ b/drivers/edac/mpc85xx_edac.c
@@ -212,7 +212,7 @@ static irqreturn_t mpc85xx_pci_isr(int irq, void *dev_id)
212 return IRQ_HANDLED; 212 return IRQ_HANDLED;
213} 213}
214 214
215static int __devinit mpc85xx_pci_err_probe(struct platform_device *op) 215int __devinit mpc85xx_pci_err_probe(struct platform_device *op)
216{ 216{
217 struct edac_pci_ctl_info *pci; 217 struct edac_pci_ctl_info *pci;
218 struct mpc85xx_pci_pdata *pdata; 218 struct mpc85xx_pci_pdata *pdata;
@@ -226,6 +226,16 @@ static int __devinit mpc85xx_pci_err_probe(struct platform_device *op)
226 if (!pci) 226 if (!pci)
227 return -ENOMEM; 227 return -ENOMEM;
228 228
229 /* make sure error reporting method is sane */
230 switch (edac_op_state) {
231 case EDAC_OPSTATE_POLL:
232 case EDAC_OPSTATE_INT:
233 break;
234 default:
235 edac_op_state = EDAC_OPSTATE_INT;
236 break;
237 }
238
229 pdata = pci->pvt_info; 239 pdata = pci->pvt_info;
230 pdata->name = "mpc85xx_pci_err"; 240 pdata->name = "mpc85xx_pci_err";
231 pdata->irq = NO_IRQ; 241 pdata->irq = NO_IRQ;
@@ -315,6 +325,7 @@ err:
315 devres_release_group(&op->dev, mpc85xx_pci_err_probe); 325 devres_release_group(&op->dev, mpc85xx_pci_err_probe);
316 return res; 326 return res;
317} 327}
328EXPORT_SYMBOL(mpc85xx_pci_err_probe);
318 329
319static int mpc85xx_pci_err_remove(struct platform_device *op) 330static int mpc85xx_pci_err_remove(struct platform_device *op)
320{ 331{
@@ -338,27 +349,6 @@ static int mpc85xx_pci_err_remove(struct platform_device *op)
338 return 0; 349 return 0;
339} 350}
340 351
341static struct of_device_id mpc85xx_pci_err_of_match[] = {
342 {
343 .compatible = "fsl,mpc8540-pcix",
344 },
345 {
346 .compatible = "fsl,mpc8540-pci",
347 },
348 {},
349};
350MODULE_DEVICE_TABLE(of, mpc85xx_pci_err_of_match);
351
352static struct platform_driver mpc85xx_pci_err_driver = {
353 .probe = mpc85xx_pci_err_probe,
354 .remove = __devexit_p(mpc85xx_pci_err_remove),
355 .driver = {
356 .name = "mpc85xx_pci_err",
357 .owner = THIS_MODULE,
358 .of_match_table = mpc85xx_pci_err_of_match,
359 },
360};
361
362#endif /* CONFIG_PCI */ 352#endif /* CONFIG_PCI */
363 353
364/**************************** L2 Err device ***************************/ 354/**************************** L2 Err device ***************************/
@@ -1210,12 +1200,6 @@ static int __init mpc85xx_mc_init(void)
1210 if (res) 1200 if (res)
1211 printk(KERN_WARNING EDAC_MOD_STR "L2 fails to register\n"); 1201 printk(KERN_WARNING EDAC_MOD_STR "L2 fails to register\n");
1212 1202
1213#ifdef CONFIG_PCI
1214 res = platform_driver_register(&mpc85xx_pci_err_driver);
1215 if (res)
1216 printk(KERN_WARNING EDAC_MOD_STR "PCI fails to register\n");
1217#endif
1218
1219#ifdef CONFIG_FSL_SOC_BOOKE 1203#ifdef CONFIG_FSL_SOC_BOOKE
1220 pvr = mfspr(SPRN_PVR); 1204 pvr = mfspr(SPRN_PVR);
1221 1205
@@ -1252,9 +1236,6 @@ static void __exit mpc85xx_mc_exit(void)
1252 on_each_cpu(mpc85xx_mc_restore_hid1, NULL, 0); 1236 on_each_cpu(mpc85xx_mc_restore_hid1, NULL, 0);
1253 } 1237 }
1254#endif 1238#endif
1255#ifdef CONFIG_PCI
1256 platform_driver_unregister(&mpc85xx_pci_err_driver);
1257#endif
1258 platform_driver_unregister(&mpc85xx_l2_err_driver); 1239 platform_driver_unregister(&mpc85xx_l2_err_driver);
1259 platform_driver_unregister(&mpc85xx_mc_err_driver); 1240 platform_driver_unregister(&mpc85xx_mc_err_driver);
1260} 1241}
diff --git a/drivers/infiniband/hw/ehca/ehca_cq.c b/drivers/infiniband/hw/ehca/ehca_cq.c
index d9b0ebcb67d7..8f5290147e8a 100644
--- a/drivers/infiniband/hw/ehca/ehca_cq.c
+++ b/drivers/infiniband/hw/ehca/ehca_cq.c
@@ -220,7 +220,7 @@ struct ib_cq *ehca_create_cq(struct ib_device *device, int cqe, int comp_vector,
220 cq = ERR_PTR(-EAGAIN); 220 cq = ERR_PTR(-EAGAIN);
221 goto create_cq_exit4; 221 goto create_cq_exit4;
222 } 222 }
223 rpage = virt_to_abs(vpage); 223 rpage = __pa(vpage);
224 224
225 h_ret = hipz_h_register_rpage_cq(adapter_handle, 225 h_ret = hipz_h_register_rpage_cq(adapter_handle,
226 my_cq->ipz_cq_handle, 226 my_cq->ipz_cq_handle,
diff --git a/drivers/infiniband/hw/ehca/ehca_eq.c b/drivers/infiniband/hw/ehca/ehca_eq.c
index 818d721fc448..90da6747d395 100644
--- a/drivers/infiniband/hw/ehca/ehca_eq.c
+++ b/drivers/infiniband/hw/ehca/ehca_eq.c
@@ -101,7 +101,7 @@ int ehca_create_eq(struct ehca_shca *shca,
101 if (!vpage) 101 if (!vpage)
102 goto create_eq_exit2; 102 goto create_eq_exit2;
103 103
104 rpage = virt_to_abs(vpage); 104 rpage = __pa(vpage);
105 h_ret = hipz_h_register_rpage_eq(shca->ipz_hca_handle, 105 h_ret = hipz_h_register_rpage_eq(shca->ipz_hca_handle,
106 eq->ipz_eq_handle, 106 eq->ipz_eq_handle,
107 &eq->pf, 107 &eq->pf,
diff --git a/drivers/infiniband/hw/ehca/ehca_mrmw.c b/drivers/infiniband/hw/ehca/ehca_mrmw.c
index b781b2cb0624..87844869dcc2 100644
--- a/drivers/infiniband/hw/ehca/ehca_mrmw.c
+++ b/drivers/infiniband/hw/ehca/ehca_mrmw.c
@@ -1136,7 +1136,7 @@ int ehca_reg_mr_rpages(struct ehca_shca *shca,
1136 } 1136 }
1137 1137
1138 if (rnum > 1) { 1138 if (rnum > 1) {
1139 rpage = virt_to_abs(kpage); 1139 rpage = __pa(kpage);
1140 if (!rpage) { 1140 if (!rpage) {
1141 ehca_err(&shca->ib_device, "kpage=%p i=%x", 1141 ehca_err(&shca->ib_device, "kpage=%p i=%x",
1142 kpage, i); 1142 kpage, i);
@@ -1231,7 +1231,7 @@ inline int ehca_rereg_mr_rereg1(struct ehca_shca *shca,
1231 pginfo->num_kpages, pginfo->num_hwpages, kpage); 1231 pginfo->num_kpages, pginfo->num_hwpages, kpage);
1232 goto ehca_rereg_mr_rereg1_exit1; 1232 goto ehca_rereg_mr_rereg1_exit1;
1233 } 1233 }
1234 rpage = virt_to_abs(kpage); 1234 rpage = __pa(kpage);
1235 if (!rpage) { 1235 if (!rpage) {
1236 ehca_err(&shca->ib_device, "kpage=%p", kpage); 1236 ehca_err(&shca->ib_device, "kpage=%p", kpage);
1237 ret = -EFAULT; 1237 ret = -EFAULT;
@@ -1525,7 +1525,7 @@ static inline void *ehca_calc_sectbase(int top, int dir, int idx)
1525 unsigned long ret = idx; 1525 unsigned long ret = idx;
1526 ret |= dir << EHCA_DIR_INDEX_SHIFT; 1526 ret |= dir << EHCA_DIR_INDEX_SHIFT;
1527 ret |= top << EHCA_TOP_INDEX_SHIFT; 1527 ret |= top << EHCA_TOP_INDEX_SHIFT;
1528 return abs_to_virt(ret << SECTION_SIZE_BITS); 1528 return __va(ret << SECTION_SIZE_BITS);
1529} 1529}
1530 1530
1531#define ehca_bmap_valid(entry) \ 1531#define ehca_bmap_valid(entry) \
@@ -1537,7 +1537,7 @@ static u64 ehca_reg_mr_section(int top, int dir, int idx, u64 *kpage,
1537{ 1537{
1538 u64 h_ret = 0; 1538 u64 h_ret = 0;
1539 unsigned long page = 0; 1539 unsigned long page = 0;
1540 u64 rpage = virt_to_abs(kpage); 1540 u64 rpage = __pa(kpage);
1541 int page_count; 1541 int page_count;
1542 1542
1543 void *sectbase = ehca_calc_sectbase(top, dir, idx); 1543 void *sectbase = ehca_calc_sectbase(top, dir, idx);
@@ -1553,7 +1553,7 @@ static u64 ehca_reg_mr_section(int top, int dir, int idx, u64 *kpage,
1553 for (rnum = 0; (rnum < MAX_RPAGES) && (page < page_count); 1553 for (rnum = 0; (rnum < MAX_RPAGES) && (page < page_count);
1554 rnum++) { 1554 rnum++) {
1555 void *pg = sectbase + ((page++) * pginfo->hwpage_size); 1555 void *pg = sectbase + ((page++) * pginfo->hwpage_size);
1556 kpage[rnum] = virt_to_abs(pg); 1556 kpage[rnum] = __pa(pg);
1557 } 1557 }
1558 1558
1559 h_ret = hipz_h_register_rpage_mr(shca->ipz_hca_handle, mr, 1559 h_ret = hipz_h_register_rpage_mr(shca->ipz_hca_handle, mr,
@@ -1870,9 +1870,8 @@ static int ehca_set_pagebuf_user1(struct ehca_mr_pginfo *pginfo,
1870 for (i = pginfo->u.usr.next_nmap; i < chunk->nmap; ) { 1870 for (i = pginfo->u.usr.next_nmap; i < chunk->nmap; ) {
1871 pgaddr = page_to_pfn(sg_page(&chunk->page_list[i])) 1871 pgaddr = page_to_pfn(sg_page(&chunk->page_list[i]))
1872 << PAGE_SHIFT ; 1872 << PAGE_SHIFT ;
1873 *kpage = phys_to_abs(pgaddr + 1873 *kpage = pgaddr + (pginfo->next_hwpage *
1874 (pginfo->next_hwpage * 1874 pginfo->hwpage_size);
1875 pginfo->hwpage_size));
1876 if ( !(*kpage) ) { 1875 if ( !(*kpage) ) {
1877 ehca_gen_err("pgaddr=%llx " 1876 ehca_gen_err("pgaddr=%llx "
1878 "chunk->page_list[i]=%llx " 1877 "chunk->page_list[i]=%llx "
@@ -1927,7 +1926,7 @@ static int ehca_check_kpages_per_ate(struct scatterlist *page_list,
1927 u64 pgaddr = page_to_pfn(sg_page(&page_list[t])) << PAGE_SHIFT; 1926 u64 pgaddr = page_to_pfn(sg_page(&page_list[t])) << PAGE_SHIFT;
1928 if (ehca_debug_level >= 3) 1927 if (ehca_debug_level >= 3)
1929 ehca_gen_dbg("chunk_page=%llx value=%016llx", pgaddr, 1928 ehca_gen_dbg("chunk_page=%llx value=%016llx", pgaddr,
1930 *(u64 *)abs_to_virt(phys_to_abs(pgaddr))); 1929 *(u64 *)__va(pgaddr));
1931 if (pgaddr - PAGE_SIZE != *prev_pgaddr) { 1930 if (pgaddr - PAGE_SIZE != *prev_pgaddr) {
1932 ehca_gen_err("uncontiguous page found pgaddr=%llx " 1931 ehca_gen_err("uncontiguous page found pgaddr=%llx "
1933 "prev_pgaddr=%llx page_list_i=%x", 1932 "prev_pgaddr=%llx page_list_i=%x",
@@ -1962,7 +1961,7 @@ static int ehca_set_pagebuf_user2(struct ehca_mr_pginfo *pginfo,
1962 if (nr_kpages == kpages_per_hwpage) { 1961 if (nr_kpages == kpages_per_hwpage) {
1963 pgaddr = ( page_to_pfn(sg_page(&chunk->page_list[i])) 1962 pgaddr = ( page_to_pfn(sg_page(&chunk->page_list[i]))
1964 << PAGE_SHIFT ); 1963 << PAGE_SHIFT );
1965 *kpage = phys_to_abs(pgaddr); 1964 *kpage = pgaddr;
1966 if ( !(*kpage) ) { 1965 if ( !(*kpage) ) {
1967 ehca_gen_err("pgaddr=%llx i=%x", 1966 ehca_gen_err("pgaddr=%llx i=%x",
1968 pgaddr, i); 1967 pgaddr, i);
@@ -1990,13 +1989,11 @@ static int ehca_set_pagebuf_user2(struct ehca_mr_pginfo *pginfo,
1990 (pginfo->hwpage_size - 1)) >> 1989 (pginfo->hwpage_size - 1)) >>
1991 PAGE_SHIFT; 1990 PAGE_SHIFT;
1992 nr_kpages -= pginfo->kpage_cnt; 1991 nr_kpages -= pginfo->kpage_cnt;
1993 *kpage = phys_to_abs( 1992 *kpage = pgaddr &
1994 pgaddr & 1993 ~(pginfo->hwpage_size - 1);
1995 ~(pginfo->hwpage_size - 1));
1996 } 1994 }
1997 if (ehca_debug_level >= 3) { 1995 if (ehca_debug_level >= 3) {
1998 u64 val = *(u64 *)abs_to_virt( 1996 u64 val = *(u64 *)__va(pgaddr);
1999 phys_to_abs(pgaddr));
2000 ehca_gen_dbg("kpage=%llx chunk_page=%llx " 1997 ehca_gen_dbg("kpage=%llx chunk_page=%llx "
2001 "value=%016llx", 1998 "value=%016llx",
2002 *kpage, pgaddr, val); 1999 *kpage, pgaddr, val);
@@ -2084,9 +2081,8 @@ static int ehca_set_pagebuf_phys(struct ehca_mr_pginfo *pginfo,
2084 pginfo->num_hwpages, i); 2081 pginfo->num_hwpages, i);
2085 return -EFAULT; 2082 return -EFAULT;
2086 } 2083 }
2087 *kpage = phys_to_abs( 2084 *kpage = (pbuf->addr & ~(pginfo->hwpage_size - 1)) +
2088 (pbuf->addr & ~(pginfo->hwpage_size - 1)) + 2085 (pginfo->next_hwpage * pginfo->hwpage_size);
2089 (pginfo->next_hwpage * pginfo->hwpage_size));
2090 if ( !(*kpage) && pbuf->addr ) { 2086 if ( !(*kpage) && pbuf->addr ) {
2091 ehca_gen_err("pbuf->addr=%llx pbuf->size=%llx " 2087 ehca_gen_err("pbuf->addr=%llx pbuf->size=%llx "
2092 "next_hwpage=%llx", pbuf->addr, 2088 "next_hwpage=%llx", pbuf->addr,
@@ -2124,8 +2120,8 @@ static int ehca_set_pagebuf_fmr(struct ehca_mr_pginfo *pginfo,
2124 /* loop over desired page_list entries */ 2120 /* loop over desired page_list entries */
2125 fmrlist = pginfo->u.fmr.page_list + pginfo->u.fmr.next_listelem; 2121 fmrlist = pginfo->u.fmr.page_list + pginfo->u.fmr.next_listelem;
2126 for (i = 0; i < number; i++) { 2122 for (i = 0; i < number; i++) {
2127 *kpage = phys_to_abs((*fmrlist & ~(pginfo->hwpage_size - 1)) + 2123 *kpage = (*fmrlist & ~(pginfo->hwpage_size - 1)) +
2128 pginfo->next_hwpage * pginfo->hwpage_size); 2124 pginfo->next_hwpage * pginfo->hwpage_size;
2129 if ( !(*kpage) ) { 2125 if ( !(*kpage) ) {
2130 ehca_gen_err("*fmrlist=%llx fmrlist=%p " 2126 ehca_gen_err("*fmrlist=%llx fmrlist=%p "
2131 "next_listelem=%llx next_hwpage=%llx", 2127 "next_listelem=%llx next_hwpage=%llx",
@@ -2152,8 +2148,7 @@ static int ehca_set_pagebuf_fmr(struct ehca_mr_pginfo *pginfo,
2152 u64 prev = *kpage; 2148 u64 prev = *kpage;
2153 /* check if adrs are contiguous */ 2149 /* check if adrs are contiguous */
2154 for (j = 1; j < cnt_per_hwpage; j++) { 2150 for (j = 1; j < cnt_per_hwpage; j++) {
2155 u64 p = phys_to_abs(fmrlist[j] & 2151 u64 p = fmrlist[j] & ~(pginfo->hwpage_size - 1);
2156 ~(pginfo->hwpage_size - 1));
2157 if (prev + pginfo->u.fmr.fmr_pgsize != p) { 2152 if (prev + pginfo->u.fmr.fmr_pgsize != p) {
2158 ehca_gen_err("uncontiguous fmr pages " 2153 ehca_gen_err("uncontiguous fmr pages "
2159 "found prev=%llx p=%llx " 2154 "found prev=%llx p=%llx "
@@ -2388,8 +2383,8 @@ static int ehca_update_busmap(unsigned long pfn, unsigned long nr_pages)
2388 memset(ehca_bmap, 0xFF, EHCA_TOP_MAP_SIZE); 2383 memset(ehca_bmap, 0xFF, EHCA_TOP_MAP_SIZE);
2389 } 2384 }
2390 2385
2391 start_section = phys_to_abs(pfn * PAGE_SIZE) / EHCA_SECTSIZE; 2386 start_section = (pfn * PAGE_SIZE) / EHCA_SECTSIZE;
2392 end_section = phys_to_abs((pfn + nr_pages) * PAGE_SIZE) / EHCA_SECTSIZE; 2387 end_section = ((pfn + nr_pages) * PAGE_SIZE) / EHCA_SECTSIZE;
2393 for (i = start_section; i < end_section; i++) { 2388 for (i = start_section; i < end_section; i++) {
2394 int ret; 2389 int ret;
2395 top = ehca_calc_index(i, EHCA_TOP_INDEX_SHIFT); 2390 top = ehca_calc_index(i, EHCA_TOP_INDEX_SHIFT);
@@ -2508,7 +2503,7 @@ static u64 ehca_map_vaddr(void *caddr)
2508 if (!ehca_bmap) 2503 if (!ehca_bmap)
2509 return EHCA_INVAL_ADDR; 2504 return EHCA_INVAL_ADDR;
2510 2505
2511 abs_addr = virt_to_abs(caddr); 2506 abs_addr = __pa(caddr);
2512 top = ehca_calc_index(abs_addr, EHCA_TOP_INDEX_SHIFT + EHCA_SECTSHIFT); 2507 top = ehca_calc_index(abs_addr, EHCA_TOP_INDEX_SHIFT + EHCA_SECTSHIFT);
2513 if (!ehca_bmap_valid(ehca_bmap->top[top])) 2508 if (!ehca_bmap_valid(ehca_bmap->top[top]))
2514 return EHCA_INVAL_ADDR; 2509 return EHCA_INVAL_ADDR;
diff --git a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/ehca_qp.c
index 964f85520798..149393915ae5 100644
--- a/drivers/infiniband/hw/ehca/ehca_qp.c
+++ b/drivers/infiniband/hw/ehca/ehca_qp.c
@@ -321,7 +321,7 @@ static inline int init_qp_queue(struct ehca_shca *shca,
321 ret = -EINVAL; 321 ret = -EINVAL;
322 goto init_qp_queue1; 322 goto init_qp_queue1;
323 } 323 }
324 rpage = virt_to_abs(vpage); 324 rpage = __pa(vpage);
325 325
326 h_ret = hipz_h_register_rpage_qp(ipz_hca_handle, 326 h_ret = hipz_h_register_rpage_qp(ipz_hca_handle,
327 my_qp->ipz_qp_handle, 327 my_qp->ipz_qp_handle,
@@ -1094,7 +1094,7 @@ static int prepare_sqe_rts(struct ehca_qp *my_qp, struct ehca_shca *shca,
1094 ehca_dbg(&shca->ib_device, "qp_num=%x bad_send_wqe_p=%p", 1094 ehca_dbg(&shca->ib_device, "qp_num=%x bad_send_wqe_p=%p",
1095 qp_num, bad_send_wqe_p); 1095 qp_num, bad_send_wqe_p);
1096 /* convert wqe pointer to vadr */ 1096 /* convert wqe pointer to vadr */
1097 bad_send_wqe_v = abs_to_virt((u64)bad_send_wqe_p); 1097 bad_send_wqe_v = __va((u64)bad_send_wqe_p);
1098 if (ehca_debug_level >= 2) 1098 if (ehca_debug_level >= 2)
1099 ehca_dmp(bad_send_wqe_v, 32, "qp_num=%x bad_wqe", qp_num); 1099 ehca_dmp(bad_send_wqe_v, 32, "qp_num=%x bad_wqe", qp_num);
1100 squeue = &my_qp->ipz_squeue; 1100 squeue = &my_qp->ipz_squeue;
@@ -1138,7 +1138,7 @@ static int calc_left_cqes(u64 wqe_p, struct ipz_queue *ipz_queue,
1138 /* convert real to abs address */ 1138 /* convert real to abs address */
1139 wqe_p = wqe_p & (~(1UL << 63)); 1139 wqe_p = wqe_p & (~(1UL << 63));
1140 1140
1141 wqe_v = abs_to_virt(wqe_p); 1141 wqe_v = __va(wqe_p);
1142 1142
1143 if (ipz_queue_abs_to_offset(ipz_queue, wqe_p, &q_ofs)) { 1143 if (ipz_queue_abs_to_offset(ipz_queue, wqe_p, &q_ofs)) {
1144 ehca_gen_err("Invalid offset for calculating left cqes " 1144 ehca_gen_err("Invalid offset for calculating left cqes "
diff --git a/drivers/infiniband/hw/ehca/ehca_reqs.c b/drivers/infiniband/hw/ehca/ehca_reqs.c
index fd05f48f6b0b..47f94984353d 100644
--- a/drivers/infiniband/hw/ehca/ehca_reqs.c
+++ b/drivers/infiniband/hw/ehca/ehca_reqs.c
@@ -135,7 +135,7 @@ static void trace_send_wr_ud(const struct ib_send_wr *send_wr)
135 mad_hdr->attr_mod); 135 mad_hdr->attr_mod);
136 } 136 }
137 for (j = 0; j < send_wr->num_sge; j++) { 137 for (j = 0; j < send_wr->num_sge; j++) {
138 u8 *data = (u8 *)abs_to_virt(sge->addr); 138 u8 *data = __va(sge->addr);
139 ehca_gen_dbg("send_wr#%x sge#%x addr=%p length=%x " 139 ehca_gen_dbg("send_wr#%x sge#%x addr=%p length=%x "
140 "lkey=%x", 140 "lkey=%x",
141 idx, j, data, sge->length, sge->lkey); 141 idx, j, data, sge->length, sge->lkey);
diff --git a/drivers/infiniband/hw/ehca/ehca_tools.h b/drivers/infiniband/hw/ehca/ehca_tools.h
index 54c0d23bad92..d280b12aae64 100644
--- a/drivers/infiniband/hw/ehca/ehca_tools.h
+++ b/drivers/infiniband/hw/ehca/ehca_tools.h
@@ -59,7 +59,6 @@
59#include <linux/device.h> 59#include <linux/device.h>
60 60
61#include <linux/atomic.h> 61#include <linux/atomic.h>
62#include <asm/abs_addr.h>
63#include <asm/ibmebus.h> 62#include <asm/ibmebus.h>
64#include <asm/io.h> 63#include <asm/io.h>
65#include <asm/pgtable.h> 64#include <asm/pgtable.h>
diff --git a/drivers/infiniband/hw/ehca/hcp_if.c b/drivers/infiniband/hw/ehca/hcp_if.c
index e6f9cdd94c7a..2d41d04fd959 100644
--- a/drivers/infiniband/hw/ehca/hcp_if.c
+++ b/drivers/infiniband/hw/ehca/hcp_if.c
@@ -396,7 +396,7 @@ u64 hipz_h_query_port(const struct ipz_adapter_handle adapter_handle,
396 struct hipz_query_port *query_port_response_block) 396 struct hipz_query_port *query_port_response_block)
397{ 397{
398 u64 ret; 398 u64 ret;
399 u64 r_cb = virt_to_abs(query_port_response_block); 399 u64 r_cb = __pa(query_port_response_block);
400 400
401 if (r_cb & (EHCA_PAGESIZE-1)) { 401 if (r_cb & (EHCA_PAGESIZE-1)) {
402 ehca_gen_err("response block not page aligned"); 402 ehca_gen_err("response block not page aligned");
@@ -438,7 +438,7 @@ u64 hipz_h_modify_port(const struct ipz_adapter_handle adapter_handle,
438u64 hipz_h_query_hca(const struct ipz_adapter_handle adapter_handle, 438u64 hipz_h_query_hca(const struct ipz_adapter_handle adapter_handle,
439 struct hipz_query_hca *query_hca_rblock) 439 struct hipz_query_hca *query_hca_rblock)
440{ 440{
441 u64 r_cb = virt_to_abs(query_hca_rblock); 441 u64 r_cb = __pa(query_hca_rblock);
442 442
443 if (r_cb & (EHCA_PAGESIZE-1)) { 443 if (r_cb & (EHCA_PAGESIZE-1)) {
444 ehca_gen_err("response_block=%p not page aligned", 444 ehca_gen_err("response_block=%p not page aligned",
@@ -577,7 +577,7 @@ u64 hipz_h_modify_qp(const struct ipz_adapter_handle adapter_handle,
577 adapter_handle.handle, /* r4 */ 577 adapter_handle.handle, /* r4 */
578 qp_handle.handle, /* r5 */ 578 qp_handle.handle, /* r5 */
579 update_mask, /* r6 */ 579 update_mask, /* r6 */
580 virt_to_abs(mqpcb), /* r7 */ 580 __pa(mqpcb), /* r7 */
581 0, 0, 0, 0, 0); 581 0, 0, 0, 0, 0);
582 582
583 if (ret == H_NOT_ENOUGH_RESOURCES) 583 if (ret == H_NOT_ENOUGH_RESOURCES)
@@ -595,7 +595,7 @@ u64 hipz_h_query_qp(const struct ipz_adapter_handle adapter_handle,
595 return ehca_plpar_hcall_norets(H_QUERY_QP, 595 return ehca_plpar_hcall_norets(H_QUERY_QP,
596 adapter_handle.handle, /* r4 */ 596 adapter_handle.handle, /* r4 */
597 qp_handle.handle, /* r5 */ 597 qp_handle.handle, /* r5 */
598 virt_to_abs(qqpcb), /* r6 */ 598 __pa(qqpcb), /* r6 */
599 0, 0, 0, 0); 599 0, 0, 0, 0);
600} 600}
601 601
@@ -787,7 +787,7 @@ u64 hipz_h_register_rpage_mr(const struct ipz_adapter_handle adapter_handle,
787 if (count > 1) { 787 if (count > 1) {
788 u64 *kpage; 788 u64 *kpage;
789 int i; 789 int i;
790 kpage = (u64 *)abs_to_virt(logical_address_of_page); 790 kpage = __va(logical_address_of_page);
791 for (i = 0; i < count; i++) 791 for (i = 0; i < count; i++)
792 ehca_gen_dbg("kpage[%d]=%p", 792 ehca_gen_dbg("kpage[%d]=%p",
793 i, (void *)kpage[i]); 793 i, (void *)kpage[i]);
@@ -944,7 +944,7 @@ u64 hipz_h_error_data(const struct ipz_adapter_handle adapter_handle,
944 void *rblock, 944 void *rblock,
945 unsigned long *byte_count) 945 unsigned long *byte_count)
946{ 946{
947 u64 r_cb = virt_to_abs(rblock); 947 u64 r_cb = __pa(rblock);
948 948
949 if (r_cb & (EHCA_PAGESIZE-1)) { 949 if (r_cb & (EHCA_PAGESIZE-1)) {
950 ehca_gen_err("rblock not page aligned."); 950 ehca_gen_err("rblock not page aligned.");
diff --git a/drivers/infiniband/hw/ehca/ipz_pt_fn.c b/drivers/infiniband/hw/ehca/ipz_pt_fn.c
index 1898d6e7cce5..62c71fadb4d9 100644
--- a/drivers/infiniband/hw/ehca/ipz_pt_fn.c
+++ b/drivers/infiniband/hw/ehca/ipz_pt_fn.c
@@ -81,7 +81,7 @@ int ipz_queue_abs_to_offset(struct ipz_queue *queue, u64 addr, u64 *q_offset)
81{ 81{
82 int i; 82 int i;
83 for (i = 0; i < queue->queue_length / queue->pagesize; i++) { 83 for (i = 0; i < queue->queue_length / queue->pagesize; i++) {
84 u64 page = (u64)virt_to_abs(queue->queue_pages[i]); 84 u64 page = __pa(queue->queue_pages[i]);
85 if (addr >= page && addr < page + queue->pagesize) { 85 if (addr >= page && addr < page + queue->pagesize) {
86 *q_offset = addr - page + i * queue->pagesize; 86 *q_offset = addr - page + i * queue->pagesize;
87 return 0; 87 return 0;
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c
index 54ac7ffacb40..7d5a6b40b31c 100644
--- a/drivers/macintosh/smu.c
+++ b/drivers/macintosh/smu.c
@@ -45,7 +45,6 @@
45#include <asm/pmac_feature.h> 45#include <asm/pmac_feature.h>
46#include <asm/smu.h> 46#include <asm/smu.h>
47#include <asm/sections.h> 47#include <asm/sections.h>
48#include <asm/abs_addr.h>
49#include <asm/uaccess.h> 48#include <asm/uaccess.h>
50 49
51#define VERSION "0.7" 50#define VERSION "0.7"
@@ -502,7 +501,7 @@ int __init smu_init (void)
502 * 32 bits value safely 501 * 32 bits value safely
503 */ 502 */
504 smu->cmd_buf_abs = (u32)smu_cmdbuf_abs; 503 smu->cmd_buf_abs = (u32)smu_cmdbuf_abs;
505 smu->cmd_buf = (struct smu_cmd_buf *)abs_to_virt(smu_cmdbuf_abs); 504 smu->cmd_buf = __va(smu_cmdbuf_abs);
506 505
507 smu->db_node = of_find_node_by_name(NULL, "smu-doorbell"); 506 smu->db_node = of_find_node_by_name(NULL, "smu-doorbell");
508 if (smu->db_node == NULL) { 507 if (smu->db_node == NULL) {
diff --git a/drivers/mtd/nand/fsl_ifc_nand.c b/drivers/mtd/nand/fsl_ifc_nand.c
index 9602c1b7e27e..01e2f2e87d8c 100644
--- a/drivers/mtd/nand/fsl_ifc_nand.c
+++ b/drivers/mtd/nand/fsl_ifc_nand.c
@@ -31,6 +31,7 @@
31#include <linux/mtd/nand_ecc.h> 31#include <linux/mtd/nand_ecc.h>
32#include <asm/fsl_ifc.h> 32#include <asm/fsl_ifc.h>
33 33
34#define FSL_IFC_V1_1_0 0x01010000
34#define ERR_BYTE 0xFF /* Value returned for read 35#define ERR_BYTE 0xFF /* Value returned for read
35 bytes when read failed */ 36 bytes when read failed */
36#define IFC_TIMEOUT_MSECS 500 /* Maximum number of mSecs to wait 37#define IFC_TIMEOUT_MSECS 500 /* Maximum number of mSecs to wait
@@ -773,13 +774,62 @@ static int fsl_ifc_chip_init_tail(struct mtd_info *mtd)
773 return 0; 774 return 0;
774} 775}
775 776
777static void fsl_ifc_sram_init(struct fsl_ifc_mtd *priv)
778{
779 struct fsl_ifc_ctrl *ctrl = priv->ctrl;
780 struct fsl_ifc_regs __iomem *ifc = ctrl->regs;
781 uint32_t csor = 0, csor_8k = 0, csor_ext = 0;
782 uint32_t cs = priv->bank;
783
784 /* Save CSOR and CSOR_ext */
785 csor = in_be32(&ifc->csor_cs[cs].csor);
786 csor_ext = in_be32(&ifc->csor_cs[cs].csor_ext);
787
788 /* chage PageSize 8K and SpareSize 1K*/
789 csor_8k = (csor & ~(CSOR_NAND_PGS_MASK)) | 0x0018C000;
790 out_be32(&ifc->csor_cs[cs].csor, csor_8k);
791 out_be32(&ifc->csor_cs[cs].csor_ext, 0x0000400);
792
793 /* READID */
794 out_be32(&ifc->ifc_nand.nand_fir0,
795 (IFC_FIR_OP_CMD0 << IFC_NAND_FIR0_OP0_SHIFT) |
796 (IFC_FIR_OP_UA << IFC_NAND_FIR0_OP1_SHIFT) |
797 (IFC_FIR_OP_RB << IFC_NAND_FIR0_OP2_SHIFT));
798 out_be32(&ifc->ifc_nand.nand_fcr0,
799 NAND_CMD_READID << IFC_NAND_FCR0_CMD0_SHIFT);
800 out_be32(&ifc->ifc_nand.row3, 0x0);
801
802 out_be32(&ifc->ifc_nand.nand_fbcr, 0x0);
803
804 /* Program ROW0/COL0 */
805 out_be32(&ifc->ifc_nand.row0, 0x0);
806 out_be32(&ifc->ifc_nand.col0, 0x0);
807
808 /* set the chip select for NAND Transaction */
809 out_be32(&ifc->ifc_nand.nand_csel, cs << IFC_NAND_CSEL_SHIFT);
810
811 /* start read seq */
812 out_be32(&ifc->ifc_nand.nandseq_strt, IFC_NAND_SEQ_STRT_FIR_STRT);
813
814 /* wait for command complete flag or timeout */
815 wait_event_timeout(ctrl->nand_wait, ctrl->nand_stat,
816 IFC_TIMEOUT_MSECS * HZ/1000);
817
818 if (ctrl->nand_stat != IFC_NAND_EVTER_STAT_OPC)
819 printk(KERN_ERR "fsl-ifc: Failed to Initialise SRAM\n");
820
821 /* Restore CSOR and CSOR_ext */
822 out_be32(&ifc->csor_cs[cs].csor, csor);
823 out_be32(&ifc->csor_cs[cs].csor_ext, csor_ext);
824}
825
776static int fsl_ifc_chip_init(struct fsl_ifc_mtd *priv) 826static int fsl_ifc_chip_init(struct fsl_ifc_mtd *priv)
777{ 827{
778 struct fsl_ifc_ctrl *ctrl = priv->ctrl; 828 struct fsl_ifc_ctrl *ctrl = priv->ctrl;
779 struct fsl_ifc_regs __iomem *ifc = ctrl->regs; 829 struct fsl_ifc_regs __iomem *ifc = ctrl->regs;
780 struct nand_chip *chip = &priv->chip; 830 struct nand_chip *chip = &priv->chip;
781 struct nand_ecclayout *layout; 831 struct nand_ecclayout *layout;
782 u32 csor; 832 u32 csor, ver;
783 833
784 /* Fill in fsl_ifc_mtd structure */ 834 /* Fill in fsl_ifc_mtd structure */
785 priv->mtd.priv = chip; 835 priv->mtd.priv = chip;
@@ -874,6 +924,10 @@ static int fsl_ifc_chip_init(struct fsl_ifc_mtd *priv)
874 chip->ecc.mode = NAND_ECC_SOFT; 924 chip->ecc.mode = NAND_ECC_SOFT;
875 } 925 }
876 926
927 ver = in_be32(&ifc->ifc_rev);
928 if (ver == FSL_IFC_V1_1_0)
929 fsl_ifc_sram_init(priv);
930
877 return 0; 931 return 0;
878} 932}
879 933
diff --git a/drivers/net/ethernet/ibm/ehea/ehea.h b/drivers/net/ethernet/ibm/ehea/ehea.h
index b8e46cc31e53..6be7b9839f35 100644
--- a/drivers/net/ethernet/ibm/ehea/ehea.h
+++ b/drivers/net/ethernet/ibm/ehea/ehea.h
@@ -35,7 +35,6 @@
35#include <linux/if_vlan.h> 35#include <linux/if_vlan.h>
36 36
37#include <asm/ibmebus.h> 37#include <asm/ibmebus.h>
38#include <asm/abs_addr.h>
39#include <asm/io.h> 38#include <asm/io.h>
40 39
41#define DRV_NAME "ehea" 40#define DRV_NAME "ehea"
diff --git a/drivers/net/ethernet/ibm/ehea/ehea_phyp.c b/drivers/net/ethernet/ibm/ehea/ehea_phyp.c
index 30f903332e92..d3a130ccdcc8 100644
--- a/drivers/net/ethernet/ibm/ehea/ehea_phyp.c
+++ b/drivers/net/ethernet/ibm/ehea/ehea_phyp.c
@@ -141,7 +141,7 @@ u64 ehea_h_query_ehea_qp(const u64 adapter_handle, const u8 qp_category,
141 qp_category, /* R5 */ 141 qp_category, /* R5 */
142 qp_handle, /* R6 */ 142 qp_handle, /* R6 */
143 sel_mask, /* R7 */ 143 sel_mask, /* R7 */
144 virt_to_abs(cb_addr), /* R8 */ 144 __pa(cb_addr), /* R8 */
145 0, 0); 145 0, 0);
146} 146}
147 147
@@ -415,7 +415,7 @@ u64 ehea_h_modify_ehea_qp(const u64 adapter_handle, const u8 cat,
415 (u64) cat, /* R5 */ 415 (u64) cat, /* R5 */
416 qp_handle, /* R6 */ 416 qp_handle, /* R6 */
417 sel_mask, /* R7 */ 417 sel_mask, /* R7 */
418 virt_to_abs(cb_addr), /* R8 */ 418 __pa(cb_addr), /* R8 */
419 0, 0, 0, 0); /* R9-R12 */ 419 0, 0, 0, 0); /* R9-R12 */
420 420
421 *inv_attr_id = outs[0]; 421 *inv_attr_id = outs[0];
@@ -528,7 +528,7 @@ u64 ehea_h_query_ehea(const u64 adapter_handle, void *cb_addr)
528{ 528{
529 u64 hret, cb_logaddr; 529 u64 hret, cb_logaddr;
530 530
531 cb_logaddr = virt_to_abs(cb_addr); 531 cb_logaddr = __pa(cb_addr);
532 532
533 hret = ehea_plpar_hcall_norets(H_QUERY_HEA, 533 hret = ehea_plpar_hcall_norets(H_QUERY_HEA,
534 adapter_handle, /* R4 */ 534 adapter_handle, /* R4 */
@@ -545,7 +545,7 @@ u64 ehea_h_query_ehea_port(const u64 adapter_handle, const u16 port_num,
545 void *cb_addr) 545 void *cb_addr)
546{ 546{
547 u64 port_info; 547 u64 port_info;
548 u64 cb_logaddr = virt_to_abs(cb_addr); 548 u64 cb_logaddr = __pa(cb_addr);
549 u64 arr_index = 0; 549 u64 arr_index = 0;
550 550
551 port_info = EHEA_BMASK_SET(H_MEHEAPORT_CAT, cb_cat) 551 port_info = EHEA_BMASK_SET(H_MEHEAPORT_CAT, cb_cat)
@@ -567,7 +567,7 @@ u64 ehea_h_modify_ehea_port(const u64 adapter_handle, const u16 port_num,
567 unsigned long outs[PLPAR_HCALL9_BUFSIZE]; 567 unsigned long outs[PLPAR_HCALL9_BUFSIZE];
568 u64 port_info; 568 u64 port_info;
569 u64 arr_index = 0; 569 u64 arr_index = 0;
570 u64 cb_logaddr = virt_to_abs(cb_addr); 570 u64 cb_logaddr = __pa(cb_addr);
571 571
572 port_info = EHEA_BMASK_SET(H_MEHEAPORT_CAT, cb_cat) 572 port_info = EHEA_BMASK_SET(H_MEHEAPORT_CAT, cb_cat)
573 | EHEA_BMASK_SET(H_MEHEAPORT_PN, port_num); 573 | EHEA_BMASK_SET(H_MEHEAPORT_PN, port_num);
@@ -621,6 +621,6 @@ u64 ehea_h_error_data(const u64 adapter_handle, const u64 ressource_handle,
621 return ehea_plpar_hcall_norets(H_ERROR_DATA, 621 return ehea_plpar_hcall_norets(H_ERROR_DATA,
622 adapter_handle, /* R4 */ 622 adapter_handle, /* R4 */
623 ressource_handle, /* R5 */ 623 ressource_handle, /* R5 */
624 virt_to_abs(rblock), /* R6 */ 624 __pa(rblock), /* R6 */
625 0, 0, 0, 0); /* R7-R12 */ 625 0, 0, 0, 0); /* R7-R12 */
626} 626}
diff --git a/drivers/net/ethernet/ibm/ehea/ehea_qmr.c b/drivers/net/ethernet/ibm/ehea/ehea_qmr.c
index cb66f574dc97..27f881758d16 100644
--- a/drivers/net/ethernet/ibm/ehea/ehea_qmr.c
+++ b/drivers/net/ethernet/ibm/ehea/ehea_qmr.c
@@ -163,7 +163,7 @@ struct ehea_cq *ehea_create_cq(struct ehea_adapter *adapter,
163 goto out_kill_hwq; 163 goto out_kill_hwq;
164 } 164 }
165 165
166 rpage = virt_to_abs(vpage); 166 rpage = __pa(vpage);
167 hret = ehea_h_register_rpage(adapter->handle, 167 hret = ehea_h_register_rpage(adapter->handle,
168 0, EHEA_CQ_REGISTER_ORIG, 168 0, EHEA_CQ_REGISTER_ORIG,
169 cq->fw_handle, rpage, 1); 169 cq->fw_handle, rpage, 1);
@@ -290,7 +290,7 @@ struct ehea_eq *ehea_create_eq(struct ehea_adapter *adapter,
290 goto out_kill_hwq; 290 goto out_kill_hwq;
291 } 291 }
292 292
293 rpage = virt_to_abs(vpage); 293 rpage = __pa(vpage);
294 294
295 hret = ehea_h_register_rpage(adapter->handle, 0, 295 hret = ehea_h_register_rpage(adapter->handle, 0,
296 EHEA_EQ_REGISTER_ORIG, 296 EHEA_EQ_REGISTER_ORIG,
@@ -395,7 +395,7 @@ static int ehea_qp_alloc_register(struct ehea_qp *qp, struct hw_queue *hw_queue,
395 pr_err("hw_qpageit_get_inc failed\n"); 395 pr_err("hw_qpageit_get_inc failed\n");
396 goto out_kill_hwq; 396 goto out_kill_hwq;
397 } 397 }
398 rpage = virt_to_abs(vpage); 398 rpage = __pa(vpage);
399 hret = ehea_h_register_rpage(adapter->handle, 399 hret = ehea_h_register_rpage(adapter->handle,
400 0, h_call_q_selector, 400 0, h_call_q_selector,
401 qp->fw_handle, rpage, 1); 401 qp->fw_handle, rpage, 1);
@@ -790,7 +790,7 @@ u64 ehea_map_vaddr(void *caddr)
790 if (!ehea_bmap) 790 if (!ehea_bmap)
791 return EHEA_INVAL_ADDR; 791 return EHEA_INVAL_ADDR;
792 792
793 index = virt_to_abs(caddr) >> SECTION_SIZE_BITS; 793 index = __pa(caddr) >> SECTION_SIZE_BITS;
794 top = (index >> EHEA_TOP_INDEX_SHIFT) & EHEA_INDEX_MASK; 794 top = (index >> EHEA_TOP_INDEX_SHIFT) & EHEA_INDEX_MASK;
795 if (!ehea_bmap->top[top]) 795 if (!ehea_bmap->top[top])
796 return EHEA_INVAL_ADDR; 796 return EHEA_INVAL_ADDR;
@@ -812,7 +812,7 @@ static inline void *ehea_calc_sectbase(int top, int dir, int idx)
812 unsigned long ret = idx; 812 unsigned long ret = idx;
813 ret |= dir << EHEA_DIR_INDEX_SHIFT; 813 ret |= dir << EHEA_DIR_INDEX_SHIFT;
814 ret |= top << EHEA_TOP_INDEX_SHIFT; 814 ret |= top << EHEA_TOP_INDEX_SHIFT;
815 return abs_to_virt(ret << SECTION_SIZE_BITS); 815 return __va(ret << SECTION_SIZE_BITS);
816} 816}
817 817
818static u64 ehea_reg_mr_section(int top, int dir, int idx, u64 *pt, 818static u64 ehea_reg_mr_section(int top, int dir, int idx, u64 *pt,
@@ -822,7 +822,7 @@ static u64 ehea_reg_mr_section(int top, int dir, int idx, u64 *pt,
822 void *pg; 822 void *pg;
823 u64 j, m, hret; 823 u64 j, m, hret;
824 unsigned long k = 0; 824 unsigned long k = 0;
825 u64 pt_abs = virt_to_abs(pt); 825 u64 pt_abs = __pa(pt);
826 826
827 void *sectbase = ehea_calc_sectbase(top, dir, idx); 827 void *sectbase = ehea_calc_sectbase(top, dir, idx);
828 828
@@ -830,7 +830,7 @@ static u64 ehea_reg_mr_section(int top, int dir, int idx, u64 *pt,
830 830
831 for (m = 0; m < EHEA_MAX_RPAGE; m++) { 831 for (m = 0; m < EHEA_MAX_RPAGE; m++) {
832 pg = sectbase + ((k++) * EHEA_PAGESIZE); 832 pg = sectbase + ((k++) * EHEA_PAGESIZE);
833 pt[m] = virt_to_abs(pg); 833 pt[m] = __pa(pg);
834 } 834 }
835 hret = ehea_h_register_rpage_mr(adapter->handle, mr->handle, 0, 835 hret = ehea_h_register_rpage_mr(adapter->handle, mr->handle, 0,
836 0, pt_abs, EHEA_MAX_RPAGE); 836 0, pt_abs, EHEA_MAX_RPAGE);
diff --git a/drivers/pci/hotplug/rpadlpar_core.c b/drivers/pci/hotplug/rpadlpar_core.c
index 1e117c2a3cad..b29e20b7862f 100644
--- a/drivers/pci/hotplug/rpadlpar_core.c
+++ b/drivers/pci/hotplug/rpadlpar_core.c
@@ -388,7 +388,7 @@ int dlpar_remove_pci_slot(char *drc_name, struct device_node *dn)
388 /* Remove the EADS bridge device itself */ 388 /* Remove the EADS bridge device itself */
389 BUG_ON(!bus->self); 389 BUG_ON(!bus->self);
390 pr_debug("PCI: Now removing bridge device %s\n", pci_name(bus->self)); 390 pr_debug("PCI: Now removing bridge device %s\n", pci_name(bus->self));
391 eeh_remove_bus_device(bus->self); 391 eeh_remove_bus_device(bus->self, true);
392 pci_stop_and_remove_bus_device(bus->self); 392 pci_stop_and_remove_bus_device(bus->self);
393 393
394 return 0; 394 return 0;
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index e3f29f61cbc3..fe6029f4df16 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -6373,14 +6373,14 @@ static struct ata_port_info sata_port_info = {
6373 6373
6374#ifdef CONFIG_PPC_PSERIES 6374#ifdef CONFIG_PPC_PSERIES
6375static const u16 ipr_blocked_processors[] = { 6375static const u16 ipr_blocked_processors[] = {
6376 PV_NORTHSTAR, 6376 PVR_NORTHSTAR,
6377 PV_PULSAR, 6377 PVR_PULSAR,
6378 PV_POWER4, 6378 PVR_POWER4,
6379 PV_ICESTAR, 6379 PVR_ICESTAR,
6380 PV_SSTAR, 6380 PVR_SSTAR,
6381 PV_POWER4p, 6381 PVR_POWER4p,
6382 PV_630, 6382 PVR_630,
6383 PV_630p 6383 PVR_630p
6384}; 6384};
6385 6385
6386/** 6386/**
@@ -6400,7 +6400,7 @@ static int ipr_invalid_adapter(struct ipr_ioa_cfg *ioa_cfg)
6400 6400
6401 if ((ioa_cfg->type == 0x5702) && (ioa_cfg->pdev->revision < 4)) { 6401 if ((ioa_cfg->type == 0x5702) && (ioa_cfg->pdev->revision < 4)) {
6402 for (i = 0; i < ARRAY_SIZE(ipr_blocked_processors); i++) { 6402 for (i = 0; i < ARRAY_SIZE(ipr_blocked_processors); i++) {
6403 if (__is_processor(ipr_blocked_processors[i])) 6403 if (pvr_version_is(ipr_blocked_processors[i]))
6404 return 1; 6404 return 1;
6405 } 6405 }
6406 } 6406 }
diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c
index 4a652999380f..a5dec1ca1b82 100644
--- a/drivers/tty/hvc/hvc_console.c
+++ b/drivers/tty/hvc/hvc_console.c
@@ -245,6 +245,20 @@ static void hvc_port_destruct(struct tty_port *port)
245 kfree(hp); 245 kfree(hp);
246} 246}
247 247
248static void hvc_check_console(int index)
249{
250 /* Already enabled, bail out */
251 if (hvc_console.flags & CON_ENABLED)
252 return;
253
254 /* If this index is what the user requested, then register
255 * now (setup won't fail at this point). It's ok to just
256 * call register again if previously .setup failed.
257 */
258 if (index == hvc_console.index)
259 register_console(&hvc_console);
260}
261
248/* 262/*
249 * hvc_instantiate() is an early console discovery method which locates 263 * hvc_instantiate() is an early console discovery method which locates
250 * consoles * prior to the vio subsystem discovering them. Hotplugged 264 * consoles * prior to the vio subsystem discovering them. Hotplugged
@@ -275,12 +289,8 @@ int hvc_instantiate(uint32_t vtermno, int index, const struct hv_ops *ops)
275 if (last_hvc < index) 289 if (last_hvc < index)
276 last_hvc = index; 290 last_hvc = index;
277 291
278 /* if this index is what the user requested, then register 292 /* check if we need to re-register the kernel console */
279 * now (setup won't fail at this point). It's ok to just 293 hvc_check_console(index);
280 * call register again if previously .setup failed.
281 */
282 if (index == hvc_console.index)
283 register_console(&hvc_console);
284 294
285 return 0; 295 return 0;
286} 296}
@@ -877,10 +887,15 @@ struct hvc_struct *hvc_alloc(uint32_t vtermno, int data,
877 i = ++last_hvc; 887 i = ++last_hvc;
878 888
879 hp->index = i; 889 hp->index = i;
890 cons_ops[i] = ops;
891 vtermnos[i] = vtermno;
880 892
881 list_add_tail(&(hp->next), &hvc_structs); 893 list_add_tail(&(hp->next), &hvc_structs);
882 spin_unlock(&hvc_structs_lock); 894 spin_unlock(&hvc_structs_lock);
883 895
896 /* check if we need to re-register the kernel console */
897 hvc_check_console(i);
898
884 return hp; 899 return hp;
885} 900}
886EXPORT_SYMBOL_GPL(hvc_alloc); 901EXPORT_SYMBOL_GPL(hvc_alloc);
@@ -893,8 +908,12 @@ int hvc_remove(struct hvc_struct *hp)
893 tty = tty_port_tty_get(&hp->port); 908 tty = tty_port_tty_get(&hp->port);
894 909
895 spin_lock_irqsave(&hp->lock, flags); 910 spin_lock_irqsave(&hp->lock, flags);
896 if (hp->index < MAX_NR_HVC_CONSOLES) 911 if (hp->index < MAX_NR_HVC_CONSOLES) {
912 console_lock();
897 vtermnos[hp->index] = -1; 913 vtermnos[hp->index] = -1;
914 cons_ops[hp->index] = NULL;
915 console_unlock();
916 }
898 917
899 /* Don't whack hp->irq because tty_hangup() will need to free the irq. */ 918 /* Don't whack hp->irq because tty_hangup() will need to free the irq. */
900 919
diff --git a/drivers/tty/hvc/hvc_vio.c b/drivers/tty/hvc/hvc_vio.c
index ee307799271a..070c0ee68642 100644
--- a/drivers/tty/hvc/hvc_vio.c
+++ b/drivers/tty/hvc/hvc_vio.c
@@ -230,6 +230,69 @@ static const struct hv_ops hvterm_hvsi_ops = {
230 .tiocmset = hvterm_hvsi_tiocmset, 230 .tiocmset = hvterm_hvsi_tiocmset,
231}; 231};
232 232
233static void udbg_hvc_putc(char c)
234{
235 int count = -1;
236
237 if (!hvterm_privs[0])
238 return;
239
240 if (c == '\n')
241 udbg_hvc_putc('\r');
242
243 do {
244 switch(hvterm_privs[0]->proto) {
245 case HV_PROTOCOL_RAW:
246 count = hvterm_raw_put_chars(0, &c, 1);
247 break;
248 case HV_PROTOCOL_HVSI:
249 count = hvterm_hvsi_put_chars(0, &c, 1);
250 break;
251 }
252 } while(count == 0);
253}
254
255static int udbg_hvc_getc_poll(void)
256{
257 int rc = 0;
258 char c;
259
260 if (!hvterm_privs[0])
261 return -1;
262
263 switch(hvterm_privs[0]->proto) {
264 case HV_PROTOCOL_RAW:
265 rc = hvterm_raw_get_chars(0, &c, 1);
266 break;
267 case HV_PROTOCOL_HVSI:
268 rc = hvterm_hvsi_get_chars(0, &c, 1);
269 break;
270 }
271 if (!rc)
272 return -1;
273 return c;
274}
275
276static int udbg_hvc_getc(void)
277{
278 int ch;
279
280 if (!hvterm_privs[0])
281 return -1;
282
283 for (;;) {
284 ch = udbg_hvc_getc_poll();
285 if (ch == -1) {
286 /* This shouldn't be needed...but... */
287 volatile unsigned long delay;
288 for (delay=0; delay < 2000000; delay++)
289 ;
290 } else {
291 return ch;
292 }
293 }
294}
295
233static int __devinit hvc_vio_probe(struct vio_dev *vdev, 296static int __devinit hvc_vio_probe(struct vio_dev *vdev,
234 const struct vio_device_id *id) 297 const struct vio_device_id *id)
235{ 298{
@@ -289,6 +352,13 @@ static int __devinit hvc_vio_probe(struct vio_dev *vdev,
289 return PTR_ERR(hp); 352 return PTR_ERR(hp);
290 dev_set_drvdata(&vdev->dev, hp); 353 dev_set_drvdata(&vdev->dev, hp);
291 354
355 /* register udbg if it's not there already for console 0 */
356 if (hp->index == 0 && !udbg_putc) {
357 udbg_putc = udbg_hvc_putc;
358 udbg_getc = udbg_hvc_getc;
359 udbg_getc_poll = udbg_hvc_getc_poll;
360 }
361
292 return 0; 362 return 0;
293} 363}
294 364
@@ -331,59 +401,6 @@ static void __exit hvc_vio_exit(void)
331} 401}
332module_exit(hvc_vio_exit); 402module_exit(hvc_vio_exit);
333 403
334static void udbg_hvc_putc(char c)
335{
336 int count = -1;
337
338 if (c == '\n')
339 udbg_hvc_putc('\r');
340
341 do {
342 switch(hvterm_priv0.proto) {
343 case HV_PROTOCOL_RAW:
344 count = hvterm_raw_put_chars(0, &c, 1);
345 break;
346 case HV_PROTOCOL_HVSI:
347 count = hvterm_hvsi_put_chars(0, &c, 1);
348 break;
349 }
350 } while(count == 0);
351}
352
353static int udbg_hvc_getc_poll(void)
354{
355 int rc = 0;
356 char c;
357
358 switch(hvterm_priv0.proto) {
359 case HV_PROTOCOL_RAW:
360 rc = hvterm_raw_get_chars(0, &c, 1);
361 break;
362 case HV_PROTOCOL_HVSI:
363 rc = hvterm_hvsi_get_chars(0, &c, 1);
364 break;
365 }
366 if (!rc)
367 return -1;
368 return c;
369}
370
371static int udbg_hvc_getc(void)
372{
373 int ch;
374 for (;;) {
375 ch = udbg_hvc_getc_poll();
376 if (ch == -1) {
377 /* This shouldn't be needed...but... */
378 volatile unsigned long delay;
379 for (delay=0; delay < 2000000; delay++)
380 ;
381 } else {
382 return ch;
383 }
384 }
385}
386
387void __init hvc_vio_init_early(void) 404void __init hvc_vio_init_early(void)
388{ 405{
389 struct device_node *stdout_node; 406 struct device_node *stdout_node;
diff --git a/drivers/video/ps3fb.c b/drivers/video/ps3fb.c
index 213fbbcf613b..4e292f29bf5d 100644
--- a/drivers/video/ps3fb.c
+++ b/drivers/video/ps3fb.c
@@ -31,7 +31,6 @@
31#include <linux/fb.h> 31#include <linux/fb.h>
32#include <linux/init.h> 32#include <linux/init.h>
33 33
34#include <asm/abs_addr.h>
35#include <asm/cell-regs.h> 34#include <asm/cell-regs.h>
36#include <asm/lv1call.h> 35#include <asm/lv1call.h>
37#include <asm/ps3av.h> 36#include <asm/ps3av.h>
@@ -1141,7 +1140,7 @@ static int __devinit ps3fb_probe(struct ps3_system_bus_device *dev)
1141 */ 1140 */
1142 fb_start = ps3fb_videomemory.address + GPU_FB_START; 1141 fb_start = ps3fb_videomemory.address + GPU_FB_START;
1143 info->screen_base = (char __force __iomem *)fb_start; 1142 info->screen_base = (char __force __iomem *)fb_start;
1144 info->fix.smem_start = virt_to_abs(fb_start); 1143 info->fix.smem_start = __pa(fb_start);
1145 info->fix.smem_len = ps3fb_videomemory.size - GPU_FB_START; 1144 info->fix.smem_len = ps3fb_videomemory.size - GPU_FB_START;
1146 1145
1147 info->pseudo_palette = par->pseudo_palette; 1146 info->pseudo_palette = par->pseudo_palette;