Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298494
b: refs/heads/master
c: 7224c0d
h: refs/heads/master
v: v3
  • Loading branch information
Greg Ungerer authored and Geert Uytterhoeven committed Apr 1, 2012
1 parent 9be48bc commit 401864d
Show file tree
Hide file tree
Showing 176 changed files with 576 additions and 4,062 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: 7d6e1cb7aed231b58acd71bdbe67fc03221373e4
refs/heads/master: 7224c0d1045327d637dab2c90777b6d5ec6d6804
17 changes: 0 additions & 17 deletions trunk/Documentation/DocBook/device-drivers.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -446,21 +446,4 @@ X!Idrivers/video/console/fonts.c
!Edrivers/i2c/i2c-core.c
</chapter>

<chapter id="hsi">
<title>High Speed Synchronous Serial Interface (HSI)</title>

<para>
High Speed Synchronous Serial Interface (HSI) is a
serial interface mainly used for connecting application
engines (APE) with cellular modem engines (CMT) in cellular
handsets.

HSI provides multiplexing for up to 16 logical channels,
low-latency and full duplex communication.
</para>

!Iinclude/linux/hsi/hsi.h
!Edrivers/hsi/hsi.c
</chapter>

</book>
2 changes: 1 addition & 1 deletion trunk/Documentation/cgroups/cpusets.txt
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ and name space for cpusets, with a minimum of additional kernel code.

The cpus and mems files in the root (top_cpuset) cpuset are
read-only. The cpus file automatically tracks the value of
cpu_online_mask using a CPU hotplug notifier, and the mems file
cpu_online_map using a CPU hotplug notifier, and the mems file
automatically tracks the value of node_states[N_HIGH_MEMORY]--i.e.,
nodes with memory--using the cpuset_track_online_nodes() hook.

Expand Down
22 changes: 11 additions & 11 deletions trunk/Documentation/cpu-hotplug.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ maxcpus=n Restrict boot time cpus to n. Say if you have 4 cpus, using
other cpus later online, read FAQ's for more info.

additional_cpus=n (*) Use this to limit hotpluggable cpus. This option sets
cpu_possible_mask = cpu_present_mask + additional_cpus
cpu_possible_map = cpu_present_map + additional_cpus

cede_offline={"off","on"} Use this option to disable/enable putting offlined
processors to an extended H_CEDE state on
Expand All @@ -64,33 +64,33 @@ should only rely on this to count the # of cpus, but *MUST* not rely
on the apicid values in those tables for disabled apics. In the event
BIOS doesn't mark such hot-pluggable cpus as disabled entries, one could
use this parameter "additional_cpus=x" to represent those cpus in the
cpu_possible_mask.
cpu_possible_map.

possible_cpus=n [s390,x86_64] use this to set hotpluggable cpus.
This option sets possible_cpus bits in
cpu_possible_mask. Thus keeping the numbers of bits set
cpu_possible_map. Thus keeping the numbers of bits set
constant even if the machine gets rebooted.

CPU maps and such
-----------------
[More on cpumaps and primitive to manipulate, please check
include/linux/cpumask.h that has more descriptive text.]

cpu_possible_mask: Bitmap of possible CPUs that can ever be available in the
cpu_possible_map: Bitmap of possible CPUs that can ever be available in the
system. This is used to allocate some boot time memory for per_cpu variables
that aren't designed to grow/shrink as CPUs are made available or removed.
Once set during boot time discovery phase, the map is static, i.e no bits
are added or removed anytime. Trimming it accurately for your system needs
upfront can save some boot time memory. See below for how we use heuristics
in x86_64 case to keep this under check.

cpu_online_mask: Bitmap of all CPUs currently online. Its set in __cpu_up()
cpu_online_map: Bitmap of all CPUs currently online. Its set in __cpu_up()
after a cpu is available for kernel scheduling and ready to receive
interrupts from devices. Its cleared when a cpu is brought down using
__cpu_disable(), before which all OS services including interrupts are
migrated to another target CPU.

cpu_present_mask: Bitmap of CPUs currently present in the system. Not all
cpu_present_map: Bitmap of CPUs currently present in the system. Not all
of them may be online. When physical hotplug is processed by the relevant
subsystem (e.g ACPI) can change and new bit either be added or removed
from the map depending on the event is hot-add/hot-remove. There are currently
Expand All @@ -99,22 +99,22 @@ at which time hotplug is disabled.

