Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'parisc-for-6.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux

Pull parisc architecture fixes from Helge Deller:

- early fixmap preallocation to fix boot failures on kernel >= 6.4

- remove DMA leftover code in parport_gsc

- drop old comments and code style fixes

* tag 'parisc-for-6.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
parisc: unaligned: Add required spaces after ','
parport: gsc: remove DMA leftover code
parisc: pci-dma: remove unused and dead EISA code and comment
parisc/mm: preallocate fixmap page tables at init

+47 -51
-8
arch/parisc/kernel/pci-dma.c
··· 417 417 map_uncached_pages(vaddr, size, paddr); 418 418 *dma_handle = (dma_addr_t) paddr; 419 419 420 - #if 0 421 - /* This probably isn't needed to support EISA cards. 422 - ** ISA cards will certainly only support 24-bit DMA addressing. 423 - ** Not clear if we can, want, or need to support ISA. 424 - */ 425 - if (!dev || *dev->coherent_dma_mask < 0xffffffff) 426 - gfp |= GFP_DMA; 427 - #endif 428 420 return (void *)vaddr; 429 421 } 430 422
+9 -9
arch/parisc/kernel/unaligned.c
··· 337 337 : "r19", "r20", "r21", "r22", "r1" ); 338 338 #else 339 339 { 340 - unsigned long valh=(val>>32),vall=(val&0xffffffffl); 340 + unsigned long valh = (val >> 32), vall = (val & 0xffffffffl); 341 341 __asm__ __volatile__ ( 342 342 " mtsp %4, %%sr1\n" 343 343 " zdep %2, 29, 2, %%r19\n" ··· 473 473 case OPCODE_LDWA_I: 474 474 case OPCODE_LDW_S: 475 475 case OPCODE_LDWA_S: 476 - ret = emulate_ldw(regs, R3(regs->iir),0); 476 + ret = emulate_ldw(regs, R3(regs->iir), 0); 477 477 break; 478 478 479 479 case OPCODE_STH: ··· 482 482 483 483 case OPCODE_STW: 484 484 case OPCODE_STWA: 485 - ret = emulate_stw(regs, R2(regs->iir),0); 485 + ret = emulate_stw(regs, R2(regs->iir), 0); 486 486 break; 487 487 488 488 #ifdef CONFIG_64BIT ··· 490 490 case OPCODE_LDDA_I: 491 491 case OPCODE_LDD_S: 492 492 case OPCODE_LDDA_S: 493 - ret = emulate_ldd(regs, R3(regs->iir),0); 493 + ret = emulate_ldd(regs, R3(regs->iir), 0); 494 494 break; 495 495 496 496 case OPCODE_STD: 497 497 case OPCODE_STDA: 498 - ret = emulate_std(regs, R2(regs->iir),0); 498 + ret = emulate_std(regs, R2(regs->iir), 0); 499 499 break; 500 500 #endif 501 501 ··· 503 503 case OPCODE_FLDWS: 504 504 case OPCODE_FLDWXR: 505 505 case OPCODE_FLDWSR: 506 - ret = emulate_ldw(regs,FR3(regs->iir),1); 506 + ret = emulate_ldw(regs, FR3(regs->iir), 1); 507 507 break; 508 508 509 509 case OPCODE_FLDDX: 510 510 case OPCODE_FLDDS: 511 - ret = emulate_ldd(regs,R3(regs->iir),1); 511 + ret = emulate_ldd(regs, R3(regs->iir), 1); 512 512 break; 513 513 514 514 case OPCODE_FSTWX: 515 515 case OPCODE_FSTWS: 516 516 case OPCODE_FSTWXR: 517 517 case OPCODE_FSTWSR: 518 - ret = emulate_stw(regs,FR3(regs->iir),1); 518 + ret = emulate_stw(regs, FR3(regs->iir), 1); 519 519 break; 520 520 521 521 case OPCODE_FSTDX: 522 522 case OPCODE_FSTDS: 523 - ret = emulate_std(regs,R3(regs->iir),1); 523 + ret = emulate_std(regs, R3(regs->iir), 1); 524 524 break; 525 525 526 526 case OPCODE_LDCD_I:
-3
arch/parisc/mm/fixmap.c
··· 19 19 pmd_t *pmd = pmd_offset(pud, vaddr); 20 20 pte_t *pte; 21 21 22 - if (pmd_none(*pmd)) 23 - pte = pte_alloc_kernel(pmd, vaddr); 24 - 25 22 pte = pte_offset_kernel(pmd, vaddr); 26 23 set_pte_at(&init_mm, vaddr, pte, __mk_pte(phys, PAGE_KERNEL_RWX)); 27 24 flush_tlb_kernel_range(vaddr, vaddr + PAGE_SIZE);
+34
arch/parisc/mm/init.c
··· 669 669 PAGE_SIZE, PAGE_GATEWAY, 1); 670 670 } 671 671 672 + static void __init fixmap_init(void) 673 + { 674 + unsigned long addr = FIXMAP_START; 675 + unsigned long end = FIXMAP_START + FIXMAP_SIZE; 676 + pgd_t *pgd = pgd_offset_k(addr); 677 + p4d_t *p4d = p4d_offset(pgd, addr); 678 + pud_t *pud = pud_offset(p4d, addr); 679 + pmd_t *pmd; 680 + 681 + BUILD_BUG_ON(FIXMAP_SIZE > PMD_SIZE); 682 + 683 + #if CONFIG_PGTABLE_LEVELS == 3 684 + if (pud_none(*pud)) { 685 + pmd = memblock_alloc(PAGE_SIZE << PMD_TABLE_ORDER, 686 + PAGE_SIZE << PMD_TABLE_ORDER); 687 + if (!pmd) 688 + panic("fixmap: pmd allocation failed.\n"); 689 + pud_populate(NULL, pud, pmd); 690 + } 691 + #endif 692 + 693 + pmd = pmd_offset(pud, addr); 694 + do { 695 + pte_t *pte = memblock_alloc(PAGE_SIZE, PAGE_SIZE); 696 + if (!pte) 697 + panic("fixmap: pte allocation failed.\n"); 698 + 699 + pmd_populate_kernel(&init_mm, pmd, pte); 700 + 701 + addr += PAGE_SIZE; 702 + } while (addr < end); 703 + } 704 + 672 705 static void __init parisc_bootmem_free(void) 673 706 { 674 707 unsigned long max_zone_pfn[MAX_NR_ZONES] = { 0, }; ··· 716 683 setup_bootmem(); 717 684 pagetable_init(); 718 685 gateway_init(); 686 + fixmap_init(); 719 687 flush_cache_all_local(); /* start with known state */ 720 688 flush_tlb_all_local(NULL); 721 689
+4 -24
drivers/parport/parport_gsc.c
··· 28 28 #include <linux/sysctl.h> 29 29 30 30 #include <asm/io.h> 31 - #include <asm/dma.h> 32 31 #include <linux/uaccess.h> 33 32 #include <asm/superio.h> 34 33 ··· 225 226 226 227 /* --- Initialisation code -------------------------------- */ 227 228 228 - struct parport *parport_gsc_probe_port(unsigned long base, 229 + static struct parport *parport_gsc_probe_port(unsigned long base, 229 230 unsigned long base_hi, int irq, 230 - int dma, struct parisc_device *padev) 231 + struct parisc_device *padev) 231 232 { 232 233 struct parport_gsc_private *priv; 233 234 struct parport_operations *ops; ··· 249 250 } 250 251 priv->ctr = 0xc; 251 252 priv->ctr_writable = 0xff; 252 - priv->dma_buf = NULL; 253 - priv->dma_handle = 0; 254 253 p->base = base; 255 254 p->base_hi = base_hi; 256 255 p->irq = irq; 257 - p->dma = dma; 258 256 p->modes = PARPORT_MODE_PCSPP | PARPORT_MODE_SAFEININT; 259 257 p->ops = ops; 260 258 p->private_data = priv; ··· 282 286 if (p->irq == PARPORT_IRQ_AUTO) { 283 287 p->irq = PARPORT_IRQ_NONE; 284 288 } 285 - if (p->irq != PARPORT_IRQ_NONE) { 289 + if (p->irq != PARPORT_IRQ_NONE) 286 290 pr_cont(", irq %d", p->irq); 287 - 288 - if (p->dma == PARPORT_DMA_AUTO) { 289 - p->dma = PARPORT_DMA_NONE; 290 - } 291 - } 292 - if (p->dma == PARPORT_DMA_AUTO) /* To use DMA, giving the irq 293 - is mandatory (see above) */ 294 - p->dma = PARPORT_DMA_NONE; 295 291 296 292 pr_cont(" ["); 297 293 #define printmode(x) \ ··· 309 321 pr_warn("%s: irq %d in use, resorting to polled operation\n", 310 322 p->name, p->irq); 311 323 p->irq = PARPORT_IRQ_NONE; 312 - p->dma = PARPORT_DMA_NONE; 313 324 } 314 325 } 315 326 ··· 356 369 pr_info("%s: enhanced parport-modes not supported\n", __func__); 357 370 } 358 371 359 - p = parport_gsc_probe_port(port, 0, dev->irq, 360 - /* PARPORT_IRQ_NONE */ PARPORT_DMA_NONE, dev); 372 + p = parport_gsc_probe_port(port, 0, dev->irq, dev); 361 373 if (p) 362 374 parport_count++; 363 375 dev_set_drvdata(&dev->dev, p); ··· 368 382 { 369 383 struct parport *p = dev_get_drvdata(&dev->dev); 370 384 if (p) { 371 - struct parport_gsc_private *priv = p->private_data; 372 385 struct parport_operations *ops = p->ops; 373 386 parport_remove_port(p); 374 - if (p->dma != PARPORT_DMA_NONE) 375 - free_dma(p->dma); 376 387 if (p->irq != PARPORT_IRQ_NONE) 377 388 free_irq(p->irq, p); 378 - if (priv->dma_buf) 379 - dma_free_coherent(&priv->dev->dev, PAGE_SIZE, 380 - priv->dma_buf, priv->dma_handle); 381 389 kfree (p->private_data); 382 390 parport_put_port(p); 383 391 kfree (ops); /* hope no-one cached it */
-7
drivers/parport/parport_gsc.h
··· 63 63 int writeIntrThreshold; 64 64 65 65 /* buffer suitable for DMA, if DMA enabled */ 66 - char *dma_buf; 67 - dma_addr_t dma_handle; 68 66 struct pci_dev *dev; 69 67 }; 70 68 ··· 196 198 extern void parport_gsc_inc_use_count(void); 197 199 198 200 extern void parport_gsc_dec_use_count(void); 199 - 200 - extern struct parport *parport_gsc_probe_port(unsigned long base, 201 - unsigned long base_hi, 202 - int irq, int dma, 203 - struct parisc_device *padev); 204 201 205 202 #endif /* __DRIVERS_PARPORT_PARPORT_GSC_H */