Commit c4a1745a authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6: (230 commits)
  [SPARC64]: Update defconfig.
  [SPARC64]: Fix 2 bugs in huge page support.
  [SPARC64]: CONFIG_BLK_DEV_RAM fix
  [SPARC64]: Optimized TSB table initialization.
  [SPARC64]: Allow CONFIG_MEMORY_HOTPLUG to build.
  [SPARC64]: Use SLAB caches for TSB tables.
  [SPARC64]: Don't kill the page allocator when growing a TSB.
  [SPARC64]: Randomize mm->mmap_base when PF_RANDOMIZE is set.
  [SPARC64]: Increase top of 32-bit process stack.
  [SPARC64]: Top-down address space allocation for 32-bit tasks.
  [SPARC64] bbc_i2c: Fix cpu check and add missing module license.
  [SPARC64]: Fix and re-enable dynamic TSB sizing.
  [SUNSU]: Fix missing spinlock initialization.
  [TG3]: Do not try to access NIC_SRAM_DATA_SIG on Sun parts.
  [SPARC64]: First cut at VIS simulator for Niagara.
  [SPARC64]: Fix system type in /proc/cpuinfo and remove bogus OBP check.
  [SPARC64]: Add SMT scheduling support for Niagara.
  [SPARC64]: Fix 32-bit truncation which broke sparsemem.
  [SPARC64]: Move over to sparsemem.
  [SPARC64]: Fix new context version SMP handling.
  ...