You really dont need to manipulate any of the system cpu maps. They should
be read-only for most use. When setting up per-cpu resources almost always use
cpu_possible_mask/for_each_possible_cpu() to iterate.
cpu_possible_map/for_each_possible_cpu() to iterate.

Never use anything other than cpumask_t to represent bitmap of CPUs.

#include <linux/cpumask.h>

for_each_possible_cpu - Iterate over cpu_possible_mask
for_each_online_cpu - Iterate over cpu_online_mask
for_each_present_cpu - Iterate over cpu_present_mask
for_each_possible_cpu - Iterate over cpu_possible_map
for_each_online_cpu - Iterate over cpu_online_map
for_each_present_cpu - Iterate over cpu_present_map
for_each_cpu_mask(x,mask) - Iterate over some random collection of cpu mask.

#include <linux/cpu.h>
get_online_cpus() and put_online_cpus():

The above calls are used to inhibit cpu hotplug operations. While the
cpu_hotplug.refcount is non zero, the cpu_online_mask will not change.
cpu_hotplug.refcount is non zero, the cpu_online_map will not change.
If you merely need to avoid cpus going away, you could also use
preempt_disable() and preempt_enable() for those sections.
Just remember the critical section cannot call any
Expand Down
1 change: 0 additions & 1 deletion trunk/Documentation/ioctl/ioctl-number.txt
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ Code Seq#(hex) Include File Comments
'j' 00-3F linux/joystick.h
'k' 00-0F linux/spi/spidev.h conflict!
'k' 00-05 video/kyro.h conflict!
'k' 10-17 linux/hsi/hsi_char.h HSI character device
'l' 00-3F linux/tcfs_fs.h transparent cryptographic file system
<http://web.archive.org/web/*/http://mikonos.dia.unisa.it/tcfs>
'l' 40-7F linux/udf_fs_i.h in development:
Expand Down
13 changes: 9 additions & 4 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1251,6 +1251,7 @@ ATHEROS ATH5K WIRELESS DRIVER
M: Jiri Slaby <jirislaby@gmail.com>
M: Nick Kossifidis <mickflemm@gmail.com>
M: "Luis R. Rodriguez" <mcgrof@qca.qualcomm.com>
M: Bob Copeland <me@bobcopeland.com>
L: linux-wireless@vger.kernel.org
L: ath5k-devel@lists.ath5k.org
W: http://wireless.kernel.org/en/users/Drivers/ath5k
Expand Down Expand Up @@ -3556,13 +3557,17 @@ L: linux-pm@vger.kernel.org
S: Supported
F: arch/x86/platform/mrst/pmu.*

INTEL PRO/WIRELESS 2100, 2200BG, 2915ABG NETWORK CONNECTION SUPPORT
M: Stanislav Yakovlev <stas.yakovlev@gmail.com>
INTEL PRO/WIRELESS 2100 NETWORK CONNECTION SUPPORT
L: linux-wireless@vger.kernel.org
S: Maintained
S: Orphan
F: Documentation/networking/README.ipw2100
F: drivers/net/wireless/ipw2x00/ipw2100.*

INTEL PRO/WIRELESS 2915ABG NETWORK CONNECTION SUPPORT
L: linux-wireless@vger.kernel.org
S: Orphan
F: Documentation/networking/README.ipw2200
F: drivers/net/wireless/ipw2x00/
F: drivers/net/wireless/ipw2x00/ipw2200.*

INTEL(R) TRUSTED EXECUTION TECHNOLOGY (TXT)
M: Joseph Cihula <joseph.cihula@intel.com>
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/alpha/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ setup_smp(void)
smp_num_probed = 1;
}

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

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/kernel/kprobes.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ int __kprobes __arch_disarm_kprobe(void *p)

void __kprobes arch_disarm_kprobe(struct kprobe *p)
{
stop_machine(__arch_disarm_kprobe, p, cpu_online_mask);
stop_machine(__arch_disarm_kprobe, p, &cpu_online_map);
}

void __kprobes arch_remove_kprobe(struct kprobe *p)
Expand Down
7 changes: 3 additions & 4 deletions trunk/arch/arm/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
* re-initialize the map in platform_smp_prepare_cpus() if
* present != possible (e.g. physical hotplug).
*/
init_cpu_present(cpu_possible_mask);
init_cpu_present(&cpu_possible_map);

