Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5bc705e9 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [MATH-EMU]: Fix underflow exception reporting.
  [SPARC64]: Create a HWCAP_SPARC_N2 and report it to userspace on Niagara-2.
  [SPARC64]: SMP trampoline needs to avoid %tick_cmpr on sun4v too.
  [SPARC64]: Do not touch %tick_cmpr on sun4v cpus.
  [SPARC64]: Niagara-2 optimized copies.
  [SPARC64]: Allow userspace to get at the machine description.
  [SPARC32]: Remove superfluous 'kernel_end' alignment on sun4c.
  [SPARC32]: Fix bogus ramdisk image location check.
  [SPARC32]: Remove iommu from struct sbus_bus and use archdata like sparc64.
parents 605a494e 40584961
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -238,6 +238,7 @@ void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_device *d
	sd = &dev->ofdev.dev.archdata;
	sd->prom_node = dp;
	sd->op = &dev->ofdev;
	sd->iommu = dev->bus->ofdev.dev.parent->archdata.iommu;

	dev->ofdev.node = dp;
	dev->ofdev.dev.parent = &dev->bus->ofdev.dev;
+1 −2
Original line number Diff line number Diff line
@@ -206,7 +206,6 @@ unsigned long __init bootmem_init(unsigned long *pages_avail)
#ifdef CONFIG_BLK_DEV_INITRD
	/* Now have to check initial ramdisk, so that bootmap does not overwrite it */
	if (sparc_ramdisk_image) {
		if (sparc_ramdisk_image >= (unsigned long)&_end - 2 * PAGE_SIZE)
		sparc_ramdisk_image -= KERNBASE;
		initrd_start = sparc_ramdisk_image + phys_base;
		initrd_end = initrd_start + sparc_ramdisk_size;
+9 −9
Original line number Diff line number Diff line
@@ -66,7 +66,7 @@ iounit_init(int sbi_node, int io_node, struct sbus_bus *sbus)
	}
	if(!xpt) panic("Cannot map External Page Table.");
	
	sbus->iommu = (struct iommu_struct *)iounit;
	sbus->ofdev.dev.archdata.iommu = iounit;
	iounit->page_table = xpt;
	spin_lock_init(&iounit->lock);
	
