Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 27118
b: refs/heads/master
c: 364212e
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Jun 5, 2006
1 parent 61f9f8b commit b6680d0
Show file tree
Hide file tree
Showing 50 changed files with 346 additions and 207 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: 2b0dd802ba1ff9b7001f5f9bd9b4d192a4aabf81
refs/heads/master: 364212e0df05efee43d87270b476fc5c9ad2c651
9 changes: 5 additions & 4 deletions trunk/Documentation/serial/driver
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,13 @@ hardware.
The interaction of the iflag bits is as follows (parity error
given as an example):
Parity error INPCK IGNPAR
None n/a n/a character received
Yes n/a 0 character discarded
Yes 0 1 character received, marked as
n/a 0 n/a character received, marked as
TTY_NORMAL
Yes 1 1 character received, marked as
None 1 n/a character received, marked as
TTY_NORMAL
Yes 1 0 character received, marked as
TTY_PARITY
Yes 1 1 character discarded

Other flags may be used (eg, xon/xoff characters) if your
hardware supports hardware "soft" flow control.
Expand Down
12 changes: 12 additions & 0 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,18 @@ L: linuxppc-dev@ozlabs.org
W: http://www.penguinppc.org/ppc64/
S: Supported

BROADCOM BNX2 GIGABIT ETHERNET DRIVER
P: Michael Chan
M: mchan@broadcom.com
L: netdev@vger.kernel.org
S: Supported

BROADCOM TG3 GIGABIT ETHERNET DRIVER
P: Michael Chan
M: mchan@broadcom.com
L: netdev@vger.kernel.org
S: Supported

BTTV VIDEO4LINUX DRIVER
P: Mauro Carvalho Chehab
M: mchehab@infradead.org
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/alpha/kernel/alpha_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ EXPORT_SYMBOL(smp_num_cpus);
EXPORT_SYMBOL(smp_call_function);
EXPORT_SYMBOL(smp_call_function_on_cpu);
EXPORT_SYMBOL(_atomic_dec_and_lock);
EXPORT_SYMBOL(cpu_present_mask);
#endif /* CONFIG_SMP */

/*
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/alpha/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ common_shutdown_1(void *generic_ptr)
if (cpuid != boot_cpuid) {
flags |= 0x00040000UL; /* "remain halted" */
*pflags = flags;
clear_bit(cpuid, &cpu_present_mask);
cpu_clear(cpuid, cpu_present_map);
halt();
}
#endif
Expand All @@ -120,8 +120,8 @@ common_shutdown_1(void *generic_ptr)

#ifdef CONFIG_SMP
/* Wait for the secondaries to halt. */
cpu_clear(boot_cpuid, cpu_possible_map);
while (cpus_weight(cpu_possible_map))
cpu_clear(boot_cpuid, cpu_present_map);
while (cpus_weight(cpu_present_map))
barrier();
#endif

Expand Down
14 changes: 4 additions & 10 deletions trunk/arch/alpha/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ enum ipi_message_type {
static int smp_secondary_alive __initdata = 0;

/* Which cpus ids came online. */
cpumask_t cpu_present_mask;
cpumask_t cpu_online_map;

EXPORT_SYMBOL(cpu_online_map);
Expand Down Expand Up @@ -439,7 +438,7 @@ setup_smp(void)
if ((cpu->flags & 0x1cc) == 0x1cc) {
smp_num_probed++;
/* Assume here that "whami" == index */
cpu_set(i, cpu_present_mask);
cpu_set(i, cpu_present_map);
cpu->pal_revision = boot_cpu_palrev;
}

Expand All @@ -450,11 +449,10 @@ setup_smp(void)
}
} else {
smp_num_probed = 1;
cpu_set(boot_cpuid, cpu_present_mask);
}

printk(KERN_INFO "SMP: %d CPUs probed -- cpu_present_mask = %lx\n",
smp_num_probed, cpu_possible_map.bits[0]);
printk(KERN_INFO "SMP: %d CPUs probed -- cpu_present_map = %lx\n",
smp_num_probed, cpu_present_map.bits[0]);
}

/*
Expand All @@ -473,7 +471,7 @@ smp_prepare_cpus(unsigned int max_cpus)

/* Nothing to do on a UP box, or when told not to. */
if (smp_num_probed == 1 || max_cpus == 0) {
cpu_present_mask = cpumask_of_cpu(boot_cpuid);
cpu_present_map = cpumask_of_cpu(boot_cpuid);
printk(KERN_INFO "SMP mode deactivated.\n");
return;
}
Expand All @@ -486,10 +484,6 @@ smp_prepare_cpus(unsigned int max_cpus)
void __devinit
smp_prepare_boot_cpu(void)
{
/*
* Mark the boot cpu (current cpu) as online
*/
cpu_set(smp_processor_id(), cpu_online_map);
}

int __devinit
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/alpha/kernel/sys_titan.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ titan_update_irq_hw(unsigned long mask)
register int bcpu = boot_cpuid;