/*
* Initialise the SCU if there are more than one CPU
Expand Down Expand Up @@ -581,9 +581,8 @@ void smp_send_stop(void)
unsigned long timeout;

if (num_online_cpus() > 1) {
struct cpumask mask;
cpumask_copy(&mask, cpu_online_mask);
cpumask_clear_cpu(smp_processor_id(), &mask);
cpumask_t mask = cpu_online_map;
cpu_clear(smp_processor_id(), mask);

smp_cross_call(&mask, IPI_CPU_STOP);
}
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/arm/mach-msm/include/mach/uncompress.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#ifndef __ASM_ARCH_MSM_UNCOMPRESS_H
#define __ASM_ARCH_MSM_UNCOMPRESS_H

#include <asm/barrier.h>
#include <asm/processor.h>
#include <mach/msm_iomap.h>

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/avr32/mach-at32ap/include/mach/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <linux/types.h>
#include <linux/serial.h>
#include <linux/platform_data/macb.h>
#include <linux/platform_data/atmel.h>
#include <linux/platform_data/atmel_nand.h>

#define GPIO_PIN_NONE (-1)

Expand Down
3 changes: 1 addition & 2 deletions trunk/arch/blackfin/include/asm/cmpxchg.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr,
(unsigned long)(n), sizeof(*(ptr))))
#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n))

#define cmpxchg(ptr, o, n) cmpxchg_local((ptr), (o), (n))
#define cmpxchg64(ptr, o, n) cmpxchg64_local((ptr), (o), (n))
#include <asm-generic/cmpxchg.h>

#endif /* !CONFIG_SMP */

Expand Down
1 change: 0 additions & 1 deletion trunk/arch/frv/mb93090-mb00/pci-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include <linux/dma-mapping.h>
#include <linux/list.h>
#include <linux/pci.h>
#include <linux/export.h>
#include <linux/highmem.h>
#include <linux/scatterlist.h>
#include <asm/io.h>
Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/hexagon/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#define BASE_IPI_IRQ 26

/*
* cpu_possible_mask needs to be filled out prior to setup_per_cpu_areas
* cpu_possible_map needs to be filled out prior to setup_per_cpu_areas
* (which is prior to any of our smp_prepare_cpu crap), in order to set
* up the... per_cpu areas.
*/
Expand Down Expand Up @@ -208,7 +208,7 @@ int __cpuinit __cpu_up(unsigned int cpu)
stack_start = ((void *) thread) + THREAD_SIZE;
__vmstart(start_secondary, stack_start);

while (!cpu_online(cpu))
while (!cpu_isset(cpu, cpu_online_map))
barrier();

return 0;
Expand All @@ -229,7 +229,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)

/* Right now, let's just fake it. */
for (i = 0; i < max_cpus; i++)
set_cpu_present(i, true);
cpu_set(i, cpu_present_map);

/* Also need to register the interrupts for IPI */
if (max_cpus > 1)
Expand Down Expand Up @@ -269,5 +269,5 @@ void smp_start_cpus(void)
int i;

for (i = 0; i < NR_CPUS; i++)
set_cpu_possible(i, true);
cpu_set(i, cpu_possible_map);
}
2 changes: 1 addition & 1 deletion trunk/arch/ia64/kernel/acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ static __init int setup_additional_cpus(char *s)
early_param("additional_cpus", setup_additional_cpus);