parents 88dcb911 ac0eb3eb
...@@ -39,6 +39,8 @@ static int __init find_device_prom_node(struct pci_pbm_info *pbm, ...@@ -39,6 +39,8 @@ static int __init find_device_prom_node(struct pci_pbm_info *pbm,
{ {
int node; int node;
*nregs = 0;
/* /*
* Return the PBM's PROM node in case we are it's PCI device, * Return the PBM's PROM node in case we are it's PCI device,
* as the PBM's reg property is different to standard PCI reg * as the PBM's reg property is different to standard PCI reg
...@@ -51,10 +53,8 @@ static int __init find_device_prom_node(struct pci_pbm_info *pbm, ...@@ -51,10 +53,8 @@ static int __init find_device_prom_node(struct pci_pbm_info *pbm,
pdev->device == PCI_DEVICE_ID_SUN_SCHIZO || pdev->device == PCI_DEVICE_ID_SUN_SCHIZO ||
pdev->device == PCI_DEVICE_ID_SUN_TOMATILLO || pdev->device == PCI_DEVICE_ID_SUN_TOMATILLO ||
pdev->device == PCI_DEVICE_ID_SUN_SABRE || pdev->device == PCI_DEVICE_ID_SUN_SABRE ||
pdev->device == PCI_DEVICE_ID_SUN_HUMMINGBIRD)) { pdev->device == PCI_DEVICE_ID_SUN_HUMMINGBIRD))
*nregs = 0;
return bus_prom_node; return bus_prom_node;
}
node = prom_getchild(bus_prom_node); node = prom_getchild(bus_prom_node);
while (node != 0) { while (node != 0) {
...@@ -541,135 +541,183 @@ void __init pci_assign_unassigned(struct pci_pbm_info *pbm, ...@@ -541,135 +541,183 @@ void __init pci_assign_unassigned(struct pci_pbm_info *pbm,
pci_assign_unassigned(pbm, bus); pci_assign_unassigned(pbm, bus);
} }
static int __init pci_intmap_match(struct pci_dev *pdev, unsigned int *interrupt) static inline unsigned int pci_slot_swivel(struct pci_pbm_info *pbm,
struct pci_dev *toplevel_pdev,
struct pci_dev *pdev,
unsigned int interrupt)
{ {
struct linux_prom_pci_intmap bridge_local_intmap[PROM_PCIIMAP_MAX], *intmap; unsigned int ret;
struct linux_prom_pci_intmask bridge_local_intmask, *intmask;
struct pcidev_cookie *dev_pcp = pdev->sysdata;
struct pci_pbm_info *pbm = dev_pcp->pbm;
struct linux_prom_pci_registers *pregs = dev_pcp->prom_regs;
unsigned int hi, mid, lo, irq;
int i, num_intmap, map_slot;
intmap = &pbm->pbm_intmap[0]; if (unlikely(interrupt < 1 || interrupt > 4)) {
intmask = &pbm->pbm_intmask; printk("%s: Device %s interrupt value of %u is strange.\n",
num_intmap = pbm->num_pbm_intmap; pbm->name, pci_name(pdev), interrupt);
map_slot = 0; return interrupt;
}
/* If we are underneath a PCI bridge, use PROM register ret = ((interrupt - 1 + (PCI_SLOT(pdev->devfn) & 3)) & 3) + 1;
* property of the parent bridge which is closest to
* the PBM. printk("%s: %s IRQ Swivel %s [%x:%x] -> [%x]\n",
* pbm->name, pci_name(toplevel_pdev), pci_name(pdev),
* However if that parent bridge has interrupt map/mask interrupt, PCI_SLOT(pdev->devfn), ret);
* properties of its own we use the PROM register property
* of the next child device on the path to PDEV. return ret;
* }
* In detail the two cases are (note that the 'X' below is the
* 'next child on the path to PDEV' mentioned above): static inline unsigned int pci_apply_intmap(struct pci_pbm_info *pbm,
* struct pci_dev *toplevel_pdev,
* 1) PBM --> PCI bus lacking int{map,mask} --> X ... PDEV struct pci_dev *pbus,
* struct pci_dev *pdev,
* Here we use regs of 'PCI bus' device. unsigned int interrupt,
* unsigned int *cnode)
* 2) PBM --> PCI bus with int{map,mask} --> X ... PDEV {
* struct linux_prom_pci_intmap imap[PROM_PCIIMAP_MAX];
* Here we use regs of 'X'. Note that X can be PDEV. struct linux_prom_pci_intmask imask;
*/ struct pcidev_cookie *pbus_pcp = pbus->sysdata;
if (pdev->bus->number != pbm->pci_first_busno) { struct pcidev_cookie *pdev_pcp = pdev->sysdata;
struct pcidev_cookie *bus_pcp, *regs_pcp; struct linux_prom_pci_registers *pregs = pdev_pcp->prom_regs;
struct pci_dev *bus_dev, *regs_dev; int plen, num_imap, i;
int plen; unsigned int hi, mid, lo, irq, orig_interrupt;
*cnode = pbus_pcp->prom_node;
plen = prom_getproperty(pbus_pcp->prom_node, "interrupt-map",
(char *) &imap[0], sizeof(imap));
if (plen <= 0 ||
(plen % sizeof(struct linux_prom_pci_intmap)) != 0) {
printk("%s: Device %s interrupt-map has bad len %d\n",
pbm->name, pci_name(pbus), plen);
goto no_intmap;
}
num_imap = plen / sizeof(struct linux_prom_pci_intmap);
plen = prom_getproperty(pbus_pcp->prom_node, "interrupt-map-mask",
(char *) &imask, sizeof(imask));
if (plen <= 0 ||
(plen % sizeof(struct linux_prom_pci_intmask)) != 0) {
printk("%s: Device %s interrupt-map-mask has bad len %d\n",
pbm->name, pci_name(pbus), plen);
goto no_intmap;
}
orig_interrupt = interrupt;
bus_dev = pdev->bus->self; hi = pregs->phys_hi & imask.phys_hi;
regs_dev = pdev; mid = pregs->phys_mid & imask.phys_mid;
lo = pregs->phys_lo & imask.phys_lo;
irq = interrupt & imask.interrupt;
while (bus_dev->bus && for (i = 0; i < num_imap; i++) {
bus_dev->bus->number != pbm->pci_first_busno) { if (imap[i].phys_hi == hi &&
regs_dev = bus_dev; imap[i].phys_mid == mid &&
bus_dev = bus_dev->bus->self; imap[i].phys_lo == lo &&
imap[i].interrupt == irq) {
*cnode = imap[i].cnode;
interrupt = imap[i].cinterrupt;
} }
}
regs_pcp = regs_dev->sysdata; printk("%s: %s MAP BUS %s DEV %s [%x] -> [%x]\n",
pregs = regs_pcp->prom_regs; pbm->name, pci_name(toplevel_pdev),
pci_name(pbus), pci_name(pdev),
orig_interrupt, interrupt);
bus_pcp = bus_dev->sysdata; no_intmap:
return interrupt;
}
/* But if the PCI bridge has it's own interrupt map /* For each PCI bus on the way to the root:
* and mask properties, use that and the regs of the * 1) If it has an interrupt-map property, apply it.
* PCI entity at the next level down on the path to the * 2) Else, swivel the interrupt number based upon the PCI device number.
* device. *
*/ * Return the "IRQ controller" node. If this is the PBM's device node,
plen = prom_getproperty(bus_pcp->prom_node, "interrupt-map", * all interrupt translations are complete, else we should use that node's
(char *) &bridge_local_intmap[0], * "reg" property to apply the PBM's "interrupt-{map,mask}" to the interrupt.
sizeof(bridge_local_intmap)); */
if (plen != -1) { static unsigned int __init pci_intmap_match_to_root(struct pci_pbm_info *pbm,
intmap = &bridge_local_intmap[0]; struct pci_dev *pdev,
num_intmap = plen / sizeof(struct linux_prom_pci_intmap); unsigned int *interrupt)
plen = prom_getproperty(bus_pcp->prom_node, {
"interrupt-map-mask", struct pci_dev *toplevel_pdev = pdev;
(char *) &bridge_local_intmask, struct pcidev_cookie *toplevel_pcp = toplevel_pdev->sysdata;
sizeof(bridge_local_intmask)); unsigned int cnode = toplevel_pcp->prom_node;
if (plen == -1) {
printk("pci_intmap_match: Warning! Bridge has intmap " while (pdev->bus->number != pbm->pci_first_busno) {
"but no intmask.\n"); struct pci_dev *pbus = pdev->bus->self;
printk("pci_intmap_match: Trying to recover.\n"); struct pcidev_cookie *pcp = pbus->sysdata;
return 0; int plen;
}
if (pdev->bus->self != bus_dev) plen = prom_getproplen(pcp->prom_node, "interrupt-map");
map_slot = 1; if (plen <= 0) {
*interrupt = pci_slot_swivel(pbm, toplevel_pdev,
pdev, *interrupt);
cnode = pcp->prom_node;
} else { } else {
pregs = bus_pcp->prom_regs; *interrupt = pci_apply_intmap(pbm, toplevel_pdev,
map_slot = 1; pbus, pdev,
*interrupt, &cnode);
while (pcp->prom_node != cnode &&
pbus->bus->number != pbm->pci_first_busno) {
pbus = pbus->bus->self;
pcp = pbus->sysdata;
}
} }
} pdev = pbus;
if (map_slot) { if (cnode == pbm->prom_node)
*interrupt = ((*interrupt break;
- 1
+ PCI_SLOT(pdev->devfn)) & 0x3) + 1;
} }
hi = pregs->phys_hi & intmask->phys_hi; return cnode;
mid = pregs->phys_mid & intmask->phys_mid; }
lo = pregs->phys_lo & intmask->phys_lo;
irq = *interrupt & intmask->interrupt; static int __init pci_intmap_match(struct pci_dev *pdev, unsigned int *interrupt)
{
for (i = 0; i < num_intmap; i++) { struct pcidev_cookie *dev_pcp = pdev->sysdata;
if (intmap[i].phys_hi == hi && struct pci_pbm_info *pbm = dev_pcp->pbm;
intmap[i].phys_mid == mid && struct linux_prom_pci_registers reg[PROMREG_MAX];
intmap[i].phys_lo == lo && unsigned int hi, mid, lo, irq;
intmap[i].interrupt == irq) { int i, cnode, plen;
*interrupt = intmap[i].cinterrupt;
printk("PCI-IRQ: Routing bus[%2x] slot[%2x] map[%d] to INO[%02x]\n", cnode = pci_intmap_match_to_root(pbm, pdev, interrupt);
pdev->bus->number, PCI_SLOT(pdev->devfn), if (cnode == pbm->prom_node)
map_slot, *interrupt); goto success;
return 1;
} plen = prom_getproperty(cnode, "reg", (char *) reg, sizeof(reg));
if (plen <= 0 ||
(plen % sizeof(struct linux_prom_pci_registers)) != 0) {
printk("%s: OBP node %x reg property has bad len %d\n",
pbm->name, cnode, plen);
goto fail;
} }
/* We will run this code even if pbm->num_pbm_intmap is zero, just so hi = reg[0].phys_hi & pbm->pbm_intmask.phys_hi;
* we can apply the slot mapping to the PROM interrupt property value. mid = reg[0].phys_mid & pbm->pbm_intmask.phys_mid;
* So do not spit out these warnings in that case. lo = reg[0].phys_lo & pbm->pbm_intmask.phys_lo;
*/ irq = *interrupt & pbm->pbm_intmask.interrupt;
if (num_intmap != 0) {
/* Print it both to OBP console and kernel one so that if bootup for (i = 0; i < pbm->num_pbm_intmap; i++) {
* hangs here the user has the information to report. struct linux_prom_pci_intmap *intmap;
*/
prom_printf("pci_intmap_match: bus %02x, devfn %02x: ", intmap = &pbm->pbm_intmap[i];
pdev->bus->number, pdev->devfn);
prom_printf("IRQ [%08x.%08x.%08x.%08x] not found in interrupt-map\n", if (intmap->phys_hi == hi &&
pregs->phys_hi, pregs->phys_mid, pregs->phys_lo, *interrupt); intmap->phys_mid == mid &&
prom_printf("Please email this information to davem@redhat.com\n"); intmap->phys_lo == lo &&
intmap->interrupt == irq) {
printk("pci_intmap_match: bus %02x, devfn %02x: ", *interrupt = intmap->cinterrupt;
pdev->bus->number, pdev->devfn); goto success;
printk("IRQ [%08x.%08x.%08x.%08x] not found in interrupt-map\n", }
pregs->phys_hi, pregs->phys_mid, pregs->phys_lo, *interrupt);
printk("Please email this information to davem@redhat.com\n");
} }
fail:
return 0; return 0;
success:
printk("PCI-IRQ: Routing bus[%2x] slot[%2x] to INO[%02x]\n",
pdev->bus->number, PCI_SLOT(pdev->devfn),
*interrupt);
return 1;
} }
static void __init pdev_fixup_irq(struct pci_dev *pdev) static void __init pdev_fixup_irq(struct pci_dev *pdev)
...@@ -703,16 +751,18 @@ static void __init pdev_fixup_irq(struct pci_dev *pdev) ...@@ -703,16 +751,18 @@ static void __init pdev_fixup_irq(struct pci_dev *pdev)
return; return;
} }
/* Fully specified already? */ if (tlb_type != hypervisor) {
if (((prom_irq & PCI_IRQ_IGN) >> 6) == portid) { /* Fully specified already? */
pdev->irq = p->irq_build(pbm, pdev, prom_irq); if (((prom_irq & PCI_IRQ_IGN) >> 6) == portid) {
goto have_irq; pdev->irq = p->irq_build(pbm, pdev, prom_irq);
} goto have_irq;
}
/* An onboard device? (bit 5 set) */ /* An onboard device? (bit 5 set) */
if ((prom_irq & PCI_IRQ_INO) & 0x20) { if ((prom_irq & PCI_IRQ_INO) & 0x20) {
pdev->irq = p->irq_build(pbm, pdev, (portid << 6 | prom_irq)); pdev->irq = p->irq_build(pbm, pdev, (portid << 6 | prom_irq));
goto have_irq; goto have_irq;
}
} }
/* Can we find a matching entry in the interrupt-map? */ /* Can we find a matching entry in the interrupt-map? */
...@@ -927,33 +977,30 @@ void pci_register_legacy_regions(struct resource *io_res, ...@@ -927,33 +977,30 @@ void pci_register_legacy_regions(struct resource *io_res,
struct resource *p; struct resource *p;
/* VGA Video RAM. */ /* VGA Video RAM. */
p = kmalloc(sizeof(*p), GFP_KERNEL); p = kzalloc(sizeof(*p), GFP_KERNEL);
if (!p) if (!p)
return; return;
memset(p, 0, sizeof(*p));
p->name = "Video RAM area"; p->name = "Video RAM area";
p->start = mem_res->start + 0xa0000UL; p->start = mem_res->start + 0xa0000UL;
p->end = p->start + 0x1ffffUL; p->end = p->start + 0x1ffffUL;
p->flags = IORESOURCE_BUSY; p->flags = IORESOURCE_BUSY;
request_resource(mem_res, p); request_resource(mem_res, p);
p = kmalloc(sizeof(*p), GFP_KERNEL); p = kzalloc(sizeof(*p), GFP_KERNEL);
if (!p) if (!p)
return; return;
memset(p, 0, sizeof(*p));
p->name = "System ROM"; p->name = "System ROM";
p->start = mem_res->start + 0xf0000UL; p->start = mem_res->start + 0xf0000UL;
p->end = p->start + 0xffffUL; p->end = p->start + 0xffffUL;
p->flags = IORESOURCE_BUSY; p->flags = IORESOURCE_BUSY;
request_resource(mem_res, p); request_resource(mem_res, p);
p = kmalloc(sizeof(*p), GFP_KERNEL); p = kzalloc(sizeof(*p), GFP_KERNEL);
if (!p) if (!p)
return; return;
memset(p, 0, sizeof(*p));
p->name = "Video ROM"; p->name = "Video ROM";
p->start = mem_res->start + 0xc0000UL; p->start = mem_res->start + 0xc0000UL;
p->end = p->start + 0x7fffUL; p->end = p->start + 0x7fffUL;
......
...@@ -139,12 +139,11 @@ void pci_iommu_table_init(struct pci_iommu *iommu, int tsbsize, u32 dma_offset, ...@@ -139,12 +139,11 @@ void pci_iommu_table_init(struct pci_iommu *iommu, int tsbsize, u32 dma_offset,
/* Allocate and initialize the free area map. */ /* Allocate and initialize the free area map. */
sz = num_tsb_entries / 8; sz = num_tsb_entries / 8;
sz = (sz + 7UL) & ~7UL; sz = (sz + 7UL) & ~7UL;
iommu->arena.map = kmalloc(sz, GFP_KERNEL); iommu->arena.map = kzalloc(sz, GFP_KERNEL);
if (!iommu->arena.map) { if (!iommu->arena.map) {
prom_printf("PCI_IOMMU: Error, kmalloc(arena.map) failed.\n"); prom_printf("PCI_IOMMU: Error, kmalloc(arena.map) failed.\n");
prom_halt(); prom_halt();
} }
memset(iommu->arena.map, 0, sz);
iommu->arena.limit = num_tsb_entries; iommu->arena.limit = num_tsb_entries;
/* Allocate and initialize the dummy page which we /* Allocate and initialize the dummy page which we
...@@ -219,7 +218,7 @@ static inline void iommu_free_ctx(struct pci_iommu *iommu, int ctx) ...@@ -219,7 +218,7 @@ static inline void iommu_free_ctx(struct pci_iommu *iommu, int ctx)
* DMA for PCI device PDEV. Return non-NULL cpu-side address if * DMA for PCI device PDEV. Return non-NULL cpu-side address if
* successful and set *DMA_ADDRP to the PCI side dma address. * successful and set *DMA_ADDRP to the PCI side dma address.
*/ */
void *pci_alloc_consistent(struct pci_dev *pdev, size_t size, dma_addr_t *dma_addrp) static void *pci_4u_alloc_consistent(struct pci_dev *pdev, size_t size, dma_addr_t *dma_addrp)
{ {
struct pcidev_cookie *pcp; struct pcidev_cookie *pcp;
struct pci_iommu *iommu; struct pci_iommu *iommu;
...@@ -267,7 +266,7 @@ void *pci_alloc_consistent(struct pci_dev *pdev, size_t size, dma_addr_t *dma_ad ...@@ -267,7 +266,7 @@ void *pci_alloc_consistent(struct pci_dev *pdev, size_t size, dma_addr_t *dma_ad
} }
/* Free and unmap a consistent DMA translation. */ /* Free and unmap a consistent DMA translation. */
void pci_free_consistent(struct pci_dev *pdev, size_t size, void *cpu, dma_addr_t dvma) static void pci_4u_free_consistent(struct pci_dev *pdev, size_t size, void *cpu, dma_addr_t dvma)
{ {
struct pcidev_cookie *pcp; struct pcidev_cookie *pcp;
struct pci_iommu *iommu; struct pci_iommu *iommu;
...@@ -294,7 +293,7 @@ void pci_free_consistent(struct pci_dev *pdev, size_t size, void *cpu, dma_addr_ ...@@ -294,7 +293,7 @@ void pci_free_consistent(struct pci_dev *pdev, size_t size, void *cpu, dma_addr_
/* Map a single buffer at PTR of SZ bytes for PCI DMA /* Map a single buffer at PTR of SZ bytes for PCI DMA
* in streaming mode. * in streaming mode.
*/ */
dma_addr_t pci_map_single(struct pci_dev *pdev, void *ptr, size_t sz, int direction) static dma_addr_t pci_4u_map_single(struct pci_dev *pdev, void *ptr, size_t sz, int direction)
{ {
struct pcidev_cookie *pcp; struct pcidev_cookie *pcp;
struct pci_iommu *iommu; struct pci_iommu *iommu;
...@@ -415,7 +414,7 @@ static void pci_strbuf_flush(struct pci_strbuf *strbuf, struct pci_iommu *iommu, ...@@ -415,7 +414,7 @@ static void pci_strbuf_flush(struct pci_strbuf *strbuf, struct pci_iommu *iommu,
} }
/* Unmap a single streaming mode DMA translation. */ /* Unmap a single streaming mode DMA translation. */
void pci_unmap_single(struct pci_dev *pdev, dma_addr_t bus_addr, size_t sz, int direction) static void pci_4u_unmap_single(struct pci_dev *pdev, dma_addr_t bus_addr, size_t sz, int direction)
{ {
struct pcidev_cookie *pcp; struct pcidev_cookie *pcp;
struct pci_iommu *iommu; struct pci_iommu *iommu;
...@@ -548,7 +547,7 @@ static inline void fill_sg(iopte_t *iopte, struct scatterlist *sg, ...@@ -548,7 +547,7 @@ static inline void fill_sg(iopte_t *iopte, struct scatterlist *sg,
* When making changes here, inspect the assembly output. I was having * When making changes here, inspect the assembly output. I was having
* hard time to kepp this routine out of using stack slots for holding variables. * hard time to kepp this routine out of using stack slots for holding variables.
*/ */
int pci_map_sg(struct pci_dev *pdev, struct scatterlist *sglist, int nelems, int direction) static int pci_4u_map_sg(struct pci_dev *pdev, struct scatterlist *sglist, int nelems, int direction)
{ {
struct pcidev_cookie *pcp; struct pcidev_cookie *pcp;
struct pci_iommu *iommu; struct pci_iommu *iommu;
...@@ -562,9 +561,9 @@ int pci_map_sg(struct pci_dev *pdev, struct scatterlist *sglist, int nelems, int ...@@ -562,9 +561,9 @@ int pci_map_sg(struct pci_dev *pdev, struct scatterlist *sglist, int nelems, int
/* Fast path single entry scatterlists. */ /* Fast path single entry scatterlists. */
if (nelems == 1) { if (nelems == 1) {
sglist->dma_address = sglist->dma_address =
pci_map_single(pdev, pci_4u_map_single(pdev,
(page_address(sglist->page) + sglist->offset), (page_address(sglist->page) + sglist->offset),
sglist->length, direction); sglist->length, direction);
if (unlikely(sglist->dma_address == PCI_DMA_ERROR_CODE)) if (unlikely(sglist->dma_address == PCI_DMA_ERROR_CODE))
return 0; return 0;
sglist->dma_length = sglist->length; sglist->dma_length = sglist->length;
...@@ -635,7 +634,7 @@ int pci_map_sg(struct pci_dev *pdev, struct scatterlist *sglist, int nelems, int ...@@ -635,7 +634,7 @@ int pci_map_sg(struct pci_dev *pdev, struct scatterlist *sglist, int nelems, int
} }
/* Unmap a set of streaming mode DMA translations. */ /* Unmap a set of streaming mode DMA translations. */
void pci_unmap_sg(struct pci_dev *pdev, struct scatterlist *sglist, int nelems, int direction) static void pci_4u_unmap_sg(struct pci_dev *pdev, struct scatterlist *sglist, int nelems, int direction)
{ {
struct pcidev_cookie *pcp; struct pcidev_cookie *pcp;
struct pci_iommu *iommu; struct pci_iommu *iommu;
...@@ -695,7 +694,7 @@ void pci_unmap_sg(struct pci_dev *pdev, struct scatterlist *sglist, int nelems, ...@@ -695,7 +694,7 @@ void pci_unmap_sg(struct pci_dev *pdev, struct scatterlist *sglist, int nelems,
/* Make physical memory consistent for a single /* Make physical memory consistent for a single
* streaming mode DMA translation after a transfer. * streaming mode DMA translation after a transfer.
*/ */
void pci_dma_sync_single_for_cpu(struct pci_dev *pdev, dma_addr_t bus_addr, size_t sz, int direction) static void pci_4u_dma_sync_single_for_cpu(struct pci_dev *pdev, dma_addr_t bus_addr, size_t sz, int direction)
{ {
struct pcidev_cookie *pcp; struct pcidev_cookie *pcp;
struct pci_iommu *iommu; struct pci_iommu *iommu;
...@@ -735,7 +734,7 @@ void pci_dma_sync_single_for_cpu(struct pci_dev *pdev, dma_addr_t bus_addr, size ...@@ -735,7 +734,7 @@ void pci_dma_sync_single_for_cpu(struct pci_dev *pdev, dma_addr_t bus_addr, size
/* Make physical memory consistent for a set of streaming /* Make physical memory consistent for a set of streaming
* mode DMA translations after a transfer. * mode DMA translations after a transfer.
*/ */
void pci_dma_sync_sg_for_cpu(struct pci_dev *pdev, struct scatterlist *sglist, int nelems, int direction) static void pci_4u_dma_sync_sg_for_cpu(struct pci_dev *pdev, struct scatterlist *sglist, int nelems, int direction)
{ {
struct pcidev_cookie *pcp; struct pcidev_cookie *pcp;
struct pci_iommu *iommu; struct pci_iommu *iommu;
...@@ -776,6 +775,17 @@ void pci_dma_sync_sg_for_cpu(struct pci_dev *pdev, struct scatterlist *sglist, i ...@@ -776,6 +775,17 @@ void pci_dma_sync_sg_for_cpu(struct pci_dev *pdev, struct scatterlist *sglist, i
spin_unlock_irqrestore(&iommu->lock, flags); spin_unlock_irqrestore(&iommu->lock, flags);
} }
struct pci_iommu_ops pci_sun4u_iommu_ops = {
.alloc_consistent = pci_4u_alloc_consistent,
.free_consistent = pci_4u_free_consistent,
.map_single = pci_4u_map_single,
.unmap_single = pci_4u_unmap_single,
.map_sg = pci_4u_map_sg,
.unmap_sg = pci_4u_unmap_sg,
.dma_sync_single_for_cpu = pci_4u_dma_sync_single_for_cpu,
.dma_sync_sg_for_cpu = pci_4u_dma_sync_sg_for_cpu,
};
static void ali_sound_dma_hack(struct pci_dev *pdev, int set_bit) static void ali_sound_dma_hack(struct pci_dev *pdev, int set_bit)
{ {
struct pci_dev *ali_isa_bridge; struct pci_dev *ali_isa_bridge;
......
...@@ -286,17 +286,17 @@ static unsigned char psycho_pil_table[] = { ...@@ -286,17 +286,17 @@ static unsigned char psycho_pil_table[] = {
/*0x14*/0, 0, 0, 0, /* PCI B slot 1 Int A, B, C, D */ /*0x14*/0, 0, 0, 0, /* PCI B slot 1 Int A, B, C, D */
/*0x18*/0, 0, 0, 0, /* PCI B slot 2 Int A, B, C, D */ /*0x18*/0, 0, 0, 0, /* PCI B slot 2 Int A, B, C, D */
/*0x1c*/0, 0, 0, 0, /* PCI B slot 3 Int A, B, C, D */ /*0x1c*/0, 0, 0, 0, /* PCI B slot 3 Int A, B, C, D */
/*0x20*/4, /* SCSI */ /*0x20*/5, /* SCSI */
/*0x21*/5, /* Ethernet */ /*0x21*/5, /* Ethernet */
/*0x22*/8, /* Parallel Port */ /*0x22*/8, /* Parallel Port */
/*0x23*/13, /* Audio Record */ /*0x23*/13, /* Audio Record */
/*0x24*/14, /* Audio Playback */ /*0x24*/14, /* Audio Playback */
/*0x25*/15, /* PowerFail */ /*0x25*/15, /* PowerFail */
/*0x26*/4, /* second SCSI */ /*0x26*/5, /* second SCSI */
/*0x27*/11, /* Floppy */ /*0x27*/11, /* Floppy */
/*0x28*/4, /* Spare Hardware */ /*0x28*/5, /* Spare Hardware */
/*0x29*/9, /* Keyboard */ /*0x29*/9, /* Keyboard */
/*0x2a*/4, /* Mouse */ /*0x2a*/5, /* Mouse */
/*0x2b*/12, /* Serial */ /*0x2b*/12, /* Serial */
/*0x2c*/10, /* Timer 0 */ /*0x2c*/10, /* Timer 0 */
/*0x2d*/11, /* Timer 1 */ /*0x2d*/11, /* Timer 1 */
...@@ -313,11 +313,11 @@ static int psycho_ino_to_pil(struct pci_dev *pdev, unsigned int ino) ...@@ -313,11 +313,11 @@ static int psycho_ino_to_pil(struct pci_dev *pdev, unsigned int ino)
ret = psycho_pil_table[ino]; ret = psycho_pil_table[ino];
if (ret == 0 && pdev == NULL) { if (ret == 0 && pdev == NULL) {
ret = 4; ret = 5;
} else if (ret == 0) { } else if (ret == 0) {
switch ((pdev->class >> 16) & 0xff) { switch ((pdev->class >> 16) & 0xff) {
case PCI_BASE_CLASS_STORAGE: case PCI_BASE_CLASS_STORAGE:
ret = 4; ret = 5;
break; break;
case PCI_BASE_CLASS_NETWORK: case PCI_BASE_CLASS_NETWORK:
...@@ -336,7 +336,7 @@ static int psycho_ino_to_pil(struct pci_dev *pdev, unsigned int ino) ...@@ -336,7 +336,7 @@ static int psycho_ino_to_pil(struct pci_dev *pdev, unsigned int ino)
break; break;
default: default:
ret = 4; ret = 5;
break; break;
}; };
} }
...@@ -1164,7 +1164,7 @@ static void pbm_config_busmastering(struct pci_pbm_info *pbm) ...@@ -1164,7 +1164,7 @@ static void pbm_config_busmastering(struct pci_pbm_info *pbm)
static void pbm_scan_bus(struct pci_controller_info *p, static void pbm_scan_bus(struct pci_controller_info *p,
struct pci_pbm_info *pbm) struct pci_pbm_info *pbm)
{ {
struct pcidev_cookie *cookie = kmalloc(sizeof(*cookie), GFP_KERNEL); struct pcidev_cookie *cookie = kzalloc(sizeof(*cookie), GFP_KERNEL);
if (!cookie) { if (!cookie) {
prom_printf("PSYCHO: Critical allocation failure.\n"); prom_printf("PSYCHO: Critical allocation failure.\n");
...@@ -1172,7 +1172,6 @@ static void pbm_scan_bus(struct pci_controller_info *p, ...@@ -1172,7 +1172,6 @@ static void pbm_scan_bus(struct pci_controller_info *p,
} }
/* All we care about is the PBM. */ /* All we care about is the PBM. */
memset(cookie, 0, sizeof(*cookie));
cookie->pbm = pbm; cookie->pbm = pbm;
pbm->pci_bus = pci_scan_bus(pbm->pci_first_busno, pbm->pci_bus = pci_scan_bus(pbm->pci_first_busno,
...@@ -1465,18 +1464,16 @@ void psycho_init(int node, char *model_name) ...@@ -1465,18 +1464,16 @@ void psycho_init(int node, char *model_name)
} }
} }
p = kmalloc(sizeof(struct pci_controller_info), GFP_ATOMIC); p = kzalloc(sizeof(struct pci_controller_info), GFP_ATOMIC);
if (!p) { if (!p) {
prom_printf("PSYCHO: Fatal memory allocation error.\n"); prom_printf("PSYCHO: Fatal memory allocation error.\n");
prom_halt(); prom_halt();
} }
memset(p, 0, sizeof(*p)); iommu = kzalloc(sizeof(struct pci_iommu), GFP_ATOMIC);
iommu = kmalloc(sizeof(struct pci_iommu), GFP_ATOMIC);
if (!iommu) { if (!iommu) {
prom_printf("PSYCHO: Fatal memory allocation error.\n"); prom_printf("PSYCHO: Fatal memory allocation error.\n");
prom_halt(); prom_halt();
} }
memset(iommu, 0, sizeof(*iommu));
p->pbm_A.iommu = p->pbm_B.iommu = iommu; p->pbm_A.iommu = p->pbm_B.iommu = iommu;
p->next = pci_controller_root; p->next = pci_controller_root;
......
...@@ -533,17 +533,17 @@ static unsigned char sabre_pil_table[] = { ...@@ -533,17 +533,17 @@ static unsigned char sabre_pil_table[] = {
/*0x14*/0, 0, 0, 0, /* PCI B slot 1 Int A, B, C, D */ /*0x14*/0, 0, 0, 0, /* PCI B slot 1 Int A, B, C, D */
/*0x18*/0, 0, 0, 0, /* PCI B slot 2 Int A, B, C, D */ /*0x18*/0, 0, 0, 0, /* PCI B slot 2 Int A, B, C, D */
/*0x1c*/0, 0, 0, 0, /* PCI B slot 3 Int A, B, C, D */ /*0x1c*/0, 0, 0, 0, /* PCI B slot 3 Int A, B, C, D */
/*0x20*/4, /* SCSI */ /*0x20*/5, /* SCSI */
/*0x21*/5, /* Ethernet */ /*0x21*/5, /* Ethernet */
/*0x22*/8, /* Parallel Port */ /*0x22*/8, /* Parallel Port */
/*0x23*/13, /* Audio Record */ /*0x23*/13, /* Audio Record */
/*0x24*/14, /* Audio Playback */ /*0x24*/14, /* Audio Playback */
/*0x25*/15, /* PowerFail */ /*0x25*/15, /* PowerFail */
/*0x26*/4, /* second SCSI */ /*0x26*/5, /* second SCSI */
/*0x27*/11, /* Floppy */ /*0x27*/11, /* Floppy */
/*0x28*/4, /* Spare Hardware */ /*0x28*/5, /* Spare Hardware */
/*0x29*/9, /* Keyboard */ /*0x29*/9, /* Keyboard */
/*0x2a*/4, /* Mouse */ /*0x2a*/5, /* Mouse */
/*0x2b*/12, /* Serial */ /*0x2b*/12, /* Serial */
/*0x2c*/10, /* Timer 0 */ /*0x2c*/10, /* Timer 0 */
/*0x2d*/11, /* Timer 1 */ /*0x2d*/11, /* Timer 1 */
...@@ -565,11 +565,11 @@ static int sabre_ino_to_pil(struct pci_dev *pdev, unsigned int ino) ...@@ -565,11 +565,11 @@ static int sabre_ino_to_pil(struct pci_dev *pdev, unsigned int ino)
ret = sabre_pil_table[ino]; ret = sabre_pil_table[ino];
if (ret == 0 && pdev == NULL) { if (ret == 0 && pdev == NULL) {
ret = 4; ret = 5;
} else if (ret == 0) { } else if (ret == 0) {
switch ((pdev->class >> 16) & 0xff) { switch ((pdev->class >> 16) & 0xff) {
case PCI_BASE_CLASS_STORAGE: case PCI_BASE_CLASS_STORAGE:
ret = 4; ret = 5;
break; break;
case PCI_BASE_CLASS_NETWORK: case PCI_BASE_CLASS_NETWORK:
...@@ -588,7 +588,7 @@ static int sabre_ino_to_pil(struct pci_dev *pdev, unsigned int ino) ...@@ -588,7 +588,7 @@ static int sabre_ino_to_pil(struct pci_dev *pdev, unsigned int ino)
break; break;
default: default:
ret = 4; ret = 5;
break; break;
}; };
} }
...@@ -1167,7 +1167,7 @@ static void apb_init(struct pci_controller_info *p, struct pci_bus *sabre_bus) ...@@ -1167,7 +1167,7 @@ static void apb_init(struct pci_controller_info *p, struct pci_bus *sabre_bus)
static struct pcidev_cookie *alloc_bridge_cookie(struct pci_pbm_info *pbm) static struct pcidev_cookie *alloc_bridge_cookie(struct pci_pbm_info *pbm)
{ {
struct pcidev_cookie *cookie = kmalloc(sizeof(*cookie), GFP_KERNEL); struct pcidev_cookie *cookie = kzalloc(sizeof(*cookie), GFP_KERNEL);
if (!cookie) { if (!cookie) {
prom_printf("SABRE: Critical allocation failure.\n"); prom_printf("SABRE: Critical allocation failure.\n");
...@@ -1175,7 +1175,6 @@ static struct pcidev_cookie *alloc_bridge_cookie(struct pci_pbm_info *pbm) ...@@ -1175,7 +1175,6 @@ static struct pcidev_cookie *alloc_bridge_cookie(struct pci_pbm_info *pbm)
} }
/* All we care about is the PBM. */ /* All we care about is the PBM. */
memset(cookie, 0, sizeof(*cookie));
cookie->pbm = pbm; cookie->pbm = pbm;
return cookie; return cookie;
...@@ -1556,19 +1555,17 @@ void sabre_init(int pnode, char *model_name) ...@@ -1556,19 +1555,17 @@ void sabre_init(int pnode, char *model_name)
} }
} }
p = kmalloc(sizeof(*p), GFP_ATOMIC); p = kzalloc(sizeof(*p), GFP_ATOMIC);
if (!p) { if (!p) {
prom_printf("SABRE: Error, kmalloc(pci_controller_info) failed.\n"); prom_printf("SABRE: Error, kmalloc(pci_controller_info) failed.\n");
prom_halt(); prom_halt();
} }
memset(p, 0, sizeof(*p));
iommu = kmalloc(sizeof(*iommu), GFP_ATOMIC); iommu = kzalloc(sizeof(*iommu), GFP_ATOMIC);
if (!iommu) { if (!iommu) {
prom_printf("SABRE: Error, kmalloc(pci_iommu) failed.\n"); prom_printf("SABRE: Error, kmalloc(pci_iommu) failed.\n");
prom_halt(); prom_halt();
} }
memset(iommu, 0, sizeof(*iommu));
p->pbm_A.iommu = p->pbm_B.iommu = iommu; p->pbm_A.iommu = p->pbm_B.iommu = iommu;
upa_portid = prom_getintdefault(pnode, "upa-portid", 0xff); upa_portid = prom_getintdefault(pnode, "upa-portid", 0xff);
......
...@@ -243,8 +243,8 @@ static unsigned char schizo_pil_table[] = { ...@@ -243,8 +243,8 @@ static unsigned char schizo_pil_table[] = {
/*0x0c*/0, 0, 0, 0, /* PCI slot 3 Int A, B, C, D */ /*0x0c*/0, 0, 0, 0, /* PCI slot 3 Int A, B, C, D */
/*0x10*/0, 0, 0, 0, /* PCI slot 4 Int A, B, C, D */ /*0x10*/0, 0, 0, 0, /* PCI slot 4 Int A, B, C, D */
/*0x14*/0, 0, 0, 0, /* PCI slot 5 Int A, B, C, D */ /*0x14*/0, 0, 0, 0, /* PCI slot 5 Int A, B, C, D */
/*0x18*/4, /* SCSI */ /*0x18*/5, /* SCSI */
/*0x19*/4, /* second SCSI */ /*0x19*/5, /* second SCSI */
/*0x1a*/0, /* UNKNOWN */ /*0x1a*/0, /* UNKNOWN */
/*0x1b*/0, /* UNKNOWN */ /*0x1b*/0, /* UNKNOWN */
/*0x1c*/8, /* Parallel */ /*0x1c*/8, /* Parallel */
...@@ -254,7 +254,7 @@ static unsigned char schizo_pil_table[] = { ...@@ -254,7 +254,7 @@ static unsigned char schizo_pil_table[] = {
/*0x20*/13, /* Audio Record */ /*0x20*/13, /* Audio Record */
/*0x21*/14, /* Audio Playback */ /*0x21*/14, /* Audio Playback */
/*0x22*/12, /* Serial */ /*0x22*/12, /* Serial */
/*0x23*/4, /* EBUS I2C */ /*0x23*/5, /* EBUS I2C */
/*0x24*/10, /* RTC Clock */ /*0x24*/10, /* RTC Clock */
/*0x25*/11, /* Floppy */ /*0x25*/11, /* Floppy */
/*0x26*/0, /* UNKNOWN */ /*0x26*/0, /* UNKNOWN */
...@@ -296,11 +296,11 @@ static int schizo_ino_to_pil(struct pci_dev *pdev, unsigned int ino) ...@@ -296,11 +296,11 @@ static int schizo_ino_to_pil(struct pci_dev *pdev, unsigned int ino)
ret = schizo_pil_table[ino]; ret = schizo_pil_table[ino];
if (ret == 0 && pdev == NULL) { if (ret == 0 && pdev == NULL) {
ret = 4; ret = 5;
} else if (ret == 0) { } else if (ret == 0) {
switch ((pdev->class >> 16) & 0xff) { switch ((pdev->class >> 16) & 0xff) {
case PCI_BASE_CLASS_STORAGE: case PCI_BASE_CLASS_STORAGE:
ret = 4; ret = 5;
break; break;
case PCI_BASE_CLASS_NETWORK: case PCI_BASE_CLASS_NETWORK:
...@@ -319,7 +319,7 @@ static int schizo_ino_to_pil(struct pci_dev *pdev, unsigned int ino) ...@@ -319,7 +319,7 @@ static int schizo_ino_to_pil(struct pci_dev *pdev, unsigned int ino)
break; break;
default: default:
ret = 4; ret = 5;
break; break;
}; };
} }
...@@ -1525,7 +1525,7 @@ static void pbm_config_busmastering(struct pci_pbm_info *pbm) ...@@ -1525,7 +1525,7 @@ static void pbm_config_busmastering(struct pci_pbm_info *pbm)
static void pbm_scan_bus(struct pci_controller_info *p, static void pbm_scan_bus(struct pci_controller_info *p,
struct pci_pbm_info *pbm) struct pci_pbm_info *pbm)
{ {
struct pcidev_cookie *cookie = kmalloc(sizeof(*cookie), GFP_KERNEL); struct pcidev_cookie *cookie = kzalloc(sizeof(*cookie), GFP_KERNEL);
if (!cookie) { if (!cookie) {
prom_printf("%s: Critical allocation failure.\n", pbm->name); prom_printf("%s: Critical allocation failure.\n", pbm->name);
...@@ -1533,7 +1533,6 @@ static void pbm_scan_bus(struct pci_controller_info *p, ...@@ -1533,7 +1533,6 @@ static void pbm_scan_bus(struct pci_controller_info *p,
} }
/* All we care about is the PBM. */ /* All we care about is the PBM. */
memset(cookie, 0, sizeof(*cookie));
cookie->pbm = pbm; cookie->pbm = pbm;
pbm->pci_bus = pci_scan_bus(pbm->pci_first_busno, pbm->pci_bus = pci_scan_bus(pbm->pci_first_busno,
...@@ -2120,27 +2119,24 @@ static void __schizo_init(int node, char *model_name, int chip_type) ...@@ -2120,27 +2119,24 @@ static void __schizo_init(int node, char *model_name, int chip_type)
} }
} }
p = kmalloc(sizeof(struct pci_controller_info), GFP_ATOMIC); p = kzalloc(sizeof(struct pci_controller_info), GFP_ATOMIC);
if (!p) { if (!p) {
prom_printf("SCHIZO: Fatal memory allocation error.\n"); prom_printf("SCHIZO: Fatal memory allocation error.\n");
prom_halt(); prom_halt();
} }
memset(p, 0, sizeof(*p));
iommu = kmalloc(sizeof(struct pci_iommu), GFP_ATOMIC); iommu = kzalloc(sizeof(struct pci_iommu), GFP_ATOMIC);
if (!iommu) { if (!iommu) {
prom_printf("SCHIZO: Fatal memory allocation error.\n"); prom_printf("SCHIZO: Fatal memory allocation error.\n");
prom_halt(); prom_halt();
} }
memset(iommu, 0, sizeof(*iommu));
p->pbm_A.iommu = iommu; p->pbm_A.iommu = iommu;
iommu = kmalloc(sizeof(struct pci_iommu), GFP_ATOMIC); iommu = kzalloc(sizeof(struct pci_iommu), GFP_ATOMIC);
if (!iommu) { if (!iommu) {
prom_printf("SCHIZO: Fatal memory allocation error.\n"); prom_printf("SCHIZO: Fatal memory allocation error.\n");
prom_halt(); prom_halt();
} }
memset(iommu, 0, sizeof(*iommu));
p->pbm_B.iommu = iommu; p->pbm_B.iommu = iommu;
p->next = pci_controller_root; p->next = pci_controller_root;
......
This diff is collapsed.
/* pci_sun4v.h: SUN4V specific PCI controller support.
*
* Copyright (C) 2006 David S. Miller (davem@davemloft.net)
*/
#ifndef _PCI_SUN4V_H
#define _PCI_SUN4V_H
extern long pci_sun4v_iommu_map(unsigned long devhandle,
unsigned long tsbid,
unsigned long num_ttes,
unsigned long io_attributes,
unsigned long io_page_list_pa);
extern unsigned long pci_sun4v_iommu_demap(unsigned long devhandle,
unsigned long tsbid,
unsigned long num_ttes);
extern unsigned long pci_sun4v_iommu_getmap(unsigned long devhandle,
unsigned long tsbid,
unsigned long *io_attributes,
unsigned long *real_address);
extern unsigned long pci_sun4v_config_get(unsigned long devhandle,
unsigned long pci_device,
unsigned long config_offset,
unsigned long size);
extern int pci_sun4v_config_put(unsigned long devhandle,
unsigned long pci_device,
unsigned long config_offset,
unsigned long size,
unsigned long data);
#endif /* !(_PCI_SUN4V_H) */
/* pci_sun4v_asm: Hypervisor calls for PCI support.
*
* Copyright (C) 2006 David S. Miller <davem@davemloft.net>
*/
#include <asm/hypervisor.h>
/* %o0: devhandle
* %o1: tsbid
* %o2: num ttes
* %o3: io_attributes
* %o4: io_page_list phys address
*
* returns %o0: -status if status was non-zero, else
* %o0: num pages mapped
*/
.globl pci_sun4v_iommu_map
pci_sun4v_iommu_map:
mov %o5, %g1
mov HV_FAST_PCI_IOMMU_MAP, %o5
ta HV_FAST_TRAP
brnz,pn %o0, 1f
sub %g0, %o0, %o0
mov %o1, %o0
1: retl
nop
/* %o0: devhandle
* %o1: tsbid
* %o2: num ttes
*
* returns %o0: num ttes demapped
*/
.globl pci_sun4v_iommu_demap
pci_sun4v_iommu_demap:
mov HV_FAST_PCI_IOMMU_DEMAP, %o5
ta HV_FAST_TRAP
retl
mov %o1, %o0
/* %o0: devhandle
* %o1: tsbid
* %o2: &io_attributes
* %o3: &real_address
*
* returns %o0: status
*/
.globl pci_sun4v_iommu_getmap
pci_sun4v_iommu_getmap:
mov %o2, %o4
mov HV_FAST_PCI_IOMMU_GETMAP, %o5
ta HV_FAST_TRAP
stx %o1, [%o4]
stx %o2, [%o3]
retl
mov %o0, %o0
/* %o0: devhandle
* %o1: pci_device
* %o2: pci_config_offset
* %o3: size
*
* returns %o0: data
*
* If there is an error, the data will be returned
* as all 1's.
*/
.globl pci_sun4v_config_get
pci_sun4v_config_get:
mov HV_FAST_PCI_CONFIG_GET, %o5
ta HV_FAST_TRAP
brnz,a,pn %o1, 1f
mov -1, %o2
1: retl
mov %o2, %o0
/* %o0: devhandle
* %o1: pci_device
* %o2: pci_config_offset
* %o3: size
* %o4: data
*
* returns %o0: status
*
* status will be zero if the operation completed
* successfully, else -1 if not
*/
.globl pci_sun4v_config_put
pci_sun4v_config_put:
mov HV_FAST_PCI_CONFIG_PUT, %o5
ta HV_FAST_TRAP
brnz,a,pn %o1, 1f
mov -1, %o1
1: retl
mov %o1, %o0
This diff is collapsed.
...@@ -124,6 +124,9 @@ void flush_ptrace_access(struct vm_area_struct *vma, struct page *page, ...@@ -124,6 +124,9 @@ void flush_ptrace_access(struct vm_area_struct *vma, struct page *page,
{ {
BUG_ON(len > PAGE_SIZE); BUG_ON(len > PAGE_SIZE);
if (tlb_type == hypervisor)
return;
#ifdef DCACHE_ALIASING_POSSIBLE #ifdef DCACHE_ALIASING_POSSIBLE
/* If bit 13 of the kernel address we used to access the /* If bit 13 of the kernel address we used to access the
* user page is the same as the virtual address that page * user page is the same as the virtual address that page
......
This diff is collapsed.
...@@ -693,11 +693,11 @@ void sbus_set_sbus64(struct sbus_dev *sdev, int bursts) ...@@ -693,11 +693,11 @@ void sbus_set_sbus64(struct sbus_dev *sdev, int bursts)
/* SBUS SYSIO INO number to Sparc PIL level. */ /* SBUS SYSIO INO number to Sparc PIL level. */
static unsigned char sysio_ino_to_pil[] = { static unsigned char sysio_ino_to_pil[] = {
0, 4, 4, 7, 5, 7, 8, 9, /* SBUS slot 0 */ 0, 5, 5, 7, 5, 7, 8, 9, /* SBUS slot 0 */
0, 4, 4, 7, 5, 7, 8, 9, /* SBUS slot 1 */ 0, 5, 5, 7, 5, 7, 8, 9, /* SBUS slot 1 */
0, 4, 4, 7, 5, 7, 8, 9, /* SBUS slot 2 */ 0, 5, 5, 7, 5, 7, 8, 9, /* SBUS slot 2 */
0, 4, 4, 7, 5, 7, 8, 9, /* SBUS slot 3 */ 0, 5, 5, 7, 5, 7, 8, 9, /* SBUS slot 3 */
4, /* Onboard SCSI */ 5, /* Onboard SCSI */
5, /* Onboard Ethernet */ 5, /* Onboard Ethernet */
/*XXX*/ 8, /* Onboard BPP */ /*XXX*/ 8, /* Onboard BPP */
0, /* Bogon */ 0, /* Bogon */
......
This diff is collapsed.
This diff is collapsed.
...@@ -95,9 +95,6 @@ extern int __ashrdi3(int, int); ...@@ -95,9 +95,6 @@ extern int __ashrdi3(int, int);
extern int dump_fpu (struct pt_regs * regs, elf_fpregset_t * fpregs); extern int dump_fpu (struct pt_regs * regs, elf_fpregset_t * fpregs);
extern unsigned long phys_base;
extern unsigned long pfn_base;
extern unsigned int sys_call_table[]; extern unsigned int sys_call_table[];
extern void xor_vis_2(unsigned long, unsigned long *, unsigned long *); extern void xor_vis_2(unsigned long, unsigned long *, unsigned long *);
...@@ -108,6 +105,14 @@ extern void xor_vis_4(unsigned long, unsigned long *, unsigned long *, ...@@ -108,6 +105,14 @@ extern void xor_vis_4(unsigned long, unsigned long *, unsigned long *,
extern void xor_vis_5(unsigned long, unsigned long *, unsigned long *, extern void xor_vis_5(unsigned long, unsigned long *, unsigned long *,
unsigned long *, unsigned long *, unsigned long *); unsigned long *, unsigned long *, unsigned long *);
extern void xor_niagara_2(unsigned long, unsigned long *, unsigned long *);
extern void xor_niagara_3(unsigned long, unsigned long *, unsigned long *,
unsigned long *);
extern void xor_niagara_4(unsigned long, unsigned long *, unsigned long *,
unsigned long *, unsigned long *);
extern void xor_niagara_5(unsigned long, unsigned long *, unsigned long *,
unsigned long *, unsigned long *, unsigned long *);
/* Per-CPU information table */ /* Per-CPU information table */
EXPORT_PER_CPU_SYMBOL(__cpu_data); EXPORT_PER_CPU_SYMBOL(__cpu_data);
...@@ -241,10 +246,6 @@ EXPORT_SYMBOL(verify_compat_iovec); ...@@ -241,10 +246,6 @@ EXPORT_SYMBOL(verify_compat_iovec);
#endif #endif
EXPORT_SYMBOL(dump_fpu); EXPORT_SYMBOL(dump_fpu);
EXPORT_SYMBOL(pte_alloc_one_kernel);
#ifndef CONFIG_SMP
EXPORT_SYMBOL(pgt_quicklists);
#endif
EXPORT_SYMBOL(put_fs_struct); EXPORT_SYMBOL(put_fs_struct);
/* math-emu wants this */ /* math-emu wants this */
...@@ -339,14 +340,10 @@ EXPORT_SYMBOL(copy_to_user_fixup); ...@@ -339,14 +340,10 @@ EXPORT_SYMBOL(copy_to_user_fixup);
EXPORT_SYMBOL(copy_from_user_fixup); EXPORT_SYMBOL(copy_from_user_fixup);
EXPORT_SYMBOL(copy_in_user_fixup); EXPORT_SYMBOL(copy_in_user_fixup);
EXPORT_SYMBOL(__strncpy_from_user); EXPORT_SYMBOL(__strncpy_from_user);
EXPORT_SYMBOL(__bzero_noasi); EXPORT_SYMBOL(__clear_user);
/* Various address conversion macros use this. */ /* Various address conversion macros use this. */
EXPORT_SYMBOL(phys_base);
EXPORT_SYMBOL(pfn_base);
EXPORT_SYMBOL(sparc64_valid_addr_bitmap); EXPORT_SYMBOL(sparc64_valid_addr_bitmap);
EXPORT_SYMBOL(page_to_pfn);
EXPORT_SYMBOL(pfn_to_page);
/* No version information on this, heavily used in inline asm, /* No version information on this, heavily used in inline asm,
* and will always be 'void __ret_efault(void)'. * and will always be 'void __ret_efault(void)'.
...@@ -392,4 +389,9 @@ EXPORT_SYMBOL(xor_vis_3); ...@@ -392,4 +389,9 @@ EXPORT_SYMBOL(xor_vis_3);
EXPORT_SYMBOL(xor_vis_4); EXPORT_SYMBOL(xor_vis_4);
EXPORT_SYMBOL(xor_vis_5); EXPORT_SYMBOL(xor_vis_5);
EXPORT_SYMBOL(xor_niagara_2);
EXPORT_SYMBOL(xor_niagara_3);
EXPORT_SYMBOL(xor_niagara_4);
EXPORT_SYMBOL(xor_niagara_5);
EXPORT_SYMBOL(prom_palette); EXPORT_SYMBOL(prom_palette);
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment