Skip to content

Commit b57b17e

Browse files
committed
Merge tag 'parisc-for-6.7-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull parisc architecture fixes from Helge Deller: - Include the upper 5 address bits when inserting TLB entries on a 64-bit kernel. On physical machines those are ignored, but in qemu it's nice to have them included and to be correct. - Stop the 64-bit kernel and show a warning if someone tries to boot on a machine with a 32-bit CPU - Fix a "no previous prototype" warning in parport-gsc * tag 'parisc-for-6.7-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Prevent booting 64-bit kernels on PA1.x machines parport: gsc: mark init function static parisc/pgtable: Do not drop upper 5 address bits of physical address
2 parents 4eeee66 + a406b8b commit b57b17e

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

arch/parisc/kernel/entry.S

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -475,22 +475,21 @@
475475
* to a CPU TLB 4k PFN (4k => 12 bits to shift) */
476476
#define PAGE_ADD_SHIFT (PAGE_SHIFT-12)
477477
#define PAGE_ADD_HUGE_SHIFT (REAL_HPAGE_SHIFT-12)
478+
#define PFN_START_BIT (63-ASM_PFN_PTE_SHIFT+(63-58)-PAGE_ADD_SHIFT)
478479

479480
/* Drop prot bits and convert to page addr for iitlbt and idtlbt */
480481
.macro convert_for_tlb_insert20 pte,tmp
481482
#ifdef CONFIG_HUGETLB_PAGE
482483
copy \pte,\tmp
483-
extrd,u \tmp,(63-ASM_PFN_PTE_SHIFT)+(63-58)+PAGE_ADD_SHIFT,\
484-
64-PAGE_SHIFT-PAGE_ADD_SHIFT,\pte
484+
extrd,u \tmp,PFN_START_BIT,PFN_START_BIT+1,\pte
485485

486486
depdi _PAGE_SIZE_ENCODING_DEFAULT,63,\
487487
(63-58)+PAGE_ADD_SHIFT,\pte
488488
extrd,u,*= \tmp,_PAGE_HPAGE_BIT+32,1,%r0
489489
depdi _HUGE_PAGE_SIZE_ENCODING_DEFAULT,63,\
490490
(63-58)+PAGE_ADD_HUGE_SHIFT,\pte
491491
#else /* Huge pages disabled */
492-
extrd,u \pte,(63-ASM_PFN_PTE_SHIFT)+(63-58)+PAGE_ADD_SHIFT,\
493-
64-PAGE_SHIFT-PAGE_ADD_SHIFT,\pte
492+
extrd,u \pte,PFN_START_BIT,PFN_START_BIT+1,\pte
494493
depdi _PAGE_SIZE_ENCODING_DEFAULT,63,\
495494
(63-58)+PAGE_ADD_SHIFT,\pte
496495
#endif

arch/parisc/kernel/head.S

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,8 @@ $bss_loop:
7070
stw,ma %arg2,4(%r1)
7171
stw,ma %arg3,4(%r1)
7272

73-
#if !defined(CONFIG_64BIT) && defined(CONFIG_PA20)
74-
/* This 32-bit kernel was compiled for PA2.0 CPUs. Check current CPU
75-
* and halt kernel if we detect a PA1.x CPU. */
73+
#if defined(CONFIG_PA20)
74+
/* check for 64-bit capable CPU as required by current kernel */
7675
ldi 32,%r10
7776
mtctl %r10,%cr11
7877
.level 2.0

drivers/parport/parport_gsc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ static struct parisc_driver parport_driver __refdata = {
392392
.remove = __exit_p(parport_remove_chip),
393393
};
394394

395-
int parport_gsc_init(void)
395+
static int parport_gsc_init(void)
396396
{
397397
return register_parisc_driver(&parport_driver);
398398
}

0 commit comments

Comments
 (0)