#ifdef CONFIG_SMP
cpumask_t cpm = cpu_present_mask;
cpumask_t cpm = cpu_present_map;
volatile unsigned long *dim0, *dim1, *dim2, *dim3;
unsigned long mask0, mask1, mask2, mask3, dummy;

Expand Down
18 changes: 15 additions & 3 deletions trunk/arch/arm/mach-ixp23xx/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,12 @@ static int ixp23xx_irq_set_type(unsigned int irq, unsigned int type)

static void ixp23xx_irq_mask(unsigned int irq)
{
volatile unsigned long *intr_reg = IXP23XX_INTR_EN1 + (irq / 32);
volatile unsigned long *intr_reg;

if (irq >= 56)
irq += 8;

intr_reg = IXP23XX_INTR_EN1 + (irq / 32);
*intr_reg &= ~(1 << (irq % 32));
}

Expand All @@ -199,17 +203,25 @@ static void ixp23xx_irq_ack(unsigned int irq)
*/
static void ixp23xx_irq_level_unmask(unsigned int irq)
{
volatile unsigned long *intr_reg = IXP23XX_INTR_EN1 + (irq / 32);
volatile unsigned long *intr_reg;

ixp23xx_irq_ack(irq);

if (irq >= 56)
irq += 8;

intr_reg = IXP23XX_INTR_EN1 + (irq / 32);
*intr_reg |= (1 << (irq % 32));
}

static void ixp23xx_irq_edge_unmask(unsigned int irq)
{
volatile unsigned long *intr_reg = IXP23XX_INTR_EN1 + (irq / 32);
volatile unsigned long *intr_reg;

if (irq >= 56)
irq += 8;

intr_reg = IXP23XX_INTR_EN1 + (irq / 32);
*intr_reg |= (1 << (irq % 32));
}

Expand Down
18 changes: 11 additions & 7 deletions trunk/arch/powerpc/platforms/powermac/pfunc_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <linux/kernel.h>
#include <linux/spinlock.h>
#include <linux/module.h>
#include <linux/mutex.h>

#include <asm/semaphore.h>
#include <asm/prom.h>
Expand Down Expand Up @@ -546,6 +547,7 @@ struct pmf_device {

static LIST_HEAD(pmf_devices);
static spinlock_t pmf_lock = SPIN_LOCK_UNLOCKED;
static DEFINE_MUTEX(pmf_irq_mutex);

static void pmf_release_device(struct kref *kref)
{
Expand Down Expand Up @@ -864,15 +866,17 @@ int pmf_register_irq_client(struct device_node *target,

spin_lock_irqsave(&pmf_lock, flags);
func = __pmf_find_function(target, name, PMF_FLAGS_INT_GEN);
if (func == NULL) {
spin_unlock_irqrestore(&pmf_lock, flags);
if (func)
func = pmf_get_function(func);
spin_unlock_irqrestore(&pmf_lock, flags);
if (func == NULL)
return -ENODEV;
}
mutex_lock(&pmf_irq_mutex);
if (list_empty(&func->irq_clients))
func->dev->handlers->irq_enable(func);
list_add(&client->link, &func->irq_clients);
client->func = func;
spin_unlock_irqrestore(&pmf_lock, flags);
mutex_unlock(&pmf_irq_mutex);

return 0;
}
Expand All @@ -881,16 +885,16 @@ EXPORT_SYMBOL_GPL(pmf_register_irq_client);
void pmf_unregister_irq_client(struct pmf_irq_client *client)
{
struct pmf_function *func = client->func;
unsigned long flags;

BUG_ON(func == NULL);

spin_lock_irqsave(&pmf_lock, flags);
mutex_lock(&pmf_irq_mutex);
client->func = NULL;
list_del(&client->link);
if (list_empty(&func->irq_clients))
func->dev->handlers->irq_disable(func);
spin_unlock_irqrestore(&pmf_lock, flags);
mutex_unlock(&pmf_irq_mutex);
pmf_put_function(func);
}
EXPORT_SYMBOL_GPL(pmf_unregister_irq_client);

Expand Down
30 changes: 30 additions & 0 deletions trunk/arch/sparc64/kernel/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <linux/config.h>
#include <linux/version.h>
#include <linux/errno.h>
#include <linux/threads.h>
#include <asm/thread_info.h>
#include <asm/asi.h>
#include <asm/pstate.h>
Expand Down Expand Up @@ -493,6 +494,35 @@ tlb_fixup_done:
call prom_init
mov %l7, %o0 ! OpenPROM cif handler

/* Initialize current_thread_info()->cpu as early as possible.
* In order to do that accurately we have to patch up the get_cpuid()
* assembler sequences. And that, in turn, requires that we know
* if we are on a Starfire box or not. While we're here, patch up
* the sun4v sequences as well.
*/
call check_if_starfire
nop
call per_cpu_patch
nop
call sun4v_patch
nop

#ifdef CONFIG_SMP
call hard_smp_processor_id
nop
cmp %o0, NR_CPUS
blu,pt %xcc, 1f
nop
call boot_cpu_id_too_large
nop
/* Not reached... */

1:
#else
mov 0, %o0
#endif
stb %o0, [%g6 + TI_CPU]

/* Off we go.... */
call start_kernel
nop
Expand Down
23 changes: 11 additions & 12 deletions trunk/arch/sparc64/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ char reboot_command[COMMAND_LINE_SIZE];

static struct pt_regs fake_swapper_regs = { { 0, }, 0, 0, 0, 0 };

static void __init per_cpu_patch(void)
void __init per_cpu_patch(void)
{
struct cpuid_patch_entry *p;
unsigned long ver;
Expand Down Expand Up @@ -280,7 +280,7 @@ static void __init per_cpu_patch(void)
}
}

static void __init sun4v_patch(void)
void __init sun4v_patch(void)
{
struct sun4v_1insn_patch_entry *p1;
struct sun4v_2insn_patch_entry *p2;
Expand Down Expand Up @@ -315,6 +315,15 @@ static void __init sun4v_patch(void)
}
}