@@ -127,7 +127,7 @@ nexti: scan = find_next_zero_bit(iounit->bmap, limit, scan);
static __u32 iounit_get_scsi_one(char *vaddr, unsigned long len, struct sbus_bus *sbus)
{
	unsigned long ret, flags;
	struct iounit_struct *iounit = (struct iounit_struct *)sbus->iommu;
	struct iounit_struct *iounit = sbus->ofdev.dev.archdata.iommu;
	
	spin_lock_irqsave(&iounit->lock, flags);
	ret = iounit_get_area(iounit, (unsigned long)vaddr, len);
@@ -138,7 +138,7 @@ static __u32 iounit_get_scsi_one(char *vaddr, unsigned long len, struct sbus_bus
static void iounit_get_scsi_sgl(struct scatterlist *sg, int sz, struct sbus_bus *sbus)
{
	unsigned long flags;
	struct iounit_struct *iounit = (struct iounit_struct *)sbus->iommu;
	struct iounit_struct *iounit = sbus->ofdev.dev.archdata.iommu;

	/* FIXME: Cache some resolved pages - often several sg entries are to the same page */
	spin_lock_irqsave(&iounit->lock, flags);
@@ -153,7 +153,7 @@ static void iounit_get_scsi_sgl(struct scatterlist *sg, int sz, struct sbus_bus
static void iounit_release_scsi_one(__u32 vaddr, unsigned long len, struct sbus_bus *sbus)
{
	unsigned long flags;
	struct iounit_struct *iounit = (struct iounit_struct *)sbus->iommu;
	struct iounit_struct *iounit = sbus->ofdev.dev.archdata.iommu;
	
	spin_lock_irqsave(&iounit->lock, flags);
	len = ((vaddr & ~PAGE_MASK) + len + (PAGE_SIZE-1)) >> PAGE_SHIFT;
@@ -168,7 +168,7 @@ static void iounit_release_scsi_sgl(struct scatterlist *sg, int sz, struct sbus_
{
	unsigned long flags;
	unsigned long vaddr, len;
	struct iounit_struct *iounit = (struct iounit_struct *)sbus->iommu;
	struct iounit_struct *iounit = sbus->ofdev.dev.archdata.iommu;

	spin_lock_irqsave(&iounit->lock, flags);
	while (sz != 0) {
@@ -211,7 +211,7 @@ static int iounit_map_dma_area(dma_addr_t *pba, unsigned long va, __u32 addr, in
			i = ((addr - IOUNIT_DMA_BASE) >> PAGE_SHIFT);

			for_each_sbus(sbus) {
				struct iounit_struct *iounit = (struct iounit_struct *)sbus->iommu;
				struct iounit_struct *iounit = sbus->ofdev.dev.archdata.iommu;

				iopte = (iopte_t *)(iounit->page_table + i);
				*iopte = MKIOPTE(__pa(page));
@@ -235,7 +235,7 @@ static void iounit_unmap_dma_area(unsigned long addr, int len)
static struct page *iounit_translate_dvma(unsigned long addr)
{
	struct sbus_bus *sbus = sbus_root;	/* They are all the same */
	struct iounit_struct *iounit = (struct iounit_struct *)sbus->iommu;
	struct iounit_struct *iounit = sbus->ofdev.dev.archdata.iommu;
	int i;
	iopte_t *iopte;

@@ -279,7 +279,7 @@ __u32 iounit_map_dma_init(struct sbus_bus *sbus, int size)
	unsigned long rotor, scan, limit;
	unsigned long flags;
	__u32 ret;
	struct iounit_struct *iounit = (struct iounit_struct *)sbus->iommu;
	struct iounit_struct *iounit = sbus->ofdev.dev.archdata.iommu;

        npages = (size + (PAGE_SIZE-1)) >> PAGE_SHIFT;
	i = 0x0213;
@@ -315,7 +315,7 @@ nexti: scan = find_next_zero_bit(iounit->bmap, limit, scan);
__u32 iounit_map_dma_page(__u32 vaddr, void *addr, struct sbus_bus *sbus)
{
	int scan = (vaddr - IOUNIT_DMA_BASE) >> PAGE_SHIFT;
	struct iounit_struct *iounit = (struct iounit_struct *)sbus->iommu;
	struct iounit_struct *iounit = sbus->ofdev.dev.archdata.iommu;
	
	iounit->page_table[scan] = MKIOPTE(__pa(((unsigned long)addr) & PAGE_MASK));
	return vaddr + (((unsigned long)addr) & ~PAGE_MASK);
+6 −6
Original line number Diff line number Diff line
@@ -132,7 +132,7 @@ iommu_init(int iommund, struct sbus_bus *sbus)
	    impl, vers, iommu->page_table,
	    (int)(IOMMU_NPTES*sizeof(iopte_t)), (int)IOMMU_NPTES);

	sbus->iommu = iommu;
	sbus->ofdev.dev.archdata.iommu = iommu;
}

/* This begs to be btfixup-ed by srmmu. */
@@ -166,7 +166,7 @@ static void iommu_flush_iotlb(iopte_t *iopte, unsigned int niopte)

static u32 iommu_get_one(struct page *page, int npages, struct sbus_bus *sbus)
{
	struct iommu_struct *iommu = sbus->iommu;
	struct iommu_struct *iommu = sbus->ofdev.dev.archdata.iommu;
	int ioptex;
	iopte_t *iopte, *iopte0;
	unsigned int busa, busa0;
@@ -291,7 +291,7 @@ static void iommu_get_scsi_sgl_pflush(struct scatterlist *sg, int sz, struct sbu

static void iommu_release_one(u32 busa, int npages, struct sbus_bus *sbus)
{
	struct iommu_struct *iommu = sbus->iommu;
	struct iommu_struct *iommu = sbus->ofdev.dev.archdata.iommu;
	int ioptex;
	int i;

@@ -334,7 +334,7 @@ static int iommu_map_dma_area(dma_addr_t *pba, unsigned long va,
    unsigned long addr, int len)
{
	unsigned long page, end;
	struct iommu_struct *iommu = sbus_root->iommu;
	struct iommu_struct *iommu = sbus_root->ofdev.dev.archdata.iommu;
	iopte_t *iopte = iommu->page_table;
	iopte_t *first;
	int ioptex;
@@ -399,7 +399,7 @@ static int iommu_map_dma_area(dma_addr_t *pba, unsigned long va,

static void iommu_unmap_dma_area(unsigned long busa, int len)
{
	struct iommu_struct *iommu = sbus_root->iommu;
	struct iommu_struct *iommu = sbus_root->ofdev.dev.archdata.iommu;
	iopte_t *iopte = iommu->page_table;
	unsigned long end;
	int ioptex = (busa - iommu->start) >> PAGE_SHIFT;
@@ -420,7 +420,7 @@ static void iommu_unmap_dma_area(unsigned long busa, int len)

static struct page *iommu_translate_dvma(unsigned long busa)
{
	struct iommu_struct *iommu = sbus_root->iommu;
	struct iommu_struct *iommu = sbus_root->ofdev.dev.archdata.iommu;
	iopte_t *iopte = iommu->page_table;

	iopte += ((busa - iommu->start) >> PAGE_SHIFT);
+0 −2
Original line number Diff line number Diff line
@@ -268,7 +268,6 @@ static inline void sun4c_init_clean_mmu(unsigned long kernel_end)
	unsigned char savectx, ctx;

	savectx = sun4c_get_context();
	kernel_end = SUN4C_REAL_PGDIR_ALIGN(kernel_end);
	for (ctx = 0; ctx < num_contexts; ctx++) {
		sun4c_set_context(ctx);
		for (vaddr = 0; vaddr < 0x20000000; vaddr += SUN4C_REAL_PGDIR_SIZE)
@@ -2064,7 +2063,6 @@ void __init sun4c_paging_init(void)
	unsigned long end_pfn, pages_avail;

	kernel_end = (unsigned long) &end;
	kernel_end += (SUN4C_REAL_PGDIR_SIZE * 4);
	kernel_end = SUN4C_REAL_PGDIR_ALIGN(kernel_end);

	pages_avail = 0;
Loading