Commit a47fd3f5 authored by Steve French's avatar Steve French

Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git

french@hera:~/linux-2.6(0)$ cg-update
l
`/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/refs/heads/master' ->
`.git/refs/heads/origin'
cp: cannot create link `.git/objects/info/packs': File exists
progress: 213 objects, 646653 bytes, 77% done
`/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/objects/info/packs' ->
`.git/objects/info/packs'
progress: 983 objects, 2805763 bytes, 100% done
cg-pull: objects pull failed
parents ef6724e3 86b37860
......@@ -2380,8 +2380,8 @@ E: tmolina@cablespeed.com
D: bug fixes, documentation, minor hackery
N: James Morris
E: jmorris@redhat.com
W: http://www.intercode.com.au/jmorris/
E: jmorris@namei.org
W: http://namei.org/
D: Netfilter, Linux Security Modules (LSM), SELinux, IPSec,
D: Crypto API, general networking, miscellaneous.
S: PO Box 707
......
......@@ -104,6 +104,7 @@ logo_*.c
logo_*_clut224.c
logo_*_mono.c
lxdialog
mach-types
mach-types.h
make_times_h
map
......
This diff is collapsed.
......@@ -102,7 +102,7 @@ Here is the list of words, from left to right:
- URB Status. This field makes no sense for submissions, but is present
to help scripts with parsing. In error case, it contains the error code.
In case of a setup packet, it contains a Setup Tag. If scripts read a number
in this field, the proceed to read Data Length. Otherwise, they read
in this field, they proceed to read Data Length. Otherwise, they read
the setup packet before reading the Data Length.
- Setup packet, if present, consists of 5 words: one of each for bmRequestType,
bRequest, wValue, wIndex, wLength, as specified by the USB Specification 2.0.
......
......@@ -44,6 +44,9 @@ bttv.o
push used by bttv. bttv will disable overlay
by default on this hardware to avoid crashes.
With this insmod option you can override this.
no_overlay=1 Disable overlay. It should be used by broken
hardware that doesn't support PCI2PCI direct
transfers.
automute=0/1 Automatically mutes the sound if there is
no TV signal, on by default. You might try
to disable this if you have bad input signal
......
......@@ -6,6 +6,11 @@ only the AMD64 specific ones are listed here.
Machine check
mce=off disable machine check
mce=bootlog Enable logging of machine checks left over from booting.
Disabled by default because some BIOS leave bogus ones.
If your BIOS doesn't do that it's a good idea to enable though
to make sure you log even machine check events that result
in a reboot.
nomce (for compatibility with i386): same as mce=off
......
......@@ -1658,7 +1658,7 @@ M: kuznet@ms2.inr.ac.ru
P: Pekka Savola (ipv6)
M: pekkas@netcore.fi
P: James Morris
M: jmorris@redhat.com
M: jmorris@namei.org
P: Hideaki YOSHIFUJI
M: yoshfuji@linux-ipv6.org
P: Patrick McHardy
......@@ -2047,7 +2047,7 @@ SELINUX SECURITY MODULE
P: Stephen Smalley
M: sds@epoch.ncsc.mil
P: James Morris
M: jmorris@redhat.com
M: jmorris@namei.org
L: linux-kernel@vger.kernel.org (kernel issues)
L: selinux@tycho.nsa.gov (general discussion)
W: http://www.nsa.gov/selinux
......
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 13
EXTRAVERSION =-rc5
EXTRAVERSION =-rc6
NAME=Woozy Numbat
# *DOCUMENTATION*
......
......@@ -41,18 +41,19 @@ summary from [1.]>" for easy identification by the developers
[2.] Full description of the problem/report:
[3.] Keywords (i.e., modules, networking, kernel):
[4.] Kernel version (from /proc/version):
[5.] Output of Oops.. message (if applicable) with symbolic information
[5.] Most recent kernel version which did not have the bug:
[6.] Output of Oops.. message (if applicable) with symbolic information
resolved (see Documentation/oops-tracing.txt)
[6.] A small shell script or example program which triggers the
[7.] A small shell script or example program which triggers the
problem (if possible)
[7.] Environment
[7.1.] Software (add the output of the ver_linux script here)
[7.2.] Processor information (from /proc/cpuinfo):
[7.3.] Module information (from /proc/modules):
[7.4.] Loaded driver and hardware information (/proc/ioports, /proc/iomem)
[7.5.] PCI information ('lspci -vvv' as root)
[7.6.] SCSI information (from /proc/scsi/scsi)
[7.7.] Other information that might be relevant to the problem
[8.] Environment
[8.1.] Software (add the output of the ver_linux script here)
[8.2.] Processor information (from /proc/cpuinfo):
[8.3.] Module information (from /proc/modules):
[8.4.] Loaded driver and hardware information (/proc/ioports, /proc/iomem)
[8.5.] PCI information ('lspci -vvv' as root)
[8.6.] SCSI information (from /proc/scsi/scsi)
[8.7.] Other information that might be relevant to the problem
(please look in /proc and include all information that you
think to be relevant):
[X.] Other notes, patches, fixes, workarounds:
......
......@@ -350,8 +350,24 @@ pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
region->end = res->end - offset;
}
void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
struct pci_bus_region *region)
{
struct pci_controller *hose = (struct pci_controller *)dev->sysdata;
unsigned long offset = 0;
if (res->flags & IORESOURCE_IO)
offset = hose->io_space->start;
else if (res->flags & IORESOURCE_MEM)
offset = hose->mem_space->start;
res->start = region->start + offset;
res->end = region->end + offset;
}
#ifdef CONFIG_HOTPLUG
EXPORT_SYMBOL(pcibios_resource_to_bus);
EXPORT_SYMBOL(pcibios_bus_to_resource);
#endif
int
......
......@@ -447,9 +447,26 @@ pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
region->end = res->end - offset;
}
void __devinit
pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
struct pci_bus_region *region)
{
struct pci_sys_data *root = dev->sysdata;
unsigned long offset = 0;
if (res->flags & IORESOURCE_IO)
offset = root->io_offset;
if (res->flags & IORESOURCE_MEM)
offset = root->mem_offset;
res->start = region->start + offset;
res->end = region->end + offset;
}
#ifdef CONFIG_HOTPLUG
EXPORT_SYMBOL(pcibios_fixup_bus);
EXPORT_SYMBOL(pcibios_resource_to_bus);
EXPORT_SYMBOL(pcibios_bus_to_resource);
#endif
/*
......
......@@ -61,7 +61,7 @@ static struct plat_serial8250_port coyote_uart_data[] = {
.mapbase = IXP4XX_UART2_BASE_PHYS,
.membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
.irq = IRQ_IXP4XX_UART2,
.flags = UPF_BOOT_AUTOCONF,
.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
.iotype = UPIO_MEM,
.regshift = 2,
.uartclk = IXP4XX_UART_XTAL,
......
......@@ -83,7 +83,7 @@ static struct plat_serial8250_port gtwx5715_uart_platform_data[] = {
.mapbase = IXP4XX_UART2_BASE_PHYS,
.membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
.irq = IRQ_IXP4XX_UART2,
.flags = UPF_BOOT_AUTOCONF,
.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
.iotype = UPIO_MEM,
.regshift = 2,
.uartclk = IXP4XX_UART_XTAL,
......
......@@ -82,7 +82,7 @@ static struct plat_serial8250_port ixdp425_uart_data[] = {
.mapbase = IXP4XX_UART1_BASE_PHYS,
.membase = (char *)IXP4XX_UART1_BASE_VIRT + REG_OFFSET,
.irq = IRQ_IXP4XX_UART1,
.flags = UPF_BOOT_AUTOCONF,
.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
.iotype = UPIO_MEM,
.regshift = 2,
.uartclk = IXP4XX_UART_XTAL,
......@@ -91,7 +91,7 @@ static struct plat_serial8250_port ixdp425_uart_data[] = {
.mapbase = IXP4XX_UART2_BASE_PHYS,
.membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
.irq = IRQ_IXP4XX_UART1,
.flags = UPF_BOOT_AUTOCONF,
.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
.iotype = UPIO_MEM,
.regshift = 2,
.uartclk = IXP4XX_UART_XTAL,
......
......@@ -30,6 +30,7 @@
* 28-Jun-2005 BJD Moved pm functionality out to common code
* 17-Jul-2005 BJD Changed to platform device for SuperIO 16550s
* 25-Jul-2005 BJD Removed ASIX static mappings
* 27-Jul-2005 BJD Ensure maximum frequency of i2c bus
*/
#include <linux/kernel.h>
......@@ -60,6 +61,7 @@
#include <asm/arch/regs-mem.h>
#include <asm/arch/regs-lcd.h>
#include <asm/arch/nand.h>
#include <asm/arch/iic.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/nand.h>
......@@ -304,7 +306,7 @@ static void bast_nand_select(struct s3c2410_nand_set *set, int slot)
}
static struct s3c2410_platform_nand bast_nand_info = {
.tacls = 80,
.tacls = 40,
.twrph0 = 80,
.twrph1 = 80,
.nr_sets = ARRAY_SIZE(bast_nand_sets),
......@@ -385,6 +387,17 @@ static struct platform_device bast_sio = {
},
};
/* we have devices on the bus which cannot work much over the
* standard 100KHz i2c bus frequency
*/
static struct s3c2410_platform_i2c bast_i2c_info = {
.flags = 0,
.slave_addr = 0x10,
.bus_freq = 100*1000,
.max_freq = 130*1000,
};
/* Standard BAST devices */
static struct platform_device *bast_devices[] __initdata = {
......@@ -431,6 +444,7 @@ void __init bast_map_io(void)
s3c24xx_uclk.parent = &s3c24xx_clkout1;
s3c_device_nand.dev.platform_data = &bast_nand_info;
s3c_device_i2c.dev.platform_data = &bast_i2c_info;
s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc));
s3c24xx_init_clocks(0);
......
......@@ -97,6 +97,7 @@ static void __init jornada720_map_io(void)
}
MACHINE_START(JORNADA720, "HP Jornada 720")
/* Maintainer: Michael Gernoth <michael@gernoth.net> */
.phys_ram = 0xc0000000,
.phys_io = 0x80000000,
.io_pg_offst = ((0xf8000000) >> 18) & 0xfffc,
......
......@@ -238,9 +238,9 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
up_read(&mm->mmap_sem);
/*
* Handle the "normal" case first
* Handle the "normal" case first - VM_FAULT_MAJOR / VM_FAULT_MINOR
*/
if (fault > 0)
if (fault >= VM_FAULT_MINOR)
return 0;
/*
......@@ -261,7 +261,7 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
do_exit(SIGKILL);
return 0;
case 0:
case VM_FAULT_SIGBUS:
/*
* We had some memory, but were unable to
* successfully fix up this page fault.
......
......@@ -370,142 +370,6 @@ ENTRY(cpu_xscale_dcache_clean_area)
bhi 1b
mov pc, lr
/* ================================ CACHE LOCKING============================
*
* The XScale MicroArchitecture implements support for locking entries into
* the data and instruction cache. The following functions implement the core
* low level instructions needed to accomplish the locking. The developer's
* manual states that the code that performs the locking must be in non-cached
* memory. To accomplish this, the code in xscale-cache-lock.c copies the
* following functions from the cache into a non-cached memory region that
* is allocated through consistent_alloc().
*
*/
.align 5
/*
* xscale_icache_lock
*
* r0: starting address to lock
* r1: end address to lock
*/
ENTRY(xscale_icache_lock)
iLockLoop:
bic r0, r0, #CACHELINESIZE - 1
mcr p15, 0, r0, c9, c1, 0 @ lock into cache
cmp r0, r1 @ are we done?
add r0, r0, #CACHELINESIZE @ advance to next cache line
bls iLockLoop
mov pc, lr
/*
* xscale_icache_unlock
*/
ENTRY(xscale_icache_unlock)
mcr p15, 0, r0, c9, c1, 1 @ Unlock icache
mov pc, lr
/*
* xscale_dcache_lock
*
* r0: starting address to lock
* r1: end address to lock
*/
ENTRY(xscale_dcache_lock)
mcr p15, 0, ip, c7, c10, 4 @ Drain Write (& Fill) Buffer
mov r2, #1
mcr p15, 0, r2, c9, c2, 0 @ Put dcache in lock mode
cpwait ip @ Wait for completion
mrs r2, cpsr
orr r3, r2, #PSR_F_BIT | PSR_I_BIT
dLockLoop:
msr cpsr_c, r3
mcr p15, 0, r0, c7, c10, 1 @ Write back line if it is dirty
mcr p15, 0, r0, c7, c6, 1 @ Flush/invalidate line
msr cpsr_c, r2
ldr ip, [r0], #CACHELINESIZE @ Preload 32 bytes into cache from
@ location [r0]. Post-increment
@ r3 to next cache line
cmp r0, r1 @ Are we done?
bls dLockLoop
mcr p15, 0, ip, c7, c10, 4 @ Drain Write (& Fill) Buffer
mov r2, #0
mcr p15, 0, r2, c9, c2, 0 @ Get out of lock mode
cpwait_ret lr, ip
/*
* xscale_dcache_unlock
*/
ENTRY(xscale_dcache_unlock)
mcr p15, 0, ip, c7, c10, 4 @ Drain Write (& Fill) Buffer
mcr p15, 0, ip, c9, c2, 1 @ Unlock cache
mov pc, lr
/*
* Needed to determine the length of the code that needs to be copied.
*/
.align 5
ENTRY(xscale_cache_dummy)
mov pc, lr
/* ================================ TLB LOCKING==============================
*
* The XScale MicroArchitecture implements support for locking entries into
* the Instruction and Data TLBs. The following functions provide the
* low level support for supporting these under Linux. xscale-lock.c
* implements some higher level management code. Most of the following
* is taken straight out of the Developer's Manual.
*/
/*
* Lock I-TLB entry
*
* r0: Virtual address to translate and lock
*/
.align 5
ENTRY(xscale_itlb_lock)
mrs r2, cpsr
orr r3, r2, #PSR_F_BIT | PSR_I_BIT
msr cpsr_c, r3 @ Disable interrupts
mcr p15, 0, r0, c8, c5, 1 @ Invalidate I-TLB entry
mcr p15, 0, r0, c10, c4, 0 @ Translate and lock
msr cpsr_c, r2 @ Restore interrupts
cpwait_ret lr, ip
/*
* Lock D-TLB entry
*
* r0: Virtual address to translate and lock
*/
.align 5
ENTRY(xscale_dtlb_lock)
mrs r2, cpsr
orr r3, r2, #PSR_F_BIT | PSR_I_BIT
msr cpsr_c, r3 @ Disable interrupts
mcr p15, 0, r0, c8, c6, 1 @ Invalidate D-TLB entry
mcr p15, 0, r0, c10, c8, 0 @ Translate and lock
msr cpsr_c, r2 @ Restore interrupts
cpwait_ret lr, ip
/*
* Unlock all I-TLB entries
*/
.align 5
ENTRY(xscale_itlb_unlock)
mcr p15, 0, ip, c10, c4, 1 @ Unlock I-TLB
mcr p15, 0, ip, c8, c5, 0 @ Invalidate I-TLB
cpwait_ret lr, ip
/*
* Unlock all D-TLB entries
*/
ENTRY(xscale_dtlb_unlock)
mcr p15, 0, ip, c10, c8, 1 @ Unlock D-TBL
mcr p15, 0, ip, c8, c6, 0 @ Invalidate D-TLB
cpwait_ret lr, ip
/* =============================== PageTable ============================== */
#define PTE_CACHE_WRITE_ALLOCATE 0
......
......@@ -40,17 +40,17 @@ float64 float64_arccos(float64 rFm);
float64 float64_pow(float64 rFn, float64 rFm);
float64 float64_pol(float64 rFn, float64 rFm);
static float64 float64_rsf(float64 rFn, float64 rFm)
static float64 float64_rsf(struct roundingData *roundData, float64 rFn, float64 rFm)
{
return float64_sub(rFm, rFn);
return float64_sub(roundData, rFm, rFn);
}
static float64 float64_rdv(float64 rFn, float64 rFm)
static float64 float64_rdv(struct roundingData *roundData, float64 rFn, float64 rFm)
{
return float64_div(rFm, rFn);
return float64_div(roundData, rFm, rFn);
}
static float64 (*const dyadic_double[16])(float64 rFn, float64 rFm) = {
static float64 (*const dyadic_double[16])(struct roundingData*, float64 rFn, float64 rFm) = {
[ADF_CODE >> 20] = float64_add,
[MUF_CODE >> 20] = float64_mul,
[SUF_CODE >> 20] = float64_sub,
......@@ -65,12 +65,12 @@ static float64 (*const dyadic_double[16])(float64 rFn, float64 rFm) = {
[FRD_CODE >> 20] = float64_rdv,
};
static float64 float64_mvf(float64 rFm)
static float64 float64_mvf(struct roundingData *roundData,float64 rFm)
{
return rFm;
}
static float64 float64_mnf(float64 rFm)
static float64 float64_mnf(struct roundingData *roundData,float64 rFm)
{
union float64_components u;
......@@ -84,7 +84,7 @@ static float64 float64_mnf(float64 rFm)
return u.f64;
}
static float64 float64_abs(float64 rFm)
static float64 float64_abs(struct roundingData *roundData,float64 rFm)
{
union float64_components u;
......@@ -98,7 +98,7 @@ static float64 float64_abs(float64 rFm)
return u.f64;
}
static float64 (*const monadic_double[16])(float64 rFm) = {
static float64 (*const monadic_double[16])(struct roundingData *, float64 rFm) = {
[MVF_CODE >> 20] = float64_mvf,
[MNF_CODE >> 20] = float64_mnf,
[ABS_CODE >> 20] = float64_abs,
......@@ -108,7 +108,7 @@ static float64 (*const monadic_double[16])(float64 rFm) = {
[NRM_CODE >> 20] = float64_mvf,
};
unsigned int DoubleCPDO(const unsigned int opcode, FPREG * rFd)
unsigned int DoubleCPDO(struct roundingData *roundData, const unsigned int opcode, FPREG * rFd)
{
FPA11 *fpa11 = GET_FPA11();
float64 rFm;
......@@ -151,13 +151,13 @@ unsigned int DoubleCPDO(const unsigned int opcode, FPREG * rFd)
}
if (dyadic_double[opc_mask_shift]) {
rFd->fDouble = dyadic_double[opc_mask_shift](rFn, rFm);
rFd->fDouble = dyadic_double[opc_mask_shift](roundData, rFn, rFm);
} else {
return 0;
}
} else {
if (monadic_double[opc_mask_shift]) {
rFd->fDouble = monadic_double[opc_mask_shift](rFm);
rFd->fDouble = monadic_double[opc_mask_shift](roundData, rFm);
} else {
return 0;
}
......
......@@ -35,17 +35,17 @@ floatx80 floatx80_arccos(floatx80 rFm);
floatx80 floatx80_pow(floatx80 rFn, floatx80 rFm);
floatx80 floatx80_pol(floatx80 rFn, floatx80 rFm);
static floatx80 floatx80_rsf(floatx80 rFn, floatx80 rFm)
static floatx80 floatx80_rsf(struct roundingData *roundData, floatx80 rFn, floatx80 rFm)
{
return floatx80_sub(rFm, rFn);
return floatx80_sub(roundData, rFm, rFn);
}
static floatx80 floatx80_rdv(floatx80 rFn, floatx80 rFm)
static floatx80 floatx80_rdv(struct roundingData *roundData, floatx80 rFn, floatx80 rFm)
{
return floatx80_div(rFm, rFn);
return floatx80_div(roundData, rFm, rFn);
}
static floatx80 (*const dyadic_extended[16])(floatx80 rFn, floatx80 rFm) = {
static floatx80 (*const dyadic_extended[16])(struct roundingData*, floatx80 rFn, floatx80 rFm) = {
[ADF_CODE >> 20] = floatx80_add,
[MUF_CODE >> 20] = floatx80_mul,
[SUF_CODE >> 20] = floatx80_sub,
......@@ -60,24 +60,24 @@ static floatx80 (*const dyadic_extended[16])(floatx80 rFn, floatx80 rFm) = {
[FRD_CODE >> 20] = floatx80_rdv,
};
static floatx80 floatx80_mvf(floatx80 rFm)
static floatx80 floatx80_mvf(struct roundingData *roundData, floatx80 rFm)
{
return rFm;
}
static floatx80 floatx80_mnf(floatx80 rFm)
static floatx80 floatx80_mnf(struct roundingData *roundData, floatx80 rFm)
{
rFm.high ^= 0x8000;
return rFm;
}
static floatx80 floatx80_abs(floatx80 rFm)
static floatx80 floatx80_abs(struct roundingData *roundData, floatx80 rFm)
{
rFm.high &= 0x7fff;
return rFm;
}
static floatx80 (*const monadic_extended[16])(floatx80 rFm) = {
static floatx80 (*const monadic_extended[16])(struct roundingData*, floatx80 rFm) = {
[MVF_CODE >> 20] = floatx80_mvf,
[MNF_CODE >> 20] = floatx80_mnf,
[ABS_CODE >> 20] = floatx80_abs,
......@@ -87,7 +87,7 @@ static floatx80 (*const monadic_extended[16])(floatx80 rFm) = {
[NRM_CODE >> 20] = floatx80_mvf,
};
unsigned int ExtendedCPDO(const unsigned int opcode, FPREG * rFd)
unsigned int ExtendedCPDO(struct roundingData *roundData, const unsigned int opcode, FPREG * rFd)
{
FPA11 *fpa11 = GET_FPA11();
floatx80 rFm;
......@@ -138,13 +138,13 @@ unsigned int ExtendedCPDO(const unsigned int opcode, FPREG * rFd)
}
if (dyadic_extended[opc_mask_shift]) {
rFd->fExtended = dyadic_extended[opc_mask_shift](rFn, rFm);
rFd->fExtended = dyadic_extended[opc_mask_shift](roundData, rFn, rFm);
} else {
return 0;
}
} else {
if (monadic_extended[opc_mask_shift]) {
rFd->fExtended = monadic_extended[opc_mask_shift](rFm);
rFd->fExtended = monadic_extended[opc_mask_shift](roundData, rFm);
} else {
return 0;
}
......
......@@ -51,48 +51,42 @@ static void resetFPA11(void)
fpa11->fpsr = FP_EMULATOR | BIT_AC;
}
void SetRoundingMode(const unsigned int opcode)
int8 SetRoundingMode(const unsigned int opcode)
{
switch (opcode & MASK_ROUNDING_MODE) {
default:
case ROUND_TO_NEAREST:
float_rounding_mode = float_round_nearest_even;
break;
return float_round_nearest_even;
case ROUND_TO_PLUS_INFINITY:
float_rounding_mode = float_round_up;
break;
return float_round_up;
case ROUND_TO_MINUS_INFINITY:
float_rounding_mode = float_round_down;
break;
return float_round_down;
case ROUND_TO_ZERO:
float_rounding_mode = float_round_to_zero;
break;
return float_round_to_zero;
}
}
void SetRoundingPrecision(const unsigned int opcode)
int8 SetRoundingPrecision(const unsigned int opcode)
{
#ifdef CONFIG_FPE_NWFPE_XP
switch (opcode & MASK_ROUNDING_PRECISION) {
case ROUND_SINGLE:
floatx80_rounding_precision = 32;
break;
return 32;
case ROUND_DOUBLE:
floatx80_rounding_precision = 64;
break;
return 64;
case ROUND_EXTENDED:
floatx80_rounding_precision = 80;
break;
return 80;
default:
floatx80_rounding_precision = 80;
return 80;
}
#endif
return 80;
}
void nwfpe_init_fpa(union fp_state *fp)
......@@ -103,8 +97,6 @@ void nwfpe_init_fpa(union fp_state *fp)
#endif
memset(fpa11, 0, sizeof(FPA11));
resetFPA11();
SetRoundingMode(ROUND_TO_NEAREST);
SetRoundingPrecision(ROUND_EXTENDED);
fpa11->initflag = 1;
}
......
......@@ -37,6 +37,13 @@
/* includes */
#include "fpsr.h" /* FP control and status register definitions */
#include "milieu.h"
struct roundingData {
int8 mode;
int8 precision;
signed char exception;
};
#include "softfloat.h"
#define typeNone 0x00
......@@ -84,8 +91,8 @@ typedef struct tagFPA11 {
initialised. */
} FPA11;
extern void SetRoundingMode(const unsigned int);
extern void SetRoundingPrecision(const unsigned int);
extern int8 SetRoundingMode(const unsigned int);
extern int8 SetRoundingPrecision(const unsigned int);
extern void nwfpe_init_fpa(union fp_state *fp);
#endif
......@@ -24,15 +24,16 @@
#include "fpa11.h"
#include "fpopcode.h"
unsigned int SingleCPDO(const unsigned int opcode, FPREG * rFd);
unsigned int DoubleCPDO(const unsigned int opcode, FPREG * rFd);
unsigned int ExtendedCPDO(const unsigned int opcode, FPREG * rFd);
unsigned int SingleCPDO(struct roundingData *roundData, const unsigned int opcode, FPREG * rFd);
unsigned int DoubleCPDO(struct roundingData *roundData, const unsigned int opcode, FPREG * rFd);
unsigned int ExtendedCPDO(struct roundingData *roundData, const unsigned int opcode, FPREG * rFd);
unsigned int EmulateCPDO(const unsigned int opcode)
{
FPA11 *fpa11 = GET_FPA11();
FPREG *rFd;
unsigned int nType, nDest, nRc;
struct roundingData roundData;
/* Get the destination size. If not valid let Linux perform
an invalid instruction trap. */
......@@ -40,7 +41,9 @@ unsigned int EmulateCPDO(const unsigned int opcode)
if (typeNone == nDest)
return 0;
SetRoundingMode(opcode);
roundData.mode = SetRoundingMode(opcode);
roundData.precision = SetRoundingPrecision(opcode);
roundData.exception = 0;
/* Compare the size of the operands in Fn and Fm.
Choose the largest size and perform operations in that size,
......@@ -63,14 +66,14 @@ unsigned int EmulateCPDO(const unsigned int opcode)
switch (nType) {
case typeSingle:
nRc = SingleCPDO(opcode, rFd);
nRc = SingleCPDO(&roundData, opcode, rFd);
break;
case typeDouble:
nRc = DoubleCPDO(opcode, rFd);
nRc = DoubleCPDO(&roundData, opcode, rFd);
break;
#ifdef CONFIG_FPE_NWFPE_XP
case typeExtended:
nRc = ExtendedCPDO(opcode, rFd);
nRc = ExtendedCPDO(&roundData, opcode, rFd);
break;
#endif
default:
......@@ -93,9 +96,9 @@ unsigned int EmulateCPDO(const unsigned int opcode)
case typeSingle:
{
if (typeDouble == nType)
rFd->fSingle = float64_to_float32(rFd->fDouble);
rFd->fSingle = float64_to_float32(&roundData, rFd->fDouble);
else
rFd->fSingle = floatx80_to_float32(rFd->fExtended);
rFd->fSingle = floatx80_to_float32(&roundData, rFd->fExtended);
}
break;
......@@ -104,7 +107,7 @@ unsigned int EmulateCPDO(const unsigned int opcode)
if (typeSingle == nType)
rFd->fDouble = float32_to_float64(rFd->fSingle);
else
rFd->fDouble = floatx80_to_float64(rFd->fExtended);
rFd->fDouble = floatx80_to_float64(&roundData, rFd->fExtended);
}
break;
......@@ -121,12 +124,15 @@ unsigned int EmulateCPDO(const unsigned int opcode)
#else
if (nDest != nType) {
if (nDest == typeSingle)
rFd->fSingle = float64_to_float32(rFd->fDouble);
rFd->fSingle = float64_to_float32(&roundData, rFd->fDouble);
else
rFd->fDouble = float32_to_float64(rFd->fSingle);
}
#endif
}
if (roundData.exception)
float_raise(roundData.exception);
return nRc;
}
......@@ -96,7 +96,7 @@ static inline void loadMultiple(const unsigned int Fn, const unsigned int __user
}
}
static inline void storeSingle(const unsigned int Fn, unsigned int __user *pMem)
static inline void storeSingle(struct roundingData *roundData, const unsigned int Fn, unsigned int __user *pMem)
{
FPA11 *fpa11 = GET_FPA11();
union {
......@@ -106,12 +106,12 @@ static inline void storeSingle(const unsigned int Fn, unsigned int __user *pMem)
switch (fpa11->fType[Fn]) {
case typeDouble:
val.f = float64_to_float32(fpa11->fpreg[Fn].fDouble);
val.f = float64_to_float32(roundData, fpa11->fpreg[Fn].fDouble);
break;
#ifdef CONFIG_FPE_NWFPE_XP
case typeExtended:
val.f = floatx80_to_float32(fpa11->fpreg[Fn].fExtended);
val.f = floatx80_to_float32(roundData, fpa11->fpreg[Fn].fExtended);
break;
#endif
......@@ -122,7 +122,7 @@ static inline void storeSingle(const unsigned int Fn, unsigned int __user *pMem)
put_user(val.i[0], pMem);
}
static inline void storeDouble(const unsigned int Fn, unsigned int __user *pMem)
static inline void storeDouble(struct roundingData *roundData, const unsigned int Fn, unsigned int __user *pMem)
{
FPA11 *fpa11 = GET_FPA11();
union {
......@@ -137,7 +137,7 @@ static inline void storeDouble(const unsigned int Fn, unsigned int __user *pMem)
#ifdef CONFIG_FPE_NWFPE_XP
case typeExtended:
val.f = floatx80_to_float64(fpa11->fpreg[Fn].fExtended);
val.f = floatx80_to_float64(roundData, fpa11->fpreg[Fn].fExtended);
break;
#endif
......@@ -259,8 +259,11 @@ unsigned int PerformSTF(const unsigned int opcode)
{
unsigned int __user *pBase, *pAddress, *pFinal;
unsigned int nRc = 1, write_back = WRITE_BACK(opcode);
struct roundingData roundData;
SetRoundingMode(ROUND_TO_NEAREST);
roundData.mode = SetRoundingMode(opcode);
roundData.precision = SetRoundingPrecision(opcode);
roundData.exception = 0;
pBase = (unsigned int __user *) readRegister(getRn(opcode));
if (REG_PC == getRn(opcode)) {
......@@ -281,10 +284,10 @@ unsigned int PerformSTF(const unsigned int opcode)
switch (opcode & MASK_TRANSFER_LENGTH) {
case TRANSFER_SINGLE:
storeSingle(getFd(opcode), pAddress);
storeSingle(&roundData, getFd(opcode), pAddress);
break;
case TRANSFER_DOUBLE:
storeDouble(getFd(opcode), pAddress);
storeDouble(&roundData, getFd(opcode), pAddress);
break;
#ifdef CONFIG_FPE_NWFPE_XP
case TRANSFER_EXTENDED:
......@@ -295,6 +298,9 @@ unsigned int PerformSTF(const unsigned int opcode)
nRc = 0;
}
if (roundData.exception)
float_raise(roundData.exception);
if (write_back)
writeRegister(getRn(opcode), (unsigned long) pFinal);
return nRc;
......
......@@ -33,8 +33,6 @@ extern flag floatx80_is_nan(floatx80);
extern flag float64_is_nan(float64);
extern flag float32_is_nan(float32);
void SetRoundingMode(const unsigned int opcode);
unsigned int PerformFLT(const unsigned int opcode);
unsigned int PerformFIX(const unsigned int opcode);
......@@ -77,14 +75,17 @@ unsigned int EmulateCPRT(const unsigned int opcode)
unsigned int PerformFLT(const unsigned int opcode)
{
FPA11 *fpa11 = GET_FPA11();
SetRoundingMode(opcode);
SetRoundingPrecision(opcode);
struct roundingData roundData;
roundData.mode = SetRoundingMode(opcode);
roundData.precision = SetRoundingPrecision(opcode);
roundData.exception = 0;
switch (opcode & MASK_ROUNDING_PRECISION) {
case ROUND_SINGLE:
{
fpa11->fType[getFn(opcode)] = typeSingle;
fpa11->fpreg[getFn(opcode)].fSingle = int32_to_float32(readRegister(getRd(opcode)));
fpa11->fpreg[getFn(opcode)].fSingle = int32_to_float32(&roundData, readRegister(getRd(opcode)));
}
break;
......@@ -108,6 +109,9 @@ unsigned int PerformFLT(const unsigned int opcode)
return 0;
}
if (roundData.exception)
float_raise(roundData.exception);
return 1;
}
......@@ -115,26 +119,29 @@ unsigned int PerformFIX(const unsigned int opcode)
{
FPA11 *fpa11 = GET_FPA11();
unsigned int Fn = getFm(opcode);
struct roundingData roundData;
SetRoundingMode(opcode);
roundData.mode = SetRoundingMode(opcode);
roundData.precision = SetRoundingPrecision(opcode);
roundData.exception = 0;
switch (fpa11->fType[Fn]) {
case typeSingle:
{
writeRegister(getRd(opcode), float32_to_int32(fpa11->fpreg[Fn].fSingle));
writeRegister(getRd(opcode), float32_to_int32(&roundData, fpa11->fpreg[Fn].fSingle));
}
break;
case typeDouble:
{
writeRegister(getRd(opcode), float64_to_int32(fpa11->fpreg[Fn].fDouble));
writeRegister(getRd(opcode), float64_to_int32(&roundData, fpa11->fpreg[Fn].fDouble));
}
break;
#ifdef CONFIG_FPE_NWFPE_XP
case typeExtended:
{
writeRegister(getRd(opcode), floatx80_to_int32(fpa11->fpreg[Fn].fExtended));
writeRegister(getRd(opcode), floatx80_to_int32(&roundData, fpa11->fpreg[Fn].fExtended));
}
break;
#endif
......@@ -143,6 +150,9 @@ unsigned int PerformFIX(const unsigned int opcode)
return 0;
}
if (roundData.exception)
float_raise(roundData.exception);
return 1;
}
......
......@@ -116,8 +116,6 @@ fpmodule.c to integrate with the NetBSD kernel (I hope!).
code to access data in user space in some other source files at the
moment (grep for get_user / put_user calls). --philb]
float_exception_flags is a global variable in SoftFloat.
This function is called by the SoftFloat routines to raise a floating
point exception. We check the trap enable byte in the FPSR, and raise
a SIGFPE exception if necessary. If not the relevant bits in the
......@@ -129,15 +127,14 @@ void float_raise(signed char flags)
register unsigned int fpsr, cumulativeTraps;
#ifdef CONFIG_DEBUG_USER
printk(KERN_DEBUG
"NWFPE: %s[%d] takes exception %08x at %p from %08lx\n",
current->comm, current->pid, flags,
__builtin_return_address(0), GET_USERREG()->ARM_pc);
/* Ignore inexact errors as there are far too many of them to log */
if (flags & ~BIT_IXC)
printk(KERN_DEBUG
"NWFPE: %s[%d] takes exception %08x at %p from %08lx\n",
current->comm, current->pid, flags,
__builtin_return_address(0), GET_USERREG()->ARM_pc);
#endif
/* Keep SoftFloat exception flags up to date. */
float_exception_flags |= flags;
/* Read fpsr and initialize the cumulativeTraps. */
fpsr = readFPSR();
cumulativeTraps = 0;
......
......@@ -36,17 +36,17 @@ float32 float32_arccos(float32 rFm);
float32 float32_pow(float32 rFn, float32 rFm);
float32 float32_pol(float32 rFn, float32 rFm);
static float32 float32_rsf(float32 rFn, float32 rFm)
static float32 float32_rsf(struct roundingData *roundData, float32 rFn, float32 rFm)
{
return float32_sub(rFm, rFn);
return float32_sub(roundData, rFm, rFn);
}
static float32 float32_rdv(float32 rFn, float32 rFm)
static float32 float32_rdv(struct roundingData *roundData, float32 rFn, float32 rFm)
{
return float32_div(rFm, rFn);
return float32_div(roundData, rFm, rFn);
}
static float32 (*const dyadic_single[16])(float32 rFn, float32 rFm) = {
static float32 (*const dyadic_single[16])(struct roundingData *, float32 rFn, float32 rFm) = {
[ADF_CODE >> 20] = float32_add,
[MUF_CODE >> 20] = float32_mul,
[SUF_CODE >> 20] = float32_sub,
......@@ -60,22 +60,22 @@ static float32 (*const dyadic_single[16])(float32 rFn, float32 rFm) = {
[FRD_CODE >> 20] = float32_rdv,
};
static float32 float32_mvf(float32 rFm)
static float32 float32_mvf(struct roundingData *roundData, float32 rFm)
{
return rFm;
}
static float32 float32_mnf(float32 rFm)
static float32 float32_mnf(struct roundingData *roundData, float32 rFm)
{
return rFm ^ 0x80000000;
}
static float32 float32_abs(float32 rFm)
static float32 float32_abs(struct roundingData *roundData, float32 rFm)
{
return rFm & 0x7fffffff;
}
static float32 (*const monadic_single[16])(float32 rFm) = {
static float32 (*const monadic_single[16])(struct roundingData*, float32 rFm) = {
[MVF_CODE >> 20] = float32_mvf,
[MNF_CODE >> 20] = float32_mnf,
[ABS_CODE >> 20] = float32_abs,
......@@ -85,7 +85,7 @@ static float32 (*const monadic_single[16])(float32 rFm) = {
[NRM_CODE >> 20] = float32_mvf,
};
unsigned int SingleCPDO(const unsigned int opcode, FPREG * rFd)
unsigned int SingleCPDO(struct roundingData *roundData, const unsigned int opcode, FPREG * rFd)
{
FPA11 *fpa11 = GET_FPA11();
float32 rFm;
......@@ -108,13 +108,13 @@ unsigned int SingleCPDO(const unsigned int opcode, FPREG * rFd)
if (fpa11->fType[Fn] == typeSingle &&
dyadic_single[opc_mask_shift]) {
rFn = fpa11->fpreg[Fn].fSingle;
rFd->fSingle = dyadic_single[opc_mask_shift](rFn, rFm);
rFd->fSingle = dyadic_single[opc_mask_shift](roundData, rFn, rFm);
} else {
return 0;
}
} else {
if (monadic_single[opc_mask_shift]) {
rFd->fSingle = monadic_single[opc_mask_shift](rFm);
rFd->fSingle = monadic_single[opc_mask_shift](roundData, rFm);
} else {
return 0;
}
......
This diff is collapsed.
......@@ -74,7 +74,7 @@ enum {
Software IEC/IEEE floating-point rounding mode.
-------------------------------------------------------------------------------
*/
extern signed char float_rounding_mode;
//extern int8 float_rounding_mode;
enum {
float_round_nearest_even = 0,
float_round_to_zero = 1,
......@@ -86,7 +86,6 @@ enum {
-------------------------------------------------------------------------------
Software IEC/IEEE floating-point exception flags.
-------------------------------------------------------------------------------
extern signed char float_exception_flags;
enum {
float_flag_inexact = 1,
float_flag_underflow = 2,
......@@ -99,7 +98,6 @@ ScottB: November 4, 1998
Changed the enumeration to match the bit order in the FPA11.
*/
extern signed char float_exception_flags;
enum {
float_flag_invalid = 1,
float_flag_divbyzero = 2,
......@@ -121,7 +119,7 @@ void float_raise( signed char );
Software IEC/IEEE integer-to-floating-point conversion routines.
-------------------------------------------------------------------------------
*/
float32 int32_to_float32( signed int );
float32 int32_to_float32( struct roundingData *, signed int );
float64 int32_to_float64( signed int );
#ifdef FLOATX80
floatx80 int32_to_floatx80( signed int );
......@@ -132,7 +130,7 @@ floatx80 int32_to_floatx80( signed int );
Software IEC/IEEE single-precision conversion routines.
-------------------------------------------------------------------------------
*/
signed int float32_to_int32( float32 );
signed int float32_to_int32( struct roundingData *, float32 );
signed int float32_to_int32_round_to_zero( float32 );
float64 float32_to_float64( float32 );
#ifdef FLOATX80
......@@ -144,13 +142,13 @@ floatx80 float32_to_floatx80( float32 );
Software IEC/IEEE single-precision operations.
-------------------------------------------------------------------------------
*/
float32 float32_round_to_int( float32 );
float32 float32_add( float32, float32 );
float32 float32_sub( float32, float32 );
float32 float32_mul( float32, float32 );
float32 float32_div( float32, float32 );
float32 float32_rem( float32, float32 );
float32 float32_sqrt( float32 );
float32 float32_round_to_int( struct roundingData*, float32 );
float32 float32_add( struct roundingData *, float32, float32 );
float32 float32_sub( struct roundingData *, float32, float32 );
float32 float32_mul( struct roundingData *, float32, float32 );
float32 float32_div( struct roundingData *, float32, float32 );
float32 float32_rem( struct roundingData *, float32, float32 );
float32 float32_sqrt( struct roundingData*, float32 );
char float32_eq( float32, float32 );
char float32_le( float32, float32 );
char float32_lt( float32, float32 );
......@@ -164,9 +162,9 @@ char float32_is_signaling_nan( float32 );
Software IEC/IEEE double-precision conversion routines.
-------------------------------------------------------------------------------
*/
signed int float64_to_int32( float64 );
signed int float64_to_int32( struct roundingData *, float64 );
signed int float64_to_int32_round_to_zero( float64 );
float32 float64_to_float32( float64 );
float32 float64_to_float32( struct roundingData *, float64 );
#ifdef FLOATX80
floatx80 float64_to_floatx80( float64 );
#endif
......@@ -176,13 +174,13 @@ floatx80 float64_to_floatx80( float64 );
Software IEC/IEEE double-precision operations.
-------------------------------------------------------------------------------
*/
float64 float64_round_to_int( float64 );
float64 float64_add( float64, float64 );
float64 float64_sub( float64, float64 );
float64 float64_mul( float64, float64 );
float64 float64_div( float64, float64 );
float64 float64_rem( float64, float64 );
float64 float64_sqrt( float64 );
float64 float64_round_to_int( struct roundingData *, float64 );
float64 float64_add( struct roundingData *, float64, float64 );
float64 float64_sub( struct roundingData *, float64, float64 );
float64 float64_mul( struct roundingData *, float64, float64 );
float64 float64_div( struct roundingData *, float64, float64 );
float64 float64_rem( struct roundingData *, float64, float64 );
float64 float64_sqrt( struct roundingData *, float64 );
char float64_eq( float64, float64 );
char float64_le( float64, float64 );
char float64_lt( float64, float64 );
......@@ -198,31 +196,23 @@ char float64_is_signaling_nan( float64 );
Software IEC/IEEE extended double-precision conversion routines.
-------------------------------------------------------------------------------
*/
signed int floatx80_to_int32( floatx80 );
signed int floatx80_to_int32( struct roundingData *, floatx80 );
signed int floatx80_to_int32_round_to_zero( floatx80 );
float32 floatx80_to_float32( floatx80 );
float64 floatx80_to_float64( floatx80 );
/*
-------------------------------------------------------------------------------
Software IEC/IEEE extended double-precision rounding precision. Valid
values are 32, 64, and 80.
-------------------------------------------------------------------------------
*/
extern signed char floatx80_rounding_precision;
float32 floatx80_to_float32( struct roundingData *, floatx80 );
float64 floatx80_to_float64( struct roundingData *, floatx80 );
/*
-------------------------------------------------------------------------------
Software IEC/IEEE extended double-precision operations.
-------------------------------------------------------------------------------
*/
floatx80 floatx80_round_to_int( floatx80 );
floatx80 floatx80_add( floatx80, floatx80 );
floatx80 floatx80_sub( floatx80, floatx80 );
floatx80 floatx80_mul( floatx80, floatx80 );
floatx80 floatx80_div( floatx80, floatx80 );
floatx80 floatx80_rem( floatx80, floatx80 );
floatx80 floatx80_sqrt( floatx80 );
floatx80 floatx80_round_to_int( struct roundingData *, floatx80 );
floatx80 floatx80_add( struct roundingData *, floatx80, floatx80 );
floatx80 floatx80_sub( struct roundingData *, floatx80, floatx80 );
floatx80 floatx80_mul( struct roundingData *, floatx80, floatx80 );
floatx80 floatx80_div( struct roundingData *, floatx80, floatx80 );
floatx80 floatx80_rem( struct roundingData *, floatx80, floatx80 );
floatx80 floatx80_sqrt( struct roundingData *, floatx80 );
char floatx80_eq( floatx80, floatx80 );
char floatx80_le( floatx80, floatx80 );
char floatx80_lt( floatx80, floatx80 );
......
......@@ -115,7 +115,7 @@ static int valid_kernel_stack(struct frame_tail *tail, struct pt_regs *regs)
return (tailaddr > stack) && (tailaddr < stack_base);
}
void arm_backtrace(struct pt_regs const *regs, unsigned int depth)
void arm_backtrace(struct pt_regs * const regs, unsigned int depth)
{
struct frame_tail *tail;
unsigned long last_address = 0;
......
......@@ -770,6 +770,9 @@ vfp_double_add(struct vfp_double *vdd, struct vfp_double *vdn,
if ((s64)m_sig < 0) {
vdd->sign = vfp_sign_negate(vdd->sign);
m_sig = -m_sig;
} else if (m_sig == 0) {
vdd->sign = (fpscr & FPSCR_RMODE_MASK) ==
FPSCR_ROUND_MINUSINF ? 0x8000 : 0;
}
} else {
m_sig += vdn->significand;
......
......@@ -176,12 +176,12 @@ __do_page_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr,
* Handle the "normal" cases first - successful and sigbus
*/
switch (fault) {
case 2:
case VM_FAULT_MAJOR:
tsk->maj_flt++;
return fault;
case 1:
case VM_FAULT_MINOR:
tsk->min_flt++;
case 0:
case VM_FAULT_SIGBUS:
return fault;
}
......@@ -226,14 +226,11 @@ int do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
/*
* Handle the "normal" case first
*/
if (fault > 0)
switch (fault) {
case VM_FAULT_MINOR:
case VM_FAULT_MAJOR:
return 0;
/*
* We had some memory, but were unable to
* successfully fix up this page fault.
*/
if (fault == 0){
case VM_FAULT_SIGBUS:
goto do_sigbus;
}
......
......@@ -284,13 +284,13 @@ do_page_fault(unsigned long address, struct pt_regs *regs,
*/
switch (handle_mm_fault(mm, vma, address, writeaccess & 1)) {
case 1:
case VM_FAULT_MINOR:
tsk->min_flt++;
break;
case 2:
case VM_FAULT_MAJOR:
tsk->maj_flt++;
break;
case 0:
case VM_FAULT_SIGBUS:
goto do_sigbus;
default:
goto out_of_memory;
......
......@@ -163,13 +163,13 @@ asmlinkage void do_page_fault(int datammu, unsigned long esr0, unsigned long ear
* the fault.
*/
switch (handle_mm_fault(mm, vma, ear0, write)) {
case 1:
case VM_FAULT_MINOR:
current->min_flt++;
break;
case 2:
case VM_FAULT_MAJOR:
current->maj_flt++;
break;
case 0:
case VM_FAULT_SIGBUS:
goto do_sigbus;
default:
goto out_of_memory;
......
......@@ -454,8 +454,9 @@ config HPET_TIMER
Choose N to continue using the legacy 8254 timer.
config HPET_EMULATE_RTC
bool "Provide RTC interrupt"
bool
depends on HPET_TIMER && RTC=y
default y
config SMP
bool "Symmetric multi-processing support"
......
......@@ -9,12 +9,15 @@
void (*pm_power_off)(void);
EXPORT_SYMBOL(pm_power_off);
void machine_restart(char * __unused)
void machine_shutdown(void)
{
#ifdef CONFIG_SMP
smp_send_stop();
#endif
}
void machine_emergency_restart(void)
{
/*
* Visual Workstations restart after this
* register is poked on the PIIX4
......@@ -22,6 +25,12 @@ void machine_restart(char * __unused)
outb(PIIX4_RESET_VAL, PIIX4_RESET_PORT);
}
void machine_restart(char * __unused)
{
machine_shutdown();
machine_emergency_restart();
}
void machine_power_off(void)
{
unsigned short pm_status;
......
......@@ -14,6 +14,8 @@
#include "cobalt.h"
#include "piix4.h"
int no_broadcast;
char visws_board_type = -1;
char visws_board_rev = -1;
......
......@@ -251,6 +251,12 @@ kb_wait(void)
break;
}
void
machine_shutdown(void)
{
/* Architecture specific shutdown needed before a kexec */
}
void
machine_restart(char *cmd)
{
......@@ -278,6 +284,13 @@ machine_restart(char *cmd)
}
}
void
machine_emergency_restart(void)
{
/*for now, just hook this to a warm restart */
machine_restart(NULL);
}
void
mca_nmi_hook(void)
{
......
......@@ -243,14 +243,6 @@ static unsigned long calculate_numa_remap_pages(void)
/* now the roundup is correct, convert to PAGE_SIZE pages */
size = size * PTRS_PER_PTE;
if (node_end_pfn[nid] & (PTRS_PER_PTE-1)) {
/*
* Adjust size if node_end_pfn is not on a proper
* pmd boundary. remap_numa_kva will barf otherwise.
*/
size += node_end_pfn[nid] & (PTRS_PER_PTE-1);
}
/*
* Validate the region we are allocating only contains valid
* pages.
......@@ -270,6 +262,17 @@ static unsigned long calculate_numa_remap_pages(void)
reserve_pages += size;
printk("Shrinking node %d from %ld pages to %ld pages\n",
nid, node_end_pfn[nid], node_end_pfn[nid] - size);
if (node_end_pfn[nid] & (PTRS_PER_PTE-1)) {
/*
* Align node_end_pfn[] and node_remap_start_pfn[] to
* pmd boundary. remap_numa_kva will barf otherwise.
*/
printk("Shrinking node %d further by %ld pages for proper alignment\n",
nid, node_end_pfn[nid] & (PTRS_PER_PTE-1));
size += node_end_pfn[nid] & (PTRS_PER_PTE-1);
}
node_end_pfn[nid] -= size;
node_remap_start_pfn[nid] = node_end_pfn[nid];
}
......
......@@ -18,8 +18,10 @@
extern struct pci_raw_ops pci_direct_conf1;
static int pci_visws_enable_irq(struct pci_dev *dev) { return 0; }
static void pci_visws_disable_irq(struct pci_dev *dev) { }
int (*pcibios_enable_irq)(struct pci_dev *dev) = &pci_visws_enable_irq;
void (*pcibios_disable_irq)(struct pci_dev *dev) = &pci_visws_disable_irq;
void __init pcibios_penalize_isa_irq(int irq, int active) {}
......
......@@ -179,7 +179,7 @@ static int can_do_pal_halt = 1;
static int __init nohalt_setup(char * str)
{
pal_halt = 0;
pal_halt = can_do_pal_halt = 0;
return 1;
}
__setup("nohalt", nohalt_setup);
......
......@@ -160,13 +160,13 @@ int do_page_fault(struct pt_regs *regs, unsigned long address,
printk("handle_mm_fault returns %d\n",fault);
#endif
switch (fault) {
case 1:
case VM_FAULT_MINOR:
current->min_flt++;
break;
case 2:
case VM_FAULT_MAJOR:
current->maj_flt++;
break;
case 0:
case VM_FAULT_SIGBUS:
goto bus_err;
default:
goto out_of_memory;
......
......@@ -178,17 +178,17 @@ void do_page_fault(struct pt_regs *regs, unsigned long code,
*/
switch (handle_mm_fault(mm, vma, address, (acc_type & VM_WRITE) != 0)) {
case 1:
case VM_FAULT_MINOR:
++current->min_flt;
break;
case 2:
case VM_FAULT_MAJOR:
++current->maj_flt;
break;
case 0:
case VM_FAULT_SIGBUS:
/*
* We ran out of memory, or some other thing happened
* to us that made us unable to handle the page fault
* gracefully.
* We hit a hared mapping outside of the file, or some
* other thing happened to us that made us unable to
* handle the page fault gracefully.
*/
goto bad_area;
default:
......
......@@ -69,9 +69,9 @@ config FEC_QS6612
config ENET_BIG_BUFFERS
bool "Use Big CPM Ethernet Buffers"
depends on NET_ETHERNET
depends on SCC_ENET || FEC_ENET
help
Allocate large buffers for MPC8xx Etherenet. Increases throughput
Allocate large buffers for MPC8xx Ethernet. Increases throughput
and decreases the likelihood of dropped packets, but costs memory.
config HTDMSOUND
......
......@@ -39,8 +39,6 @@
#include <asm/tlbflush.h>
#include <asm/rheap.h>
extern int get_pteptr(struct mm_struct *mm, unsigned long addr, pte_t **ptep);
static void m8xx_cpm_dpinit(void);
static uint host_buffer; /* One page of host buffer */
static uint host_end; /* end + 1 */
......@@ -108,14 +106,11 @@ struct hw_interrupt_type cpm_pic = {
.end = cpm_eoi,
};
extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr);
void
m8xx_cpm_reset(uint bootpage)
m8xx_cpm_reset(void)
{
volatile immap_t *imp;
volatile cpm8xx_t *commproc;
pte_t *pte;
imp = (immap_t *)IMAP_ADDR;
commproc = (cpm8xx_t *)&imp->im_cpm;
......@@ -143,17 +138,6 @@ m8xx_cpm_reset(uint bootpage)
/* Reclaim the DP memory for our use. */
m8xx_cpm_dpinit();
/* get the PTE for the bootpage */
if (!get_pteptr(&init_mm, bootpage, &pte))
panic("get_pteptr failed\n");
/* and make it uncachable */
pte_val(*pte) |= _PAGE_NO_CACHE;
_tlbie(bootpage);
host_buffer = bootpage;
host_end = host_buffer + PAGE_SIZE;
/* Tell everyone where the comm processor resides.
*/
cpmp = (cpm8xx_t *)commproc;
......@@ -384,8 +368,6 @@ static rh_info_t cpm_dpmem_info;
void m8xx_cpm_dpinit(void)
{
cpm8xx_t *cp = &((immap_t *)IMAP_ADDR)->im_cpm;
spin_lock_init(&cpm_dpmem_lock);
/* Initialize the info header */
......
......@@ -173,7 +173,7 @@ struct fec_enet_private {
uint phy_status;
uint phy_speed;
phy_info_t *phy;
struct tq_struct phy_task;
struct work_struct phy_task;
uint sequence_done;
......@@ -199,7 +199,8 @@ static int fec_enet_start_xmit(struct sk_buff *skb, struct net_device *dev);
#ifdef CONFIG_USE_MDIO
static void fec_enet_mii(struct net_device *dev);
#endif /* CONFIG_USE_MDIO */
static void fec_enet_interrupt(int irq, void * dev_id, struct pt_regs * regs);
static irqreturn_t fec_enet_interrupt(int irq, void * dev_id,
struct pt_regs * regs);
#ifdef CONFIG_FEC_PACKETHOOK
static void fec_enet_tx(struct net_device *dev, __u32 regval);
static void fec_enet_rx(struct net_device *dev, __u32 regval);
......@@ -471,7 +472,7 @@ fec_timeout(struct net_device *dev)
/* The interrupt handler.
* This is called from the MPC core interrupt.
*/
static void
static irqreturn_t
fec_enet_interrupt(int irq, void * dev_id, struct pt_regs * regs)
{
struct net_device *dev = dev_id;
......@@ -525,6 +526,7 @@ printk("%s[%d] %s: unexpected FEC_ENET_MII event\n", __FILE__,__LINE__,__FUNCTIO
}
}
return IRQ_RETVAL(IRQ_HANDLED);
}
......@@ -1263,8 +1265,9 @@ static void mii_display_status(struct net_device *dev)
printk(".\n");
}
static void mii_display_config(struct net_device *dev)
static void mii_display_config(void *priv)
{
struct net_device *dev = (struct net_device *)priv;
struct fec_enet_private *fep = dev->priv;
volatile uint *s = &(fep->phy_status);
......@@ -1294,8 +1297,9 @@ static void mii_display_config(struct net_device *dev)
fep->sequence_done = 1;
}
static void mii_relink(struct net_device *dev)
static void mii_relink(void *priv)
{
struct net_device *dev = (struct net_device *)priv;
struct fec_enet_private *fep = dev->priv;
int duplex;
......@@ -1323,18 +1327,16 @@ static void mii_queue_relink(uint mii_reg, struct net_device *dev)
{
struct fec_enet_private *fep = dev->priv;
fep->phy_task.routine = (void *)mii_relink;
fep->phy_task.data = dev;
schedule_task(&fep->phy_task);
INIT_WORK(&fep->phy_task, mii_relink, (void *)dev);
schedule_work(&fep->phy_task);
}
static void mii_queue_config(uint mii_reg, struct net_device *dev)
{
struct fec_enet_private *fep = dev->priv;
fep->phy_task.routine = (void *)mii_display_config;
fep->phy_task.data = dev;
schedule_task(&fep->phy_task);
INIT_WORK(&fep->phy_task, mii_display_config, (void *)dev);
schedule_work(&fep->phy_task);
}
......@@ -1403,11 +1405,11 @@ mii_discover_phy(uint mii_reg, struct net_device *dev)
/* This interrupt occurs when the PHY detects a link change.
*/
static void
static
#ifdef CONFIG_RPXCLASSIC
mii_link_interrupt(void *dev_id)
void mii_link_interrupt(void *dev_id)
#else
mii_link_interrupt(int irq, void * dev_id, struct pt_regs * regs)
irqreturn_t mii_link_interrupt(int irq, void * dev_id, struct pt_regs * regs)
#endif
{
#ifdef CONFIG_USE_MDIO
......@@ -1440,6 +1442,9 @@ mii_link_interrupt(int irq, void * dev_id, struct pt_regs * regs)
printk("%s[%d] %s: unexpected Link interrupt\n", __FILE__,__LINE__,__FUNCTION__);
#endif /* CONFIG_USE_MDIO */
#ifndef CONFIG_RPXCLASSIC
return IRQ_RETVAL(IRQ_HANDLED);
#endif /* CONFIG_RPXCLASSIC */
}
static int
......@@ -1575,7 +1580,7 @@ static int __init fec_enet_init(void)
struct fec_enet_private *fep;
int i, j, k, err;
unsigned char *eap, *iap, *ba;
unsigned long mem_addr;
dma_addr_t mem_addr;
volatile cbd_t *bdp;
cbd_t *cbd_base;
volatile immap_t *immap;
......@@ -1640,7 +1645,8 @@ static int __init fec_enet_init(void)
printk("FEC initialization failed.\n");
return 1;
}
cbd_base = (cbd_t *)consistent_alloc(GFP_KERNEL, PAGE_SIZE, &mem_addr);
cbd_base = (cbd_t *)dma_alloc_coherent(dev->class_dev.dev, PAGE_SIZE,
&mem_addr, GFP_KERNEL);
/* Set receive and transmit descriptor base.
*/
......@@ -1657,7 +1663,10 @@ static int __init fec_enet_init(void)
/* Allocate a page.
*/
ba = (unsigned char *)consistent_alloc(GFP_KERNEL, PAGE_SIZE, &mem_addr);
ba = (unsigned char *)dma_alloc_coherent(dev->class_dev.dev,
PAGE_SIZE,
&mem_addr,
GFP_KERNEL);
/* BUG: no check for failure */
/* Initialize the BD for every fragment in the page.
......
......@@ -160,6 +160,21 @@ void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
}
EXPORT_SYMBOL(pcibios_resource_to_bus);
void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
struct pci_bus_region *region)
{
unsigned long offset = 0;
struct pci_controller *hose = dev->sysdata;
if (hose && res->flags & IORESOURCE_IO)
offset = (unsigned long)hose->io_base_virt - isa_io_base;
else if (hose && res->flags & IORESOURCE_MEM)
offset = hose->pci_mem_offset;
res->start = region->start + offset;
res->end = region->end + offset;
}
EXPORT_SYMBOL(pcibios_bus_to_resource);
/*
* We need to avoid collisions with `mirrored' VGA ports
* and other strange ISA hardware, so we always want the
......
......@@ -324,7 +324,7 @@ EXPORT_SYMBOL(__res);
EXPORT_SYMBOL(next_mmu_context);
EXPORT_SYMBOL(set_context);
EXPORT_SYMBOL(handle_mm_fault); /* For MOL */
EXPORT_SYMBOL_GPL(__handle_mm_fault); /* For MOL */
EXPORT_SYMBOL(disarm_decr);
#ifdef CONFIG_PPC_STD_MMU
extern long mol_trampoline;
......
......@@ -57,7 +57,7 @@ unsigned char __res[sizeof(bd_t)];
extern void m8xx_ide_init(void);
extern unsigned long find_available_memory(void);
extern void m8xx_cpm_reset(uint cpm_page);
extern void m8xx_cpm_reset();
extern void m8xx_wdt_handler_install(bd_t *bp);
extern void rpxfb_alloc_pages(void);
extern void cpm_interrupt_init(void);
......@@ -70,13 +70,9 @@ board_init(void)
void __init
m8xx_setup_arch(void)
{
int cpm_page;
cpm_page = (int) alloc_bootmem_pages(PAGE_SIZE);
/* Reset the Communication Processor Module.
*/
m8xx_cpm_reset(cpm_page);
m8xx_cpm_reset();
#ifdef CONFIG_FB_RPX
rpxfb_alloc_pages();
......
......@@ -191,8 +191,8 @@ struct platform_device ppc_sys_platform_devices[] = {
.num_resources = 2,
.resource = (struct resource[]) {
{
.start = 0x22000,
.end = 0x22fff,
.start = 0x23000,
.end = 0x23fff,
.flags = IORESOURCE_MEM,
},
{
......@@ -208,8 +208,8 @@ struct platform_device ppc_sys_platform_devices[] = {
.num_resources = 2,
.resource = (struct resource[]) {
{
.start = 0x23000,
.end = 0x23fff,
.start = 0x22000,
.end = 0x22fff,
.flags = IORESOURCE_MEM,
},
{
......
......@@ -1307,7 +1307,7 @@ local int huft_build(
{
*t = (inflate_huft *)Z_NULL;
*m = 0;
return Z_OK;
return Z_DATA_ERROR;
}
......@@ -1351,6 +1351,7 @@ local int huft_build(
if ((j = *p++) != 0)
v[x[j]++] = i;
} while (++i < n);
n = x[g]; /* set n to length of v */
/* Generate the Huffman codes and for each, make the table entries */
......
This diff is collapsed.
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.13-rc3
# Wed Jul 13 14:40:34 2005
# Linux kernel version: 2.6.13-rc6
# Mon Aug 8 14:16:59 2005
#
CONFIG_64BIT=y
CONFIG_MMU=y
......@@ -267,8 +267,6 @@ CONFIG_NET_CLS_ROUTE=y
# Network testing
#
# CONFIG_NET_PKTGEN is not set
# CONFIG_NETPOLL is not set
# CONFIG_NET_POLL_CONTROLLER is not set
# CONFIG_HAMRADIO is not set
# CONFIG_IRDA is not set
# CONFIG_BT is not set
......@@ -468,6 +466,7 @@ CONFIG_SCSI_QLA2XXX=y
# CONFIG_SCSI_QLA2300 is not set
# CONFIG_SCSI_QLA2322 is not set
# CONFIG_SCSI_QLA6312 is not set
# CONFIG_SCSI_QLA24XX is not set
# CONFIG_SCSI_LPFC is not set
# CONFIG_SCSI_DC395x is not set
# CONFIG_SCSI_DC390T is not set
......@@ -539,11 +538,9 @@ CONFIG_IEEE1394_RAWIO=y
#
# Macintosh device drivers
#
CONFIG_ADB=y
CONFIG_ADB_PMU=y
CONFIG_PMAC_SMU=y
# CONFIG_PMAC_BACKLIGHT is not set
# CONFIG_INPUT_ADBHID is not set
CONFIG_THERM_PM72=y
#
......@@ -631,6 +628,8 @@ CONFIG_PPPOE=m
# CONFIG_NET_FC is not set
# CONFIG_SHAPER is not set
# CONFIG_NETCONSOLE is not set
# CONFIG_NETPOLL is not set
# CONFIG_NET_POLL_CONTROLLER is not set
#
# ISDN subsystem
......@@ -718,7 +717,6 @@ CONFIG_LEGACY_PTY_COUNT=256
#
# CONFIG_WATCHDOG is not set
# CONFIG_RTC is not set
# CONFIG_GEN_RTC is not set
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
......
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.13-rc3
# Wed Jul 13 14:43:39 2005
# Linux kernel version: 2.6.13-rc6
# Mon Aug 8 14:17:02 2005
#
CONFIG_64BIT=y
CONFIG_MMU=y
......@@ -257,10 +257,6 @@ CONFIG_NET_CLS_ROUTE=y
# Network testing
#
# CONFIG_NET_PKTGEN is not set
CONFIG_NETPOLL=y
CONFIG_NETPOLL_RX=y
CONFIG_NETPOLL_TRAP=y
CONFIG_NET_POLL_CONTROLLER=y
# CONFIG_HAMRADIO is not set
# CONFIG_IRDA is not set
# CONFIG_BT is not set
......@@ -388,6 +384,7 @@ CONFIG_SCSI_QLA2XXX=y
# CONFIG_SCSI_QLA2300 is not set
# CONFIG_SCSI_QLA2322 is not set
# CONFIG_SCSI_QLA6312 is not set
# CONFIG_SCSI_QLA24XX is not set
# CONFIG_SCSI_LPFC is not set
# CONFIG_SCSI_DC395x is not set
# CONFIG_SCSI_DC390T is not set
......@@ -537,6 +534,10 @@ CONFIG_PPPOE=m
# CONFIG_NET_FC is not set
# CONFIG_SHAPER is not set
CONFIG_NETCONSOLE=y
CONFIG_NETPOLL=y
CONFIG_NETPOLL_RX=y
CONFIG_NETPOLL_TRAP=y
CONFIG_NET_POLL_CONTROLLER=y
#
# ISDN subsystem
......@@ -610,7 +611,6 @@ CONFIG_LEGACY_PTY_COUNT=256
#
# CONFIG_WATCHDOG is not set
# CONFIG_RTC is not set
# CONFIG_GEN_RTC is not set
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
......
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.13-rc3
# Wed Jul 13 14:46:18 2005
# Linux kernel version: 2.6.13-rc6
# Mon Aug 8 14:17:04 2005
#
CONFIG_64BIT=y
CONFIG_MMU=y
......@@ -193,8 +193,6 @@ CONFIG_TCP_CONG_BIC=y
# Network testing
#
# CONFIG_NET_PKTGEN is not set
# CONFIG_NETPOLL is not set
# CONFIG_NET_POLL_CONTROLLER is not set
# CONFIG_HAMRADIO is not set
# CONFIG_IRDA is not set
# CONFIG_BT is not set
......@@ -433,6 +431,8 @@ CONFIG_E1000=y
# CONFIG_SLIP is not set
# CONFIG_SHAPER is not set
# CONFIG_NETCONSOLE is not set
# CONFIG_NETPOLL is not set
# CONFIG_NET_POLL_CONTROLLER is not set
#
# ISDN subsystem
......@@ -512,7 +512,6 @@ CONFIG_LEGACY_PTY_COUNT=256
#
# CONFIG_WATCHDOG is not set
# CONFIG_RTC is not set
# CONFIG_GEN_RTC is not set
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
......
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.13-rc3
# Wed Jul 13 14:47:54 2005
# Linux kernel version: 2.6.13-rc6
# Mon Aug 8 14:17:07 2005
#
CONFIG_64BIT=y
CONFIG_MMU=y
......@@ -287,10 +287,6 @@ CONFIG_NET_CLS_ROUTE=y
# Network testing
#
# CONFIG_NET_PKTGEN is not set
CONFIG_NETPOLL=y
CONFIG_NETPOLL_RX=y
CONFIG_NETPOLL_TRAP=y
CONFIG_NET_POLL_CONTROLLER=y
# CONFIG_HAMRADIO is not set
# CONFIG_IRDA is not set
# CONFIG_BT is not set
......@@ -488,6 +484,7 @@ CONFIG_SCSI_QLA22XX=m
CONFIG_SCSI_QLA2300=m
CONFIG_SCSI_QLA2322=m
CONFIG_SCSI_QLA6312=m
CONFIG_SCSI_QLA24XX=m
CONFIG_SCSI_LPFC=m
# CONFIG_SCSI_DC395x is not set
# CONFIG_SCSI_DC390T is not set
......@@ -645,6 +642,10 @@ CONFIG_PPPOE=m
# CONFIG_NET_FC is not set
# CONFIG_SHAPER is not set
CONFIG_NETCONSOLE=y
CONFIG_NETPOLL=y
CONFIG_NETPOLL_RX=y
CONFIG_NETPOLL_TRAP=y
CONFIG_NET_POLL_CONTROLLER=y
#
# ISDN subsystem
......@@ -746,7 +747,6 @@ CONFIG_HVCS=m
#
# CONFIG_WATCHDOG is not set
# CONFIG_RTC is not set
# CONFIG_GEN_RTC is not set
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
......
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.13-rc3
# Wed Jul 13 14:37:07 2005
# Linux kernel version: 2.6.13-rc6
# Mon Aug 8 14:16:54 2005
#
CONFIG_64BIT=y
CONFIG_MMU=y
......@@ -289,10 +289,6 @@ CONFIG_NET_CLS_ROUTE=y
# Network testing
#
# CONFIG_NET_PKTGEN is not set
CONFIG_NETPOLL=y
CONFIG_NETPOLL_RX=y
CONFIG_NETPOLL_TRAP=y
CONFIG_NET_POLL_CONTROLLER=y
# CONFIG_HAMRADIO is not set
# CONFIG_IRDA is not set
# CONFIG_BT is not set
......@@ -506,6 +502,7 @@ CONFIG_SCSI_QLA22XX=m
CONFIG_SCSI_QLA2300=m
CONFIG_SCSI_QLA2322=m
CONFIG_SCSI_QLA6312=m
CONFIG_SCSI_QLA24XX=m
CONFIG_SCSI_LPFC=m
# CONFIG_SCSI_DC395x is not set
# CONFIG_SCSI_DC390T is not set
......@@ -579,11 +576,9 @@ CONFIG_IEEE1394_AMDTP=m
#
# Macintosh device drivers
#
CONFIG_ADB=y
CONFIG_ADB_PMU=y
CONFIG_PMAC_SMU=y
# CONFIG_PMAC_BACKLIGHT is not set
# CONFIG_INPUT_ADBHID is not set
CONFIG_THERM_PM72=y
#
......@@ -694,6 +689,10 @@ CONFIG_PPPOE=m
# CONFIG_NET_FC is not set
# CONFIG_SHAPER is not set
CONFIG_NETCONSOLE=y
CONFIG_NETPOLL=y
CONFIG_NETPOLL_RX=y
CONFIG_NETPOLL_TRAP=y
CONFIG_NET_POLL_CONTROLLER=y
#
# ISDN subsystem
......@@ -797,7 +796,6 @@ CONFIG_HVCS=m
#
# CONFIG_WATCHDOG is not set
# CONFIG_RTC is not set
# CONFIG_GEN_RTC is not set
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
......
......@@ -2071,7 +2071,7 @@ _GLOBAL(hmt_start_secondary)
blr
#endif
#if defined(CONFIG_SMP) && !defined(CONFIG_PPC_ISERIES)
#if defined(CONFIG_KEXEC) || (defined(CONFIG_SMP) && !defined(CONFIG_PPC_ISERIES))
_GLOBAL(smp_release_cpus)
/* All secondary cpus are spinning on a common
* spinloop, release them all now so they can start
......
......@@ -185,7 +185,7 @@ void kexec_copy_flush(struct kimage *image)
void kexec_smp_down(void *arg)
{
if (ppc_md.cpu_irq_down)
ppc_md.cpu_irq_down();
ppc_md.cpu_irq_down(1);
local_irq_disable();
kexec_smp_wait();
......@@ -232,7 +232,7 @@ static void kexec_prepare_cpus(void)
/* after we tell the others to go down */
if (ppc_md.cpu_irq_down)
ppc_md.cpu_irq_down();
ppc_md.cpu_irq_down(0);
put_cpu();
......@@ -243,15 +243,19 @@ static void kexec_prepare_cpus(void)
static void kexec_prepare_cpus(void)
{
extern void smp_release_cpus(void);
/*
* move the secondarys to us so that we can copy
* the new kernel 0-0x100 safely
*
* do this if kexec in setup.c ?
*
* We need to release the cpus if we are ever going from an
* UP to an SMP kernel.
*/
smp_relase_cpus();
smp_release_cpus();
if (ppc_md.cpu_irq_down)
ppc_md.cpu_irq_down();
ppc_md.cpu_irq_down(0);
local_irq_disable();
}
......
......@@ -794,10 +794,10 @@ void mpic_setup_this_cpu(void)
/*
* XXX: someone who knows mpic should check this.
* do we need to eoi the ipi here (see xics comments)?
* do we need to eoi the ipi including for kexec cpu here (see xics comments)?
* or can we reset the mpic in the new kernel?
*/
void mpic_teardown_this_cpu(void)
void mpic_teardown_this_cpu(int secondary)
{
struct mpic *mpic = mpic_primary;
unsigned long flags;
......
......@@ -256,7 +256,7 @@ extern unsigned int mpic_irq_get_priority(unsigned int irq);
extern void mpic_setup_this_cpu(void);
/* Clean up for kexec (or cpu offline or ...) */
extern void mpic_teardown_this_cpu(void);
extern void mpic_teardown_this_cpu(int secondary);
/* Request IPIs on primary mpic */
extern void mpic_request_ipis(void);
......
......@@ -108,8 +108,28 @@ void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region
region->end = res->end - offset;
}
void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
struct pci_bus_region *region)
{
unsigned long offset = 0;
struct pci_controller *hose = pci_bus_to_host(dev->bus);
if (!hose)
return;
if (res->flags & IORESOURCE_IO)
offset = (unsigned long)hose->io_base_virt - pci_io_base;
if (res->flags & IORESOURCE_MEM)
offset = hose->pci_mem_offset;
res->start = region->start + offset;
res->end = region->end + offset;
}
#ifdef CONFIG_HOTPLUG
EXPORT_SYMBOL(pcibios_resource_to_bus);
EXPORT_SYMBOL(pcibios_bus_to_resource);
#endif
/*
......
......@@ -647,29 +647,30 @@ static void xics_set_affinity(unsigned int virq, cpumask_t cpumask)
}
}
void xics_teardown_cpu(void)
void xics_teardown_cpu(int secondary)
{
int cpu = smp_processor_id();
int status;
ops->cppr_info(cpu, 0x00);
iosync();
/*
* we need to EOI the IPI if we got here from kexec down IPI
*
* xics doesn't care if we duplicate an EOI as long as we
* don't EOI and raise priority.
*
* probably need to check all the other interrupts too
* should we be flagging idle loop instead?
* or creating some task to be scheduled?
* Some machines need to have at least one cpu in the GIQ,
* so leave the master cpu in the group.
*/
ops->xirr_info_set(cpu, XICS_IPI);
status = rtas_set_indicator(GLOBAL_INTERRUPT_QUEUE,
(1UL << interrupt_server_size) - 1 - default_distrib_server, 0);
WARN_ON(status != 0);
if (secondary) {
/*
* we need to EOI the IPI if we got here from kexec down IPI
*
* probably need to check all the other interrupts too
* should we be flagging idle loop instead?
* or creating some task to be scheduled?
*/
ops->xirr_info_set(cpu, XICS_IPI);
rtas_set_indicator(GLOBAL_INTERRUPT_QUEUE,
(1UL << interrupt_server_size) - 1 -
default_distrib_server, 0);
}
}
#ifdef CONFIG_HOTPLUG_CPU
......
......@@ -329,13 +329,16 @@ int xmon_core(struct pt_regs *regs, int fromipi)
printf("cpu 0x%x: Exception %lx %s in xmon, "
"returning to main loop\n",
cpu, regs->trap, getvecname(TRAP(regs)));
release_output_lock();
longjmp(xmon_fault_jmp[cpu], 1);
}
if (setjmp(recurse_jmp) != 0) {
if (!in_xmon || !xmon_gate) {
get_output_lock();
printf("xmon: WARNING: bad recursive fault "
"on cpu 0x%x\n", cpu);
release_output_lock();
goto waiting;
}
secondary = !(xmon_taken && cpu == xmon_owner);
......
......@@ -223,13 +223,13 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long writeaccess,
*/
survive:
switch (handle_mm_fault(mm, vma, address, writeaccess)) {
case 1:
case VM_FAULT_MINOR:
tsk->min_flt++;
break;
case 2:
case VM_FAULT_MAJOR:
tsk->maj_flt++;
break;
case 0:
case VM_FAULT_SIGBUS:
goto do_sigbus;
default:
goto out_of_memory;
......
This diff is collapsed.
......@@ -322,3 +322,4 @@ module_exit(aes_fini);
MODULE_DESCRIPTION("Rijndael (AES) Cipher Algorithm");
MODULE_LICENSE("GPL");
MODULE_ALIAS("aes");
......@@ -43,11 +43,11 @@ static int putreg32(struct task_struct *child, unsigned regno, u32 val)
switch (regno) {
case offsetof(struct user32, regs.fs):
if (val && (val & 3) != 3) return -EIO;
child->thread.fs = val & 0xffff;
child->thread.fsindex = val & 0xffff;
break;
case offsetof(struct user32, regs.gs):
if (val && (val & 3) != 3) return -EIO;
child->thread.gs = val & 0xffff;
child->thread.gsindex = val & 0xffff;
break;
case offsetof(struct user32, regs.ds):
if (val && (val & 3) != 3) return -EIO;
......@@ -138,10 +138,10 @@ static int getreg32(struct task_struct *child, unsigned regno, u32 *val)
switch (regno) {
case offsetof(struct user32, regs.fs):
*val = child->thread.fs;
*val = child->thread.fsindex;
break;
case offsetof(struct user32, regs.gs):
*val = child->thread.gs;
*val = child->thread.gsindex;
break;
case offsetof(struct user32, regs.ds):
*val = child->thread.ds;
......
......@@ -36,6 +36,7 @@ static unsigned long bank[NR_BANKS] = { [0 ... NR_BANKS-1] = ~0UL };
static unsigned long console_logged;
static int notify_user;
static int rip_msr;
static int mce_bootlog;
/*
* Lockless MCE logging infrastructure.
......@@ -197,10 +198,11 @@ void do_machine_check(struct pt_regs * regs, long error_code)
rdmsrl(MSR_IA32_MC0_ADDR + i*4, m.addr);
mce_get_rip(&m, regs);
if (error_code != -1)
if (error_code >= 0)
rdtscll(m.tsc);
wrmsrl(MSR_IA32_MC0_STATUS + i*4, 0);
mce_log(&m);
if (error_code != -2)
mce_log(&m);
/* Did this bank cause the exception? */
/* Assume that the bank with uncorrectable errors did it,
......@@ -315,7 +317,7 @@ static void mce_init(void *dummy)
/* Log the machine checks left over from the previous reset.
This also clears all registers */
do_machine_check(NULL, -1);
do_machine_check(NULL, mce_bootlog ? -1 : -2);
set_in_cr4(X86_CR4_MCE);
......@@ -476,11 +478,17 @@ static int __init mcheck_disable(char *str)
}
/* mce=off disables machine check. Note you can reenable it later
using sysfs */
using sysfs.
mce=bootlog Log MCEs from before booting. Disabled by default to work
around buggy BIOS that leave bogus MCEs. */
static int __init mcheck_enable(char *str)
{
if (*str == '=')
str++;
if (!strcmp(str, "off"))
mce_dont_init = 1;
else if (!strcmp(str, "bootlog"))
mce_bootlog = 1;
else
printk("mce= argument %s ignored. Please use /sys", str);
return 0;
......
......@@ -645,15 +645,15 @@ void __init setup_arch(char **cmdline_p)
}
}
#endif
sparse_init();
#ifdef CONFIG_KEXEC
if (crashk_res.start != crashk_res.end) {
reserve_bootmem(crashk_res.start,
crashk_res.end - crashk_res.start + 1);
}
#endif
sparse_init();
paging_init();
check_ioapic();
......
......@@ -439,13 +439,13 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code)
* the fault.
*/
switch (handle_mm_fault(mm, vma, address, write)) {
case 1:
case VM_FAULT_MINOR:
tsk->min_flt++;
break;
case 2:
case VM_FAULT_MAJOR:
tsk->maj_flt++;
break;
case 0:
case VM_FAULT_SIGBUS:
goto do_sigbus;
default:
goto out_of_memory;
......
......@@ -1283,8 +1283,7 @@ static void do_fd_request(request_queue_t* q)
if (fdc_busy) return;
save_flags(flags);
cli();
while (fdc_busy)
sleep_on(&fdc_wait);
wait_event(fdc_wait, !fdc_busy);
fdc_busy = 1;
ENABLE_IRQ();
restore_flags(flags);
......
......@@ -133,9 +133,10 @@ config ACPI_HOTKEY
depends on ACPI_INTERPRETER
depends on EXPERIMENTAL
depends on !IA64_SGI_SN
default m
default n
help
ACPI generic hotkey
Experimental consolidated hotkey driver.
If you are unsure, say N.
config ACPI_FAN
tristate "Fan"
......
This diff is collapsed.
......@@ -491,12 +491,6 @@ acpi_ds_load2_begin_op (
if ((!(walk_state->op_info->flags & AML_NSOPCODE) &&
(walk_state->opcode != AML_INT_NAMEPATH_OP)) ||
(!(walk_state->op_info->flags & AML_NAMED))) {
if ((walk_state->op_info->class == AML_CLASS_EXECUTE) ||
(walk_state->op_info->class == AML_CLASS_CONTROL)) {
ACPI_REPORT_WARNING ((
"Encountered executable code at module level, [%s]\n",
acpi_ps_get_opcode_name (walk_state->opcode)));
}
return_ACPI_STATUS (AE_OK);
}
......
......@@ -76,13 +76,14 @@ static int acpi_ec_remove (struct acpi_device *device, int type);
static int acpi_ec_start (struct acpi_device *device);
static int acpi_ec_stop (struct acpi_device *device, int type);
static int acpi_ec_burst_add ( struct acpi_device *device);
static int acpi_ec_polling_add ( struct acpi_device *device);
static struct acpi_driver acpi_ec_driver = {
.name = ACPI_EC_DRIVER_NAME,
.class = ACPI_EC_CLASS,
.ids = ACPI_EC_HID,
.ops = {
.add = acpi_ec_burst_add,
.add = acpi_ec_polling_add,
.remove = acpi_ec_remove,
.start = acpi_ec_start,
.stop = acpi_ec_stop,
......@@ -164,7 +165,7 @@ static union acpi_ec *ec_ecdt;
/* External interfaces use first EC only, so remember */
static struct acpi_device *first_ec;
static int acpi_ec_polling_mode;
static int acpi_ec_polling_mode = EC_POLLING;
/* --------------------------------------------------------------------------
Transaction Management
......@@ -1710,11 +1711,24 @@ static int __init acpi_fake_ecdt_setup(char *str)
acpi_fake_ecdt_enabled = 1;
return 0;
}
__setup("acpi_fake_ecdt", acpi_fake_ecdt_setup);
static int __init acpi_ec_set_polling_mode(char *str)
{
acpi_ec_polling_mode = EC_POLLING;
acpi_ec_driver.ops.add = acpi_ec_polling_add;
int burst;
if (!get_option(&str, &burst))
return 0;
if (burst) {
acpi_ec_polling_mode = EC_BURST;
acpi_ec_driver.ops.add = acpi_ec_burst_add;
} else {
acpi_ec_polling_mode = EC_POLLING;
acpi_ec_driver.ops.add = acpi_ec_polling_add;
}
printk(KERN_INFO PREFIX "EC %s mode.\n",
burst ? "burst": "polling");
return 0;
}
__setup("ec_polling", acpi_ec_set_polling_mode);
__setup("ec_burst=", acpi_ec_set_polling_mode);
This diff is collapsed.
......@@ -43,7 +43,7 @@ ACPI_MODULE_NAME ("acpi_motherboard")
*/
#define IS_RESERVED_ADDR(base, len) \
(((len) > 0) && ((base) > 0) && ((base) + (len) < IO_SPACE_LIMIT) \
&& ((base) + (len) > PCIBIOS_MIN_IO))
&& ((base) + (len) > 0x1000))
/*
* Clearing the flag (IORESOURCE_BUSY) allows drivers to use
......
......@@ -145,10 +145,14 @@ acpi_os_vprintf(const char *fmt, va_list args)
#endif
}
extern int acpi_in_resume;
void *
acpi_os_allocate(acpi_size size)
{
return kmalloc(size, GFP_KERNEL);
if (acpi_in_resume)
return kmalloc(size, GFP_ATOMIC);
else
return kmalloc(size, GFP_KERNEL);
}
void
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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