/*
* cpu_possible_mask should be static, it cannot change as CPUs
* cpu_possible_map should be static, it cannot change as CPUs
* are onlined, or offlined. The reason is per-cpu data-structures
* are allocated by some modules at init time, and dont expect to
* do this dynamically on cpu arrival/departure.
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/m68k/include/asm/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include <linux/types.h>
#include <linux/irqflags.h>
#include <asm/cmpxchg.h>

/*
* Atomic operations that C can't guarantee us. Useful for
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/mips/cavium-octeon/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ static inline void octeon_send_ipi_mask(const struct cpumask *mask,
}

/**
* Detect available CPUs, populate cpu_possible_mask
* Detect available CPUs, populate cpu_possible_map
*/
static void octeon_smp_hotplug_setup(void)
{
Expand Down Expand Up @@ -268,7 +268,7 @@ static int octeon_cpu_disable(void)

spin_lock(&smp_reserve_lock);

set_cpu_online(cpu, false);
cpu_clear(cpu, cpu_online_map);
cpu_clear(cpu, cpu_callin_map);
local_irq_disable();
fixup_irqs();
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/mips/kernel/mips-mt-fpaff.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ asmlinkage long mipsmt_sys_sched_getaffinity(pid_t pid, unsigned int len,
if (retval)
goto out_unlock;

cpumask_and(&mask, &p->thread.user_cpus_allowed, cpu_possible_mask);
cpus_and(mask, p->thread.user_cpus_allowed, cpu_possible_map);

out_unlock:
read_unlock(&tasklist_lock);
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/mips/kernel/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
int i;

#ifdef CONFIG_SMP
if (!cpu_online(n))
if (!cpu_isset(n, cpu_online_map))
return 0;
#endif

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/mips/kernel/smp-bmips.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ static int bmips_cpu_disable(void)

pr_info("SMP: CPU%d is offline\n", cpu);

set_cpu_online(cpu, false);
cpu_clear(cpu, cpu_online_map);
cpu_clear(cpu, cpu_callin_map);

local_flush_tlb_all();
Expand Down
27 changes: 15 additions & 12 deletions trunk/arch/mips/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ static void stop_this_cpu(void *dummy)
/*
* Remove this CPU:
*/
set_cpu_online(smp_processor_id(), false);
cpu_clear(smp_processor_id(), cpu_online_map);
for (;;) {
if (cpu_wait)
(*cpu_wait)(); /* Wait if available. */
Expand All @@ -174,7 +174,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
mp_ops->prepare_cpus(max_cpus);
set_cpu_sibling_map(0);
#ifndef CONFIG_HOTPLUG_CPU
init_cpu_present(cpu_possible_mask);
init_cpu_present(&cpu_possible_map);
#endif
}

Expand Down Expand Up @@ -248,7 +248,7 @@ int __cpuinit __cpu_up(unsigned int cpu)
while (!cpu_isset(cpu, cpu_callin_map))
udelay(100);

set_cpu_online(cpu, true);
cpu_set(cpu, cpu_online_map);

return 0;
}
Expand Down Expand Up @@ -320,12 +320,13 @@ void flush_tlb_mm(struct mm_struct *mm)
if ((atomic_read(&mm->mm_users) != 1) || (current->mm != mm)) {
smp_on_other_tlbs(flush_tlb_mm_ipi, mm);
} else {
cpumask_t mask = cpu_online_map;
unsigned int cpu;

for_each_online_cpu(cpu) {
if (cpu != smp_processor_id() && cpu_context(cpu, mm))
cpu_clear(smp_processor_id(), mask);
for_each_cpu_mask(cpu, mask)
if (cpu_context(cpu, mm))
cpu_context(cpu, mm) = 0;
}
}
local_flush_tlb_mm(mm);

Expand Down Expand Up @@ -359,12 +360,13 @@ void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, unsigned l

smp_on_other_tlbs(flush_tlb_range_ipi, &fd);
} else {
cpumask_t mask = cpu_online_map;
unsigned int cpu;

for_each_online_cpu(cpu) {
if (cpu != smp_processor_id() && cpu_context(cpu, mm))
cpu_clear(smp_processor_id(), mask);
for_each_cpu_mask(cpu, mask)
if (cpu_context(cpu, mm))
cpu_context(cpu, mm) = 0;
}
}
local_flush_tlb_range(vma, start, end);
preempt_enable();
Expand Down Expand Up @@ -405,12 +407,13 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long page)

smp_on_other_tlbs(flush_tlb_page_ipi, &fd);
} else {
cpumask_t mask = cpu_online_map;
unsigned int cpu;

for_each_online_cpu(cpu) {
if (cpu != smp_processor_id() && cpu_context(cpu, vma->vm_mm))
cpu_clear(smp_processor_id(), mask);
for_each_cpu_mask(cpu, mask)
if (cpu_context(cpu, vma->vm_mm))
cpu_context(cpu, vma->vm_mm) = 0;
}
}
local_flush_tlb_page(vma, page);
preempt_enable();
Expand Down
Loading

0 comments on commit 401864d

Please sign in to comment.