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

Commit 99bc7215 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull ARM fixes from Russell King:
 "Three fixes and a resulting cleanup for -rc2:

   - Andre Przywara reported that he was seeing a warning with the new
     cast inside DMA_ERROR_CODE's definition, and fixed the incorrect
     use.

   - Doug Anderson noticed that kgdb causes a "scheduling while atomic"
     bug.

   - OMAP5 folk noticed that their Thumb-2 compiled X servers crashed
     when enabling support to cover ARMv6 CPUs due to a kernel bug
     leaking some conditional context into the signal handler"

* 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
  ARM: 8425/1: kgdb: Don't try to stop the machine when setting breakpoints
  ARM: 8437/1: dma-mapping: fix build warning with new DMA_ERROR_CODE definition
  ARM: get rid of needless #if in signal handling code
  ARM: fix Thumb2 signal handling when ARMv6 is enabled
parents 30ec5682 7ae85dc7
Loading
Loading
Loading
Loading
+5 −3
Original line number Original line Diff line number Diff line
@@ -259,7 +259,8 @@ int kgdb_arch_set_breakpoint(struct kgdb_bkpt *bpt)
	if (err)
	if (err)
		return err;
		return err;


	patch_text((void *)bpt->bpt_addr,
	/* Machine is already stopped, so we can use __patch_text() directly */
	__patch_text((void *)bpt->bpt_addr,
		     *(unsigned int *)arch_kgdb_ops.gdb_bpt_instr);
		     *(unsigned int *)arch_kgdb_ops.gdb_bpt_instr);


	return err;
	return err;
@@ -267,7 +268,8 @@ int kgdb_arch_set_breakpoint(struct kgdb_bkpt *bpt)


int kgdb_arch_remove_breakpoint(struct kgdb_bkpt *bpt)
int kgdb_arch_remove_breakpoint(struct kgdb_bkpt *bpt)
{
{
	patch_text((void *)bpt->bpt_addr, *(unsigned int *)bpt->saved_instr);
	/* Machine is already stopped, so we can use __patch_text() directly */
	__patch_text((void *)bpt->bpt_addr, *(unsigned int *)bpt->saved_instr);


	return 0;
	return 0;
}
}
+9 −6
Original line number Original line Diff line number Diff line
@@ -343,15 +343,18 @@ setup_return(struct pt_regs *regs, struct ksignal *ksig,
		 */
		 */
		thumb = handler & 1;
		thumb = handler & 1;


#if __LINUX_ARM_ARCH__ >= 7
		/*
		/*
		 * Clear the If-Then Thumb-2 execution state
		 * Clear the If-Then Thumb-2 execution state.  ARM spec
		 * ARM spec requires this to be all 000s in ARM mode
		 * requires this to be all 000s in ARM mode.  Snapdragon
		 * Snapdragon S4/Krait misbehaves on a Thumb=>ARM
		 * S4/Krait misbehaves on a Thumb=>ARM signal transition
		 * signal transition without this.
		 * without this.
		 *
		 * We must do this whenever we are running on a Thumb-2
		 * capable CPU, which includes ARMv6T2.  However, we elect
		 * to always do this to simplify the code; this field is
		 * marked UNK/SBZP for older architectures.
		 */
		 */
		cpsr &= ~PSR_IT_MASK;
		cpsr &= ~PSR_IT_MASK;
#endif


		if (thumb) {
		if (thumb) {
			cpsr |= PSR_T_BIT;
			cpsr |= PSR_T_BIT;
+3 −1
Original line number Original line Diff line number Diff line
@@ -1249,7 +1249,7 @@ __iommu_create_mapping(struct device *dev, struct page **pages, size_t size)
	struct dma_iommu_mapping *mapping = to_dma_iommu_mapping(dev);
	struct dma_iommu_mapping *mapping = to_dma_iommu_mapping(dev);
	unsigned int count = PAGE_ALIGN(size) >> PAGE_SHIFT;
	unsigned int count = PAGE_ALIGN(size) >> PAGE_SHIFT;
	dma_addr_t dma_addr, iova;
	dma_addr_t dma_addr, iova;
	int i, ret = DMA_ERROR_CODE;
	int i;


	dma_addr = __alloc_iova(mapping, size);
	dma_addr = __alloc_iova(mapping, size);
	if (dma_addr == DMA_ERROR_CODE)
	if (dma_addr == DMA_ERROR_CODE)
@@ -1257,6 +1257,8 @@ __iommu_create_mapping(struct device *dev, struct page **pages, size_t size)


	iova = dma_addr;
	iova = dma_addr;
	for (i = 0; i < count; ) {
	for (i = 0; i < count; ) {
		int ret;

		unsigned int next_pfn = page_to_pfn(pages[i]) + 1;
		unsigned int next_pfn = page_to_pfn(pages[i]) + 1;
		phys_addr_t phys = page_to_phys(pages[i]);
		phys_addr_t phys = page_to_phys(pages[i]);
		unsigned int len, j;
		unsigned int len, j;