Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 96639
b: refs/heads/master
c: a1355e5
h: refs/heads/master
i:
  96637: 7095dd9
  96635: 268d47a
  96631: 2717027
  96623: 31bc609
  96607: 813d85e
  96575: 9b59b3c
  96511: 38867d6
v: v3
  • Loading branch information
Andrew Morton authored and Mauro Carvalho Chehab committed May 14, 2008
1 parent 459bfdb commit d8dcfd9
Show file tree
Hide file tree
Showing 138 changed files with 1,347 additions and 4,281 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: fc99824c427ed998e3c5e376bd9c640fde1c407c
refs/heads/master: a1355e530173021099d0401f3294414382189dbd
12 changes: 1 addition & 11 deletions trunk/Documentation/memory-barriers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -994,17 +994,7 @@ The Linux kernel has eight basic CPU memory barriers:
DATA DEPENDENCY read_barrier_depends() smp_read_barrier_depends()


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.
All CPU memory barriers unconditionally imply compiler barriers.

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,6 +12,11 @@ ENTRY(_start)

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

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

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

. = ALIGN(16);
_end = .;

Expand Down
7 changes: 2 additions & 5 deletions trunk/arch/x86/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -1303,9 +1303,6 @@ 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 @@ -1318,13 +1315,13 @@ static const struct user_regset x86_32_regsets[] = {
},
[REGSET_FP] = {
.core_note_type = NT_PRFPREG,
.n = sizeof(struct user_i387_ia32_struct) / sizeof(u32),
.n = sizeof(struct user_i387_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 user32_fxsr_struct) / sizeof(u32),
.n = sizeof(struct user_i387_struct) / sizeof(u32),
.size = sizeof(u32), .align = sizeof(u32),
.active = xfpregs_active, .get = xfpregs_get, .set = xfpregs_set
},
Expand Down
4 changes: 1 addition & 3 deletions trunk/arch/x86/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#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 @@ -24,9 +23,8 @@ 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_X86_SMP)
#if defined(CONFIG_HAVE_SETUP_PER_CPU_AREA) && defined(CONFIG_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_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);
set_bit(X86_FEATURE_CONSTANT_TSC, &c->x86_capability);
}

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

/* Send a message to other CPUs */
if (cpus_equal(mask, allbutself) &&
cpus_equal(cpu_online_map, cpu_callout_map))
if (cpus_equal(mask, allbutself))
send_IPI_allbutself(CALL_FUNCTION_VECTOR);
else
send_IPI_mask(mask, CALL_FUNCTION_VECTOR);
Expand Down
24 changes: 7 additions & 17 deletions trunk/arch/x86/kernel/smpboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ 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 @@ -327,12 +326,6 @@ 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 @@ -1047,20 +1040,14 @@ 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();
low_mappings = 1;
#endif

err = do_boot_cpu(apicid, cpu);

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

/*
Expand Down Expand Up @@ -1272,6 +1259,9 @@ 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: 0 additions & 3 deletions trunk/arch/x86/kernel/x8664_ksyms_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
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 @@ -30,8 +29,6 @@ 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: 2 additions & 0 deletions trunk/arch/x86/lib/csum-partial_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ __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: 11 additions & 1 deletion trunk/arch/x86/mm/init_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,8 @@ void zap_low_mappings(void)
{
int i;

save_pg_dir();

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

cpa_init();
save_pg_dir();

/*
* 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
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, (unsigned long long)(offset + size));
offset, 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, (unsigned long long)(addr + size),
addr, addr + size,
cattr_name(flags));
}
}
Expand Down
9 changes: 3 additions & 6 deletions trunk/block/genhd.c
Original file line number Diff line number Diff line change
Expand Up @@ -653,26 +653,23 @@ void genhd_media_change_notify(struct gendisk *disk)
EXPORT_SYMBOL_GPL(genhd_media_change_notify);
#endif /* 0 */

dev_t blk_lookup_devt(const char *name, int part)
dev_t blk_lookup_devt(const char *name)
{
struct device *dev;
dev_t devt = MKDEV(0, 0);

mutex_lock(&block_class_lock);
list_for_each_entry(dev, &block_class.devices, node) {
if (strcmp(dev->bus_id, name) == 0) {
struct gendisk *disk = dev_to_disk(dev);

if (part < disk->minors)
devt = MKDEV(MAJOR(dev->devt),
MINOR(dev->devt) + part);
devt = dev->devt;
break;
}
}
mutex_unlock(&block_class_lock);

return devt;
}

EXPORT_SYMBOL(blk_lookup_devt);

struct gendisk *alloc_disk(int minors)
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/base/class.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ int class_register(struct class *cls)

pr_debug("device class '%s': registering\n", cls->name);

INIT_LIST_HEAD(&cls->children);
INIT_LIST_HEAD(&cls->devices);
INIT_LIST_HEAD(&cls->interfaces);
kset_init(&cls->class_dirs);
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/base/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,11 @@ 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/media/video/tuner-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@
typeof(&FUNCTION) __a = symbol_request(FUNCTION); \
if (__a) { \
__r = (int) __a(ARGS); \
symbol_put(FUNCTION); \
} else { \
printk(KERN_ERR "TUNER: Unable to find " \
"symbol "#FUNCTION"()\n"); \
} \
symbol_put(FUNCTION); \
__r; \
})

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 && MEMORY_HOTPLUG
depends on IBMEBUS && INET && SPARSEMEM
select INET_LRO
---help---
This driver supports the IBM pSeries eHEA ethernet adapter.
Expand Down
Loading

0 comments on commit d8dcfd9

Please sign in to comment.