Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 96638
b: refs/heads/master
c: fc99824
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed May 14, 2008
1 parent 7095dd9 commit 459bfdb
Show file tree
Hide file tree
Showing 132 changed files with 4,246 additions and 1,338 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: 0a3ad00ca09632c6d0675f606276e92bdf1b306c
refs/heads/master: fc99824c427ed998e3c5e376bd9c640fde1c407c
12 changes: 11 additions & 1 deletion trunk/Documentation/memory-barriers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,17 @@ The Linux kernel has eight basic CPU memory barriers:
DATA DEPENDENCY read_barrier_depends() smp_read_barrier_depends()


All CPU memory barriers unconditionally imply compiler barriers.
All memory barriers except the data dependency barriers imply a compiler
barrier. Data dependencies do not impose any additional compiler ordering.

Aside: In the case of data dependencies, the compiler would be expected to
issue the loads in the correct order (eg. `a[b]` would have to load the value
of b before loading a[b]), however there is no guarantee in the C specification
that the compiler may not speculate the value of b (eg. is equal to 1) and load
a before b (eg. tmp = a[1]; if (b != 1) tmp = a[b]; ). There is also the
problem of a compiler reloading b after having loaded a[b], thus having a newer
copy of b than a[b]. A consensus has not yet been reached about these problems,
however the ACCESS_ONCE macro is a good place to start looking.

SMP memory barriers are reduced to compiler barriers on uniprocessor compiled
systems because it is assumed that a CPU will appear to be self-consistent,
Expand Down
10 changes: 5 additions & 5 deletions trunk/arch/x86/kernel/acpi/realmode/wakeup.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ ENTRY(_start)

SECTIONS
{
. = HEADER_OFFSET;
.header : {
*(.header)
}

. = 0;
.text : {
*(.text*)
Expand Down Expand Up @@ -50,6 +45,11 @@ SECTIONS
__bss_end = .;
}

. = HEADER_OFFSET;
.header : {
*(.header)
}

. = ALIGN(16);
_end = .;

Expand Down
7 changes: 5 additions & 2 deletions trunk/arch/x86/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -1303,6 +1303,9 @@ static const struct user_regset_view user_x86_64_view = {
#define genregs32_get genregs_get
#define genregs32_set genregs_set

#define user_i387_ia32_struct user_i387_struct
#define user32_fxsr_struct user_fxsr_struct

#endif /* CONFIG_X86_64 */

#if defined CONFIG_X86_32 || defined CONFIG_IA32_EMULATION
Expand All @@ -1315,13 +1318,13 @@ static const struct user_regset x86_32_regsets[] = {
},
[REGSET_FP] = {
.core_note_type = NT_PRFPREG,
.n = sizeof(struct user_i387_struct) / sizeof(u32),
.n = sizeof(struct user_i387_ia32_struct) / sizeof(u32),
.size = sizeof(u32), .align = sizeof(u32),
.active = fpregs_active, .get = fpregs_get, .set = fpregs_set
},
[REGSET_XFP] = {
.core_note_type = NT_PRXFPREG,
.n = sizeof(struct user_i387_struct) / sizeof(u32),
.n = sizeof(struct user32_fxsr_struct) / sizeof(u32),
.size = sizeof(u32), .align = sizeof(u32),
.active = xfpregs_active, .get = xfpregs_get, .set = xfpregs_set
},
Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/x86/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <asm/mpspec.h>
#include <asm/apicdef.h>

#ifdef CONFIG_X86_LOCAL_APIC
unsigned int num_processors;
unsigned disabled_cpus __cpuinitdata;
/* Processor that is doing the boot up */
Expand All @@ -23,8 +24,9 @@ EXPORT_PER_CPU_SYMBOL(x86_cpu_to_apicid);

/* Bitmask of physically existing CPUs */
physid_mask_t phys_cpu_present_map;
#endif

#if defined(CONFIG_HAVE_SETUP_PER_CPU_AREA) && defined(CONFIG_SMP)
#if defined(CONFIG_HAVE_SETUP_PER_CPU_AREA) && defined(CONFIG_X86_SMP)
/*
* Copy data used in early init routines from the initial arrays to the
* per cpu data areas. These arrays then become expendable and the
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/kernel/setup_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,7 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
static void __cpuinit early_init_centaur(struct cpuinfo_x86 *c)
{
if (c->x86 == 0x6 && c->x86_model >= 0xf)
set_bit(X86_FEATURE_CONSTANT_TSC, &c->x86_capability);
set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);
}

static void __cpuinit init_centaur(struct cpuinfo_x86 *c)
Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/x86/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,8 @@ native_smp_call_function_mask(cpumask_t mask,
wmb();

/* Send a message to other CPUs */
if (cpus_equal(mask, allbutself))
if (cpus_equal(mask, allbutself) &&
cpus_equal(cpu_online_map, cpu_callout_map))
send_IPI_allbutself(CALL_FUNCTION_VECTOR);
else
send_IPI_mask(mask, CALL_FUNCTION_VECTOR);
Expand Down
24 changes: 17 additions & 7 deletions trunk/arch/x86/kernel/smpboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ void *x86_bios_cpu_apicid_early_ptr;

#ifdef CONFIG_X86_32
u8 apicid_2_node[MAX_APICID];
static int low_mappings;
#endif

/* State of each CPU */
Expand Down Expand Up @@ -326,6 +327,12 @@ static void __cpuinit start_secondary(void *unused)
enable_8259A_irq(0);
}

#ifdef CONFIG_X86_32
while (low_mappings)
cpu_relax();
__flush_tlb_all();
#endif

/* This must be done before setting cpu_online_map */
set_cpu_sibling_map(raw_smp_processor_id());
wmb();
Expand Down Expand Up @@ -1040,14 +1047,20 @@ int __cpuinit native_cpu_up(unsigned int cpu)
#ifdef CONFIG_X86_32
/* init low mem mapping */
clone_pgd_range(swapper_pg_dir, swapper_pg_dir + KERNEL_PGD_BOUNDARY,
min_t(unsigned long, KERNEL_PGD_PTRS, KERNEL_PGD_BOUNDARY));
min_t(unsigned long, KERNEL_PGD_PTRS, KERNEL_PGD_BOUNDARY));
flush_tlb_all();
#endif
low_mappings = 1;