#ifdef CONFIG_SMP
void __init boot_cpu_id_too_large(int cpu)
{
prom_printf("Serious problem, boot cpu id (%d) >= NR_CPUS (%d)\n",
cpu, NR_CPUS);
prom_halt();
}
#endif

void __init setup_arch(char **cmdline_p)
{
/* Initialize PROM console and command line. */
Expand All @@ -332,16 +341,6 @@ void __init setup_arch(char **cmdline_p)
conswitchp = &prom_con;
#endif

/* Work out if we are starfire early on */
check_if_starfire();

/* Now we know enough to patch the get_cpuid sequences
* used by trap code.
*/
per_cpu_patch();

sun4v_patch();

boot_flags_init(*cmdline_p);

idprom_init();
Expand Down
16 changes: 3 additions & 13 deletions trunk/arch/sparc64/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1264,7 +1264,6 @@ void __init smp_tick_init(void)
boot_cpu_id = hard_smp_processor_id();
current_tick_offset = timer_tick_offset;

cpu_set(boot_cpu_id, cpu_online_map);
prof_counter(boot_cpu_id) = prof_multiplier(boot_cpu_id) = 1;
}

Expand Down Expand Up @@ -1345,18 +1344,6 @@ void __init smp_setup_cpu_possible_map(void)

void __devinit smp_prepare_boot_cpu(void)
{
int cpu = hard_smp_processor_id();

if (cpu >= NR_CPUS) {
prom_printf("Serious problem, boot cpu id >= NR_CPUS\n");
prom_halt();
}

current_thread_info()->cpu = cpu;
__local_per_cpu_offset = __per_cpu_offset(cpu);

cpu_set(smp_processor_id(), cpu_online_map);
cpu_set(smp_processor_id(), phys_cpu_present_map);
}

int __devinit __cpu_up(unsigned int cpu)
Expand Down Expand Up @@ -1433,4 +1420,7 @@ void __init setup_per_cpu_areas(void)

for (i = 0; i < NR_CPUS; i++, ptr += size)
memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start);

/* Setup %g5 for the boot cpu. */
__local_per_cpu_offset = __per_cpu_offset(smp_processor_id());
}
5 changes: 3 additions & 2 deletions trunk/arch/sparc64/lib/checksum.S
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,9 @@ csum_partial_end_cruft:
sll %g1, 8, %g1
or %o5, %g1, %o4

1: add %o2, %o4, %o2
1: addcc %o2, %o4, %o2
addc %g0, %o2, %o2

csum_partial_finish:
retl
mov %o2, %o0
srl %o2, 0, %o0
5 changes: 3 additions & 2 deletions trunk/arch/sparc64/lib/csum_copy.S
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,12 @@ FUNC_NAME: /* %o0=src, %o1=dst, %o2=len, %o3=sum */
sll %g1, 8, %g1
or %o5, %g1, %o4

1: add %o3, %o4, %o3
1: addcc %o3, %o4, %o3
addc %g0, %o3, %o3

70:
retl
mov %o3, %o0
srl %o3, 0, %o0

95: mov 0, GLOBAL_SPARE
brlez,pn %o2, 4f
Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/um/Makefile-i386
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,9 @@ include $(srctree)/arch/i386/Makefile.cpu
# prevent gcc from keeping the stack 16 byte aligned. Taken from i386.
cflags-y += $(call cc-option,-mpreferred-stack-boundary=2)

# Prevent sprintf in nfsd from being converted to strcpy and resulting in
# an unresolved reference.
cflags-y += -ffreestanding

CFLAGS += $(cflags-y)
USER_CFLAGS += $(cflags-y)
Loading

0 comments on commit b6680d0

Please sign in to comment.