Commit 1a5304fe authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull parisc updates from Helge Deller:
 "Two important fixes in here:

   - The argument pointer register was wrong when calling 64-bit
     firmware functions, which may cause random memory corruption or
     crashes.

   - Ensure page alignment in cache flush functions, otherwise not all
     memory might get flushed.

  The rest are cleanups (mmap implementation, panic path) and usual
  smaller updates.

  Summary:

   - Calculate correct argument pointer in real64_call_asm()

   - Cleanup mmap implementation regarding color alignment (John David
     Anglin)

   - Spinlock fixes in panic path (Guilherme G. Piccoli)

   - build doc update for parisc64 (Randy Dunlap)

   - Ensure page alignment in flush functions"

* tag 'parisc-for-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
  parisc: Fix argument pointer in real64_call_asm()
  parisc: Cleanup mmap implementation regarding color alignment
  parisc: Drop HP-UX constants and structs from grfioctl.h
  parisc: Ensure page alignment in flush functions
  parisc: Replace regular spinlock with spin_trylock on panic path
  parisc: update kbuild doc. aliases for parisc64
  parisc: Limit amount of kgdb breakpoints on parisc
parents b4082428 6e3220ba
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -160,6 +160,7 @@ directory name found in the arch/ directory.
But some architectures such as x86 and sparc have aliases.

- x86: i386 for 32 bit, x86_64 for 64 bit
- parisc: parisc64 for 64 bit
- sparc: sparc32 for 32 bit, sparc64 for 64 bit

CROSS_COMPILE
+0 −38
Original line number Diff line number Diff line
@@ -59,42 +59,4 @@
#define CRT_ID_LEGO		0x35ACDA30	/* Lego FX5, FX10 ... */
#define CRT_ID_PINNACLE		0x35ACDA16	/* Pinnacle FXe */ 

/* structure for ioctl(GCDESCRIBE) */

#define gaddr_t unsigned long	/* FIXME: PA2.0 (64bit) portable ? */

struct	grf_fbinfo {
	unsigned int	id;		/* upper 32 bits of graphics id */
	unsigned int	mapsize;	/* mapped size of framebuffer */
	unsigned int	dwidth, dlength;/* x and y sizes */
	unsigned int	width, length;	/* total x and total y size */
	unsigned int	xlen;		/* x pitch size */
	unsigned int	bpp, bppu;	/* bits per pixel and used bpp */
	unsigned int	npl, nplbytes;	/* # of planes and bytes per plane */
	char		name[32];	/* name of the device (from ROM) */
	unsigned int	attr;		/* attributes */
	gaddr_t 	fbbase, regbase;/* framebuffer and register base addr */
	gaddr_t		regions[6];	/* region bases */
};

#define	GCID		_IOR('G', 0, int)
#define	GCON		_IO('G', 1)
#define	GCOFF		_IO('G', 2)
#define	GCAON		_IO('G', 3)
#define	GCAOFF		_IO('G', 4)
#define	GCMAP		_IOWR('G', 5, int)
#define	GCUNMAP		_IOWR('G', 6, int)
#define	GCMAP_HPUX	_IO('G', 5)
#define	GCUNMAP_HPUX	_IO('G', 6)
#define	GCLOCK		_IO('G', 7)
#define	GCUNLOCK	_IO('G', 8)
#define	GCLOCK_MINIMUM	_IO('G', 9)
#define	GCUNLOCK_MINIMUM _IO('G', 10)
#define	GCSTATIC_CMAP	_IO('G', 11)
#define	GCVARIABLE_CMAP _IO('G', 12)
#define GCTERM		_IOWR('G',20,int)	/* multi-headed Tomcat */ 
#define GCDESCRIBE	_IOR('G', 21, struct grf_fbinfo)
#define GCFASTLOCK	_IO('G', 26)

#endif /* __ASM_PARISC_GRFIOCTL_H */
+2 −0
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@
#define NUMREGBYTES			sizeof(struct parisc_gdb_regs)
#define BUFMAX				4096

#define KGDB_MAX_BREAKPOINTS		40

#define CACHE_FLUSH_IS_SAFE		1

#ifndef __ASSEMBLY__
+1 −0
Original line number Diff line number Diff line
@@ -80,6 +80,7 @@ int pdc_do_firm_test_reset(unsigned long ftc_bitmap);
int pdc_do_reset(void);
int pdc_soft_power_info(unsigned long *power_reg);
int pdc_soft_power_button(int sw_control);
int pdc_soft_power_button_panic(int sw_control);
void pdc_io_reset(void);
void pdc_io_reset_devices(void);
int pdc_iodc_getc(void);
+23 −4
Original line number Diff line number Diff line
@@ -1232,7 +1232,7 @@ int __init pdc_soft_power_info(unsigned long *power_reg)
}

/*
 * pdc_soft_power_button - Control the soft power button behaviour
 * pdc_soft_power_button{_panic} - Control the soft power button behaviour
 * @sw_control: 0 for hardware control, 1 for software control
 *
 *
@@ -1241,6 +1241,9 @@ int __init pdc_soft_power_info(unsigned long *power_reg)
 * Under software control the OS may control to when to allow to shut
 * down the system. Under hardware control pressing the power button
 * powers off the system immediately.
 *
 * The _panic version relies on spin_trylock to prevent deadlock
 * on panic path.
 */
int pdc_soft_power_button(int sw_control)
{
@@ -1254,6 +1257,22 @@ int pdc_soft_power_button(int sw_control)
	return retval;
}

int pdc_soft_power_button_panic(int sw_control)
{
	int retval;
	unsigned long flags;

	if (!spin_trylock_irqsave(&pdc_lock, flags)) {
		pr_emerg("Couldn't enable soft power button\n");
		return -EBUSY; /* ignored by the panic notifier */
	}

	retval = mem_pdc_call(PDC_SOFT_POWER, PDC_SOFT_POWER_ENABLE, __pa(pdc_result), sw_control);
	spin_unlock_irqrestore(&pdc_lock, flags);

	return retval;
}

/*
 * pdc_io_reset - Hack to avoid overlapping range registers of Bridges devices.
 * Primarily a problem on T600 (which parisc-linux doesn't support) but
Loading