err = do_boot_cpu(apicid, cpu);
if (err < 0) {

zap_low_mappings();
low_mappings = 0;
#else
err = do_boot_cpu(apicid, cpu);
#endif
if (err) {
Dprintk("do_boot_cpu failed %d\n", err);
return err;
return -EIO;
}

/*
Expand Down Expand Up @@ -1259,9 +1272,6 @@ void __init native_smp_cpus_done(unsigned int max_cpus)
setup_ioapic_dest();
#endif
check_nmi_watchdog();
#ifdef CONFIG_X86_32
zap_low_mappings();
#endif
}

#ifdef CONFIG_HOTPLUG_CPU
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/x86/kernel/x8664_ksyms_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
All C exports should go in the respective C files. */

#include <linux/module.h>
#include <net/checksum.h>
#include <linux/smp.h>

#include <asm/processor.h>
Expand Down Expand Up @@ -29,6 +30,8 @@ EXPORT_SYMBOL(__copy_from_user_inatomic);
EXPORT_SYMBOL(copy_page);
EXPORT_SYMBOL(clear_page);

EXPORT_SYMBOL(csum_partial);

/*
* Export string functions. We normally rely on gcc builtin for most of these,
* but gcc sometimes decides not to inline them.
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/x86/lib/csum-partial_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,6 @@ __wsum csum_partial(const void *buff, int len, __wsum sum)
(__force u32)sum);
}

EXPORT_SYMBOL(csum_partial);

/*
* this routine is used for miscellaneous IP-like checksums, mainly
* in icmp.c
Expand Down
12 changes: 1 addition & 11 deletions trunk/arch/x86/mm/init_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,6 @@ void zap_low_mappings(void)
{
int i;

save_pg_dir();

/*
* Zap initial low-memory mappings.
*
Expand Down Expand Up @@ -663,16 +661,8 @@ void __init mem_init(void)
test_wp_bit();

cpa_init();

/*
* Subtle. SMP is doing it's boot stuff late (because it has to
* fork idle threads) - but it also needs low mappings for the
* protected-mode entry to work. We zap these entries only after
* the WP-bit has been tested.
*/
#ifndef CONFIG_SMP
save_pg_dir();
zap_low_mappings();
#endif
}

#ifdef CONFIG_MEMORY_HOTPLUG
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/x86/mm/pat.c
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn,
"%s:%d /dev/mem ioremap_change_attr failed %s for %Lx-%Lx\n",
current->comm, current->pid,
cattr_name(flags),
offset, offset + size);
offset, (unsigned long long)(offset + size));
return 0;
}

Expand All @@ -576,7 +576,7 @@ void map_devmem(unsigned long pfn, unsigned long size, pgprot_t vma_prot)
"%s:%d /dev/mem expected mapping type %s for %Lx-%Lx, got %s\n",
current->comm, current->pid,
cattr_name(want_flags),
addr, addr + size,
addr, (unsigned long long)(addr + size),
cattr_name(flags));
}
}
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/base/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,13 @@ int register_memory_notifier(struct notifier_block *nb)
{
return blocking_notifier_chain_register(&memory_chain, nb);
}
EXPORT_SYMBOL(register_memory_notifier);

void unregister_memory_notifier(struct notifier_block *nb)
{
blocking_notifier_chain_unregister(&memory_chain, nb);
}
EXPORT_SYMBOL(unregister_memory_notifier);

/*
* register_memory - Setup a sysfs device for a memory block
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2426,7 +2426,7 @@ config CHELSIO_T3

config EHEA
tristate "eHEA Ethernet support"
depends on IBMEBUS && INET && SPARSEMEM
depends on IBMEBUS && INET && SPARSEMEM && MEMORY_HOTPLUG
select INET_LRO
---help---
This driver supports the IBM pSeries eHEA ethernet adapter.
Expand Down
Loading

0 comments on commit 459bfdb

Please sign in to comment.