Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 58245
b: refs/heads/master
c: 1feb17e
h: refs/heads/master
i:
  58243: e8e087f
v: v3
  • Loading branch information
Linus Torvalds committed Jul 6, 2007
1 parent 5c2b4ad commit 3a665b7
Show file tree
Hide file tree
Showing 25 changed files with 179 additions and 42 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 25442cafb8cc3d979418caccabc91260707a0947
refs/heads/master: 1feb17e286339382a1ae36e0fecc4d88c2d7f123
4 changes: 4 additions & 0 deletions trunk/arch/i386/kernel/cpu/mtrr/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,8 @@ static void set_mtrr(unsigned int reg, unsigned long base,
data.smp_size = size;
data.smp_type = type;
atomic_set(&data.count, num_booting_cpus() - 1);
/* make sure data.count is visible before unleashing other CPUs */
smp_wmb();
atomic_set(&data.gate,0);

/* Start the ball rolling on other CPUs */
Expand All @@ -242,6 +244,7 @@ static void set_mtrr(unsigned int reg, unsigned long base,

/* ok, reset count and toggle gate */
atomic_set(&data.count, num_booting_cpus() - 1);
smp_wmb();
atomic_set(&data.gate,1);

/* do our MTRR business */
Expand All @@ -260,6 +263,7 @@ static void set_mtrr(unsigned int reg, unsigned long base,
cpu_relax();

atomic_set(&data.count, num_booting_cpus() - 1);
smp_wmb();
atomic_set(&data.gate,0);

/*
Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/i386/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -367,10 +367,6 @@ ENTRY(system_call)
CFI_ADJUST_CFA_OFFSET 4
SAVE_ALL
GET_THREAD_INFO(%ebp)
testl $TF_MASK,PT_EFLAGS(%esp)
jz no_singlestep
orl $_TIF_SINGLESTEP,TI_flags(%ebp)
no_singlestep:
# system call tracing in operation / emulation
/* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */
testw $(_TIF_SYSCALL_EMU|_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT),TI_flags(%ebp)
Expand All @@ -385,6 +381,10 @@ syscall_exit:
# setting need_resched or sigpending
# between sampling and the iret
TRACE_IRQS_OFF
testl $TF_MASK,PT_EFLAGS(%esp) # If tracing set singlestep flag on exit
jz no_singlestep
orl $_TIF_SINGLESTEP,TI_flags(%ebp)
no_singlestep:
movl TI_flags(%ebp), %ecx
testw $_TIF_ALLWORK_MASK, %cx # current->work
jne syscall_exit_work
Expand Down
48 changes: 48 additions & 0 deletions trunk/arch/i386/mach-es7000/es7000plat.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include <asm/smp.h>
#include <asm/apicdef.h>
#include "es7000.h"
#include <mach_mpparse.h>

/*
* ES7000 Globals
Expand Down Expand Up @@ -174,6 +175,53 @@ find_unisys_acpi_oem_table(unsigned long *oem_addr)
}
#endif

/*
* This file also gets compiled if CONFIG_X86_GENERICARCH is set. Generic
* arch already has got following function definitions (asm-generic/es7000.c)
* hence no need to define these for that case.
*/
#ifndef CONFIG_X86_GENERICARCH
void es7000_sw_apic(void);
void __init enable_apic_mode(void)
{
es7000_sw_apic();
return;
}

__init int mps_oem_check(struct mp_config_table *mpc, char *oem,
char *productid)
{
if (mpc->mpc_oemptr) {
struct mp_config_oemtable *oem_table =
(struct mp_config_oemtable *)mpc->mpc_oemptr;
if (!strncmp(oem, "UNISYS", 6))
return parse_unisys_oem((char *)oem_table);
}
return 0;
}
#ifdef CONFIG_ACPI
/* Hook from generic ACPI tables.c */
int __init acpi_madt_oem_check(char *oem_id, char *oem_table_id)
{
unsigned long oem_addr;
if (!find_unisys_acpi_oem_table(&oem_addr)) {
if (es7000_check_dsdt())
return parse_unisys_oem((char *)oem_addr);
else {
setup_unisys();
return 1;
}
}
return 0;
}
#else
int __init acpi_madt_oem_check(char *oem_id, char *oem_table_id)
{
return 0;
}
#endif
#endif /* COFIG_X86_GENERICARCH */

static void
es7000_spin(int n)
{
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/mips/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ config DEBUG_STACK_USAGE

This option will slow down process creation somewhat.

config CONFIG_SMTC_IDLE_HOOK_DEBUG
config SMTC_IDLE_HOOK_DEBUG
bool "Enable additional debug checks before going into CPU idle loop"
depends on DEBUG_KERNEL && MIPS_MT_SMTC
help
Expand Down
15 changes: 13 additions & 2 deletions trunk/arch/mips/kernel/cpu-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,24 @@ static inline void check_wait(void)
case CPU_4KEC:
case CPU_4KSC:
case CPU_5KC:
case CPU_24K:
case CPU_25KF:
case CPU_PR4450:
cpu_wait = r4k_wait;
break;

case CPU_24K:
case CPU_34K:
cpu_wait = r4k_wait;
if (read_c0_config7() & MIPS_CONF7_WII)
cpu_wait = r4k_wait_irqoff;
break;

case CPU_74K:
case CPU_PR4450:
cpu_wait = r4k_wait;
if ((c->processor_id & 0xff) >= PRID_REV_ENCODE_332(2, 1, 0))
cpu_wait = r4k_wait_irqoff;
break;

case CPU_TX49XX:
cpu_wait = r4k_wait_irqoff;
break;
Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/mips/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -1372,12 +1372,12 @@ void __init per_cpu_trap_init(void)
*/
if (cpu_has_mips_r2) {
cp0_compare_irq = (read_c0_intctl () >> 29) & 7;
cp0_perfcount_irq = -1;
} else {
cp0_compare_irq = CP0_LEGACY_COMPARE_IRQ;
cp0_perfcount_irq = (read_c0_intctl () >> 26) & 7;
if (cp0_perfcount_irq != cp0_compare_irq)
if (cp0_perfcount_irq == cp0_compare_irq)
cp0_perfcount_irq = -1;
} else {
cp0_compare_irq = CP0_LEGACY_COMPARE_IRQ;
cp0_perfcount_irq = -1;
}

#ifdef CONFIG_MIPS_MT_SMTC
Expand Down
4 changes: 0 additions & 4 deletions trunk/arch/mips/kernel/vpe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1436,10 +1436,6 @@ static int __init vpe_module_init(void)
write_vpe_c0_vpecontrol(read_vpe_c0_vpecontrol() & ~VPECONTROL_TE);

if (i != 0) {
write_vpe_c0_status((read_c0_status() &
~(ST0_IM | ST0_IE | ST0_KSU))
| ST0_CU0);

/*
* Set config to be the same as vpe0,
* particularly kseg0 coherency alg
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/mips/lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ obj-y += iomap.o
obj-$(CONFIG_PCI) += iomap-pci.o

# libgcc-style stuff needed in the kernel
lib-y += ashldi3.o ashrdi3.o lshrdi3.o ucmpdi2.o
obj-y += ashldi3.o ashrdi3.o lshrdi3.o ucmpdi2.o
2 changes: 1 addition & 1 deletion trunk/drivers/atm/firestream.c
Original file line number Diff line number Diff line change
Expand Up @@ -1654,7 +1654,7 @@ static void fs_poll (unsigned long data)
{
struct fs_dev *dev = (struct fs_dev *) data;

fs_irq (0, dev, NULL);
fs_irq (0, dev);
dev->timer.expires = jiffies + FS_POLL_FREQ;
add_timer (&dev->timer);
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/arm/am79c961a.c
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ static void am79c961_poll_controller(struct net_device *dev)
{
unsigned long flags;
local_irq_save(flags);
am79c961_interrupt(dev->irq, dev, NULL);
am79c961_interrupt(dev->irq, dev);
local_irq_restore(flags);
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/ixp2000/ixpdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ static irqreturn_t ixpdev_interrupt(int irq, void *dev_id)
static void ixpdev_poll_controller(struct net_device *dev)
{
disable_irq(IRQ_IXP2000_THDA0);
ixpdev_interrupt(IRQ_IXP2000_THDA0, dev, NULL);
ixpdev_interrupt(IRQ_IXP2000_THDA0, dev);
enable_irq(IRQ_IXP2000_THDA0);
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/sb1250-mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,7 @@ static void sbmac_netpoll(struct net_device *netdev)

__raw_writeq(0, sc->sbm_imr);

sbmac_intr(irq, netdev, NULL);
sbmac_intr(irq, netdev);

#ifdef CONFIG_SBMAC_COALESCE
__raw_writeq(((M_MAC_INT_EOP_COUNT | M_MAC_INT_EOP_TIMER) << S_MAC_TX_CH0) |
Expand Down
63 changes: 54 additions & 9 deletions trunk/drivers/pnp/quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,10 @@ static int quirk_smc_fir_enabled(struct pnp_dev *dev)

static void quirk_smc_enable(struct pnp_dev *dev)
{
/*
* If the BIOS left the device disabled, or it is enabled and
* responding correctly, we're in good shape.
*/
if (!dev->active || quirk_smc_fir_enabled(dev))
struct resource fir, sir, irq;

pnp_activate_dev(dev);
if (quirk_smc_fir_enabled(dev))
return;

/*
Expand All @@ -152,16 +151,62 @@ static void quirk_smc_enable(struct pnp_dev *dev)
* this. Fortunately, they do fix things up if we auto-configure
* the device using its _PRS and _SRS methods.
*/
dev_err(&dev->dev, "%s device not responding, auto-configuring "
"resources\n", dev->id->id);
dev_err(&dev->dev, "%s not responding at SIR 0x%lx, FIR 0x%lx; "
"auto-configuring\n", dev->id->id,
(unsigned long) pnp_port_start(dev, 0),
(unsigned long) pnp_port_start(dev, 1));

pnp_disable_dev(dev);
pnp_init_resource_table(&dev->res);
pnp_auto_config_dev(dev);
pnp_activate_dev(dev);
if (quirk_smc_fir_enabled(dev)) {
dev_err(&dev->dev, "responds at SIR 0x%lx, FIR 0x%lx\n",
(unsigned long) pnp_port_start(dev, 0),
(unsigned long) pnp_port_start(dev, 1));
return;
}

/*
* The Toshiba Portege 4000 _CRS reports the FIR region first,
* followed by the SIR region. The BIOS will configure the bridge,
* but only if we call _SRS with SIR first, then FIR. It also
* reports the IRQ as active high, when it is really active low.
*/
dev_err(&dev->dev, "not responding at SIR 0x%lx, FIR 0x%lx; "
"swapping SIR/FIR and reconfiguring\n",
(unsigned long) pnp_port_start(dev, 0),
(unsigned long) pnp_port_start(dev, 1));

/*
* Clear IORESOURCE_AUTO so pnp_activate_dev() doesn't reassign
* these resources any more.
*/
fir = dev->res.port_resource[0];
sir = dev->res.port_resource[1];
fir.flags &= ~IORESOURCE_AUTO;
sir.flags &= ~IORESOURCE_AUTO;

irq = dev->res.irq_resource[0];
irq.flags &= ~IORESOURCE_AUTO;
irq.flags &= ~IORESOURCE_BITS;
irq.flags |= IORESOURCE_IRQ_LOWEDGE;

pnp_disable_dev(dev);
dev->res.port_resource[0] = sir;
dev->res.port_resource[1] = fir;
dev->res.irq_resource[0] = irq;
pnp_activate_dev(dev);

if (quirk_smc_fir_enabled(dev)) {
dev_err(&dev->dev, "responds at SIR 0x%lx, FIR 0x%lx\n",
(unsigned long) pnp_port_start(dev, 0),
(unsigned long) pnp_port_start(dev, 1));
return;
}

if (!quirk_smc_fir_enabled(dev))
dev_err(&dev->dev, "giving up; try \"smsc-ircc2.nopnp\"\n");
dev_err(&dev->dev, "giving up; try \"smsc-ircc2.nopnp\" and "
"email bjorn.helgaas@hp.com\n");
}


Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/usb/misc/uss720.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ static int uss720_irq(int usbstatus, void *buffer, int len, void *dev_id)
memcpy(priv->reg, buffer, 4);
/* if nAck interrupts are enabled and we have an interrupt, call the interrupt procedure */
if (priv->reg[2] & priv->reg[1] & 0x10)
parport_generic_irq(0, pp, NULL);
parport_generic_irq(0, pp);
return 1;
}
#endif
Expand Down
7 changes: 6 additions & 1 deletion trunk/fs/binfmt_elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1499,6 +1499,9 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file)
#endif
int thread_status_size = 0;
elf_addr_t *auxv;
#ifdef ELF_CORE_WRITE_EXTRA_NOTES
int extra_notes_size;
#endif

/*
* We no longer stop all VM operations.
Expand Down Expand Up @@ -1628,7 +1631,8 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file)
sz += thread_status_size;

#ifdef ELF_CORE_WRITE_EXTRA_NOTES
sz += ELF_CORE_EXTRA_NOTES_SIZE;
extra_notes_size = ELF_CORE_EXTRA_NOTES_SIZE;
sz += extra_notes_size;
#endif

fill_elf_note_phdr(&phdr, sz, offset);
Expand Down Expand Up @@ -1674,6 +1678,7 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file)

#ifdef ELF_CORE_WRITE_EXTRA_NOTES
ELF_CORE_WRITE_EXTRA_NOTES;
foffset += extra_notes_size;
#endif

/* write out the thread status notes section */
Expand Down
4 changes: 4 additions & 0 deletions trunk/include/asm-i386/mach-es7000/mach_apic.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ static inline void init_apic_ldr(void)
apic_write_around(APIC_LDR, val);
}

#ifndef CONFIG_X86_GENERICARCH
extern void enable_apic_mode(void);
#endif

extern int apic_version [MAX_APICS];
static inline void setup_apic_routing(void)
{
Expand Down
6 changes: 6 additions & 0 deletions trunk/include/asm-i386/mach-es7000/mach_mpparse.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ extern int parse_unisys_oem (char *oemptr);
extern int find_unisys_acpi_oem_table(unsigned long *oem_addr);
extern void setup_unisys(void);

#ifndef CONFIG_X86_GENERICARCH
extern int acpi_madt_oem_check(char *oem_id, char *oem_table_id);
extern int mps_oem_check(struct mp_config_table *mpc, char *oem,
char *productid);
#endif

#ifdef CONFIG_ACPI

static inline int es7000_check_dsdt(void)
Expand Down
1 change: 1 addition & 0 deletions trunk/include/asm-mips/addrspace.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@
|| defined (CONFIG_CPU_R4X00) \
|| defined (CONFIG_CPU_R5000) \
|| defined (CONFIG_CPU_RM7000) \
|| defined (CONFIG_CPU_RM9000) \
|| defined (CONFIG_CPU_NEVADA) \
|| defined (CONFIG_CPU_TX49XX) \
|| defined (CONFIG_CPU_MIPS64)
Expand Down
11 changes: 11 additions & 0 deletions trunk/include/asm-mips/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,17 @@
#define PRID_REV_VR4181A 0x0070 /* Same as VR4122 */
#define PRID_REV_VR4130 0x0080

/*
* Older processors used to encode processor version and revision in two
* 4-bit bitfields, the 4K seems to simply count up and even newer MTI cores
* have switched to use the 8-bits as 3:3:2 bitfield with the last field as
* the patch number. *ARGH*
*/
#define PRID_REV_ENCODE_44(ver, rev) \
((ver) << 4 | (rev))
#define PRID_REV_ENCODE_332(ver, rev, patch) \
((ver) << 5 | (rev) << 2 | (patch))

/*
* FPU implementation/revision register (CP1 control register 0).
*
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/asm-mips/mipsregs.h
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,8 @@
#define MIPS_CONF3_LPA (_ULCAST_(1) << 7)
#define MIPS_CONF3_DSP (_ULCAST_(1) << 10)

#define MIPS_CONF7_WII (_ULCAST_(1) << 31)

/*
* Bits in the MIPS32/64 coprocessor 1 (FPU) revision register.
*/
Expand Down
Loading

0 comments on commit 3a665b7

Please sign in to comment.