aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sparc64/kernel/pci_common.c4
-rw-r--r--arch/sparc64/kernel/prom.c3
-rw-r--r--arch/sparc64/kernel/smp.c2
-rw-r--r--arch/sparc64/kernel/vio.c29
-rw-r--r--arch/sparc64/lib/NGmemcpy.S8
-rw-r--r--drivers/net/r8169.c16
-rw-r--r--drivers/scsi/megaraid.c8
-rw-r--r--include/asm-x86_64/processor.h2
-rw-r--r--mm/memory.c14
9 files changed, 65 insertions, 21 deletions
diff --git a/arch/sparc64/kernel/pci_common.c b/arch/sparc64/kernel/pci_common.c
index 2f61c4b12596..c76bfbb7da08 100644
--- a/arch/sparc64/kernel/pci_common.c
+++ b/arch/sparc64/kernel/pci_common.c
@@ -264,7 +264,7 @@ static int sun4v_read_pci_cfg(struct pci_bus *bus_dev, unsigned int devfn,
264 unsigned int func = PCI_FUNC(devfn); 264 unsigned int func = PCI_FUNC(devfn);
265 unsigned long ret; 265 unsigned long ret;
266 266
267 if (bus_dev == pbm->pci_bus && devfn == 0x00) 267 if (!bus && devfn == 0x00)
268 return pci_host_bridge_read_pci_cfg(bus_dev, devfn, where, 268 return pci_host_bridge_read_pci_cfg(bus_dev, devfn, where,
269 size, value); 269 size, value);
270 if (config_out_of_range(pbm, bus, devfn, where)) { 270 if (config_out_of_range(pbm, bus, devfn, where)) {
@@ -300,7 +300,7 @@ static int sun4v_write_pci_cfg(struct pci_bus *bus_dev, unsigned int devfn,
300 unsigned int func = PCI_FUNC(devfn); 300 unsigned int func = PCI_FUNC(devfn);
301 unsigned long ret; 301 unsigned long ret;
302 302
303 if (bus_dev == pbm->pci_bus && devfn == 0x00) 303 if (!bus && devfn == 0x00)
304 return pci_host_bridge_write_pci_cfg(bus_dev, devfn, where, 304 return pci_host_bridge_write_pci_cfg(bus_dev, devfn, where,
305 size, value); 305 size, value);
306 if (config_out_of_range(pbm, bus, devfn, where)) { 306 if (config_out_of_range(pbm, bus, devfn, where)) {
diff --git a/arch/sparc64/kernel/prom.c b/arch/sparc64/kernel/prom.c
index 0614dff63d7c..a246e962e5a7 100644
--- a/arch/sparc64/kernel/prom.c
+++ b/arch/sparc64/kernel/prom.c
@@ -1046,7 +1046,8 @@ static void __init irq_trans_init(struct device_node *dp)
1046 if (!strcmp(dp->name, "fhc") && 1046 if (!strcmp(dp->name, "fhc") &&
1047 !strcmp(dp->parent->name, "central")) 1047 !strcmp(dp->parent->name, "central"))
1048 return central_irq_trans_init(dp); 1048 return central_irq_trans_init(dp);
1049 if (!strcmp(dp->name, "virtual-devices")) 1049 if (!strcmp(dp->name, "virtual-devices") ||
1050 !strcmp(dp->name, "niu"))
1050 return sun4v_vdev_irq_trans_init(dp); 1051 return sun4v_vdev_irq_trans_init(dp);
1051} 1052}
1052 1053
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c
index b84c49e3697c..c73b7a48b036 100644
--- a/arch/sparc64/kernel/smp.c
+++ b/arch/sparc64/kernel/smp.c
@@ -353,6 +353,8 @@ static int __devinit smp_boot_one_cpu(unsigned int cpu)
353 int timeout, ret; 353 int timeout, ret;
354 354
355 p = fork_idle(cpu); 355 p = fork_idle(cpu);
356 if (IS_ERR(p))
357 return PTR_ERR(p);
356 callin_flag = 0; 358 callin_flag = 0;
357 cpu_new_thread = task_thread_info(p); 359 cpu_new_thread = task_thread_info(p);
358 360
diff --git a/arch/sparc64/kernel/vio.c b/arch/sparc64/kernel/vio.c
index 1550ac5673da..0c1ee619d814 100644
--- a/arch/sparc64/kernel/vio.c
+++ b/arch/sparc64/kernel/vio.c
@@ -292,7 +292,7 @@ static struct vio_dev *vio_create_one(struct mdesc_handle *hp, u64 mp,
292 } 292 }
293 vdev->dp = dp; 293 vdev->dp = dp;
294 294
295 printk(KERN_ERR "VIO: Adding device %s\n", vdev->dev.bus_id); 295 printk(KERN_INFO "VIO: Adding device %s\n", vdev->dev.bus_id);
296 296
297 err = device_register(&vdev->dev); 297 err = device_register(&vdev->dev);
298 if (err) { 298 if (err) {
@@ -342,8 +342,33 @@ static struct mdesc_notifier_client vio_device_notifier = {
342 .node_name = "virtual-device-port", 342 .node_name = "virtual-device-port",
343}; 343};
344 344
345/* We are only interested in domain service ports under the
346 * "domain-services" node. On control nodes there is another port
347 * under "openboot" that we should not mess with as aparently that is
348 * reserved exclusively for OBP use.
349 */
350static void vio_add_ds(struct mdesc_handle *hp, u64 node)
351{
352 int found;
353 u64 a;
354
355 found = 0;
356 mdesc_for_each_arc(a, hp, node, MDESC_ARC_TYPE_BACK) {
357 u64 target = mdesc_arc_target(hp, a);
358 const char *name = mdesc_node_name(hp, target);
359
360 if (!strcmp(name, "domain-services")) {
361 found = 1;
362 break;
363 }
364 }
365
366 if (found)
367 (void) vio_create_one(hp, node, &root_vdev->dev);
368}
369
345static struct mdesc_notifier_client vio_ds_notifier = { 370static struct mdesc_notifier_client vio_ds_notifier = {
346 .add = vio_add, 371 .add = vio_add_ds,
347 .remove = vio_remove, 372 .remove = vio_remove,
348 .node_name = "domain-services-port", 373 .node_name = "domain-services-port",
349}; 374};
diff --git a/arch/sparc64/lib/NGmemcpy.S b/arch/sparc64/lib/NGmemcpy.S
index 605cb3f09900..96a14caf6966 100644
--- a/arch/sparc64/lib/NGmemcpy.S
+++ b/arch/sparc64/lib/NGmemcpy.S
@@ -321,11 +321,11 @@ FUNC_NAME: /* %i0=dst, %i1=src, %i2=len */
321 andn %i2, 0xf, %i4 321 andn %i2, 0xf, %i4
322 and %i2, 0xf, %i2 322 and %i2, 0xf, %i2
3231: subcc %i4, 0x10, %i4 3231: subcc %i4, 0x10, %i4
324 EX_LD(LOAD(ldx, %i1, %i5)) 324 EX_LD(LOAD(ldx, %i1, %o4))
325 add %i1, 0x08, %i1 325 add %i1, 0x08, %i1
326 EX_LD(LOAD(ldx, %i1, %g1)) 326 EX_LD(LOAD(ldx, %i1, %g1))
327 sub %i1, 0x08, %i1 327 sub %i1, 0x08, %i1
328 EX_ST(STORE(stx, %i5, %i1 + %i3)) 328 EX_ST(STORE(stx, %o4, %i1 + %i3))
329 add %i1, 0x8, %i1 329 add %i1, 0x8, %i1
330 EX_ST(STORE(stx, %g1, %i1 + %i3)) 330 EX_ST(STORE(stx, %g1, %i1 + %i3))
331 bgu,pt %XCC, 1b 331 bgu,pt %XCC, 1b
@@ -334,8 +334,8 @@ FUNC_NAME: /* %i0=dst, %i1=src, %i2=len */
334 be,pt %XCC, 1f 334 be,pt %XCC, 1f
335 nop 335 nop
336 sub %i2, 0x8, %i2 336 sub %i2, 0x8, %i2
337 EX_LD(LOAD(ldx, %i1, %i5)) 337 EX_LD(LOAD(ldx, %i1, %o4))
338 EX_ST(STORE(stx, %i5, %i1 + %i3)) 338 EX_ST(STORE(stx, %o4, %i1 + %i3))
339 add %i1, 0x8, %i1 339 add %i1, 0x8, %i1
3401: andcc %i2, 0x4, %g0 3401: andcc %i2, 0x4, %g0
341 be,pt %XCC, 1f 341 be,pt %XCC, 1f
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index c921ec32c232..c76dd29c8e9a 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -1918,7 +1918,11 @@ static void rtl_hw_start_8169(struct net_device *dev)
1918 1918
1919 rtl_set_rx_max_size(ioaddr); 1919 rtl_set_rx_max_size(ioaddr);
1920 1920
1921 rtl_set_rx_tx_config_registers(tp); 1921 if ((tp->mac_version == RTL_GIGA_MAC_VER_01) ||
1922 (tp->mac_version == RTL_GIGA_MAC_VER_02) ||
1923 (tp->mac_version == RTL_GIGA_MAC_VER_03) ||
1924 (tp->mac_version == RTL_GIGA_MAC_VER_04))
1925 rtl_set_rx_tx_config_registers(tp);
1922 1926
1923 tp->cp_cmd |= rtl_rw_cpluscmd(ioaddr) | PCIMulRW; 1927 tp->cp_cmd |= rtl_rw_cpluscmd(ioaddr) | PCIMulRW;
1924 1928
@@ -1941,6 +1945,14 @@ static void rtl_hw_start_8169(struct net_device *dev)
1941 1945
1942 rtl_set_rx_tx_desc_registers(tp, ioaddr); 1946 rtl_set_rx_tx_desc_registers(tp, ioaddr);
1943 1947
1948 if ((tp->mac_version != RTL_GIGA_MAC_VER_01) &&
1949 (tp->mac_version != RTL_GIGA_MAC_VER_02) &&
1950 (tp->mac_version != RTL_GIGA_MAC_VER_03) &&
1951 (tp->mac_version != RTL_GIGA_MAC_VER_04)) {
1952 RTL_W8(ChipCmd, CmdTxEnb | CmdRxEnb);
1953 rtl_set_rx_tx_config_registers(tp);
1954 }
1955
1944 RTL_W8(Cfg9346, Cfg9346_Lock); 1956 RTL_W8(Cfg9346, Cfg9346_Lock);
1945 1957
1946 /* Initially a 10 us delay. Turned it into a PCI commit. - FR */ 1958 /* Initially a 10 us delay. Turned it into a PCI commit. - FR */
@@ -1955,8 +1967,6 @@ static void rtl_hw_start_8169(struct net_device *dev)
1955 1967
1956 /* Enable all known interrupts by setting the interrupt mask. */ 1968 /* Enable all known interrupts by setting the interrupt mask. */
1957 RTL_W16(IntrMask, tp->intr_event); 1969 RTL_W16(IntrMask, tp->intr_event);
1958
1959 RTL_W8(ChipCmd, CmdTxEnb | CmdRxEnb);
1960} 1970}
1961 1971
1962static void rtl_hw_start_8168(struct net_device *dev) 1972static void rtl_hw_start_8168(struct net_device *dev)
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
index 3907f6718ede..da56163c30a8 100644
--- a/drivers/scsi/megaraid.c
+++ b/drivers/scsi/megaraid.c
@@ -1753,6 +1753,14 @@ mega_build_sglist(adapter_t *adapter, scb_t *scb, u32 *buf, u32 *len)
1753 1753
1754 *len = 0; 1754 *len = 0;
1755 1755
1756 if (scsi_sg_count(cmd) == 1 && !adapter->has_64bit_addr) {
1757 sg = scsi_sglist(cmd);
1758 scb->dma_h_bulkdata = sg_dma_address(sg);
1759 *buf = (u32)scb->dma_h_bulkdata;
1760 *len = sg_dma_len(sg);
1761 return 0;
1762 }
1763
1756 scsi_for_each_sg(cmd, sg, sgcnt, idx) { 1764 scsi_for_each_sg(cmd, sg, sgcnt, idx) {
1757 if (adapter->has_64bit_addr) { 1765 if (adapter->has_64bit_addr) {
1758 scb->sgl64[idx].address = sg_dma_address(sg); 1766 scb->sgl64[idx].address = sg_dma_address(sg);
diff --git a/include/asm-x86_64/processor.h b/include/asm-x86_64/processor.h
index 19525175b91c..31f579b828f2 100644
--- a/include/asm-x86_64/processor.h
+++ b/include/asm-x86_64/processor.h
@@ -371,7 +371,7 @@ static inline void sync_core(void)
371#define ARCH_HAS_PREFETCH 371#define ARCH_HAS_PREFETCH
372static inline void prefetch(void *x) 372static inline void prefetch(void *x)
373{ 373{
374 asm volatile("prefetcht0 %0" :: "m" (*(unsigned long *)x)); 374 asm volatile("prefetcht0 (%0)" :: "r" (x));
375} 375}
376 376
377#define ARCH_HAS_PREFETCHW 1 377#define ARCH_HAS_PREFETCHW 1
diff --git a/mm/memory.c b/mm/memory.c
index ca8cac11bd2c..c0e7741a98de 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -2307,13 +2307,14 @@ oom:
2307 * do not need to flush old virtual caches or the TLB. 2307 * do not need to flush old virtual caches or the TLB.
2308 * 2308 *
2309 * We enter with non-exclusive mmap_sem (to exclude vma changes, 2309 * We enter with non-exclusive mmap_sem (to exclude vma changes,
2310 * but allow concurrent faults), and pte mapped but not yet locked. 2310 * but allow concurrent faults), and pte neither mapped nor locked.
2311 * We return with mmap_sem still held, but pte unmapped and unlocked. 2311 * We return with mmap_sem still held, but pte unmapped and unlocked.
2312 */ 2312 */
2313static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma, 2313static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
2314 unsigned long address, pte_t *page_table, pmd_t *pmd, 2314 unsigned long address, pmd_t *pmd,
2315 pgoff_t pgoff, unsigned int flags, pte_t orig_pte) 2315 pgoff_t pgoff, unsigned int flags, pte_t orig_pte)
2316{ 2316{
2317 pte_t *page_table;
2317 spinlock_t *ptl; 2318 spinlock_t *ptl;
2318 struct page *page; 2319 struct page *page;
2319 pte_t entry; 2320 pte_t entry;
@@ -2327,7 +2328,6 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
2327 vmf.flags = flags; 2328 vmf.flags = flags;
2328 vmf.page = NULL; 2329 vmf.page = NULL;
2329 2330
2330 pte_unmap(page_table);
2331 BUG_ON(vma->vm_flags & VM_PFNMAP); 2331 BUG_ON(vma->vm_flags & VM_PFNMAP);
2332 2332
2333 if (likely(vma->vm_ops->fault)) { 2333 if (likely(vma->vm_ops->fault)) {
@@ -2468,8 +2468,8 @@ static int do_linear_fault(struct mm_struct *mm, struct vm_area_struct *vma,
2468 - vma->vm_start) >> PAGE_CACHE_SHIFT) + vma->vm_pgoff; 2468 - vma->vm_start) >> PAGE_CACHE_SHIFT) + vma->vm_pgoff;
2469 unsigned int flags = (write_access ? FAULT_FLAG_WRITE : 0); 2469 unsigned int flags = (write_access ? FAULT_FLAG_WRITE : 0);
2470 2470
2471 return __do_fault(mm, vma, address, page_table, pmd, pgoff, 2471 pte_unmap(page_table);
2472 flags, orig_pte); 2472 return __do_fault(mm, vma, address, pmd, pgoff, flags, orig_pte);
2473} 2473}
2474 2474
2475 2475
@@ -2552,9 +2552,7 @@ static int do_nonlinear_fault(struct mm_struct *mm, struct vm_area_struct *vma,
2552 } 2552 }
2553 2553
2554 pgoff = pte_to_pgoff(orig_pte); 2554 pgoff = pte_to_pgoff(orig_pte);
2555 2555 return __do_fault(mm, vma, address, pmd, pgoff, flags, orig_pte);
2556 return __do_fault(mm, vma, address, page_table, pmd, pgoff,
2557 flags, orig_pte);
2558} 2556}
2559 2557
2560/* 2558/*