Commit 883ab4e4 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'parisc-for-6.15-rc1' of...

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

Pull parisc updates from Helge Deller:

 - drop parisc specific memcpy_fromio() function

 - clean up coding style and fix compile warnings

* tag 'parisc-for-6.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
  parisc: led: Use scnprintf() to avoid string truncation warning
  Input: gscps2 - Describe missing function parameters
  parisc: perf: use named initializers for struct miscdevice
  parisc: PDT: Fix missing prototype warning
  parisc: Remove memcpy_fromio
  parisc: Fix formatting errors in io.c
parents 1c83601b e822b8f0
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -135,9 +135,6 @@ static inline void gsc_writeq(unsigned long long val, unsigned long addr)

#define pci_iounmap			pci_iounmap

void memcpy_fromio(void *dst, const volatile void __iomem *src, int count);
#define memcpy_fromio memcpy_fromio

/* Port-space IO */

#define inb_p inb
+0 −1
Original line number Diff line number Diff line
@@ -43,7 +43,6 @@ EXPORT_SYMBOL($global$);
#endif

#include <asm/io.h>
EXPORT_SYMBOL(memcpy_fromio);

extern void $$divI(void);
extern void $$divU(void);
+2 −0
Original line number Diff line number Diff line
@@ -63,6 +63,7 @@ static unsigned long pdt_entry[MAX_PDT_ENTRIES] __page_aligned_bss;
#define PDT_ADDR_PERM_ERR	(pdt_type != PDT_PDC ? 2UL : 0UL)
#define PDT_ADDR_SINGLE_ERR	1UL

#ifdef CONFIG_PROC_FS
/* report PDT entries via /proc/meminfo */
void arch_report_meminfo(struct seq_file *m)
{
@@ -74,6 +75,7 @@ void arch_report_meminfo(struct seq_file *m)
	seq_printf(m, "PDT_cur_entries: %7lu\n",
			pdt_status.pdt_entries);
}
#endif

static int get_info_pat_new(void)
{
+3 −3
Original line number Diff line number Diff line
@@ -475,9 +475,9 @@ static const struct file_operations perf_fops = {
};

static struct miscdevice perf_dev = {
	MISC_DYNAMIC_MINOR,
	PA_PERF_DEV,
	&perf_fops
	.minor	= MISC_DYNAMIC_MINOR,
	.name	= PA_PERF_DEV,
	.fops	= &perf_fops,
};

/*
+29 −90
Original line number Diff line number Diff line
@@ -12,67 +12,6 @@
#include <linux/module.h>
#include <asm/io.h>

/*
** Copies a block of memory from a device in an efficient manner.
** Assumes the device can cope with 32-bit transfers.  If it can't,
** don't use this function.
**
** CR16 counts on C3000 reading 256 bytes from Symbios 896 RAM:
**	27341/64    = 427 cyc per int
**	61311/128   = 478 cyc per short
**	122637/256  = 479 cyc per byte
** Ergo bus latencies dominant (not transfer size).
**      Minimize total number of transfers at cost of CPU cycles.
**	TODO: only look at src alignment and adjust the stores to dest.
*/
void memcpy_fromio(void *dst, const volatile void __iomem *src, int count)
{
	/* first compare alignment of src/dst */ 
	if ( (((unsigned long)dst ^ (unsigned long)src) & 1) || (count < 2) )
		goto bytecopy;

	if ( (((unsigned long)dst ^ (unsigned long)src) & 2) || (count < 4) )
		goto shortcopy;

	/* Then check for misaligned start address */
	if ((unsigned long)src & 1) {
		*(u8 *)dst = readb(src);
		src++;
		dst++;
		count--;
		if (count < 2) goto bytecopy;
	}

	if ((unsigned long)src & 2) {
		*(u16 *)dst = __raw_readw(src);
		src += 2;
		dst += 2;
		count -= 2;
	}

	while (count > 3) {
		*(u32 *)dst = __raw_readl(src);
		dst += 4;
		src += 4;
		count -= 4;
	}

 shortcopy:
	while (count > 1) {
		*(u16 *)dst = __raw_readw(src);
		src += 2;
		dst += 2;
		count -= 2;
	}

 bytecopy:
	while (count--) {
		*(char *)dst = readb(src);
		src++;
		dst++;
	}
}

/*
 * Read COUNT 8-bit bytes from port PORT into memory starting at
 * SRC.
Loading