Commit 537c1ab3 authored by Matthew Wilcox's avatar Matthew Wilcox Committed by David S. Miller

[PATCH] PA-RISC arch update for 2.6.2

 - a500 & c3000 defconfigs (Grant Grundler)
 - Copyright and FSF address updates (Joel Soete, Grant Grundler)
 - Changes to fix dev->bridge conversion (James Bottomley)
 - Fix SuckyIO console (Grant Grundler)
 - Stop pasting __FILE__
 - More compat work (Carlos O'Donell)
 - Redo vmlinux.lds.S for x86-similarity (James Bottomley)
 - Move __ex_table into the writable section (Randolph Chung)
parent 5558ae34
This diff is collapsed.
This diff is collapsed.
/* /*
* linux/arch/parisc/kernel/sys_hpux.c * Implements HPUX syscalls.
* *
* implements HPUX syscalls. * Copyright (C) 1999 Matthew Wilcox <willy with parisc-linux.org>
* Copyright (C) 2000 Michael Ang <mang with subcarrier.org>
* Copyright (C) 2000 John Marvin <jsm with parisc-linux.org>
* Copyright (C) 2000 Philipp Rumpf
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include <linux/mm.h> #include <linux/mm.h>
......
/* /*
* linux/arch/parisc/hpux/ioctl.c * Implements some necessary HPUX ioctls.
* *
* implements some necessary HPUX ioctls. * Copyright (C) 1999-2002 Matthew Wilcox <willy with parisc-linux.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* /*
......
/* /*
* linux/arch/parisc/kernel/sys_hpux.c * Implements HPUX syscalls.
* *
* implements HPUX syscalls. * Copyright (C) 1999 Matthew Wilcox <willy with parisc-linux.org>
* Copyright (C) 2000 Philipp Rumpf
* Copyright (C) 2000 John Marvin <jsm with parisc-linux.org>
* Copyright (C) 2000 Michael Ang <mang with subcarrier.org>
* Copyright (C) 2001 Nathan Neulinger <nneul at umr.edu>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include <linux/fs.h> #include <linux/fs.h>
......
...@@ -2,6 +2,29 @@ ...@@ -2,6 +2,29 @@
* Generate definitions needed by assembly language modules. * Generate definitions needed by assembly language modules.
* This code generates raw asm output which is post-processed to extract * This code generates raw asm output which is post-processed to extract
* and format the required data. * and format the required data.
*
* Copyright (C) 2000-2001 John Marvin <jsm at parisc-linux.org>
* Copyright (C) 2000 David Huggins-Daines <dhd with pobox.org>
* Copyright (C) 2000 Sam Creasey <sammy@sammy.net>
* Copyright (C) 2000 Grant Grundler <grundler with parisc-linux.org>
* Copyright (C) 2001 Paul Bame <bame at parisc-linux.org>
* Copyright (C) 2001 Richard Hirst <rhirst at parisc-linux.org>
* Copyright (C) 2002 Randolph Chung <tausq with parisc-linux.org>
* Copyright (C) 2003 James Bottomley <jejb at parisc-linux.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include <linux/types.h> #include <linux/types.h>
......
...@@ -286,7 +286,7 @@ void get_pci_node_path(struct pci_dev *dev, struct hardware_path *path) ...@@ -286,7 +286,7 @@ void get_pci_node_path(struct pci_dev *dev, struct hardware_path *path)
path->bc[i--] = PCI_SLOT(devfn) | (PCI_FUNC(devfn) << 5); path->bc[i--] = PCI_SLOT(devfn) | (PCI_FUNC(devfn) << 5);
} }
padev = HBA_DATA(bus->dev->platform_data)->dev; padev = HBA_DATA(bus->bridge->platform_data)->dev;
while (padev != &root) { while (padev != &root) {
path->bc[i--] = padev->hw_path; path->bc[i--] = padev->hw_path;
padev = padev->parent; padev = padev->parent;
......
/* arch/parisc/kernel/pdc.c - safe pdc access routines /*
* arch/parisc/kernel/firmware.c - safe PDC access routines
*
* PDC == Processor Dependent Code
*
* See http://www.parisc-linux.org/documentation/index.html
* for documentation describing the entry points and calling
* conventions defined below.
* *
* Copyright 1999 SuSE GmbH Nuernberg (Philipp Rumpf, prumpf@tux.org) * Copyright 1999 SuSE GmbH Nuernberg (Philipp Rumpf, prumpf@tux.org)
* portions Copyright 1999 The Puffin Group, (Alex deVries, David Kennedy) * Copyright 1999 The Puffin Group, (Alex deVries, David Kennedy)
* Copyright 2003 Grant Grundler <grundler parisc-linux org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* *
* only these routines should be used out of the real kernel (i.e. everything */
* using virtual addresses) for obvious reasons */
/* I think it would be in everyone's best interest to follow this /* I think it would be in everyone's best interest to follow this
* guidelines when writing PDC wrappers: * guidelines when writing PDC wrappers:
...@@ -643,6 +655,49 @@ int pdc_pci_irt(unsigned long num_entries, unsigned long hpa, void *tbl) ...@@ -643,6 +655,49 @@ int pdc_pci_irt(unsigned long num_entries, unsigned long hpa, void *tbl)
} }
#if 0 /* UNTEST CODE - left here in case someone needs it */
/**
* pdc_pci_config_read - read PCI config space.
* @hpa token from PDC to indicate which PCI device
* @pci_addr configuration space address to read from
*
* Read PCI Configuration space *before* linux PCI subsystem is running.
*/
unsigned int pdc_pci_config_read(void *hpa, unsigned long cfg_addr)
{
int retval;
spin_lock_irq(&pdc_lock);
pdc_result[0] = 0;
pdc_result[1] = 0;
retval = mem_pdc_call(PDC_PCI_INDEX, PDC_PCI_READ_CONFIG,
__pa(pdc_result), hpa, cfg_addr&~3UL, 4UL);
spin_unlock_irq(&pdc_lock);
return retval ? ~0 : (unsigned int) pdc_result[0];
}
/**
* pdc_pci_config_write - read PCI config space.
* @hpa token from PDC to indicate which PCI device
* @pci_addr configuration space address to write
* @val value we want in the 32-bit register
*
* Write PCI Configuration space *before* linux PCI subsystem is running.
*/
void pdc_pci_config_write(void *hpa, unsigned long cfg_addr, unsigned int val)
{
int retval;
spin_lock_irq(&pdc_lock);
pdc_result[0] = 0;
retval = mem_pdc_call(PDC_PCI_INDEX, PDC_PCI_WRITE_CONFIG,
__pa(pdc_result), hpa,
cfg_addr&~3UL, 4UL, (unsigned long) val);
spin_unlock_irq(&pdc_lock);
return retval;
}
#endif /* UNTESTED CODE */
/** /**
* pdc_tod_read - Read the Time-Of-Day clock. * pdc_tod_read - Read the Time-Of-Day clock.
* @tod: The return buffer: * @tod: The return buffer:
......
...@@ -22,17 +22,6 @@ ...@@ -22,17 +22,6 @@
.level 1.1 .level 1.1
.section .initcall.init
.align 4
.export __initcall_start
__initcall_start:
.export __initcall_end
__initcall_end:
.export __setup_start
__setup_start:
.export __setup_end
__setup_end:
.data .data
.export boot_args .export boot_args
...@@ -64,13 +53,13 @@ stext: ...@@ -64,13 +53,13 @@ stext:
/* Clear BSS (shouldn't the boot loader do this?) */ /* Clear BSS (shouldn't the boot loader do this?) */
.import _edata,data .import __bss_start,data
.import _end,data .import __bss_stop,data
ldil L%PA(_edata),%r3 ldil L%PA(__bss_start),%r3
ldo R%PA(_edata)(%r3),%r3 ldo R%PA(__bss_start)(%r3),%r3
ldil L%PA(_end),%r4 ldil L%PA(__bss_stop),%r4
ldo R%PA(_end)(%r4),%r4 ldo R%PA(__bss_stop)(%r4),%r4
$bss_loop: $bss_loop:
cmpb,<<,n %r3,%r4,$bss_loop cmpb,<<,n %r3,%r4,$bss_loop
stw,ma %r0,4(%r3) stw,ma %r0,4(%r3)
......
...@@ -26,17 +26,6 @@ ...@@ -26,17 +26,6 @@
.level 2.0w .level 2.0w
.section .initcall.init
.align 4
.export __initcall_start
__initcall_start:
.export __initcall_end
__initcall_end:
.export __setup_start
__setup_start:
.export __setup_end
__setup_end:
.data .data
.export boot_args .export boot_args
...@@ -64,13 +53,13 @@ stext: ...@@ -64,13 +53,13 @@ stext:
/* Clear BSS (shouldn't the boot loader do this?) */ /* Clear BSS (shouldn't the boot loader do this?) */
.import _edata,data .import __bss_start,data
.import _end,data .import __bss_stop,data
ldil L%PA(_edata),%r3 ldil L%PA(__bss_start),%r3
ldo R%PA(_edata)(%r3),%r3 ldo R%PA(__bss_start)(%r3),%r3
ldil L%PA(_end),%r4 ldil L%PA(__bss_stop),%r4
ldo R%PA(_end)(%r4),%r4 ldo R%PA(__bss_stop)(%r4),%r4
$bss_loop: $bss_loop:
cmpb,<<,n %r3,%r4,$bss_loop cmpb,<<,n %r3,%r4,$bss_loop
stb,ma %r0,1(%r3) stb,ma %r0,1(%r3)
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
......
/*
* Static declaration of "init" task data structure.
*
* Copyright (C) 2000 Paul Bame <bame at parisc-linux.org>
* Copyright (C) 2000-2001 John Marvin <jsm at parisc-linux.org>
* Copyright (C) 2001 Helge Deller <deller @ parisc-linux.org>
* Copyright (C) 2002 Matthew Wilcox <willy with parisc-linux.org>
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/sched.h> #include <linux/sched.h>
......
...@@ -526,20 +526,6 @@ static void __init system_map_inventory(void) ...@@ -526,20 +526,6 @@ static void __init system_map_inventory(void)
int i; int i;
long status = PDC_OK; long status = PDC_OK;
#if defined(CONFIG_IOMMU_SBA) && defined(CONFIG_SUPERIO)
/*
* Stop the suckyio usb controller on Astro based systems.
* Otherwise the machine might crash during iommu setup.
*/
pdc_io_reset();
/*
* Unfortunately if we reset devices here, serial console
* stops working :-(
*/
/* pdc_io_reset_devices(); */
#endif
for (i = 0; status != PDC_BAD_PROC && status != PDC_NE_MOD; i++) { for (i = 0; status != PDC_BAD_PROC && status != PDC_NE_MOD; i++) {
struct parisc_device *dev; struct parisc_device *dev;
struct pdc_system_map_mod_info module_result; struct pdc_system_map_mod_info module_result;
......
/* /*
* Parisc tlb and cache flushing support * PARISC TLB and cache flushing support
* Copyright (C) 2000 Hewlett-Packard (John Marvin) * Copyright (C) 2000-2001 Hewlett-Packard (John Marvin)
* Copyright (C) 2001 Matthew Wilcox (willy at parisc-linux.org)
* Copyright (C) 2002 Richard Hirst (rhirst with parisc-linux.org)
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -14,7 +16,7 @@ ...@@ -14,7 +16,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* /*
......
/* /*
* Architecture-specific kernel symbols * Architecture-specific kernel symbols
*
* Copyright (C) 2000-2001 Richard Hirst <rhirst with parisc-linux.org>
* Copyright (C) 2001 Dave Kennedy
* Copyright (C) 2001 Paul Bame <bame at parisc-linux.org>
* Copyright (C) 2001-2003 Grant Grundler <grundler with parisc-linux.org>
* Copyright (C) 2002-2003 Matthew Wilcox <willy at parisc-linux.org>
* Copyright (C) 2002 Randolph Chung <tausq at parisc-linux.org>
* Copyright (C) 2002-2003 Helge Deller <deller with parisc-linux.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include <linux/config.h> #include <linux/config.h>
......
...@@ -261,11 +261,13 @@ pcxl_alloc_range(size_t size) ...@@ -261,11 +261,13 @@ pcxl_alloc_range(size_t size)
} else if(pages_needed <= 32) { } else if(pages_needed <= 32) {
PCXL_FIND_FREE_MAPPING(res_idx, mask, 32); PCXL_FIND_FREE_MAPPING(res_idx, mask, 32);
} else { } else {
panic(__FILE__ ": pcxl_alloc_range() Too many pages to map.\n"); panic("%s: pcxl_alloc_range() Too many pages to map.\n",
__FILE__);
} }
dump_resmap(); dump_resmap();
panic(__FILE__ ": pcxl_alloc_range() out of dma mapping resources\n"); panic("%s: pcxl_alloc_range() out of dma mapping resources\n",
__FILE__);
resource_found: resource_found:
...@@ -319,7 +321,8 @@ pcxl_free_range(unsigned long vaddr, size_t size) ...@@ -319,7 +321,8 @@ pcxl_free_range(unsigned long vaddr, size_t size)
} else if(pages_mapped <= 32) { } else if(pages_mapped <= 32) {
PCXL_FREE_MAPPINGS(res_idx, mask, 32); PCXL_FREE_MAPPINGS(res_idx, mask, 32);
} else { } else {
panic(__FILE__ ": pcxl_free_range() Too many pages to unmap.\n"); panic("%s: pcxl_free_range() Too many pages to unmap.\n",
__FILE__);
} }
pcxl_used_pages -= (pages_mapped ? pages_mapped : 1); pcxl_used_pages -= (pages_mapped ? pages_mapped : 1);
......
...@@ -229,7 +229,7 @@ void __devinit pcibios_resource_to_bus(struct pci_dev *dev, ...@@ -229,7 +229,7 @@ void __devinit pcibios_resource_to_bus(struct pci_dev *dev,
struct pci_bus_region *region, struct resource *res) struct pci_bus_region *region, struct resource *res)
{ {
struct pci_bus *bus = dev->bus; struct pci_bus *bus = dev->bus;
struct pci_hba_data *hba = HBA_DATA(bus->dev->platform_data); struct pci_hba_data *hba = HBA_DATA(bus->bridge->platform_data);
if (res->flags & IORESOURCE_IO) { if (res->flags & IORESOURCE_IO) {
/* /*
......
/* /*
* arch/parisc/kernel/pdc_chassis.c * interfaces to log Chassis Codes via PDC (firmware)
* *
* Copyright (C) 2002 Laurent Canet <canetl@esiee.fr> * Copyright (C) 2002 Laurent Canet <canetl@esiee.fr>
* Copyright (C) 2002-2003 Thibaut Varene <varenet@esiee.fr> * Copyright (C) 2002-2003 Thibaut Varene <varenet@esiee.fr>
* *
*
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option) * the Free Software Foundation; either version 2 of the License, or
* any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
...@@ -17,7 +16,7 @@ ...@@ -17,7 +16,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#undef PDC_CHASSIS_DEBUG #undef PDC_CHASSIS_DEBUG
......
/* /*
* linux/arch/parisc/kernel/pdc_console.c * PDC Console support - ie use firmware to dump text via boot console
* *
* Copyright (C) 1999-2003 Matthew Wilcox <willy at parisc-linux.org>
* Copyright (C) 2000 Martin K Petersen <mkp at mkp.net>
* Copyright (C) 2000 John Marvin <jsm at parisc-linux.org>
* Copyright (C) 2000-2003 Paul Bame <bame at parisc-linux.org>
* Copyright (C) 2000 Philipp Rumpf <prumpf with tux.org>
* Copyright (C) 2000 Michael Ang <mang with subcarrier.org>
* Copyright (C) 2000 Grant Grundler <grundler with parisc-linux.org>
* Copyright (C) 2001-2002 Ryan Bradetich <rbrad at parisc-linux.org>
* Copyright (C) 2001 Helge Deller <deller at parisc-linux.org>
* Copyright (C) 2001 Thomas Bogendoerfer <tsbogend at parisc-linux.org>
* Copyright (C) 2002 Randolph Chung <tausq with parisc-linux.org>
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/*
* The PDC console is a simple console, which can be used for debugging * The PDC console is a simple console, which can be used for debugging
* boot related problems on HP PA-RISC machines. * boot related problems on HP PA-RISC machines.
* *
......
;
; Purpose: /* low-level asm for "intrigue" (PA8500-8700 CPU perf counters)
; This file has the overall purpose of suppyling low-level *
; assembly to program the intrigue portion of the cpu. * Copyright (C) 2001 Randolph Chung <tausq at parisc-linux.org>
; *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <linux/config.h> #include <linux/config.h>
#include <asm/assembly.h> #include <asm/assembly.h>
......
/*
* Imagine for use with the Onyx (PCX-U) CPU interface
*
* Copyright (C) 2001 Randolph Chung <tausq at parisc-linux.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef PERF_IMAGES_H #ifndef PERF_IMAGES_H
#define PERF_IMAGES_H #define PERF_IMAGES_H
/* Magic numbers taken without modification from HPUX stuff */ /* Magic numbers taken without modification from HPUX stuff */
/*
* Imagine for use with the Onyx cpu interface
*/
#define PCXU_IMAGE_SIZE 584 #define PCXU_IMAGE_SIZE 584
static uint32_t onyx_images[][PCXU_IMAGE_SIZE/sizeof(uint32_t)] = { static uint32_t onyx_images[][PCXU_IMAGE_SIZE/sizeof(uint32_t)] = {
......
/* /*
* linux/arch/parisc/kernel/process.c * PARISC Architecture-dependent parts of process handling
* based on the work for i386 * based on the work for i386
*/ *
* Copyright (C) 1999-2003 Matthew Wilcox <willy at parisc-linux.org>
/* * Copyright (C) 2000 Martin K Petersen <mkp at mkp.net>
* This file handles the architecture-dependent parts of process handling.. * Copyright (C) 2000 John Marvin <jsm at parisc-linux.org>
* Copyright (C) 2000 David Huggins-Daines <dhd with pobox.org>
* Copyright (C) 2000-2003 Paul Bame <bame at parisc-linux.org>
* Copyright (C) 2000 Philipp Rumpf <prumpf with tux.org>
* Copyright (C) 2000 David Kennedy <dkennedy with linuxcare.com>
* Copyright (C) 2000 Richard Hirst <rhirst with parisc-lixux.org>
* Copyright (C) 2000 Grant Grundler <grundler with parisc-linux.org>
* Copyright (C) 2001 Alan Modra <amodra at parisc-linux.org>
* Copyright (C) 2001-2002 Ryan Bradetich <rbrad at parisc-linux.org>
* Copyright (C) 2001-2002 Helge Deller <deller at parisc-linux.org>
* Copyright (C) 2002 Randolph Chung <tausq with parisc-linux.org>
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#define __KERNEL_SYSCALLS__ #define __KERNEL_SYSCALLS__
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <linux/user.h> #include <linux/user.h>
#include <linux/personality.h> #include <linux/personality.h>
#include <linux/security.h> #include <linux/security.h>
#include <linux/compat.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
...@@ -36,8 +37,6 @@ ...@@ -36,8 +37,6 @@
#ifdef __LP64__ #ifdef __LP64__
#define CHILD_IS_32BIT (child->personality == PER_LINUX_32BIT)
/* This function is needed to translate 32 bit pt_regs offsets in to /* This function is needed to translate 32 bit pt_regs offsets in to
* 64 bit pt_regs offsets. For example, a 32 bit gdb under a 64 bit kernel * 64 bit pt_regs offsets. For example, a 32 bit gdb under a 64 bit kernel
* will request offset 12 if it wants gr3, but the lower 32 bits of * will request offset 12 if it wants gr3, but the lower 32 bits of
...@@ -130,7 +129,7 @@ long sys_ptrace(long request, pid_t pid, long addr, long data) ...@@ -130,7 +129,7 @@ long sys_ptrace(long request, pid_t pid, long addr, long data)
int copied; int copied;
#ifdef __LP64__ #ifdef __LP64__
if (CHILD_IS_32BIT) { if (is_compat_task(child)) {
unsigned int tmp; unsigned int tmp;
addr &= 0xffffffffL; addr &= 0xffffffffL;
...@@ -162,7 +161,7 @@ long sys_ptrace(long request, pid_t pid, long addr, long data) ...@@ -162,7 +161,7 @@ long sys_ptrace(long request, pid_t pid, long addr, long data)
case PTRACE_POKEDATA: case PTRACE_POKEDATA:
ret = 0; ret = 0;
#ifdef __LP64__ #ifdef __LP64__
if (CHILD_IS_32BIT) { if (is_compat_task(child)) {
unsigned int tmp = (unsigned int)data; unsigned int tmp = (unsigned int)data;
DBG(("sys_ptrace(POKE%s, %d, %lx, %lx)\n", DBG(("sys_ptrace(POKE%s, %d, %lx, %lx)\n",
request == PTRACE_POKETEXT ? "TEXT" : "DATA", request == PTRACE_POKETEXT ? "TEXT" : "DATA",
...@@ -185,7 +184,7 @@ long sys_ptrace(long request, pid_t pid, long addr, long data) ...@@ -185,7 +184,7 @@ long sys_ptrace(long request, pid_t pid, long addr, long data)
case PTRACE_PEEKUSR: { case PTRACE_PEEKUSR: {
ret = -EIO; ret = -EIO;
#ifdef __LP64__ #ifdef __LP64__
if (CHILD_IS_32BIT) { if (is_compat_task(child)) {
unsigned int tmp; unsigned int tmp;
if (addr & (sizeof(int)-1)) if (addr & (sizeof(int)-1))
...@@ -244,7 +243,7 @@ long sys_ptrace(long request, pid_t pid, long addr, long data) ...@@ -244,7 +243,7 @@ long sys_ptrace(long request, pid_t pid, long addr, long data)
goto out_tsk; goto out_tsk;
} }
#ifdef __LP64__ #ifdef __LP64__
if (CHILD_IS_32BIT) { if (is_compat_task(child)) {
if (addr & (sizeof(int)-1)) if (addr & (sizeof(int)-1))
goto out_tsk; goto out_tsk;
if ((addr = translate_usr_offset(addr)) < 0) if ((addr = translate_usr_offset(addr)) < 0)
......
/* mostly borrowed from kernel/signal.c */ /* Signal support for 32-bit kernel builds
*
* Copyright (C) 2001 Matthew Wilcox <willy at parisc-linux.org>
* Code was mostly borrowed from kernel/signal.c.
* See kernel/signal.c for additional Copyrights.
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <linux/config.h> #include <linux/config.h>
#include <linux/compat.h> #include <linux/compat.h>
#include <linux/slab.h> #include <linux/slab.h>
......
/*
* Copyright (C) 2001 Matthew Wilcox <willy at parisc-linux.org>
* Copyright (C) 2003 Carlos O'Donell <carlos at parisc-linux.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _PARISC64_KERNEL_SIGNAL32_H #ifndef _PARISC64_KERNEL_SIGNAL32_H
#define _PARISC64_KERNEL_SIGNAL32_H #define _PARISC64_KERNEL_SIGNAL32_H
......
/*
* Copyright (C) 2002 Richard Hirst <rhirst at parisc-linux.org>
* Copyright (C) 2003 James Bottomley <jejb at parisc-linux.org>
* Copyright (C) 2003 Randolph Chung <tausq with parisc-linux.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _PARISC64_KERNEL_SYS32_H #ifndef _PARISC64_KERNEL_SYS32_H
#define _PARISC64_KERNEL_SYS32_H #define _PARISC64_KERNEL_SYS32_H
......
/* /*
* linux/arch/parisc/kernel/sys_parisc.c * PARISC specific syscalls
*
* Copyright (C) 1999-2003 Matthew Wilcox <willy at parisc-linux.org>
* Copyright (C) 2000-2003 Paul Bame <bame at parisc-linux.org>
* Copyright (C) 2001 Thomas Bogendoerfer <tsbogend at parisc-linux.org>
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* this implements syscalls which are handled per-arch. * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include <asm/uaccess.h> #include <asm/uaccess.h>
......
/* System Call Table
*
* Copyright (C) 1999-2003 Matthew Wilcox <willy at parisc-linux.org>
* Copyright (C) 2000-2001 John Marvin <jsm at parisc-linux.org>
* Copyright (C) 2000 Alan Modra <amodra at parisc-linux.org>
* Copyright (C) 2000-2003 Paul Bame <bame at parisc-linux.org>
* Copyright (C) 2000 Philipp Rumpf <prumpf with tux.org>
* Copyright (C) 2000 Michael Ang <mang with subcarrier.org>
* Copyright (C) 2000 David Huggins-Daines <dhd with pobox.org>
* Copyright (C) 2000 Grant Grundler <grundler at parisc-linux.org>
* Copyright (C) 2001 Richard Hirst <rhirst with parisc-linux.org>
* Copyright (C) 2001-2002 Ryan Bradetich <rbrad at parisc-linux.org>
* Copyright (C) 2001 Helge Deller <deller at parisc-linux.org>
* Copyright (C) 2000-2001 Thomas Bogendoerfer <tsbogend at parisc-linux.org>
* Copyright (C) 2002 Randolph Chung <tausq with parisc-linux.org>
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#undef ENTRY_SAME #undef ENTRY_SAME
#undef ENTRY_DIFF #undef ENTRY_DIFF
#undef ENTRY_UHOH #undef ENTRY_UHOH
......
...@@ -270,7 +270,7 @@ static int emulate_ldd(struct pt_regs *regs, int toreg, int flop) ...@@ -270,7 +270,7 @@ static int emulate_ldd(struct pt_regs *regs, int toreg, int flop)
} }
#endif #endif
DPRINTF("val = 0xllx\n", val); DPRINTF("val = 0x%llx\n", val);
if (flop) if (flop)
regs->fr[toreg] = val; regs->fr[toreg] = val;
......
/* Kernel link layout for various "sections"
*
* Copyright (C) 1999-2003 Matthew Wilcox <willy at parisc-linux.org>
* Copyright (C) 2000-2003 Paul Bame <bame at parisc-linux.org>
* Copyright (C) 2000 John Marvin <jsm at parisc-linux.org>
* Copyright (C) 2000 Michael Ang <mang with subcarrier.org>
* Copyright (C) 2002 Randolph Chung <tausq with parisc-linux.org>
* Copyright (C) 2003 James Bottomley <jejb with parisc-linux.org>
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <linux/config.h> #include <linux/config.h>
#include <asm-generic/vmlinux.lds.h> #include <asm-generic/vmlinux.lds.h>
/* needed for the processor specific cache alignment size */
#include <asm/cache.h>
/* ld script to make hppa Linux kernel */ /* ld script to make hppa Linux kernel */
#ifndef CONFIG_PARISC64 #ifndef CONFIG_PARISC64
...@@ -22,7 +48,7 @@ SECTIONS ...@@ -22,7 +48,7 @@ SECTIONS
. = 0x10100000; . = 0x10100000;
_text = .; /* Text and read-only data */ _text = .; /* Text and read-only data */
.text BLOCK(16) : { .text ALIGN(16) : {
*(.text*) *(.text*)
*(.PARISC.unwind) *(.PARISC.unwind)
*(.fixup) *(.fixup)
...@@ -32,18 +58,42 @@ SECTIONS ...@@ -32,18 +58,42 @@ SECTIONS
_etext = .; /* End of text section */ _etext = .; /* End of text section */
RODATA
/* writeable */
data_start = .;
. = ALIGN(16); /* Exception table */ . = ALIGN(16); /* Exception table */
__start___ex_table = .; __start___ex_table = .;
__ex_table : { *(__ex_table) } __ex_table : { *(__ex_table) }
__stop___ex_table = .; __stop___ex_table = .;
RODATA .data : { /* Data */
.data BLOCK(8192) : { /* Data without special */
data_start = .;
*(.data) *(.data)
CONSTRUCTORS
} }
. = ALIGN(4096);
/* nosave data is really only used for software suspend...it's here
* just in case we ever implement it */
__nosave_begin = .;
.data_nosave : { *(.data.nosave) }
. = ALIGN(4096);
__nosave_end = .;
. = ALIGN(L1_CACHE_BYTES);
.data.cacheline_aligned : { *(.data.cacheline_aligned) }
_edata = .; /* End of data section */
. = ALIGN(16384); /* init_task */
.data.init_task : { *(.data.init_task) }
/* The interrupt stack is currently partially coded, but not yet
* implemented */
. = ALIGN(16384);
init_istack : { *(init_istack) }
#ifdef CONFIG_PARISC64 #ifdef CONFIG_PARISC64
. = ALIGN(16); /* Linkage tables */ . = ALIGN(16); /* Linkage tables */
.opd : { *(.opd) } PROVIDE (__gp = .); .opd : { *(.opd) } PROVIDE (__gp = .);
...@@ -63,7 +113,7 @@ SECTIONS ...@@ -63,7 +113,7 @@ SECTIONS
__setup_start = .; __setup_start = .;
.init.setup : { *(.init.setup) } .init.setup : { *(.init.setup) }
__setup_end = .; __setup_end = .;
__start___param =.; __start___param = .;
__param : { *(__param) } __param : { *(__param) }
__stop___param = .; __stop___param = .;
__initcall_start = .; __initcall_start = .;
...@@ -81,6 +131,19 @@ SECTIONS ...@@ -81,6 +131,19 @@ SECTIONS
.con_initcall.init : { *(.con_initcall.init) } .con_initcall.init : { *(.con_initcall.init) }
__con_initcall_end = .; __con_initcall_end = .;
SECURITY_INIT SECURITY_INIT
/* alternate instruction replacement. This is a mechanism x86 uses
* to detect the CPU type and replace generic instruction sequences
* with CPU specific ones. We don't currently do this in PA, but
* it seems like a good idea... */
. = ALIGN(4);
__alt_instructions = .;
.altinstructions : { *(.altinstructions) }
__alt_instructions_end = .;
.altinstr_replacement : { *(.altinstr_replacement) }
/* .exit.text is discard at runtime, not link time, to deal with references
from .altinstructions and .eh_frame */
.exit.text : { *(.exit.text) }
.exit.data : { *(.exit.data) }
. = ALIGN(4096); . = ALIGN(4096);
__initramfs_start = .; __initramfs_start = .;
.init.ramfs : { *(.init.ramfs) } .init.ramfs : { *(.init.ramfs) }
...@@ -91,17 +154,28 @@ SECTIONS ...@@ -91,17 +154,28 @@ SECTIONS
__per_cpu_end = .; __per_cpu_end = .;
. = ALIGN(4096); . = ALIGN(4096);
__init_end = .; __init_end = .;
/* freed after init ends here */
init_task BLOCK(16384) : { *(init_task) } /* The initial task and kernel stack */ __bss_start = .; /* BSS */
.bss : { *(.bss) *(COMMON) }
_edata = .; /* End of data section */ __bss_stop = .;
.bss : { *(.bss) *(COMMON) } /* BSS */
_end = . ; _end = . ;
/* Sections to be discarded */
/DISCARD/ : {
*(.exitcall.exit)
#ifdef CONFIG_PARISC64
/* temporary hack until binutils is fixed to not emit these
for static binaries */
*(.interp)
*(.dynsym)
*(.dynstr)
*(.dynamic)
*(.hash)
#endif
}
/* Stabs debugging sections. */ /* Stabs debugging sections. */
.stab 0 : { *(.stab) } .stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) } .stabstr 0 : { *(.stabstr) }
...@@ -112,14 +186,4 @@ SECTIONS ...@@ -112,14 +186,4 @@ SECTIONS
.comment 0 : { *(.comment) } .comment 0 : { *(.comment) }
.note 0 : { *(.note) } .note 0 : { *(.note) }
#ifdef CONFIG_PARISC64
/* temporary hack until binutils is fixed to not emit these
for static binaries */
/DISCARD/ : {
*(.dynsym)
*(.dynstr)
*(.dynamic)
*(.hash)
}
#endif
} }
/* /*
* Linux/PA-RISC Project (http://www.parisc-linux.org/) * User Space Access Routines
*
* Copyright (C) 2000-2002 Hewlett-Packard (John Marvin)
* Copyright (C) 2000 Richard Hirst <rhirst with parisc-linux.org>
* Copyright (C) 2001 Matthieu Delahaye <delahaym at esiee.fr>
* Copyright (C) 2003 Randolph Chung <tausq with parisc-linux.org>
* *
* Assembly Language User Access Routines
* Copyright (C) 2000 Hewlett-Packard (John Marvin)
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -16,7 +19,7 @@ ...@@ -16,7 +19,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* /*
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifdef __NO_PA_HDRS #ifdef __NO_PA_HDRS
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifdef __NO_PA_HDRS #ifdef __NO_PA_HDRS
PA header file -- do not include this header file for non-PA builds. PA header file -- do not include this header file for non-PA builds.
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* /*
* BEGIN_DESC * BEGIN_DESC
...@@ -347,7 +347,7 @@ decode_fpu(unsigned int Fpu_register[], unsigned int trap_counts[]) ...@@ -347,7 +347,7 @@ decode_fpu(unsigned int Fpu_register[], unsigned int trap_counts[])
return SIGNALCODE(SIGFPE, FPE_FLTRES); return SIGNALCODE(SIGFPE, FPE_FLTRES);
default: default:
update_trap_counts(Fpu_register, aflags, bflags, trap_counts); update_trap_counts(Fpu_register, aflags, bflags, trap_counts);
printk(__FILE__ "(%d) Unknown FPU exception 0x%x\n", printk("%s(%d) Unknown FPU exception 0x%x\n", __FILE__,
__LINE__, Excp_type(exception_index)); __LINE__, Excp_type(exception_index));
return SIGNALCODE(SIGILL, ILL_COPROC); return SIGNALCODE(SIGILL, ILL_COPROC);
case NOEXCEPTION: /* no exception */ case NOEXCEPTION: /* no exception */
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* /*
* BEGIN_DESC * BEGIN_DESC
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* /*
* BEGIN_DESC * BEGIN_DESC
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* /*
* BEGIN_DESC * BEGIN_DESC
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* /*
* BEGIN_DESC * BEGIN_DESC
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* /*
* BEGIN_DESC * BEGIN_DESC
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* /*
* BEGIN_DESC * BEGIN_DESC
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* /*
* BEGIN_DESC * BEGIN_DESC
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* /*
* BEGIN_DESC * BEGIN_DESC
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* /*
* linux/arch/math-emu/driver.c.c * linux/arch/math-emu/driver.c.c
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* /*
* BEGIN_DESC * BEGIN_DESC
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* /*
* BEGIN_DESC * BEGIN_DESC
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* /*
* BEGIN_DESC * BEGIN_DESC
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* /*
* BEGIN_DESC * BEGIN_DESC
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* /*
* BEGIN_DESC * BEGIN_DESC
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* /*
* BEGIN_DESC * BEGIN_DESC
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* /*
* BEGIN_DESC * BEGIN_DESC
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* /*
* BEGIN_DESC * BEGIN_DESC
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* /*
* BEGIN_DESC * BEGIN_DESC
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifdef __NO_PA_HDRS #ifdef __NO_PA_HDRS
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* /*
* BEGIN_DESC * BEGIN_DESC
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* /*
* BEGIN_DESC * BEGIN_DESC
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* /*
* BEGIN_DESC * BEGIN_DESC
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifdef __NO_PA_HDRS #ifdef __NO_PA_HDRS
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef _PARISC_MATH_EMU_H #ifndef _PARISC_MATH_EMU_H
#define _PARISC_MATH_EMU_H #define _PARISC_MATH_EMU_H
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* /*
* BEGIN_DESC * BEGIN_DESC
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* /*
* BEGIN_DESC * BEGIN_DESC
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* /*
* BEGIN_DESC * BEGIN_DESC
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* /*
* BEGIN_DESC * BEGIN_DESC
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* /*
* BEGIN_DESC * BEGIN_DESC
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* /*
* BEGIN_DESC * BEGIN_DESC
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* /*
* BEGIN_DESC * BEGIN_DESC
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifdef __NO_PA_HDRS #ifdef __NO_PA_HDRS
......
/*
* kmap/page table map and unmap support routines
*
* Copyright 1999,2000 Hewlett-Packard Company
* Copyright 2000 John Marvin <jsm at hp.com>
* Copyright 2000 Grant Grundler <grundler at parisc-linux.org>
* Copyright 2000 Philipp Rumpf <prumpf@tux.org>
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* /*
** Stolen mostly from arch/parisc/kernel/pci-dma.c ** Stolen mostly from arch/parisc/kernel/pci-dma.c
*/ */
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include <linux/config.h> #include <linux/config.h>
#ifndef __ASSEMBLY__
/* /*
* PA 2.0 processors have 64-byte cachelines; PA 1.1 processors have * PA 2.0 processors have 64-byte cachelines; PA 1.1 processors have
* 32-byte cachelines. The default configuration is not for SMP anyway, * 32-byte cachelines. The default configuration is not for SMP anyway,
...@@ -24,13 +23,13 @@ ...@@ -24,13 +23,13 @@
#define L1_CACHE_SHIFT 5 #define L1_CACHE_SHIFT 5
#endif #endif
#ifndef __ASSEMBLY__
#define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) #define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1))
#define SMP_CACHE_BYTES L1_CACHE_BYTES #define SMP_CACHE_BYTES L1_CACHE_BYTES
#define L1_CACHE_SHIFT_MAX 5 /* largest L1 which this arch supports */ #define L1_CACHE_SHIFT_MAX 5 /* largest L1 which this arch supports */
#define __cacheline_aligned __attribute__((__aligned__(L1_CACHE_BYTES)))
extern void flush_data_cache_local(void); /* flushes local data-cache only */ extern void flush_data_cache_local(void); /* flushes local data-cache only */
extern void flush_instruction_cache_local(void); /* flushes local code-cache only */ extern void flush_instruction_cache_local(void); /* flushes local code-cache only */
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
......
...@@ -24,6 +24,7 @@ typedef u16 compat_nlink_t; ...@@ -24,6 +24,7 @@ typedef u16 compat_nlink_t;
typedef u16 compat_ipc_pid_t; typedef u16 compat_ipc_pid_t;
typedef s32 compat_daddr_t; typedef s32 compat_daddr_t;
typedef u32 compat_caddr_t; typedef u32 compat_caddr_t;
typedef u32 compat_timer_t;
typedef s32 compat_int_t; typedef s32 compat_int_t;
typedef s32 compat_long_t; typedef s32 compat_long_t;
...@@ -101,6 +102,15 @@ struct compat_statfs { ...@@ -101,6 +102,15 @@ struct compat_statfs {
s32 f_spare[5]; s32 f_spare[5];
}; };
struct compat_sigcontext {
compat_int_t sc_flags;
compat_int_t sc_gr[32]; /* PSW in sc_gr[0] */
u64 sc_fr[32];
compat_int_t sc_iasq[2];
compat_int_t sc_iaoq[2];
compat_int_t sc_sar; /* cr11 */
};
#define COMPAT_RLIM_INFINITY 0xffffffff #define COMPAT_RLIM_INFINITY 0xffffffff
typedef u32 compat_old_sigset_t; /* at least 32 bits */ typedef u32 compat_old_sigset_t; /* at least 32 bits */
...@@ -129,9 +139,7 @@ static inline void *compat_ptr(compat_uptr_t uptr) ...@@ -129,9 +139,7 @@ static inline void *compat_ptr(compat_uptr_t uptr)
static __inline__ void *compat_alloc_user_space(long len) static __inline__ void *compat_alloc_user_space(long len)
{ {
struct pt_regs *regs = &current->thread.regs; struct pt_regs *regs = &current->thread.regs;
unsigned long usp = regs->gr[30]; return (void *)regs->gr[30];
return (void *)(usp + len);
} }
#endif /* _ASM_PARISC_COMPAT_H */ #endif /* _ASM_PARISC_COMPAT_H */
#include<linux/compat.h>
#include<linux/compat_siginfo.h>
#include<asm/compat_ucontext.h>
#ifndef _ASM_PARISC_COMPAT_RT_SIGFRAME_H
#define _ASM_PARISC_COMPAT_RT_SIGFRAME_H
/* In a deft move of uber-hackery, we decide to carry the top half of all
* 64-bit registers in a non-portable, non-ABI, hidden structure.
* Userspace can read the hidden structure if it *wants* but is never
* guaranteed to be in the same place. Infact the uc_sigmask from the
* ucontext_t structure may push the hidden register file downards
*/
struct compat_regfile {
/* Upper half of all the 64-bit registers that were truncated
on a copy to a 32-bit userspace */
compat_int_t rf_gr[32];
compat_int_t rf_iasq[2];
compat_int_t rf_iaoq[2];
compat_int_t rf_sar;
};
#define COMPAT_SIGRETURN_TRAMP 4
#define COMPAT_SIGRESTARTBLOCK_TRAMP 5
#define COMPAT_TRAMP_SIZE (COMPAT_SIGRETURN_TRAMP + COMPAT_SIGRESTARTBLOCK_TRAMP)
struct compat_rt_sigframe {
/* XXX: Must match trampoline size in arch/parisc/kernel/signal.c
Secondary to that it must protect the ERESTART_RESTARTBLOCK
trampoline we left on the stack (we were bad and didn't
change sp so we could run really fast.) */
compat_uint_t tramp[COMPAT_TRAMP_SIZE];
compat_siginfo_t info;
struct compat_ucontext uc;
/* Hidden location of truncated registers, *must* be last. */
struct compat_regfile regs;
};
/*
* The 32-bit ABI wants at least 48 bytes for a function call frame:
* 16 bytes for arg0-arg3, and 32 bytes for magic (the only part of
* which Linux/parisc uses is sp-20 for the saved return pointer...)
* Then, the stack pointer must be rounded to a cache line (64 bytes).
*/
#define SIGFRAME32 64
#define FUNCTIONCALLFRAME32 48
#define PARISC_RT_SIGFRAME_SIZE32 \
(((sizeof(struct compat_rt_sigframe) + FUNCTIONCALLFRAME32) + SIGFRAME32) & -SIGFRAME32)
#endif
/* Use generic */
#include <asm-generic/compat_signal.h>
#ifndef _ASM_PARISC_COMPAT_UCONTEXT_H
#define _ASM_PARISC_COMPAT_UCONTEXT_H
#include<linux/compat.h>
#include<asm/compat_signal.h>
/* 32-bit ucontext as seen from an 64-bit kernel */
struct compat_ucontext {
compat_uint_t uc_flags;
compat_uptr_t uc_link;
compat_stack_t uc_stack; /* struct compat_sigaltstack (12 bytes)*/
/* FIXME: Pad out to get uc_mcontext to start at an 8-byte aligned boundary */
compat_uint_t pad[1];
struct compat_sigcontext uc_mcontext;
compat_sigset_t uc_sigmask; /* mask last for extensibility */
};
#endif /* !_ASM_PARISC_COMPAT_UCONTEXT_H */
...@@ -29,7 +29,8 @@ ...@@ -29,7 +29,8 @@
#ifdef PCI_DEBUG #ifdef PCI_DEBUG
#define ASSERT(expr) \ #define ASSERT(expr) \
if(!(expr)) { \ if(!(expr)) { \
printk( "\n" __FILE__ ":%d: Assertion " #expr " failed!\n",__LINE__); \ printk("\n%s:%d: Assertion " #expr " failed!\n", \
__FILE__, __LINE__); \
panic(#expr); \ panic(#expr); \
} }
#else #else
...@@ -55,6 +56,12 @@ struct pci_hba_data { ...@@ -55,6 +56,12 @@ struct pci_hba_data {
struct resource io_space; /* PIOP */ struct resource io_space; /* PIOP */
struct resource lmmio_space; /* bus addresses < 4Gb */ struct resource lmmio_space; /* bus addresses < 4Gb */
struct resource elmmio_space; /* additional bus addresses < 4Gb */ struct resource elmmio_space; /* additional bus addresses < 4Gb */
struct resource gmmio_space; /* bus addresses > 4Gb */
/* NOTE: Dino code assumes it can use *all* of the lmmio_space,
* elmmio_space and gmmio_space as a contiguous array of
* resources. This #define represents the array size */
#define DINO_MAX_LMMIO_RESOURCES 3
unsigned long lmmio_space_offset; /* CPU view - PCI view */ unsigned long lmmio_space_offset; /* CPU view - PCI view */
void * iommu; /* IOMMU this device is under */ void * iommu; /* IOMMU this device is under */
/* REVISIT - spinlock to protect resources? */ /* REVISIT - spinlock to protect resources? */
......
...@@ -478,7 +478,11 @@ extern int pdc_type; ...@@ -478,7 +478,11 @@ extern int pdc_type;
#define PDC_TYPE_SYSTEM_MAP 1 /* 32-bit, but supports PDC_SYSTEM_MAP */ #define PDC_TYPE_SYSTEM_MAP 1 /* 32-bit, but supports PDC_SYSTEM_MAP */
#define PDC_TYPE_SNAKE 2 /* Doesn't support SYSTEM_MAP */ #define PDC_TYPE_SNAKE 2 /* Doesn't support SYSTEM_MAP */
#define is_pdc_pat() (pdc_type == PDC_TYPE_PAT) #ifdef CONFIG_PARISC64
#define is_pdc_pat() (PDC_TYPE_PAT == pdc_type)
#else
#define is_pdc_pat() (0)
#endif
struct pdc_chassis_info { /* for PDC_CHASSIS_INFO */ struct pdc_chassis_info { /* for PDC_CHASSIS_INFO */
unsigned long actcnt; /* actual number of bytes returned */ unsigned long actcnt; /* actual number of bytes returned */
......
...@@ -29,7 +29,7 @@ typedef long __kernel_time_t; ...@@ -29,7 +29,7 @@ typedef long __kernel_time_t;
typedef unsigned int __kernel_size_t; typedef unsigned int __kernel_size_t;
typedef int __kernel_ssize_t; typedef int __kernel_ssize_t;
typedef int __kernel_ptrdiff_t; typedef int __kernel_ptrdiff_t;
typedef int __kernel_time_t; typedef long __kernel_time_t;
#endif #endif
typedef char * __kernel_caddr_t; typedef char * __kernel_caddr_t;
......
#ifndef _ASM_PARISC_RT_SIGFRAME_H #ifndef _ASM_PARISC_RT_SIGFRAME_H
#define _ASM_PARISC_RT_SIGFRAME_H #define _ASM_PARISC_RT_SIGFRAME_H
#ifdef CONFIG_COMPAT
#include <asm/compat_rt_sigframe.h>
#endif
#define SIGRETURN_TRAMP 4
#define SIGRESTARTBLOCK_TRAMP 5
#define TRAMP_SIZE (SIGRETURN_TRAMP + SIGRESTARTBLOCK_TRAMP)
struct rt_sigframe { struct rt_sigframe {
unsigned int tramp[4]; /* XXX: Must match trampoline size in arch/parisc/kernel/signal.c
Secondary to that it must protect the ERESTART_RESTARTBLOCK
trampoline we left on the stack (we were bad and didn't
change sp so we could run really fast.) */
unsigned int tramp[TRAMP_SIZE];
struct siginfo info; struct siginfo info;
struct ucontext uc; struct ucontext uc;
}; };
/*
* The 32-bit ABI wants at least 48 bytes for a function call frame:
* 16 bytes for arg0-arg3, and 32 bytes for magic (the only part of
* which Linux/parisc uses is sp-20 for the saved return pointer...)
* Then, the stack pointer must be rounded to a cache line (64 bytes).
*/
#define SIGFRAME32 64
#define FUNCTIONCALLFRAME32 48
#define PARISC_RT_SIGFRAME_SIZE32 \
(((sizeof(struct rt_sigframe) + FUNCTIONCALLFRAME32) + SIGFRAME32) & -SIGFRAME32)
#ifdef __LP64__
#define SIGFRAME 128 #define SIGFRAME 128
#define FUNCTIONCALLFRAME 96 #define FUNCTIONCALLFRAME 96
#define PARISC_RT_SIGFRAME_SIZE \ #define PARISC_RT_SIGFRAME_SIZE \
(((sizeof(struct rt_sigframe) + FUNCTIONCALLFRAME) + SIGFRAME) & -SIGFRAME) (((sizeof(struct rt_sigframe) + FUNCTIONCALLFRAME) + SIGFRAME) & -SIGFRAME)
#else
#define SIGFRAME SIGFRAME32
#define FUNCTIONCALLFRAME FUNCTIONCALLFRAME32
#define PARISC_RT_SIGFRAME_SIZE PARISC_RT_SIGFRAME_SIZE32
#endif
#endif #endif
#ifndef _PARISC_SIGINFO_H #ifndef _PARISC_SIGINFO_H
#define _PARISC_SIGINFO_H #define _PARISC_SIGINFO_H
#define HAVE_ARCH_COPY_SIGINFO_TO_USER
#include <asm-generic/siginfo.h> #include <asm-generic/siginfo.h>
/* /*
......
#ifndef _PARISC_SUPERIO_H #ifndef _PARISC_SUPERIO_H
#define _PARISC_SUPERIO_H #define _PARISC_SUPERIO_H
/* Offsets to configuration and base address registers */
#define IC_PIC1 0x20 /* PCI I/O address of master 8259 */ #define IC_PIC1 0x20 /* PCI I/O address of master 8259 */
#define IC_PIC2 0xA0 /* PCI I/O address of slave */ #define IC_PIC2 0xA0 /* PCI I/O address of slave */
/* Config Space Offsets to configuration and base address registers */
#define SIO_CR 0x5A /* Configuration Register */ #define SIO_CR 0x5A /* Configuration Register */
#define SIO_ACPIBAR 0x88 /* ACPI BAR */ #define SIO_ACPIBAR 0x88 /* ACPI BAR */
#define SIO_FDCBAR 0x90 /* Floppy Disk Controller BAR */ #define SIO_FDCBAR 0x90 /* Floppy Disk Controller BAR */
...@@ -11,15 +12,22 @@ ...@@ -11,15 +12,22 @@
#define SIO_SP2BAR 0x98 /* Serial 2 BAR */ #define SIO_SP2BAR 0x98 /* Serial 2 BAR */
#define SIO_PPBAR 0x9C /* Parallel BAR */ #define SIO_PPBAR 0x9C /* Parallel BAR */
/* Interrupt triggers and routing */
#define TRIGGER_1 0x67 /* Edge/level trigger register 1 */ #define TRIGGER_1 0x67 /* Edge/level trigger register 1 */
#define TRIGGER_2 0x68 /* Edge/level trigger register 2 */ #define TRIGGER_2 0x68 /* Edge/level trigger register 2 */
#define IR_SER 0x69 /* Serial 1 [0:3] and Serial 2 [4:7] */
#define IR_PFD 0x6a /* Parallel [0:3] and Floppy [4:7] */ /* Interrupt Routing Control registers */
#define IR_IDE 0x6b /* IDE1 [0:3] and IDE2 [4:7] */ #define CFG_IR_SER 0x69 /* Serial 1 [0:3] and Serial 2 [4:7] */
#define IR_USB 0x6d /* USB [4:7] */ #define CFG_IR_PFD 0x6a /* Parallel [0:3] and Floppy [4:7] */
#define IR_LOW 0x69 /* Lowest interrupt routing reg */ #define CFG_IR_IDE 0x6b /* IDE1 [0:3] and IDE2 [4:7] */
#define IR_HIGH 0x71 /* Highest interrupt routing reg */ #define CFG_IR_INTAB 0x6c /* PCI INTA [0:3] and INT B [4:7] */
#define CFG_IR_INTCD 0x6d /* PCI INTC [0:3] and INT D [4:7] */
#define CFG_IR_PS2 0x6e /* PS/2 KBINT [0:3] and Mouse [4:7] */
#define CFG_IR_FXBUS 0x6f /* FXIRQ[0] [0:3] and FXIRQ[1] [4:7] */
#define CFG_IR_USB 0x70 /* FXIRQ[2] [0:3] and USB [4:7] */
#define CFG_IR_ACPI 0x71 /* ACPI SCI [0:3] and reserved [4:7] */
#define CFG_IR_LOW CFG_IR_SER /* Lowest interrupt routing reg */
#define CFG_IR_HIGH CFG_IR_ACPI /* Highest interrupt routing reg */
/* 8259 operational control words */ /* 8259 operational control words */
#define OCW2_EOI 0x20 /* Non-specific EOI */ #define OCW2_EOI 0x20 /* Non-specific EOI */
...@@ -42,15 +50,15 @@ ...@@ -42,15 +50,15 @@
#define SUPERIO_NIRQS 8 #define SUPERIO_NIRQS 8
struct superio_device { struct superio_device {
u16 fdc_base; u32 fdc_base;
u16 sp1_base; u32 sp1_base;
u16 sp2_base; u32 sp2_base;
u16 pp_base; u32 pp_base;
u16 acpi_base; u32 acpi_base;
int iosapic_irq; int suckyio_irq_enabled;
int iosapic_irq_enabled;
struct irq_region *irq_region; struct irq_region *irq_region;
struct pci_dev *lio_pdev; /* pci device for legacy IO fn */ struct pci_dev *lio_pdev; /* pci device for legacy IO (fn 1) */
struct pci_dev *usb_pdev; /* pci device for USB (fn 2) */
}; };
/* /*
......
...@@ -62,7 +62,7 @@ extern int __put_user_bad(void); ...@@ -62,7 +62,7 @@ extern int __put_user_bad(void);
*/ */
struct exception_table_entry { struct exception_table_entry {
unsigned long addr; /* address of insn that is allowed to fault. */ unsigned long insn; /* address of insn that is allowed to fault. */
long skip; /* pcoq skip | r9 clear flag | r8 -EFAULT flag */ long skip; /* pcoq skip | r9 clear flag | r8 -EFAULT flag */
}; };
...@@ -98,7 +98,7 @@ struct exception_table_entry { ...@@ -98,7 +98,7 @@ struct exception_table_entry {
#define __get_kernel_asm(ldx,ptr) \ #define __get_kernel_asm(ldx,ptr) \
__asm__("\n1:\t" ldx "\t0(%2),%0\n" \ __asm__("\n1:\t" ldx "\t0(%2),%0\n" \
"2:\n" \ "2:\n" \
"\t.section __ex_table,\"a\"\n" \ "\t.section __ex_table,\"aw\"\n" \
"\t.dword\t1b\n" \ "\t.dword\t1b\n" \
"\t.dword\t(2b-1b)+3\n" \ "\t.dword\t(2b-1b)+3\n" \
"\t.previous" \ "\t.previous" \
...@@ -108,7 +108,7 @@ struct exception_table_entry { ...@@ -108,7 +108,7 @@ struct exception_table_entry {
#define __get_user_asm(ldx,ptr) \ #define __get_user_asm(ldx,ptr) \
__asm__("\n1:\t" ldx "\t0(%%sr3,%2),%0\n" \ __asm__("\n1:\t" ldx "\t0(%%sr3,%2),%0\n" \
"2:\n" \ "2:\n" \
"\t.section __ex_table,\"a\"\n" \ "\t.section __ex_table,\"aw\"\n" \
"\t.dword\t1b\n" \ "\t.dword\t1b\n" \
"\t.dword\t(2b-1b)+3\n" \ "\t.dword\t(2b-1b)+3\n" \
"\t.previous" \ "\t.previous" \
...@@ -118,7 +118,7 @@ struct exception_table_entry { ...@@ -118,7 +118,7 @@ struct exception_table_entry {
#define __get_kernel_asm(ldx,ptr) \ #define __get_kernel_asm(ldx,ptr) \
__asm__("\n1:\t" ldx "\t0(%2),%0\n" \ __asm__("\n1:\t" ldx "\t0(%2),%0\n" \
"2:\n" \ "2:\n" \
"\t.section __ex_table,\"a\"\n" \ "\t.section __ex_table,\"aw\"\n" \
"\t.word\t1b\n" \ "\t.word\t1b\n" \
"\t.word\t(2b-1b)+3\n" \ "\t.word\t(2b-1b)+3\n" \
"\t.previous" \ "\t.previous" \
...@@ -128,13 +128,13 @@ struct exception_table_entry { ...@@ -128,13 +128,13 @@ struct exception_table_entry {
#define __get_user_asm(ldx,ptr) \ #define __get_user_asm(ldx,ptr) \
__asm__("\n1:\t" ldx "\t0(%%sr3,%2),%0\n" \ __asm__("\n1:\t" ldx "\t0(%%sr3,%2),%0\n" \
"2:\n" \ "2:\n" \
"\t.section __ex_table,\"a\"\n" \ "\t.section __ex_table,\"aw\"\n" \
"\t.word\t1b\n" \ "\t.word\t1b\n" \
"\t.word\t(2b-1b)+3\n" \ "\t.word\t(2b-1b)+3\n" \
"\t.previous" \ "\t.previous" \
: "=r"(__gu_val), "=r"(__gu_err) \ : "=r"(__gu_val), "=r"(__gu_err) \
: "r"(ptr), "1"(__gu_err)); : "r"(ptr), "1"(__gu_err));
#endif #endif /* !__LP64__ */
#define __put_user(x,ptr) \ #define __put_user(x,ptr) \
({ \ ({ \
...@@ -173,7 +173,7 @@ struct exception_table_entry { ...@@ -173,7 +173,7 @@ struct exception_table_entry {
__asm__ __volatile__ ( \ __asm__ __volatile__ ( \
"\n1:\t" stx "\t%2,0(%1)\n" \ "\n1:\t" stx "\t%2,0(%1)\n" \
"2:\n" \ "2:\n" \
"\t.section __ex_table,\"a\"\n" \ "\t.section __ex_table,\"aw\"\n" \
"\t.dword\t1b\n" \ "\t.dword\t1b\n" \
"\t.dword\t(2b-1b)+1\n" \ "\t.dword\t(2b-1b)+1\n" \
"\t.previous" \ "\t.previous" \
...@@ -184,7 +184,7 @@ struct exception_table_entry { ...@@ -184,7 +184,7 @@ struct exception_table_entry {
__asm__ __volatile__ ( \ __asm__ __volatile__ ( \
"\n1:\t" stx "\t%2,0(%%sr3,%1)\n" \ "\n1:\t" stx "\t%2,0(%%sr3,%1)\n" \
"2:\n" \ "2:\n" \
"\t.section __ex_table,\"a\"\n" \ "\t.section __ex_table,\"aw\"\n" \
"\t.dword\t1b\n" \ "\t.dword\t1b\n" \
"\t.dword\t(2b-1b)+1\n" \ "\t.dword\t(2b-1b)+1\n" \
"\t.previous" \ "\t.previous" \
...@@ -195,7 +195,7 @@ struct exception_table_entry { ...@@ -195,7 +195,7 @@ struct exception_table_entry {
__asm__ __volatile__ ( \ __asm__ __volatile__ ( \
"\n1:\t" stx "\t%2,0(%1)\n" \ "\n1:\t" stx "\t%2,0(%1)\n" \
"2:\n" \ "2:\n" \
"\t.section __ex_table,\"a\"\n" \ "\t.section __ex_table,\"aw\"\n" \
"\t.word\t1b\n" \ "\t.word\t1b\n" \
"\t.word\t(2b-1b)+1\n" \ "\t.word\t(2b-1b)+1\n" \
"\t.previous" \ "\t.previous" \
...@@ -206,7 +206,7 @@ struct exception_table_entry { ...@@ -206,7 +206,7 @@ struct exception_table_entry {
__asm__ __volatile__ ( \ __asm__ __volatile__ ( \
"\n1:\t" stx "\t%2,0(%%sr3,%1)\n" \ "\n1:\t" stx "\t%2,0(%%sr3,%1)\n" \
"2:\n" \ "2:\n" \
"\t.section __ex_table,\"a\"\n" \ "\t.section __ex_table,\"aw\"\n" \
"\t.word\t1b\n" \ "\t.word\t1b\n" \
"\t.word\t(2b-1b)+1\n" \ "\t.word\t(2b-1b)+1\n" \
"\t.previous" \ "\t.previous" \
...@@ -221,7 +221,7 @@ static inline void __put_kernel_asm64(u64 x, void *ptr) ...@@ -221,7 +221,7 @@ static inline void __put_kernel_asm64(u64 x, void *ptr)
"\n1:\tstw %1,0(%0)\n" "\n1:\tstw %1,0(%0)\n"
"\n2:\tstw %2,4(%0)\n" "\n2:\tstw %2,4(%0)\n"
"3:\n" "3:\n"
"\t.section __ex_table,\"a\"\n" "\t.section __ex_table,\"aw\"\n"
"\t.word\t1b\n" "\t.word\t1b\n"
"\t.word\t(3b-1b)+1\n" "\t.word\t(3b-1b)+1\n"
"\t.word\t2b\n" "\t.word\t2b\n"
...@@ -239,7 +239,7 @@ static inline void __put_user_asm64(u64 x, void *ptr) ...@@ -239,7 +239,7 @@ static inline void __put_user_asm64(u64 x, void *ptr)
"\n1:\tstw %1,0(%%sr3,%0)\n" "\n1:\tstw %1,0(%%sr3,%0)\n"
"\n2:\tstw %2,4(%%sr3,%0)\n" "\n2:\tstw %2,4(%%sr3,%0)\n"
"3:\n" "3:\n"
"\t.section __ex_table,\"a\"\n" "\t.section __ex_table,\"aw\"\n"
"\t.word\t1b\n" "\t.word\t1b\n"
"\t.word\t(3b-1b)+1\n" "\t.word\t(3b-1b)+1\n"
"\t.word\t2b\n" "\t.word\t2b\n"
...@@ -249,7 +249,7 @@ static inline void __put_user_asm64(u64 x, void *ptr) ...@@ -249,7 +249,7 @@ static inline void __put_user_asm64(u64 x, void *ptr)
} }
#endif #endif /* !__LP64__ */
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment