mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-18 18:23:53 +08:00
Merge branch 'parisc-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull parisc fixes from Helge Deller: "This contains a kernel segfault fix when reading /proc/kpageflags or /proc/kpagecount, two fixes for the serial port and PCI graphic card support on C8000 workstations and a fix to use unshadowed registers for flushing D- and I-caches." * 'parisc-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Use unshadowed index register for flush instructions in flush_dcache_page_asm and flush_icache_page_asm parisc: provide pci_mmap_page_range() for parisc parisc: fix serial ports on C8000 workstation parisc: fix kernel BUG at arch/parisc/include/asm/mmzone.h:50 (part 2)
This commit is contained in:
commit
aa4927b9ed
@ -27,7 +27,7 @@ extern struct node_map_data node_data[];
|
||||
|
||||
#define PFNNID_SHIFT (30 - PAGE_SHIFT)
|
||||
#define PFNNID_MAP_MAX 512 /* support 512GB */
|
||||
extern unsigned char pfnnid_map[PFNNID_MAP_MAX];
|
||||
extern signed char pfnnid_map[PFNNID_MAP_MAX];
|
||||
|
||||
#ifndef CONFIG_64BIT
|
||||
#define pfn_is_io(pfn) ((pfn & (0xf0000000UL >> PAGE_SHIFT)) == (0xf0000000UL >> PAGE_SHIFT))
|
||||
@ -46,7 +46,7 @@ static inline int pfn_to_nid(unsigned long pfn)
|
||||
i = pfn >> PFNNID_SHIFT;
|
||||
BUG_ON(i >= ARRAY_SIZE(pfnnid_map));
|
||||
|
||||
return (int)pfnnid_map[i];
|
||||
return pfnnid_map[i];
|
||||
}
|
||||
|
||||
static inline int pfn_valid(int pfn)
|
||||
|
@ -225,4 +225,9 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
|
||||
return channel ? 15 : 14;
|
||||
}
|
||||
|
||||
#define HAVE_PCI_MMAP
|
||||
|
||||
extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
|
||||
enum pci_mmap_state mmap_state, int write_combine);
|
||||
|
||||
#endif /* __ASM_PARISC_PCI_H */
|
||||
|
@ -1205,6 +1205,7 @@ static struct hp_hardware hp_hardware_list[] = {
|
||||
{HPHW_FIO, 0x004, 0x00320, 0x0, "Metheus Frame Buffer"},
|
||||
{HPHW_FIO, 0x004, 0x00340, 0x0, "BARCO CX4500 VME Grphx Cnsl"},
|
||||
{HPHW_FIO, 0x004, 0x00360, 0x0, "Hughes TOG VME FDDI"},
|
||||
{HPHW_FIO, 0x076, 0x000AD, 0x00, "Crestone Peak RS-232"},
|
||||
{HPHW_IOA, 0x185, 0x0000B, 0x00, "Java BC Summit Port"},
|
||||
{HPHW_IOA, 0x1FF, 0x0000B, 0x00, "Hitachi Ghostview Summit Port"},
|
||||
{HPHW_IOA, 0x580, 0x0000B, 0x10, "U2-IOA BC Runway Port"},
|
||||
|
@ -860,7 +860,7 @@ ENTRY(flush_dcache_page_asm)
|
||||
#endif
|
||||
|
||||
ldil L%dcache_stride, %r1
|
||||
ldw R%dcache_stride(%r1), %r1
|
||||
ldw R%dcache_stride(%r1), r31
|
||||
|
||||
#ifdef CONFIG_64BIT
|
||||
depdi,z 1, 63-PAGE_SHIFT,1, %r25
|
||||
@ -868,26 +868,26 @@ ENTRY(flush_dcache_page_asm)
|
||||
depwi,z 1, 31-PAGE_SHIFT,1, %r25
|
||||
#endif
|
||||
add %r28, %r25, %r25
|
||||
sub %r25, %r1, %r25
|
||||
sub %r25, r31, %r25
|
||||
|
||||
|
||||
1: fdc,m %r1(%r28)
|
||||
fdc,m %r1(%r28)
|
||||
fdc,m %r1(%r28)
|
||||
fdc,m %r1(%r28)
|
||||
fdc,m %r1(%r28)
|
||||
fdc,m %r1(%r28)
|
||||
fdc,m %r1(%r28)
|
||||
fdc,m %r1(%r28)
|
||||
fdc,m %r1(%r28)
|
||||
fdc,m %r1(%r28)
|
||||
fdc,m %r1(%r28)
|
||||
fdc,m %r1(%r28)
|
||||
fdc,m %r1(%r28)
|
||||
fdc,m %r1(%r28)
|
||||
fdc,m %r1(%r28)
|
||||
1: fdc,m r31(%r28)
|
||||
fdc,m r31(%r28)
|
||||
fdc,m r31(%r28)
|
||||
fdc,m r31(%r28)
|
||||
fdc,m r31(%r28)
|
||||
fdc,m r31(%r28)
|
||||
fdc,m r31(%r28)
|
||||
fdc,m r31(%r28)
|
||||
fdc,m r31(%r28)
|
||||
fdc,m r31(%r28)
|
||||
fdc,m r31(%r28)
|
||||
fdc,m r31(%r28)
|
||||
fdc,m r31(%r28)
|
||||
fdc,m r31(%r28)
|
||||
fdc,m r31(%r28)
|
||||
cmpb,COND(<<) %r28, %r25,1b
|
||||
fdc,m %r1(%r28)
|
||||
fdc,m r31(%r28)
|
||||
|
||||
sync
|
||||
|
||||
@ -936,7 +936,7 @@ ENTRY(flush_icache_page_asm)
|
||||
#endif
|
||||
|
||||
ldil L%icache_stride, %r1
|
||||
ldw R%icache_stride(%r1), %r1
|
||||
ldw R%icache_stride(%r1), %r31
|
||||
|
||||
#ifdef CONFIG_64BIT
|
||||
depdi,z 1, 63-PAGE_SHIFT,1, %r25
|
||||
@ -944,28 +944,28 @@ ENTRY(flush_icache_page_asm)
|
||||
depwi,z 1, 31-PAGE_SHIFT,1, %r25
|
||||
#endif
|
||||
add %r28, %r25, %r25
|
||||
sub %r25, %r1, %r25
|
||||
sub %r25, %r31, %r25
|
||||
|
||||
|
||||
/* fic only has the type 26 form on PA1.1, requiring an
|
||||
* explicit space specification, so use %sr4 */
|
||||
1: fic,m %r1(%sr4,%r28)
|
||||
fic,m %r1(%sr4,%r28)
|
||||
fic,m %r1(%sr4,%r28)
|
||||
fic,m %r1(%sr4,%r28)
|
||||
fic,m %r1(%sr4,%r28)
|
||||
fic,m %r1(%sr4,%r28)
|
||||
fic,m %r1(%sr4,%r28)
|
||||
fic,m %r1(%sr4,%r28)
|
||||
fic,m %r1(%sr4,%r28)
|
||||
fic,m %r1(%sr4,%r28)
|
||||
fic,m %r1(%sr4,%r28)
|
||||
fic,m %r1(%sr4,%r28)
|
||||
fic,m %r1(%sr4,%r28)
|
||||
fic,m %r1(%sr4,%r28)
|
||||
fic,m %r1(%sr4,%r28)
|
||||
1: fic,m %r31(%sr4,%r28)
|
||||
fic,m %r31(%sr4,%r28)
|
||||
fic,m %r31(%sr4,%r28)
|
||||
fic,m %r31(%sr4,%r28)
|
||||
fic,m %r31(%sr4,%r28)
|
||||
fic,m %r31(%sr4,%r28)
|
||||
fic,m %r31(%sr4,%r28)
|
||||
fic,m %r31(%sr4,%r28)
|
||||
fic,m %r31(%sr4,%r28)
|
||||
fic,m %r31(%sr4,%r28)
|
||||
fic,m %r31(%sr4,%r28)
|
||||
fic,m %r31(%sr4,%r28)
|
||||
fic,m %r31(%sr4,%r28)
|
||||
fic,m %r31(%sr4,%r28)
|
||||
fic,m %r31(%sr4,%r28)
|
||||
cmpb,COND(<<) %r28, %r25,1b
|
||||
fic,m %r1(%sr4,%r28)
|
||||
fic,m %r31(%sr4,%r28)
|
||||
|
||||
sync
|
||||
|
||||
|
@ -220,6 +220,33 @@ resource_size_t pcibios_align_resource(void *data, const struct resource *res,
|
||||
}
|
||||
|
||||
|
||||
int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
|
||||
enum pci_mmap_state mmap_state, int write_combine)
|
||||
{
|
||||
unsigned long prot;
|
||||
|
||||
/*
|
||||
* I/O space can be accessed via normal processor loads and stores on
|
||||
* this platform but for now we elect not to do this and portable
|
||||
* drivers should not do this anyway.
|
||||
*/
|
||||
if (mmap_state == pci_mmap_io)
|
||||
return -EINVAL;
|
||||
|
||||
if (write_combine)
|
||||
return -EINVAL;
|
||||
|
||||
/*
|
||||
* Ignore write-combine; for now only return uncached mappings.
|
||||
*/
|
||||
prot = pgprot_val(vma->vm_page_prot);
|
||||
prot |= _PAGE_NO_CACHE;
|
||||
vma->vm_page_prot = __pgprot(prot);
|
||||
|
||||
return remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
|
||||
vma->vm_end - vma->vm_start, vma->vm_page_prot);
|
||||
}
|
||||
|
||||
/*
|
||||
* A driver is enabling the device. We make sure that all the appropriate
|
||||
* bits are set to allow the device to operate as the driver is expecting.
|
||||
|
@ -47,7 +47,7 @@ pte_t pg0[PT_INITIAL * PTRS_PER_PTE] __attribute__ ((__section__ (".data..vm0.pt
|
||||
|
||||
#ifdef CONFIG_DISCONTIGMEM
|
||||
struct node_map_data node_data[MAX_NUMNODES] __read_mostly;
|
||||
unsigned char pfnnid_map[PFNNID_MAP_MAX] __read_mostly;
|
||||
signed char pfnnid_map[PFNNID_MAP_MAX] __read_mostly;
|
||||
#endif
|
||||
|
||||
static struct resource data_resource = {
|
||||
|
@ -811,6 +811,70 @@ int iosapic_fixup_irq(void *isi_obj, struct pci_dev *pcidev)
|
||||
return pcidev->irq;
|
||||
}
|
||||
|
||||
static struct iosapic_info *first_isi = NULL;
|
||||
|
||||
#ifdef CONFIG_64BIT
|
||||
int iosapic_serial_irq(int num)
|
||||
{
|
||||
struct iosapic_info *isi = first_isi;
|
||||
struct irt_entry *irte = NULL; /* only used if PAT PDC */
|
||||
struct vector_info *vi;
|
||||
int isi_line; /* line used by device */
|
||||
|
||||
/* lookup IRT entry for isi/slot/pin set */
|
||||
irte = &irt_cell[num];
|
||||
|
||||
DBG_IRT("iosapic_serial_irq(): irte %p %x %x %x %x %x %x %x %x\n",
|
||||
irte,
|
||||
irte->entry_type,
|
||||
irte->entry_length,
|
||||
irte->polarity_trigger,
|
||||
irte->src_bus_irq_devno,
|
||||
irte->src_bus_id,
|
||||
irte->src_seg_id,
|
||||
irte->dest_iosapic_intin,
|
||||
(u32) irte->dest_iosapic_addr);
|
||||
isi_line = irte->dest_iosapic_intin;
|
||||
|
||||
/* get vector info for this input line */
|
||||
vi = isi->isi_vector + isi_line;
|
||||
DBG_IRT("iosapic_serial_irq: line %d vi 0x%p\n", isi_line, vi);
|
||||
|
||||
/* If this IRQ line has already been setup, skip it */
|
||||
if (vi->irte)
|
||||
goto out;
|
||||
|
||||
vi->irte = irte;
|
||||
|
||||
/*
|
||||
* Allocate processor IRQ
|
||||
*
|
||||
* XXX/FIXME The txn_alloc_irq() code and related code should be
|
||||
* moved to enable_irq(). That way we only allocate processor IRQ
|
||||
* bits for devices that actually have drivers claiming them.
|
||||
* Right now we assign an IRQ to every PCI device present,
|
||||
* regardless of whether it's used or not.
|
||||
*/
|
||||
vi->txn_irq = txn_alloc_irq(8);
|
||||
|
||||
if (vi->txn_irq < 0)
|
||||
panic("I/O sapic: couldn't get TXN IRQ\n");
|
||||
|
||||
/* enable_irq() will use txn_* to program IRdT */
|
||||
vi->txn_addr = txn_alloc_addr(vi->txn_irq);
|
||||
vi->txn_data = txn_alloc_data(vi->txn_irq);
|
||||
|
||||
vi->eoi_addr = isi->addr + IOSAPIC_REG_EOI;
|
||||
vi->eoi_data = cpu_to_le32(vi->txn_data);
|
||||
|
||||
cpu_claim_irq(vi->txn_irq, &iosapic_interrupt_type, vi);
|
||||
|
||||
out:
|
||||
|
||||
return vi->txn_irq;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
** squirrel away the I/O Sapic Version
|
||||
@ -877,6 +941,8 @@ void *iosapic_register(unsigned long hpa)
|
||||
vip->irqline = (unsigned char) cnt;
|
||||
vip->iosapic = isi;
|
||||
}
|
||||
if (!first_isi)
|
||||
first_isi = isi;
|
||||
return isi;
|
||||
}
|
||||
|
||||
|
@ -30,6 +30,12 @@ static int __init serial_init_chip(struct parisc_device *dev)
|
||||
unsigned long address;
|
||||
int err;
|
||||
|
||||
#ifdef CONFIG_64BIT
|
||||
extern int iosapic_serial_irq(int cellnum);
|
||||
if (!dev->irq && (dev->id.sversion == 0xad))
|
||||
dev->irq = iosapic_serial_irq(dev->mod_index-1);
|
||||
#endif
|
||||
|
||||
if (!dev->irq) {
|
||||
/* We find some unattached serial ports by walking native
|
||||
* busses. These should be silently ignored. Otherwise,
|
||||
@ -51,7 +57,8 @@ static int __init serial_init_chip(struct parisc_device *dev)
|
||||
memset(&uart, 0, sizeof(uart));
|
||||
uart.port.iotype = UPIO_MEM;
|
||||
/* 7.272727MHz on Lasi. Assumed the same for Dino, Wax and Timi. */
|
||||
uart.port.uartclk = 7272727;
|
||||
uart.port.uartclk = (dev->id.sversion != 0xad) ?
|
||||
7272727 : 1843200;
|
||||
uart.port.mapbase = address;
|
||||
uart.port.membase = ioremap_nocache(address, 16);
|
||||
uart.port.irq = dev->irq;
|
||||
@ -73,6 +80,7 @@ static struct parisc_device_id serial_tbl[] = {
|
||||
{ HPHW_FIO, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x00075 },
|
||||
{ HPHW_FIO, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x0008c },
|
||||
{ HPHW_FIO, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x0008d },
|
||||
{ HPHW_FIO, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x000ad },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user