History

Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm

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

Linus Torvalds committed 11 years ago

Commit 99bc7212 parents 30ec568 7ae85dc3 files · +17 −10Browse files

Unified · Split

3 files
  1. arch/arm/kernel/kgdb.c +5 −3
  2. arch/arm/kernel/signal.c +9 −6
  3. arch/arm/mm/dma-mapping.c +3 −1
arch/arm/kernel/kgdb.c+5−3
@@ -259,15 +259,17 @@ int kgdb_arch_set_breakpoint(struct kgdb_bkpt *bpt) · 258 unmodified lines
259 if (err)259 if (err)
260 return err;260 return err;
261 261
262 patch_text((void *)bpt->bpt_addr,262 /* Machine is already stopped, so we can use __patch_text() directly */
263 *(unsigned int *)arch_kgdb_ops.gdb_bpt_instr);263 __patch_text((void *)bpt->bpt_addr,
264 *(unsigned int *)arch_kgdb_ops.gdb_bpt_instr);
264 265
265 return err;266 return err;
266}267}
267 268
268int kgdb_arch_remove_breakpoint(struct kgdb_bkpt *bpt)269int kgdb_arch_remove_breakpoint(struct kgdb_bkpt *bpt)
269{270{
270 patch_text((void *)bpt->bpt_addr, *(unsigned int *)bpt->saved_instr);271 /* Machine is already stopped, so we can use __patch_text() directly */
272 __patch_text((void *)bpt->bpt_addr, *(unsigned int *)bpt->saved_instr);
271 273
272 return 0;274 return 0;
273}275}
arch/arm/kernel/signal.c+9−6
@@ -343,15 +343,18 @@ setup_return(struct pt_regs *regs, struct ksignal *ksig, · 342 unmodified lines
343 */343 */
344 thumb = handler & 1;344 thumb = handler & 1;
345 345
346#if __LINUX_ARM_ARCH__ >= 7
347 /*346 /*
348 * Clear the If-Then Thumb-2 execution state347 * Clear the If-Then Thumb-2 execution state. ARM spec
349 * ARM spec requires this to be all 000s in ARM mode348 * requires this to be all 000s in ARM mode. Snapdragon
350 * Snapdragon S4/Krait misbehaves on a Thumb=>ARM349 * S4/Krait misbehaves on a Thumb=>ARM signal transition
351 * signal transition without this.350 * without this.
351 *
352 * We must do this whenever we are running on a Thumb-2
353 * capable CPU, which includes ARMv6T2. However, we elect
354 * to always do this to simplify the code; this field is
355 * marked UNK/SBZP for older architectures.
352 */356 */
353 cpsr &= ~PSR_IT_MASK;357 cpsr &= ~PSR_IT_MASK;
354#endif
355 358
356 if (thumb) {359 if (thumb) {
357 cpsr |= PSR_T_BIT;360 cpsr |= PSR_T_BIT;
arch/arm/mm/dma-mapping.c+3−1
@@ -1249,7 +1249,7 @@ __iommu_create_mapping(struct device *dev, struct page **pages, size_t size) · 1248 unmodified lines
1249 struct dma_iommu_mapping *mapping = to_dma_iommu_mapping(dev);1249 struct dma_iommu_mapping *mapping = to_dma_iommu_mapping(dev);
1250 unsigned int count = PAGE_ALIGN(size) >> PAGE_SHIFT;1250 unsigned int count = PAGE_ALIGN(size) >> PAGE_SHIFT;
1251 dma_addr_t dma_addr, iova;1251 dma_addr_t dma_addr, iova;
1252 int i, ret = DMA_ERROR_CODE;1252 int i;
1253 1253
1254 dma_addr = __alloc_iova(mapping, size);1254 dma_addr = __alloc_iova(mapping, size);
1255 if (dma_addr == DMA_ERROR_CODE)1255 if (dma_addr == DMA_ERROR_CODE)
@@ -1257,6 +1257,8 @@ __iommu_create_mapping(struct device *dev, struct page **pages, size_t size) · 1 unmodified line
1257 1257
1258 iova = dma_addr;1258 iova = dma_addr;
1259 for (i = 0; i < count; ) {1259 for (i = 0; i < count; ) {
1260 int ret;
1261
1260 unsigned int next_pfn = page_to_pfn(pages[i]) + 1;1262 unsigned int next_pfn = page_to_pfn(pages[i]) + 1;
1261 phys_addr_t phys = page_to_phys(pages[i]);1263 phys_addr_t phys = page_to_phys(pages[i]);
1262 unsigned int len, j;1264 unsigned int len, j;