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

Commit 8e44e434 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  Fix build of cpm_uart due to core changes
  powerpc/8xx: Fix regression introduced by cache coherency rewrite
  powerpc/4xx: Fix erroneous xmon warning on PowerPC 4xx
  powerpc/mm: Fix 40x and 8xx vs. _PAGE_SPECIAL
  powerpc: Cleanup linker script using new linker script macros.
  powerpc: Fix ibm,client-architecture-support printout
  powerpc: Increase NODES_SHIFT on 64bit from 4 to 8
  powerpc/perf_counter: Fix vdso detection
  powerpc: Move 64bit heap above 1TB on machines with 1TB segments
  powerpc: Change archdata dma_data to a union
  powerpc: Rename get_dma_direct_offset get_dma_offset
  powerpc/mm: Remove duplicated #include
  powerpc/book3e-64: Remove duplicated #include
  powerpc: Check for unsupported relocs when using CONFIG_RELOCATABLE
  powerpc/pmc: Don't access lppaca on Book3E
  powerpc: kmalloc failure ignored in vio_build_iommu_table()
  hvc_console: Provide (un)locked version for hvc_resize()
parents 06aab5a3 09dd3fc1
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -385,9 +385,15 @@ config NUMA

config NODES_SHIFT
	int
	default "8" if PPC64
	default "4"
	depends on NEED_MULTIPLE_NODES

config MAX_ACTIVE_REGIONS
	int
	default "256" if PPC64
	default "32"

config ARCH_SELECT_MEMORY_MODEL
	def_bool y
	depends on PPC64
+11 −0
Original line number Diff line number Diff line
@@ -164,6 +164,17 @@ PHONY += $(BOOT_TARGETS)

boot := arch/$(ARCH)/boot

ifeq ($(CONFIG_RELOCATABLE),y)
quiet_cmd_relocs_check = CALL    $<
      cmd_relocs_check = perl $< "$(OBJDUMP)" "$(obj)/vmlinux"

PHONY += relocs_check
relocs_check: arch/powerpc/relocs_check.pl vmlinux
	$(call cmd,relocs_check)

zImage: relocs_check
endif

$(BOOT_TARGETS): vmlinux
	$(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@)

+10 −1
Original line number Diff line number Diff line
@@ -15,7 +15,16 @@ struct dev_archdata {

	/* DMA operations on that device */
	struct dma_map_ops	*dma_ops;
	void			*dma_data;

	/*
	 * When an iommu is in use, dma_data is used as a ptr to the base of the
	 * iommu_table.  Otherwise, it is a simple numerical offset.
	 */
	union {
		dma_addr_t	dma_offset;
		void		*iommu_table_base;
	} dma_data;

#ifdef CONFIG_SWIOTLB
	dma_addr_t		max_direct_dma_addr;
#endif
+24 −3
Original line number Diff line number Diff line
@@ -26,7 +26,6 @@ extern void *dma_direct_alloc_coherent(struct device *dev, size_t size,
extern void dma_direct_free_coherent(struct device *dev, size_t size,
				     void *vaddr, dma_addr_t dma_handle);

extern unsigned long get_dma_direct_offset(struct device *dev);

#ifdef CONFIG_NOT_COHERENT_CACHE
/*
@@ -90,6 +89,28 @@ static inline void set_dma_ops(struct device *dev, struct dma_map_ops *ops)
	dev->archdata.dma_ops = ops;
}

/*
 * get_dma_offset()
 *
 * Get the dma offset on configurations where the dma address can be determined
 * from the physical address by looking at a simple offset.  Direct dma and
 * swiotlb use this function, but it is typically not used by implementations
 * with an iommu.
 */
static inline dma_addr_t get_dma_offset(struct device *dev)
{
	if (dev)
		return dev->archdata.dma_data.dma_offset;

	return PCI_DRAM_OFFSET;
}

static inline void set_dma_offset(struct device *dev, dma_addr_t off)
{
	if (dev)
		dev->archdata.dma_data.dma_offset = off;
}

/* this will be removed soon */
#define flush_write_buffers()

@@ -181,12 +202,12 @@ static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)

static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr)
{
	return paddr + get_dma_direct_offset(dev);
	return paddr + get_dma_offset(dev);
}

static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t daddr)
{
	return daddr - get_dma_direct_offset(dev);
	return daddr - get_dma_offset(dev);
}

#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
+10 −0
Original line number Diff line number Diff line
@@ -70,6 +70,16 @@ struct iommu_table {

struct scatterlist;

static inline void set_iommu_table_base(struct device *dev, void *base)
{
	dev->archdata.dma_data.iommu_table_base = base;
}

static inline void *get_iommu_table_base(struct device *dev)
{
	return dev->archdata.dma_data.iommu_table_base;
}

/* Frees table for an individual device node */
extern void iommu_free_table(struct iommu_table *tbl, const char *node_name);

Loading