Merge branch 'x86/core' into x86/headers

This commit is contained in:
Ingo Molnar 2009-02-13 13:05:57 +01:00
Родитель d88316c243 7032e86967
Коммит d040c1614c
504 изменённых файлов: 16619 добавлений и 11228 удалений

Просмотреть файл

@ -18,11 +18,11 @@ For an architecture to support this feature, it must define some of
these macros in include/asm-XXX/topology.h: these macros in include/asm-XXX/topology.h:
#define topology_physical_package_id(cpu) #define topology_physical_package_id(cpu)
#define topology_core_id(cpu) #define topology_core_id(cpu)
#define topology_thread_siblings(cpu) #define topology_thread_cpumask(cpu)
#define topology_core_siblings(cpu) #define topology_core_cpumask(cpu)
The type of **_id is int. The type of **_id is int.
The type of siblings is cpumask_t. The type of siblings is (const) struct cpumask *.
To be consistent on all architectures, include/linux/topology.h To be consistent on all architectures, include/linux/topology.h
provides default definitions for any of the above macros that are provides default definitions for any of the above macros that are

Просмотреть файл

@ -43,7 +43,8 @@ Only comments so marked will be considered by the kernel-doc scripts,
and any comment so marked must be in kernel-doc format. Do not use and any comment so marked must be in kernel-doc format. Do not use
"/**" to be begin a comment block unless the comment block contains "/**" to be begin a comment block unless the comment block contains
kernel-doc formatted comments. The closing comment marker for kernel-doc formatted comments. The closing comment marker for
kernel-doc comments can be either "*/" or "**/". kernel-doc comments can be either "*/" or "**/", but "*/" is
preferred in the Linux kernel tree.
Kernel-doc comments should be placed just before the function Kernel-doc comments should be placed just before the function
or data structure being described. or data structure being described.
@ -63,7 +64,7 @@ Example kernel-doc function comment:
* comment lines. * comment lines.
* *
* The longer description can have multiple paragraphs. * The longer description can have multiple paragraphs.
**/ */
The first line, with the short description, must be on a single line. The first line, with the short description, must be on a single line.
@ -85,7 +86,7 @@ Example kernel-doc data structure comment.
* perhaps with more lines and words. * perhaps with more lines and words.
* *
* Longer description of this structure. * Longer description of this structure.
**/ */
The kernel-doc function comments describe each parameter to the The kernel-doc function comments describe each parameter to the
function, in order, with the @name lines. function, in order, with the @name lines.

Просмотреть файл

@ -937,6 +937,8 @@ and is between 256 and 4096 characters. It is defined in the file
intel_iommu= [DMAR] Intel IOMMU driver (DMAR) option intel_iommu= [DMAR] Intel IOMMU driver (DMAR) option
on
Enable intel iommu driver.
off off
Disable intel iommu driver. Disable intel iommu driver.
igfx_off [Default Off] igfx_off [Default Off]

Просмотреть файл

@ -158,7 +158,7 @@ Offset Proto Name Meaning
0202/4 2.00+ header Magic signature "HdrS" 0202/4 2.00+ header Magic signature "HdrS"
0206/2 2.00+ version Boot protocol version supported 0206/2 2.00+ version Boot protocol version supported
0208/4 2.00+ realmode_swtch Boot loader hook (see below) 0208/4 2.00+ realmode_swtch Boot loader hook (see below)
020C/2 2.00+ start_sys The load-low segment (0x1000) (obsolete) 020C/2 2.00+ start_sys_seg The load-low segment (0x1000) (obsolete)
020E/2 2.00+ kernel_version Pointer to kernel version string 020E/2 2.00+ kernel_version Pointer to kernel version string
0210/1 2.00+ type_of_loader Boot loader identifier 0210/1 2.00+ type_of_loader Boot loader identifier
0211/1 2.00+ loadflags Boot protocol option flags 0211/1 2.00+ loadflags Boot protocol option flags
@ -170,10 +170,11 @@ Offset Proto Name Meaning
0224/2 2.01+ heap_end_ptr Free memory after setup end 0224/2 2.01+ heap_end_ptr Free memory after setup end
0226/2 N/A pad1 Unused 0226/2 N/A pad1 Unused
0228/4 2.02+ cmd_line_ptr 32-bit pointer to the kernel command line 0228/4 2.02+ cmd_line_ptr 32-bit pointer to the kernel command line
022C/4 2.03+ initrd_addr_max Highest legal initrd address 022C/4 2.03+ ramdisk_max Highest legal initrd address
0230/4 2.05+ kernel_alignment Physical addr alignment required for kernel 0230/4 2.05+ kernel_alignment Physical addr alignment required for kernel
0234/1 2.05+ relocatable_kernel Whether kernel is relocatable or not 0234/1 2.05+ relocatable_kernel Whether kernel is relocatable or not
0235/3 N/A pad2 Unused 0235/1 N/A pad2 Unused
0236/2 N/A pad3 Unused
0238/4 2.06+ cmdline_size Maximum size of the kernel command line 0238/4 2.06+ cmdline_size Maximum size of the kernel command line
023C/4 2.07+ hardware_subarch Hardware subarchitecture 023C/4 2.07+ hardware_subarch Hardware subarchitecture
0240/8 2.07+ hardware_subarch_data Subarchitecture-specific data 0240/8 2.07+ hardware_subarch_data Subarchitecture-specific data
@ -299,14 +300,14 @@ Protocol: 2.00+
e.g. 0x0204 for version 2.04, and 0x0a11 for a hypothetical version e.g. 0x0204 for version 2.04, and 0x0a11 for a hypothetical version
10.17. 10.17.
Field name: readmode_swtch Field name: realmode_swtch
Type: modify (optional) Type: modify (optional)
Offset/size: 0x208/4 Offset/size: 0x208/4
Protocol: 2.00+ Protocol: 2.00+
Boot loader hook (see ADVANCED BOOT LOADER HOOKS below.) Boot loader hook (see ADVANCED BOOT LOADER HOOKS below.)
Field name: start_sys Field name: start_sys_seg
Type: read Type: read
Offset/size: 0x20c/2 Offset/size: 0x20c/2
Protocol: 2.00+ Protocol: 2.00+
@ -468,7 +469,7 @@ Protocol: 2.02+
zero, the kernel will assume that your boot loader does not support zero, the kernel will assume that your boot loader does not support
the 2.02+ protocol. the 2.02+ protocol.
Field name: initrd_addr_max Field name: ramdisk_max
Type: read Type: read
Offset/size: 0x22c/4 Offset/size: 0x22c/4
Protocol: 2.03+ Protocol: 2.03+

Просмотреть файл

@ -1202,6 +1202,8 @@ S: Supported
CONTROL GROUPS (CGROUPS) CONTROL GROUPS (CGROUPS)
P: Paul Menage P: Paul Menage
M: menage@google.com M: menage@google.com
P: Li Zefan
M: lizf@cn.fujitsu.com
L: containers@lists.linux-foundation.org L: containers@lists.linux-foundation.org
S: Maintained S: Maintained
@ -3537,6 +3539,12 @@ S: Maintained
PXA MMCI DRIVER PXA MMCI DRIVER
S: Orphan S: Orphan
PXA RTC DRIVER
P: Robert Jarzmik
M: robert.jarzmik@free.fr
L: rtc-linux@googlegroups.com
S: Maintained
QLOGIC QLA2XXX FC-SCSI DRIVER QLOGIC QLA2XXX FC-SCSI DRIVER
P: Andrew Vasquez P: Andrew Vasquez
M: linux-driver@qlogic.com M: linux-driver@qlogic.com
@ -4285,8 +4293,8 @@ P: Rajiv Andrade
M: srajiv@linux.vnet.ibm.com M: srajiv@linux.vnet.ibm.com
W: http://tpmdd.sourceforge.net W: http://tpmdd.sourceforge.net
P: Marcel Selhorst P: Marcel Selhorst
M: tpm@selhorst.net M: m.selhorst@sirrix.com
W: http://www.prosec.rub.de/tpm/ W: http://www.sirrix.com
L: tpmdd-devel@lists.sourceforge.net (moderated for non-subscribers) L: tpmdd-devel@lists.sourceforge.net (moderated for non-subscribers)
S: Maintained S: Maintained

Просмотреть файл

@ -532,8 +532,9 @@ KBUILD_CFLAGS += $(call cc-option,-Wframe-larger-than=${CONFIG_FRAME_WARN})
endif endif
# Force gcc to behave correct even for buggy distributions # Force gcc to behave correct even for buggy distributions
# Arch Makefiles may override this setting ifndef CONFIG_CC_STACKPROTECTOR
KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector) KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector)
endif
ifdef CONFIG_FRAME_POINTER ifdef CONFIG_FRAME_POINTER
KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls

Просмотреть файл

@ -55,7 +55,7 @@ int irq_select_affinity(unsigned int irq)
cpu = (cpu < (NR_CPUS-1) ? cpu + 1 : 0); cpu = (cpu < (NR_CPUS-1) ? cpu + 1 : 0);
last_cpu = cpu; last_cpu = cpu;
irq_desc[irq].affinity = cpumask_of_cpu(cpu); cpumask_copy(irq_desc[irq].affinity, cpumask_of(cpu));
irq_desc[irq].chip->set_affinity(irq, cpumask_of(cpu)); irq_desc[irq].chip->set_affinity(irq, cpumask_of(cpu));
return 0; return 0;
} }

Просмотреть файл

@ -104,6 +104,11 @@ static struct irq_desc bad_irq_desc = {
.lock = __SPIN_LOCK_UNLOCKED(bad_irq_desc.lock), .lock = __SPIN_LOCK_UNLOCKED(bad_irq_desc.lock),
}; };
#ifdef CONFIG_CPUMASK_OFFSTACK
/* We are not allocating bad_irq_desc.affinity or .pending_mask */
#error "ARM architecture does not support CONFIG_CPUMASK_OFFSTACK."
#endif
/* /*
* do_IRQ handles all hardware IRQ's. Decoded IRQs should not * do_IRQ handles all hardware IRQ's. Decoded IRQs should not
* come via this function. Instead, they should provide their * come via this function. Instead, they should provide their
@ -161,7 +166,7 @@ void __init init_IRQ(void)
irq_desc[irq].status |= IRQ_NOREQUEST | IRQ_NOPROBE; irq_desc[irq].status |= IRQ_NOREQUEST | IRQ_NOPROBE;
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
bad_irq_desc.affinity = CPU_MASK_ALL; cpumask_setall(bad_irq_desc.affinity);
bad_irq_desc.cpu = smp_processor_id(); bad_irq_desc.cpu = smp_processor_id();
#endif #endif
init_arch_irq(); init_arch_irq();
@ -191,15 +196,16 @@ void migrate_irqs(void)
struct irq_desc *desc = irq_desc + i; struct irq_desc *desc = irq_desc + i;
if (desc->cpu == cpu) { if (desc->cpu == cpu) {
unsigned int newcpu = any_online_cpu(desc->affinity); unsigned int newcpu = cpumask_any_and(desc->affinity,
cpu_online_mask);
if (newcpu == NR_CPUS) { if (newcpu >= nr_cpu_ids) {
if (printk_ratelimit()) if (printk_ratelimit())
printk(KERN_INFO "IRQ%u no longer affine to CPU%u\n", printk(KERN_INFO "IRQ%u no longer affine to CPU%u\n",
i, cpu); i, cpu);
cpus_setall(desc->affinity); cpumask_setall(desc->affinity);
newcpu = any_online_cpu(desc->affinity); newcpu = cpumask_any_and(desc->affinity,
cpu_online_mask);
} }
route_irq(desc, i, newcpu); route_irq(desc, i, newcpu);

Просмотреть файл

@ -13,8 +13,8 @@
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
const extern unsigned char relocate_new_kernel[]; extern const unsigned char relocate_new_kernel[];
const extern unsigned int relocate_new_kernel_size; extern const unsigned int relocate_new_kernel_size;
extern void setup_mm_for_reboot(char mode); extern void setup_mm_for_reboot(char mode);

Просмотреть файл

@ -65,6 +65,7 @@ SECTIONS
#endif #endif
. = ALIGN(4096); . = ALIGN(4096);
__per_cpu_start = .; __per_cpu_start = .;
*(.data.percpu.page_aligned)
*(.data.percpu) *(.data.percpu)
*(.data.percpu.shared_aligned) *(.data.percpu.shared_aligned)
__per_cpu_end = .; __per_cpu_end = .;

Просмотреть файл

@ -121,6 +121,16 @@ int __init pxa_init_dma(int num_ch)
if (dma_channels == NULL) if (dma_channels == NULL)
return -ENOMEM; return -ENOMEM;
/* dma channel priorities on pxa2xx processors:
* ch 0 - 3, 16 - 19 <--> (0) DMA_PRIO_HIGH
* ch 4 - 7, 20 - 23 <--> (1) DMA_PRIO_MEDIUM
* ch 8 - 15, 24 - 31 <--> (2) DMA_PRIO_LOW
*/
for (i = 0; i < num_ch; i++) {
DCSR(i) = 0;
dma_channels[i].prio = min((i & 0xf) >> 2, DMA_PRIO_LOW);
}
ret = request_irq(IRQ_DMA, dma_irq_handler, IRQF_DISABLED, "DMA", NULL); ret = request_irq(IRQ_DMA, dma_irq_handler, IRQF_DISABLED, "DMA", NULL);
if (ret) { if (ret) {
printk (KERN_CRIT "Wow! Can't register IRQ for DMA\n"); printk (KERN_CRIT "Wow! Can't register IRQ for DMA\n");
@ -128,14 +138,6 @@ int __init pxa_init_dma(int num_ch)
return ret; return ret;
} }
/* dma channel priorities on pxa2xx processors:
* ch 0 - 3, 16 - 19 <--> (0) DMA_PRIO_HIGH
* ch 4 - 7, 20 - 23 <--> (1) DMA_PRIO_MEDIUM
* ch 8 - 15, 24 - 31 <--> (2) DMA_PRIO_LOW
*/
for (i = 0; i < num_ch; i++)
dma_channels[i].prio = min((i & 0xf) >> 2, DMA_PRIO_LOW);
num_dma_channels = num_ch; num_dma_channels = num_ch;
return 0; return 0;
} }

Просмотреть файл

@ -1,6 +1,8 @@
#ifndef __ASM_ARCH_REGS_AC97_H #ifndef __ASM_ARCH_REGS_AC97_H
#define __ASM_ARCH_REGS_AC97_H #define __ASM_ARCH_REGS_AC97_H
#include <mach/hardware.h>
/* /*
* AC97 Controller registers * AC97 Controller registers
*/ */

Просмотреть файл

@ -41,6 +41,9 @@
#elif defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx) #elif defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
#define SSCR0_SCR (0x000fff00) /* Serial Clock Rate (mask) */ #define SSCR0_SCR (0x000fff00) /* Serial Clock Rate (mask) */
#define SSCR0_SerClkDiv(x) (((x) - 1) << 8) /* Divisor [1..4096] */ #define SSCR0_SerClkDiv(x) (((x) - 1) << 8) /* Divisor [1..4096] */
#endif
#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
#define SSCR0_EDSS (1 << 20) /* Extended data size select */ #define SSCR0_EDSS (1 << 20) /* Extended data size select */
#define SSCR0_NCS (1 << 21) /* Network clock select */ #define SSCR0_NCS (1 << 21) /* Network clock select */
#define SSCR0_RIM (1 << 22) /* Receive FIFO overrrun interrupt mask */ #define SSCR0_RIM (1 << 22) /* Receive FIFO overrrun interrupt mask */

Просмотреть файл

@ -88,13 +88,13 @@ static struct pxa3xx_mfp_addr_map pxa310_mfp_addr_map[] __initdata = {
static DEFINE_PXA3_CKEN(common_nand, NAND, 156000000, 0); static DEFINE_PXA3_CKEN(common_nand, NAND, 156000000, 0);
static struct clk_lookup common_clkregs[] = { static struct clk_lookup common_clkregs[] = {
INIT_CLKREG(&clk_common_nand, "pxa3xx-nand", "NANDCLK"), INIT_CLKREG(&clk_common_nand, "pxa3xx-nand", NULL),
}; };
static DEFINE_PXA3_CKEN(pxa310_mmc3, MMC3, 19500000, 0); static DEFINE_PXA3_CKEN(pxa310_mmc3, MMC3, 19500000, 0);
static struct clk_lookup pxa310_clkregs[] = { static struct clk_lookup pxa310_clkregs[] = {
INIT_CLKREG(&clk_pxa310_mmc3, "pxa2xx-mci.2", "MMCCLK"), INIT_CLKREG(&clk_pxa310_mmc3, "pxa2xx-mci.2", NULL),
}; };
static int __init pxa300_init(void) static int __init pxa300_init(void)

Просмотреть файл

@ -83,7 +83,7 @@ static struct pxa3xx_mfp_addr_map pxa320_mfp_addr_map[] __initdata = {
static DEFINE_PXA3_CKEN(pxa320_nand, NAND, 104000000, 0); static DEFINE_PXA3_CKEN(pxa320_nand, NAND, 104000000, 0);
static struct clk_lookup pxa320_clkregs[] = { static struct clk_lookup pxa320_clkregs[] = {
INIT_CLKREG(&clk_pxa320_nand, "pxa3xx-nand", "NANDCLK"), INIT_CLKREG(&clk_pxa320_nand, "pxa3xx-nand", NULL),
}; };
static int __init pxa320_init(void) static int __init pxa320_init(void)

Просмотреть файл

@ -263,7 +263,7 @@ static void em_route_irq(int irq, unsigned int cpu)
const struct cpumask *mask = cpumask_of(cpu); const struct cpumask *mask = cpumask_of(cpu);
spin_lock_irq(&desc->lock); spin_lock_irq(&desc->lock);
desc->affinity = *mask; cpumask_copy(desc->affinity, mask);
desc->chip->set_affinity(irq, mask); desc->chip->set_affinity(irq, mask);
spin_unlock_irq(&desc->lock); spin_unlock_irq(&desc->lock);
} }

Просмотреть файл

@ -70,6 +70,11 @@ static struct irq_desc bad_irq_desc = {
#endif #endif
}; };
#ifdef CONFIG_CPUMASK_OFFSTACK
/* We are not allocating a variable-sized bad_irq_desc.affinity */
#error "Blackfin architecture does not support CONFIG_CPUMASK_OFFSTACK."
#endif
int show_interrupts(struct seq_file *p, void *v) int show_interrupts(struct seq_file *p, void *v)
{ {
int i = *(loff_t *) v, j; int i = *(loff_t *) v, j;

Просмотреть файл

@ -36,10 +36,10 @@
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/hardirq.h>
#include <asm/pgalloc.h> #include <asm/pgalloc.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/hardirq.h>
#include <asm/mmu_context.h> #include <asm/mmu_context.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/mmu.h> #include <asm/mmu.h>

Просмотреть файл

@ -27,12 +27,12 @@ extern void *per_cpu_init(void);
#else /* ! SMP */ #else /* ! SMP */
#define PER_CPU_ATTRIBUTES __attribute__((__section__(".data.percpu")))
#define per_cpu_init() (__phys_per_cpu_start) #define per_cpu_init() (__phys_per_cpu_start)
#endif /* SMP */ #endif /* SMP */
#define PER_CPU_BASE_SECTION ".data.percpu"
/* /*
* Be extremely careful when taking the address of this variable! Due to virtual * Be extremely careful when taking the address of this variable! Due to virtual
* remapping, it is different from the canonical address returned by __get_cpu_var(var)! * remapping, it is different from the canonical address returned by __get_cpu_var(var)!

Просмотреть файл

@ -84,7 +84,7 @@ void build_cpu_to_node_map(void);
.child = NULL, \ .child = NULL, \
.groups = NULL, \ .groups = NULL, \
.min_interval = 8, \ .min_interval = 8, \
.max_interval = 8*(min(num_online_cpus(), 32)), \ .max_interval = 8*(min(num_online_cpus(), 32U)), \
.busy_factor = 64, \ .busy_factor = 64, \
.imbalance_pct = 125, \ .imbalance_pct = 125, \
.cache_nice_tries = 2, \ .cache_nice_tries = 2, \

Просмотреть файл

@ -0,0 +1,13 @@
#ifndef _ASM_IA64_UV_UV_H
#define _ASM_IA64_UV_UV_H
#include <asm/system.h>
#include <asm/sn/simulator.h>
static inline int is_uv_system(void)
{
/* temporary support for running on hardware simulator */
return IS_MEDUSA() || ia64_platform_is("uv");
}
#endif /* _ASM_IA64_UV_UV_H */

Просмотреть файл

@ -199,6 +199,10 @@ char *__init __acpi_map_table(unsigned long phys_addr, unsigned long size)
return __va(phys_addr); return __va(phys_addr);
} }
char *__init __acpi_unmap_table(unsigned long virt_addr, unsigned long size)
{
}
/* -------------------------------------------------------------------------- /* --------------------------------------------------------------------------
Boot-time Table Parsing Boot-time Table Parsing
-------------------------------------------------------------------------- */ -------------------------------------------------------------------------- */

Просмотреть файл

@ -880,7 +880,7 @@ iosapic_unregister_intr (unsigned int gsi)
if (iosapic_intr_info[irq].count == 0) { if (iosapic_intr_info[irq].count == 0) {
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
/* Clear affinity */ /* Clear affinity */
cpus_setall(idesc->affinity); cpumask_setall(idesc->affinity);
#endif #endif
/* Clear the interrupt information */ /* Clear the interrupt information */
iosapic_intr_info[irq].dest = 0; iosapic_intr_info[irq].dest = 0;

Просмотреть файл

@ -103,7 +103,7 @@ static char irq_redir [NR_IRQS]; // = { [0 ... NR_IRQS-1] = 1 };
void set_irq_affinity_info (unsigned int irq, int hwid, int redir) void set_irq_affinity_info (unsigned int irq, int hwid, int redir)
{ {
if (irq < NR_IRQS) { if (irq < NR_IRQS) {
cpumask_copy(&irq_desc[irq].affinity, cpumask_copy(irq_desc[irq].affinity,
cpumask_of(cpu_logical_id(hwid))); cpumask_of(cpu_logical_id(hwid)));
irq_redir[irq] = (char) (redir & 0xff); irq_redir[irq] = (char) (redir & 0xff);
} }
@ -148,7 +148,7 @@ static void migrate_irqs(void)
if (desc->status == IRQ_PER_CPU) if (desc->status == IRQ_PER_CPU)
continue; continue;
if (cpumask_any_and(&irq_desc[irq].affinity, cpu_online_mask) if (cpumask_any_and(irq_desc[irq].affinity, cpu_online_mask)
>= nr_cpu_ids) { >= nr_cpu_ids) {
/* /*
* Save it for phase 2 processing * Save it for phase 2 processing

Просмотреть файл

@ -493,11 +493,13 @@ ia64_handle_irq (ia64_vector vector, struct pt_regs *regs)
saved_tpr = ia64_getreg(_IA64_REG_CR_TPR); saved_tpr = ia64_getreg(_IA64_REG_CR_TPR);
ia64_srlz_d(); ia64_srlz_d();
while (vector != IA64_SPURIOUS_INT_VECTOR) { while (vector != IA64_SPURIOUS_INT_VECTOR) {
struct irq_desc *desc = irq_to_desc(vector);
if (unlikely(IS_LOCAL_TLB_FLUSH(vector))) { if (unlikely(IS_LOCAL_TLB_FLUSH(vector))) {
smp_local_flush_tlb(); smp_local_flush_tlb();
kstat_this_cpu.irqs[vector]++; kstat_incr_irqs_this_cpu(vector, desc);
} else if (unlikely(IS_RESCHEDULE(vector))) } else if (unlikely(IS_RESCHEDULE(vector)))
kstat_this_cpu.irqs[vector]++; kstat_incr_irqs_this_cpu(vector, desc);
else { else {
int irq = local_vector_to_irq(vector); int irq = local_vector_to_irq(vector);
@ -551,11 +553,13 @@ void ia64_process_pending_intr(void)
* Perform normal interrupt style processing * Perform normal interrupt style processing
*/ */
while (vector != IA64_SPURIOUS_INT_VECTOR) { while (vector != IA64_SPURIOUS_INT_VECTOR) {
struct irq_desc *desc = irq_to_desc(vector);
if (unlikely(IS_LOCAL_TLB_FLUSH(vector))) { if (unlikely(IS_LOCAL_TLB_FLUSH(vector))) {
smp_local_flush_tlb(); smp_local_flush_tlb();
kstat_this_cpu.irqs[vector]++; kstat_incr_irqs_this_cpu(vector, desc);
} else if (unlikely(IS_RESCHEDULE(vector))) } else if (unlikely(IS_RESCHEDULE(vector)))
kstat_this_cpu.irqs[vector]++; kstat_incr_irqs_this_cpu(vector, desc);
else { else {
struct pt_regs *old_regs = set_irq_regs(NULL); struct pt_regs *old_regs = set_irq_regs(NULL);
int irq = local_vector_to_irq(vector); int irq = local_vector_to_irq(vector);

Просмотреть файл

@ -75,7 +75,7 @@ static void ia64_set_msi_irq_affinity(unsigned int irq,
msg.data = data; msg.data = data;
write_msi_msg(irq, &msg); write_msi_msg(irq, &msg);
irq_desc[irq].affinity = cpumask_of_cpu(cpu); cpumask_copy(irq_desc[irq].affinity, cpumask_of(cpu));
} }
#endif /* CONFIG_SMP */ #endif /* CONFIG_SMP */
@ -187,7 +187,7 @@ static void dmar_msi_set_affinity(unsigned int irq, const struct cpumask *mask)
msg.address_lo |= MSI_ADDR_DESTID_CPU(cpu_physical_id(cpu)); msg.address_lo |= MSI_ADDR_DESTID_CPU(cpu_physical_id(cpu));
dmar_msi_write(irq, &msg); dmar_msi_write(irq, &msg);
irq_desc[irq].affinity = *mask; cpumask_copy(irq_desc[irq].affinity, mask);
} }
#endif /* CONFIG_SMP */ #endif /* CONFIG_SMP */

Просмотреть файл

@ -219,6 +219,7 @@ SECTIONS
.data.percpu PERCPU_ADDR : AT(__phys_per_cpu_start - LOAD_OFFSET) .data.percpu PERCPU_ADDR : AT(__phys_per_cpu_start - LOAD_OFFSET)
{ {
__per_cpu_start = .; __per_cpu_start = .;
*(.data.percpu.page_aligned)
*(.data.percpu) *(.data.percpu)
*(.data.percpu.shared_aligned) *(.data.percpu.shared_aligned)
__per_cpu_end = .; __per_cpu_end = .;

Просмотреть файл

@ -205,7 +205,7 @@ static void sn_set_msi_irq_affinity(unsigned int irq,
msg.address_lo = (u32)(bus_addr & 0x00000000ffffffff); msg.address_lo = (u32)(bus_addr & 0x00000000ffffffff);
write_msi_msg(irq, &msg); write_msi_msg(irq, &msg);
irq_desc[irq].affinity = *cpu_mask; cpumask_copy(irq_desc[irq].affinity, cpu_mask);
} }
#endif /* CONFIG_SMP */ #endif /* CONFIG_SMP */

Просмотреть файл

@ -66,7 +66,7 @@ extern void smtc_forward_irq(unsigned int irq);
*/ */
#define IRQ_AFFINITY_HOOK(irq) \ #define IRQ_AFFINITY_HOOK(irq) \
do { \ do { \
if (!cpu_isset(smp_processor_id(), irq_desc[irq].affinity)) { \ if (!cpumask_test_cpu(smp_processor_id(), irq_desc[irq].affinity)) {\
smtc_forward_irq(irq); \ smtc_forward_irq(irq); \
irq_exit(); \ irq_exit(); \
return; \ return; \

Просмотреть файл

@ -51,6 +51,7 @@ static inline int __raw_spin_is_contended(raw_spinlock_t *lock)
return (((counters >> 14) - counters) & 0x1fff) > 1; return (((counters >> 14) - counters) & 0x1fff) > 1;
} }
#define __raw_spin_is_contended __raw_spin_is_contended
static inline void __raw_spin_lock(raw_spinlock_t *lock) static inline void __raw_spin_lock(raw_spinlock_t *lock)
{ {

Просмотреть файл

@ -187,7 +187,7 @@ static void gic_set_affinity(unsigned int irq, const struct cpumask *cpumask)
set_bit(irq, pcpu_masks[first_cpu(tmp)].pcpu_mask); set_bit(irq, pcpu_masks[first_cpu(tmp)].pcpu_mask);
} }
irq_desc[irq].affinity = *cpumask; cpumask_copy(irq_desc[irq].affinity, cpumask);
spin_unlock_irqrestore(&gic_lock, flags); spin_unlock_irqrestore(&gic_lock, flags);
} }

Просмотреть файл

@ -686,7 +686,7 @@ void smtc_forward_irq(unsigned int irq)
* and efficiency, we just pick the easiest one to find. * and efficiency, we just pick the easiest one to find.
*/ */
target = first_cpu(irq_desc[irq].affinity); target = cpumask_first(irq_desc[irq].affinity);
/* /*
* We depend on the platform code to have correctly processed * We depend on the platform code to have correctly processed
@ -921,11 +921,13 @@ void ipi_decode(struct smtc_ipi *pipi)
struct clock_event_device *cd; struct clock_event_device *cd;
void *arg_copy = pipi->arg; void *arg_copy = pipi->arg;
int type_copy = pipi->type; int type_copy = pipi->type;
int irq = MIPS_CPU_IRQ_BASE + 1;
smtc_ipi_nq(&freeIPIq, pipi); smtc_ipi_nq(&freeIPIq, pipi);
switch (type_copy) { switch (type_copy) {
case SMTC_CLOCK_TICK: case SMTC_CLOCK_TICK:
irq_enter(); irq_enter();
kstat_this_cpu.irqs[MIPS_CPU_IRQ_BASE + 1]++; kstat_incr_irqs_this_cpu(irq, irq_to_desc(irq));
cd = &per_cpu(mips_clockevent_device, cpu); cd = &per_cpu(mips_clockevent_device, cpu);
cd->event_handler(cd); cd->event_handler(cd);
irq_exit(); irq_exit();

Просмотреть файл

@ -116,7 +116,7 @@ struct plat_smp_ops msmtc_smp_ops = {
void plat_set_irq_affinity(unsigned int irq, const struct cpumask *affinity) void plat_set_irq_affinity(unsigned int irq, const struct cpumask *affinity)
{ {
cpumask_t tmask = *affinity; cpumask_t tmask;
int cpu = 0; int cpu = 0;
void smtc_set_irq_affinity(unsigned int irq, cpumask_t aff); void smtc_set_irq_affinity(unsigned int irq, cpumask_t aff);
@ -139,11 +139,12 @@ void plat_set_irq_affinity(unsigned int irq, const struct cpumask *affinity)
* be made to forward to an offline "CPU". * be made to forward to an offline "CPU".
*/ */
cpumask_copy(&tmask, affinity);
for_each_cpu(cpu, affinity) { for_each_cpu(cpu, affinity) {
if ((cpu_data[cpu].vpe_id != 0) || !cpu_online(cpu)) if ((cpu_data[cpu].vpe_id != 0) || !cpu_online(cpu))
cpu_clear(cpu, tmask); cpu_clear(cpu, tmask);
} }
irq_desc[irq].affinity = tmask; cpumask_copy(irq_desc[irq].affinity, &tmask);
if (cpus_empty(tmask)) if (cpus_empty(tmask))
/* /*

Просмотреть файл

@ -155,7 +155,7 @@ static void indy_buserror_irq(void)
int irq = SGI_BUSERR_IRQ; int irq = SGI_BUSERR_IRQ;
irq_enter(); irq_enter();
kstat_this_cpu.irqs[irq]++; kstat_incr_irqs_this_cpu(irq, irq_to_desc(irq));
ip22_be_interrupt(irq); ip22_be_interrupt(irq);
irq_exit(); irq_exit();
} }

Просмотреть файл

@ -122,7 +122,7 @@ void indy_8254timer_irq(void)
char c; char c;
irq_enter(); irq_enter();
kstat_this_cpu.irqs[irq]++; kstat_incr_irqs_this_cpu(irq, irq_to_desc(irq));
printk(KERN_ALERT "Oops, got 8254 interrupt.\n"); printk(KERN_ALERT "Oops, got 8254 interrupt.\n");
ArcRead(0, &c, 1, &cnt); ArcRead(0, &c, 1, &cnt);
ArcEnterInteractiveMode(); ArcEnterInteractiveMode();

Просмотреть файл

@ -178,9 +178,10 @@ struct plat_smp_ops bcm1480_smp_ops = {
void bcm1480_mailbox_interrupt(void) void bcm1480_mailbox_interrupt(void)
{ {
int cpu = smp_processor_id(); int cpu = smp_processor_id();
int irq = K_BCM1480_INT_MBOX_0_0;
unsigned int action; unsigned int action;
kstat_this_cpu.irqs[K_BCM1480_INT_MBOX_0_0]++; kstat_incr_irqs_this_cpu(irq, irq_to_desc(irq));
/* Load the mailbox register to figure out what we're supposed to do */ /* Load the mailbox register to figure out what we're supposed to do */
action = (__raw_readq(mailbox_0_regs[cpu]) >> 48) & 0xffff; action = (__raw_readq(mailbox_0_regs[cpu]) >> 48) & 0xffff;

Просмотреть файл

@ -166,9 +166,10 @@ struct plat_smp_ops sb_smp_ops = {
void sb1250_mailbox_interrupt(void) void sb1250_mailbox_interrupt(void)
{ {
int cpu = smp_processor_id(); int cpu = smp_processor_id();
int irq = K_INT_MBOX_0;
unsigned int action; unsigned int action;
kstat_this_cpu.irqs[K_INT_MBOX_0]++; kstat_incr_irqs_this_cpu(irq, irq_to_desc(irq));
/* Load the mailbox register to figure out what we're supposed to do */ /* Load the mailbox register to figure out what we're supposed to do */
action = (____raw_readq(mailbox_regs[cpu]) >> 48) & 0xffff; action = (____raw_readq(mailbox_regs[cpu]) >> 48) & 0xffff;

Просмотреть файл

@ -130,6 +130,7 @@ void watchdog_interrupt(struct pt_regs *regs, enum exception_code excep)
* the stack NMI-atomically, it's safe to use smp_processor_id(). * the stack NMI-atomically, it's safe to use smp_processor_id().
*/ */
int sum, cpu = smp_processor_id(); int sum, cpu = smp_processor_id();
int irq = NMIIRQ;
u8 wdt, tmp; u8 wdt, tmp;
wdt = WDCTR & ~WDCTR_WDCNE; wdt = WDCTR & ~WDCTR_WDCNE;
@ -138,7 +139,7 @@ void watchdog_interrupt(struct pt_regs *regs, enum exception_code excep)
NMICR = NMICR_WDIF; NMICR = NMICR_WDIF;
nmi_count(cpu)++; nmi_count(cpu)++;
kstat_this_cpu.irqs[NMIIRQ]++; kstat_incr_irqs_this_cpu(irq, irq_to_desc(irq));
sum = irq_stat[cpu].__irq_count; sum = irq_stat[cpu].__irq_count;
if (last_irq_sums[cpu] == sum) { if (last_irq_sums[cpu] == sum) {

Просмотреть файл

@ -120,7 +120,7 @@ int cpu_check_affinity(unsigned int irq, cpumask_t *dest)
if (CHECK_IRQ_PER_CPU(irq)) { if (CHECK_IRQ_PER_CPU(irq)) {
/* Bad linux design decision. The mask has already /* Bad linux design decision. The mask has already
* been set; we must reset it */ * been set; we must reset it */
irq_desc[irq].affinity = CPU_MASK_ALL; cpumask_setall(irq_desc[irq].affinity);
return -EINVAL; return -EINVAL;
} }
@ -136,7 +136,7 @@ static void cpu_set_affinity_irq(unsigned int irq, const struct cpumask *dest)
if (cpu_check_affinity(irq, dest)) if (cpu_check_affinity(irq, dest))
return; return;
irq_desc[irq].affinity = *dest; cpumask_copy(irq_desc[irq].affinity, dest);
} }
#endif #endif
@ -295,7 +295,7 @@ int txn_alloc_irq(unsigned int bits_wide)
unsigned long txn_affinity_addr(unsigned int irq, int cpu) unsigned long txn_affinity_addr(unsigned int irq, int cpu)
{ {
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
irq_desc[irq].affinity = cpumask_of_cpu(cpu); cpumask_copy(irq_desc[irq].affinity, cpumask_of(cpu));
#endif #endif
return per_cpu(cpu_data, cpu).txn_addr; return per_cpu(cpu_data, cpu).txn_addr;
@ -352,7 +352,7 @@ void do_cpu_irq_mask(struct pt_regs *regs)
irq = eirr_to_irq(eirr_val); irq = eirr_to_irq(eirr_val);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
dest = irq_desc[irq].affinity; cpumask_copy(&dest, irq_desc[irq].affinity);
if (CHECK_IRQ_PER_CPU(irq_desc[irq].status) && if (CHECK_IRQ_PER_CPU(irq_desc[irq].status) &&
!cpu_isset(smp_processor_id(), dest)) { !cpu_isset(smp_processor_id(), dest)) {
int cpu = first_cpu(dest); int cpu = first_cpu(dest);

Просмотреть файл

@ -191,7 +191,8 @@
interrupts = <37 0x8 36 0x8 35 0x8>; interrupts = <37 0x8 36 0x8 35 0x8>;
interrupt-parent = <&ipic>; interrupt-parent = <&ipic>;
tbi-handle = < &tbi0 >; tbi-handle = < &tbi0 >;
phy-handle = < &phy1 >; /* Vitesse 7385 isn't on the MDIO bus */
fixed-link = <1 1 1000 0 0>;
fsl,magic-packet; fsl,magic-packet;
mdio@24520 { mdio@24520 {
@ -199,12 +200,6 @@
#size-cells = <0>; #size-cells = <0>;
compatible = "fsl,gianfar-mdio"; compatible = "fsl,gianfar-mdio";
reg = <0x24520 0x20>; reg = <0x24520 0x20>;
phy1: ethernet-phy@1 {
interrupt-parent = <&ipic>;
interrupts = <19 0x8>;
reg = <0x1>;
device_type = "ethernet-phy";
};
phy4: ethernet-phy@4 { phy4: ethernet-phy@4 {
interrupt-parent = <&ipic>; interrupt-parent = <&ipic>;
interrupts = <20 0x8>; interrupts = <20 0x8>;
@ -219,6 +214,8 @@
}; };
enet1: ethernet@25000 { enet1: ethernet@25000 {
#address-cells = <1>;
#size-cells = <1>;
cell-index = <1>; cell-index = <1>;
device_type = "network"; device_type = "network";
model = "eTSEC"; model = "eTSEC";

Просмотреть файл

@ -651,7 +651,7 @@ CONFIG_CICADA_PHY=y
# CONFIG_NATIONAL_PHY is not set # CONFIG_NATIONAL_PHY is not set
# CONFIG_STE10XP is not set # CONFIG_STE10XP is not set
# CONFIG_LSI_ET1011C_PHY is not set # CONFIG_LSI_ET1011C_PHY is not set
# CONFIG_FIXED_PHY is not set CONFIG_FIXED_PHY=y
# CONFIG_MDIO_BITBANG is not set # CONFIG_MDIO_BITBANG is not set
CONFIG_NET_ETHERNET=y CONFIG_NET_ETHERNET=y
CONFIG_MII=y CONFIG_MII=y

Просмотреть файл

@ -195,8 +195,9 @@ __ftrace_make_nop(struct module *mod,
return -EINVAL; return -EINVAL;
} }
offset = (unsigned)((unsigned short)jmp[0]) << 16 | /* The bottom half is signed extended */
(unsigned)((unsigned short)jmp[1]); offset = ((unsigned)((unsigned short)jmp[0]) << 16) +
(int)((short)jmp[1]);
DEBUGP(" %x ", offset); DEBUGP(" %x ", offset);

Просмотреть файл

@ -231,7 +231,7 @@ void fixup_irqs(cpumask_t map)
if (irq_desc[irq].status & IRQ_PER_CPU) if (irq_desc[irq].status & IRQ_PER_CPU)
continue; continue;
cpus_and(mask, irq_desc[irq].affinity, map); cpumask_and(&mask, irq_desc[irq].affinity, &map);
if (any_online_cpu(mask) == NR_CPUS) { if (any_online_cpu(mask) == NR_CPUS) {
printk("Breaking affinity for irq %i\n", irq); printk("Breaking affinity for irq %i\n", irq);
mask = map; mask = map;

Просмотреть файл

@ -561,8 +561,21 @@ int pci_mmap_legacy_page_range(struct pci_bus *bus,
(unsigned long long)(offset + size - 1)); (unsigned long long)(offset + size - 1));
if (mmap_state == pci_mmap_mem) { if (mmap_state == pci_mmap_mem) {
if ((offset + size) > hose->isa_mem_size) /* Hack alert !
return -ENXIO; *
* Because X is lame and can fail starting if it gets an error trying
* to mmap legacy_mem (instead of just moving on without legacy memory
* access) we fake it here by giving it anonymous memory, effectively
* behaving just like /dev/zero
*/
if ((offset + size) > hose->isa_mem_size) {
printk(KERN_DEBUG
"Process %s (pid:%d) mapped non-existing PCI legacy memory for 0%04x:%02x\n",
current->comm, current->pid, pci_domain_nr(bus), bus->number);
if (vma->vm_flags & VM_SHARED)
return shmem_zero_setup(vma);
return 0;
}
offset += hose->isa_mem_phys; offset += hose->isa_mem_phys;
} else { } else {
unsigned long io_offset = (unsigned long)hose->io_base_virt - _IO_BASE; unsigned long io_offset = (unsigned long)hose->io_base_virt - _IO_BASE;

Просмотреть файл

@ -184,6 +184,7 @@ SECTIONS
. = ALIGN(PAGE_SIZE); . = ALIGN(PAGE_SIZE);
.data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) {
__per_cpu_start = .; __per_cpu_start = .;
*(.data.percpu.page_aligned)
*(.data.percpu) *(.data.percpu)
*(.data.percpu.shared_aligned) *(.data.percpu.shared_aligned)
__per_cpu_end = .; __per_cpu_end = .;

Просмотреть файл

@ -172,6 +172,8 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr)
} }
break; break;
case 0x378: /* orx */ case 0x378: /* orx */
if (instr & 1)
break;
rs = (instr >> 21) & 0x1f; rs = (instr >> 21) & 0x1f;
rb = (instr >> 11) & 0x1f; rb = (instr >> 11) & 0x1f;
if (rs == rb) { /* mr */ if (rs == rb) { /* mr */

Просмотреть файл

@ -73,7 +73,7 @@ extern unsigned int tlbcam_index;
/* /*
* Return PA for this VA if it is mapped by a CAM, or 0 * Return PA for this VA if it is mapped by a CAM, or 0
*/ */
unsigned long v_mapped_by_tlbcam(unsigned long va) phys_addr_t v_mapped_by_tlbcam(unsigned long va)
{ {
int b; int b;
for (b = 0; b < tlbcam_index; ++b) for (b = 0; b < tlbcam_index; ++b)
@ -85,7 +85,7 @@ unsigned long v_mapped_by_tlbcam(unsigned long va)
/* /*
* Return VA for a given PA or 0 if not mapped * Return VA for a given PA or 0 if not mapped
*/ */
unsigned long p_mapped_by_tlbcam(unsigned long pa) unsigned long p_mapped_by_tlbcam(phys_addr_t pa)
{ {
int b; int b;
for (b = 0; b < tlbcam_index; ++b) for (b = 0; b < tlbcam_index; ++b)

Просмотреть файл

@ -320,7 +320,7 @@ _GLOBAL(create_hpte)
and r8,r8,r0 /* writable if _RW & _DIRTY */ and r8,r8,r0 /* writable if _RW & _DIRTY */
rlwimi r5,r5,32-1,30,30 /* _PAGE_USER -> PP msb */ rlwimi r5,r5,32-1,30,30 /* _PAGE_USER -> PP msb */
rlwimi r5,r5,32-2,31,31 /* _PAGE_USER -> PP lsb */ rlwimi r5,r5,32-2,31,31 /* _PAGE_USER -> PP lsb */
ori r8,r8,0xe14 /* clear out reserved bits and M */ ori r8,r8,0xe04 /* clear out reserved bits */
andc r8,r5,r8 /* PP = user? (rw&dirty? 2: 3): 0 */ andc r8,r5,r8 /* PP = user? (rw&dirty? 2: 3): 0 */
BEGIN_FTR_SECTION BEGIN_FTR_SECTION
rlwinm r8,r8,0,~_PAGE_COHERENT /* clear M (coherence not required) */ rlwinm r8,r8,0,~_PAGE_COHERENT /* clear M (coherence not required) */

Просмотреть файл

@ -61,8 +61,8 @@ void setbat(int index, unsigned long virt, phys_addr_t phys,
#ifdef HAVE_TLBCAM #ifdef HAVE_TLBCAM
extern unsigned int tlbcam_index; extern unsigned int tlbcam_index;
extern unsigned long v_mapped_by_tlbcam(unsigned long va); extern phys_addr_t v_mapped_by_tlbcam(unsigned long va);
extern unsigned long p_mapped_by_tlbcam(unsigned long pa); extern unsigned long p_mapped_by_tlbcam(phys_addr_t pa);
#else /* !HAVE_TLBCAM */ #else /* !HAVE_TLBCAM */
#define v_mapped_by_tlbcam(x) (0UL) #define v_mapped_by_tlbcam(x) (0UL)
#define p_mapped_by_tlbcam(x) (0UL) #define p_mapped_by_tlbcam(x) (0UL)

Просмотреть файл

@ -16,6 +16,7 @@
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <asm/cell-pmu.h> #include <asm/cell-pmu.h>
#include <asm/time.h>
#include "pr_util.h" #include "pr_util.h"
#define SCALE_SHIFT 14 #define SCALE_SHIFT 14

Просмотреть файл

@ -186,7 +186,7 @@ out_unmap_regs:
iounmap(priv->regs); iounmap(priv->regs);
out_free_bootmem: out_free_bootmem:
free_bootmem((unsigned long)priv, free_bootmem((unsigned long)priv,
sizeof(sizeof(struct pq2ads_pci_pic))); sizeof(struct pq2ads_pci_pic));
of_node_put(np); of_node_put(np);
out_unmap_irq: out_unmap_irq:
irq_dispose_mapping(irq); irq_dispose_mapping(irq);

Просмотреть файл

@ -14,6 +14,7 @@
#include <asm/firmware.h> #include <asm/firmware.h>
#include <asm/machdep.h> #include <asm/machdep.h>
#include <asm/pSeries_reconfig.h> #include <asm/pSeries_reconfig.h>
#include <asm/sparsemem.h>
static int pseries_remove_lmb(unsigned long base, unsigned int lmb_size) static int pseries_remove_lmb(unsigned long base, unsigned int lmb_size)
{ {

Просмотреть файл

@ -153,9 +153,10 @@ static int get_irq_server(unsigned int virq, unsigned int strict_check)
{ {
int server; int server;
/* For the moment only implement delivery to all cpus or one cpu */ /* For the moment only implement delivery to all cpus or one cpu */
cpumask_t cpumask = irq_desc[virq].affinity; cpumask_t cpumask;
cpumask_t tmp = CPU_MASK_NONE; cpumask_t tmp = CPU_MASK_NONE;
cpumask_copy(&cpumask, irq_desc[virq].affinity);
if (!distribute_irqs) if (!distribute_irqs)
return default_server; return default_server;
@ -869,7 +870,7 @@ void xics_migrate_irqs_away(void)
virq, cpu); virq, cpu);
/* Reset affinity to all cpus */ /* Reset affinity to all cpus */
irq_desc[virq].affinity = CPU_MASK_ALL; cpumask_setall(irq_desc[virq].affinity);
desc->chip->set_affinity(virq, cpu_all_mask); desc->chip->set_affinity(virq, cpu_all_mask);
unlock: unlock:
spin_unlock_irqrestore(&desc->lock, flags); spin_unlock_irqrestore(&desc->lock, flags);

Просмотреть файл

@ -165,7 +165,7 @@ static int cpm2_set_irq_type(unsigned int virq, unsigned int flow_type)
edibit = (14 - (src - CPM2_IRQ_EXT1)); edibit = (14 - (src - CPM2_IRQ_EXT1));
else else
if (src >= CPM2_IRQ_PORTC15 && src <= CPM2_IRQ_PORTC0) if (src >= CPM2_IRQ_PORTC15 && src <= CPM2_IRQ_PORTC0)
edibit = (31 - (src - CPM2_IRQ_PORTC15)); edibit = (31 - (CPM2_IRQ_PORTC0 - src));
else else
return (flow_type & IRQ_TYPE_LEVEL_LOW) ? 0 : -EINVAL; return (flow_type & IRQ_TYPE_LEVEL_LOW) ? 0 : -EINVAL;

Просмотреть файл

@ -890,7 +890,7 @@ unsigned int ipic_get_irq(void)
return irq_linear_revmap(primary_ipic->irqhost, irq); return irq_linear_revmap(primary_ipic->irqhost, irq);
} }
#ifdef CONFIG_PM #ifdef CONFIG_SUSPEND
static struct { static struct {
u32 sicfr; u32 sicfr;
u32 siprr[2]; u32 siprr[2];

Просмотреть файл

@ -566,9 +566,10 @@ static void __init mpic_scan_ht_pics(struct mpic *mpic)
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
static int irq_choose_cpu(unsigned int virt_irq) static int irq_choose_cpu(unsigned int virt_irq)
{ {
cpumask_t mask = irq_desc[virt_irq].affinity; cpumask_t mask;
int cpuid; int cpuid;
cpumask_copy(&mask, irq_desc[virt_irq].affinity);
if (cpus_equal(mask, CPU_MASK_ALL)) { if (cpus_equal(mask, CPU_MASK_ALL)) {
static int irq_rover; static int irq_rover;
static DEFINE_SPINLOCK(irq_rover_lock); static DEFINE_SPINLOCK(irq_rover_lock);

Просмотреть файл

@ -1,7 +1,7 @@
# #
# Automatically generated make config: don't edit # Automatically generated make config: don't edit
# Linux kernel version: 2.6.28-rc6 # Linux kernel version: 2.6.29-rc4
# Thu Nov 27 11:00:49 2008 # Wed Feb 11 10:07:16 2009
# #
CONFIG_SCHED_MC=y CONFIG_SCHED_MC=y
CONFIG_MMU=y CONFIG_MMU=y
@ -14,12 +14,14 @@ CONFIG_RWSEM_XCHGADD_ALGORITHM=y
# CONFIG_ARCH_HAS_ILOG2_U64 is not set # CONFIG_ARCH_HAS_ILOG2_U64 is not set
CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_HWEIGHT=y
CONFIG_GENERIC_TIME=y CONFIG_GENERIC_TIME=y
CONFIG_GENERIC_TIME_VSYSCALL=y
CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_BUG=y CONFIG_GENERIC_BUG=y
CONFIG_NO_IOMEM=y CONFIG_NO_IOMEM=y
CONFIG_NO_DMA=y CONFIG_NO_DMA=y
CONFIG_GENERIC_LOCKBREAK=y CONFIG_GENERIC_LOCKBREAK=y
CONFIG_PGSTE=y CONFIG_PGSTE=y
CONFIG_VIRT_CPU_ACCOUNTING=y
CONFIG_S390=y CONFIG_S390=y
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@ -39,20 +41,29 @@ CONFIG_POSIX_MQUEUE=y
# CONFIG_TASKSTATS is not set # CONFIG_TASKSTATS is not set
CONFIG_AUDIT=y CONFIG_AUDIT=y
# CONFIG_AUDITSYSCALL is not set # CONFIG_AUDITSYSCALL is not set
#
# RCU Subsystem
#
CONFIG_CLASSIC_RCU=y
# CONFIG_TREE_RCU is not set
# CONFIG_PREEMPT_RCU is not set
# CONFIG_TREE_RCU_TRACE is not set
# CONFIG_PREEMPT_RCU_TRACE is not set
CONFIG_IKCONFIG=y CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=17 CONFIG_LOG_BUF_SHIFT=17
CONFIG_GROUP_SCHED=y
CONFIG_FAIR_GROUP_SCHED=y
# CONFIG_RT_GROUP_SCHED is not set
CONFIG_USER_SCHED=y
# CONFIG_CGROUP_SCHED is not set
CONFIG_CGROUPS=y CONFIG_CGROUPS=y
# CONFIG_CGROUP_DEBUG is not set # CONFIG_CGROUP_DEBUG is not set
CONFIG_CGROUP_NS=y CONFIG_CGROUP_NS=y
# CONFIG_CGROUP_FREEZER is not set # CONFIG_CGROUP_FREEZER is not set
# CONFIG_CGROUP_DEVICE is not set # CONFIG_CGROUP_DEVICE is not set
# CONFIG_CPUSETS is not set # CONFIG_CPUSETS is not set
CONFIG_GROUP_SCHED=y
CONFIG_FAIR_GROUP_SCHED=y
# CONFIG_RT_GROUP_SCHED is not set
CONFIG_USER_SCHED=y
# CONFIG_CGROUP_SCHED is not set
# CONFIG_CGROUP_CPUACCT is not set # CONFIG_CGROUP_CPUACCT is not set
# CONFIG_RESOURCE_COUNTERS is not set # CONFIG_RESOURCE_COUNTERS is not set
CONFIG_SYSFS_DEPRECATED=y CONFIG_SYSFS_DEPRECATED=y
@ -63,6 +74,7 @@ CONFIG_UTS_NS=y
CONFIG_IPC_NS=y CONFIG_IPC_NS=y
# CONFIG_USER_NS is not set # CONFIG_USER_NS is not set
# CONFIG_PID_NS is not set # CONFIG_PID_NS is not set
# CONFIG_NET_NS is not set
CONFIG_BLK_DEV_INITRD=y CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE="" CONFIG_INITRAMFS_SOURCE=""
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
@ -91,17 +103,17 @@ CONFIG_SLAB=y
# CONFIG_SLUB is not set # CONFIG_SLUB is not set
# CONFIG_SLOB is not set # CONFIG_SLOB is not set
# CONFIG_PROFILING is not set # CONFIG_PROFILING is not set
# CONFIG_MARKERS is not set
CONFIG_HAVE_OPROFILE=y CONFIG_HAVE_OPROFILE=y
CONFIG_KPROBES=y CONFIG_KPROBES=y
CONFIG_HAVE_SYSCALL_WRAPPERS=y
CONFIG_KRETPROBES=y CONFIG_KRETPROBES=y
CONFIG_HAVE_KPROBES=y CONFIG_HAVE_KPROBES=y
CONFIG_HAVE_KRETPROBES=y CONFIG_HAVE_KRETPROBES=y
CONFIG_HAVE_ARCH_TRACEHOOK=y CONFIG_HAVE_ARCH_TRACEHOOK=y
CONFIG_USE_GENERIC_SMP_HELPERS=y
# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
CONFIG_SLABINFO=y CONFIG_SLABINFO=y
CONFIG_RT_MUTEXES=y CONFIG_RT_MUTEXES=y
# CONFIG_TINY_SHMEM is not set
CONFIG_BASE_SMALL=0 CONFIG_BASE_SMALL=0
CONFIG_MODULES=y CONFIG_MODULES=y
# CONFIG_MODULE_FORCE_LOAD is not set # CONFIG_MODULE_FORCE_LOAD is not set
@ -109,7 +121,7 @@ CONFIG_MODULE_UNLOAD=y
# CONFIG_MODULE_FORCE_UNLOAD is not set # CONFIG_MODULE_FORCE_UNLOAD is not set
CONFIG_MODVERSIONS=y CONFIG_MODVERSIONS=y
# CONFIG_MODULE_SRCVERSION_ALL is not set # CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_KMOD=y CONFIG_INIT_ALL_POSSIBLE=y
CONFIG_STOP_MACHINE=y CONFIG_STOP_MACHINE=y
CONFIG_BLOCK=y CONFIG_BLOCK=y
# CONFIG_BLK_DEV_IO_TRACE is not set # CONFIG_BLK_DEV_IO_TRACE is not set
@ -130,7 +142,6 @@ CONFIG_DEFAULT_DEADLINE=y
# CONFIG_DEFAULT_NOOP is not set # CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="deadline" CONFIG_DEFAULT_IOSCHED="deadline"
CONFIG_PREEMPT_NOTIFIERS=y CONFIG_PREEMPT_NOTIFIERS=y
CONFIG_CLASSIC_RCU=y
# CONFIG_FREEZER is not set # CONFIG_FREEZER is not set
# #
@ -161,6 +172,7 @@ CONFIG_S390_EXEC_PROTECT=y
CONFIG_MARCH_Z900=y CONFIG_MARCH_Z900=y
# CONFIG_MARCH_Z990 is not set # CONFIG_MARCH_Z990 is not set
# CONFIG_MARCH_Z9_109 is not set # CONFIG_MARCH_Z9_109 is not set
# CONFIG_MARCH_Z10 is not set
CONFIG_PACK_STACK=y CONFIG_PACK_STACK=y
# CONFIG_SMALL_STACK is not set # CONFIG_SMALL_STACK is not set
CONFIG_CHECK_STACK=y CONFIG_CHECK_STACK=y
@ -174,7 +186,6 @@ CONFIG_ARCH_POPULATES_NODE_MAP=y
# CONFIG_PREEMPT_NONE is not set # CONFIG_PREEMPT_NONE is not set
# CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT_VOLUNTARY is not set
CONFIG_PREEMPT=y CONFIG_PREEMPT=y
# CONFIG_PREEMPT_RCU is not set
CONFIG_ARCH_SPARSEMEM_ENABLE=y CONFIG_ARCH_SPARSEMEM_ENABLE=y
CONFIG_ARCH_SPARSEMEM_DEFAULT=y CONFIG_ARCH_SPARSEMEM_DEFAULT=y
CONFIG_ARCH_SELECT_MEMORY_MODEL=y CONFIG_ARCH_SELECT_MEMORY_MODEL=y
@ -195,7 +206,6 @@ CONFIG_MEMORY_HOTREMOVE=y
CONFIG_PAGEFLAGS_EXTENDED=y CONFIG_PAGEFLAGS_EXTENDED=y
CONFIG_SPLIT_PTLOCK_CPUS=4 CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_MIGRATION=y CONFIG_MIGRATION=y
CONFIG_RESOURCES_64BIT=y
CONFIG_PHYS_ADDR_T_64BIT=y CONFIG_PHYS_ADDR_T_64BIT=y
CONFIG_ZONE_DMA_FLAG=1 CONFIG_ZONE_DMA_FLAG=1
CONFIG_BOUNCE=y CONFIG_BOUNCE=y
@ -207,7 +217,6 @@ CONFIG_UNEVICTABLE_LRU=y
# #
CONFIG_MACHCHK_WARNING=y CONFIG_MACHCHK_WARNING=y
CONFIG_QDIO=y CONFIG_QDIO=y
# CONFIG_QDIO_DEBUG is not set
CONFIG_CHSC_SCH=m CONFIG_CHSC_SCH=m
# #
@ -227,15 +236,13 @@ CONFIG_PFAULT=y
# CONFIG_SHARED_KERNEL is not set # CONFIG_SHARED_KERNEL is not set
# CONFIG_CMM is not set # CONFIG_CMM is not set
# CONFIG_PAGE_STATES is not set # CONFIG_PAGE_STATES is not set
CONFIG_VIRT_TIMER=y
CONFIG_VIRT_CPU_ACCOUNTING=y
# CONFIG_APPLDATA_BASE is not set # CONFIG_APPLDATA_BASE is not set
CONFIG_HZ_100=y CONFIG_HZ_100=y
# CONFIG_HZ_250 is not set # CONFIG_HZ_250 is not set
# CONFIG_HZ_300 is not set # CONFIG_HZ_300 is not set
# CONFIG_HZ_1000 is not set # CONFIG_HZ_1000 is not set
CONFIG_HZ=100 CONFIG_HZ=100
# CONFIG_SCHED_HRTICK is not set CONFIG_SCHED_HRTICK=y
CONFIG_S390_HYPFS_FS=y CONFIG_S390_HYPFS_FS=y
CONFIG_KEXEC=y CONFIG_KEXEC=y
# CONFIG_ZFCPDUMP is not set # CONFIG_ZFCPDUMP is not set
@ -245,6 +252,7 @@ CONFIG_NET=y
# #
# Networking options # Networking options
# #
CONFIG_COMPAT_NET_DEV_OPS=y
CONFIG_PACKET=y CONFIG_PACKET=y
# CONFIG_PACKET_MMAP is not set # CONFIG_PACKET_MMAP is not set
CONFIG_UNIX=y CONFIG_UNIX=y
@ -383,6 +391,7 @@ CONFIG_NET_SCH_TBF=m
CONFIG_NET_SCH_GRED=m CONFIG_NET_SCH_GRED=m
CONFIG_NET_SCH_DSMARK=m CONFIG_NET_SCH_DSMARK=m
# CONFIG_NET_SCH_NETEM is not set # CONFIG_NET_SCH_NETEM is not set
# CONFIG_NET_SCH_DRR is not set
# CONFIG_NET_SCH_INGRESS is not set # CONFIG_NET_SCH_INGRESS is not set
# #
@ -400,6 +409,7 @@ CONFIG_CLS_U32_MARK=y
CONFIG_NET_CLS_RSVP=m CONFIG_NET_CLS_RSVP=m
CONFIG_NET_CLS_RSVP6=m CONFIG_NET_CLS_RSVP6=m
CONFIG_NET_CLS_FLOW=m CONFIG_NET_CLS_FLOW=m
# CONFIG_NET_CLS_CGROUP is not set
# CONFIG_NET_EMATCH is not set # CONFIG_NET_EMATCH is not set
CONFIG_NET_CLS_ACT=y CONFIG_NET_CLS_ACT=y
CONFIG_NET_ACT_POLICE=y CONFIG_NET_ACT_POLICE=y
@ -411,6 +421,7 @@ CONFIG_NET_ACT_NAT=m
# CONFIG_NET_ACT_SKBEDIT is not set # CONFIG_NET_ACT_SKBEDIT is not set
# CONFIG_NET_CLS_IND is not set # CONFIG_NET_CLS_IND is not set
CONFIG_NET_SCH_FIFO=y CONFIG_NET_SCH_FIFO=y
# CONFIG_DCB is not set
# #
# Network testing # Network testing
@ -428,6 +439,7 @@ CONFIG_CAN_VCAN=m
# CONFIG_CAN_DEBUG_DEVICES is not set # CONFIG_CAN_DEBUG_DEVICES is not set
# CONFIG_AF_RXRPC is not set # CONFIG_AF_RXRPC is not set
# CONFIG_PHONET is not set # CONFIG_PHONET is not set
# CONFIG_WIMAX is not set
# CONFIG_RFKILL is not set # CONFIG_RFKILL is not set
# CONFIG_NET_9P is not set # CONFIG_NET_9P is not set
# CONFIG_PCMCIA is not set # CONFIG_PCMCIA is not set
@ -475,10 +487,14 @@ CONFIG_DASD_DIAG=y
CONFIG_DASD_EER=y CONFIG_DASD_EER=y
CONFIG_VIRTIO_BLK=m CONFIG_VIRTIO_BLK=m
CONFIG_MISC_DEVICES=y CONFIG_MISC_DEVICES=y
# CONFIG_EEPROM_93CX6 is not set
# CONFIG_ENCLOSURE_SERVICES is not set # CONFIG_ENCLOSURE_SERVICES is not set
# CONFIG_C2PORT is not set # CONFIG_C2PORT is not set
#
# EEPROM support
#
# CONFIG_EEPROM_93CX6 is not set
# #
# SCSI device support # SCSI device support
# #
@ -520,6 +536,7 @@ CONFIG_SCSI_FC_ATTRS=y
# CONFIG_SCSI_SRP_ATTRS is not set # CONFIG_SCSI_SRP_ATTRS is not set
CONFIG_SCSI_LOWLEVEL=y CONFIG_SCSI_LOWLEVEL=y
# CONFIG_ISCSI_TCP is not set # CONFIG_ISCSI_TCP is not set
# CONFIG_LIBFC is not set
# CONFIG_SCSI_DEBUG is not set # CONFIG_SCSI_DEBUG is not set
CONFIG_ZFCP=y CONFIG_ZFCP=y
CONFIG_SCSI_DH=m CONFIG_SCSI_DH=m
@ -566,6 +583,10 @@ CONFIG_NET_ETHERNET=y
CONFIG_NETDEV_1000=y CONFIG_NETDEV_1000=y
CONFIG_NETDEV_10000=y CONFIG_NETDEV_10000=y
# CONFIG_TR is not set # CONFIG_TR is not set
#
# Enable WiMAX (Networking options) to see the WiMAX drivers
#
# CONFIG_WAN is not set # CONFIG_WAN is not set
# #
@ -593,9 +614,11 @@ CONFIG_VIRTIO_NET=m
# #
CONFIG_DEVKMEM=y CONFIG_DEVKMEM=y
CONFIG_UNIX98_PTYS=y CONFIG_UNIX98_PTYS=y
# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=256 CONFIG_LEGACY_PTY_COUNT=256
CONFIG_HVC_DRIVER=y CONFIG_HVC_DRIVER=y
CONFIG_HVC_IUCV=y
CONFIG_VIRTIO_CONSOLE=y CONFIG_VIRTIO_CONSOLE=y
CONFIG_HW_RANDOM=m CONFIG_HW_RANDOM=m
CONFIG_HW_RANDOM_VIRTIO=m CONFIG_HW_RANDOM_VIRTIO=m
@ -645,7 +668,6 @@ CONFIG_S390_VMUR=m
# CONFIG_NEW_LEDS is not set # CONFIG_NEW_LEDS is not set
CONFIG_ACCESSIBILITY=y CONFIG_ACCESSIBILITY=y
# CONFIG_STAGING is not set # CONFIG_STAGING is not set
CONFIG_STAGING_EXCLUDE_BUILD=y
# #
# File systems # File systems
@ -668,6 +690,7 @@ CONFIG_FILE_LOCKING=y
# CONFIG_XFS_FS is not set # CONFIG_XFS_FS is not set
# CONFIG_GFS2_FS is not set # CONFIG_GFS2_FS is not set
# CONFIG_OCFS2_FS is not set # CONFIG_OCFS2_FS is not set
# CONFIG_BTRFS_FS is not set
CONFIG_DNOTIFY=y CONFIG_DNOTIFY=y
CONFIG_INOTIFY=y CONFIG_INOTIFY=y
CONFIG_INOTIFY_USER=y CONFIG_INOTIFY_USER=y
@ -703,10 +726,7 @@ CONFIG_TMPFS_POSIX_ACL=y
# CONFIG_HUGETLBFS is not set # CONFIG_HUGETLBFS is not set
# CONFIG_HUGETLB_PAGE is not set # CONFIG_HUGETLB_PAGE is not set
CONFIG_CONFIGFS_FS=m CONFIG_CONFIGFS_FS=m
CONFIG_MISC_FILESYSTEMS=y
#
# Miscellaneous filesystems
#
# CONFIG_ADFS_FS is not set # CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set # CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set # CONFIG_HFS_FS is not set
@ -715,6 +735,7 @@ CONFIG_CONFIGFS_FS=m
# CONFIG_BFS_FS is not set # CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not set # CONFIG_EFS_FS is not set
# CONFIG_CRAMFS is not set # CONFIG_CRAMFS is not set
# CONFIG_SQUASHFS is not set
# CONFIG_VXFS_FS is not set # CONFIG_VXFS_FS is not set
# CONFIG_MINIX_FS is not set # CONFIG_MINIX_FS is not set
# CONFIG_OMFS_FS is not set # CONFIG_OMFS_FS is not set
@ -808,6 +829,7 @@ CONFIG_DEBUG_BUGVERBOSE=y
CONFIG_DEBUG_MEMORY_INIT=y CONFIG_DEBUG_MEMORY_INIT=y
# CONFIG_DEBUG_LIST is not set # CONFIG_DEBUG_LIST is not set
# CONFIG_DEBUG_SG is not set # CONFIG_DEBUG_SG is not set
# CONFIG_DEBUG_NOTIFIERS is not set
# CONFIG_FRAME_POINTER is not set # CONFIG_FRAME_POINTER is not set
# CONFIG_RCU_TORTURE_TEST is not set # CONFIG_RCU_TORTURE_TEST is not set
# CONFIG_RCU_CPU_STALL_DETECTOR is not set # CONFIG_RCU_CPU_STALL_DETECTOR is not set
@ -818,15 +840,19 @@ CONFIG_DEBUG_MEMORY_INIT=y
# CONFIG_FAULT_INJECTION is not set # CONFIG_FAULT_INJECTION is not set
# CONFIG_LATENCYTOP is not set # CONFIG_LATENCYTOP is not set
CONFIG_SYSCTL_SYSCALL_CHECK=y CONFIG_SYSCTL_SYSCALL_CHECK=y
CONFIG_HAVE_FUNCTION_TRACER=y
# #
# Tracers # Tracers
# #
# CONFIG_FUNCTION_TRACER is not set
# CONFIG_IRQSOFF_TRACER is not set # CONFIG_IRQSOFF_TRACER is not set
# CONFIG_PREEMPT_TRACER is not set # CONFIG_PREEMPT_TRACER is not set
# CONFIG_SCHED_TRACER is not set # CONFIG_SCHED_TRACER is not set
# CONFIG_CONTEXT_SWITCH_TRACER is not set # CONFIG_CONTEXT_SWITCH_TRACER is not set
# CONFIG_BOOT_TRACER is not set # CONFIG_BOOT_TRACER is not set
# CONFIG_TRACE_BRANCH_PROFILING is not set
# CONFIG_STACK_TRACER is not set
# CONFIG_DYNAMIC_PRINTK_DEBUG is not set # CONFIG_DYNAMIC_PRINTK_DEBUG is not set
CONFIG_SAMPLES=y CONFIG_SAMPLES=y
# CONFIG_SAMPLE_KOBJECT is not set # CONFIG_SAMPLE_KOBJECT is not set
@ -847,11 +873,17 @@ CONFIG_CRYPTO=y
# #
CONFIG_CRYPTO_FIPS=y CONFIG_CRYPTO_FIPS=y
CONFIG_CRYPTO_ALGAPI=y CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_AEAD=y CONFIG_CRYPTO_ALGAPI2=y
CONFIG_CRYPTO_AEAD=m
CONFIG_CRYPTO_AEAD2=y
CONFIG_CRYPTO_BLKCIPHER=y CONFIG_CRYPTO_BLKCIPHER=y
CONFIG_CRYPTO_HASH=y CONFIG_CRYPTO_BLKCIPHER2=y
CONFIG_CRYPTO_RNG=y CONFIG_CRYPTO_HASH=m
CONFIG_CRYPTO_HASH2=y
CONFIG_CRYPTO_RNG=m
CONFIG_CRYPTO_RNG2=y
CONFIG_CRYPTO_MANAGER=y CONFIG_CRYPTO_MANAGER=y
CONFIG_CRYPTO_MANAGER2=y
CONFIG_CRYPTO_GF128MUL=m CONFIG_CRYPTO_GF128MUL=m
# CONFIG_CRYPTO_NULL is not set # CONFIG_CRYPTO_NULL is not set
# CONFIG_CRYPTO_CRYPTD is not set # CONFIG_CRYPTO_CRYPTD is not set
@ -885,7 +917,7 @@ CONFIG_CRYPTO_HMAC=m
# #
# Digest # Digest
# #
# CONFIG_CRYPTO_CRC32C is not set CONFIG_CRYPTO_CRC32C=m
# CONFIG_CRYPTO_MD4 is not set # CONFIG_CRYPTO_MD4 is not set
CONFIG_CRYPTO_MD5=m CONFIG_CRYPTO_MD5=m
# CONFIG_CRYPTO_MICHAEL_MIC is not set # CONFIG_CRYPTO_MICHAEL_MIC is not set
@ -942,6 +974,7 @@ CONFIG_S390_PRNG=m
# Library routines # Library routines
# #
CONFIG_BITREVERSE=m CONFIG_BITREVERSE=m
CONFIG_GENERIC_FIND_LAST_BIT=y
# CONFIG_CRC_CCITT is not set # CONFIG_CRC_CCITT is not set
# CONFIG_CRC16 is not set # CONFIG_CRC16 is not set
CONFIG_CRC_T10DIF=y CONFIG_CRC_T10DIF=y

Просмотреть файл

@ -384,8 +384,8 @@ struct _lowcore
__u32 panic_magic; /* 0xe00 */ __u32 panic_magic; /* 0xe00 */
/* Per cpu primary space access list */ /* Per cpu primary space access list */
__u8 pad_0xe04[0xe3c-0xe04]; /* 0xe04 */ __u8 pad_0xe04[0xe38-0xe04]; /* 0xe04 */
__u32 vdso_per_cpu_data; /* 0xe3c */ __u64 vdso_per_cpu_data; /* 0xe38 */
__u32 paste[16]; /* 0xe40 */ __u32 paste[16]; /* 0xe40 */
__u8 pad13[0x11b8-0xe80]; /* 0xe80 */ __u8 pad13[0x11b8-0xe80]; /* 0xe80 */

Просмотреть файл

@ -95,6 +95,7 @@ asmlinkage void do_softirq(void)
local_irq_restore(flags); local_irq_restore(flags);
} }
#ifdef CONFIG_PROC_FS
void init_irq_proc(void) void init_irq_proc(void)
{ {
struct proc_dir_entry *root_irq_dir; struct proc_dir_entry *root_irq_dir;
@ -102,3 +103,4 @@ void init_irq_proc(void)
root_irq_dir = proc_mkdir("irq", NULL); root_irq_dir = proc_mkdir("irq", NULL);
create_prof_cpu_mask(root_irq_dir); create_prof_cpu_mask(root_irq_dir);
} }
#endif

Просмотреть файл

@ -891,10 +891,35 @@ prom_tba: .xword 0
tlb_type: .word 0 /* Must NOT end up in BSS */ tlb_type: .word 0 /* Must NOT end up in BSS */
.section ".fixup",#alloc,#execinstr .section ".fixup",#alloc,#execinstr
.globl __ret_efault, __retl_efault .globl __ret_efault, __retl_efault, __ret_one, __retl_one
__ret_efault: ENTRY(__ret_efault)
ret ret
restore %g0, -EFAULT, %o0 restore %g0, -EFAULT, %o0
__retl_efault: ENDPROC(__ret_efault)
ENTRY(__retl_efault)
retl retl
mov -EFAULT, %o0 mov -EFAULT, %o0
ENDPROC(__retl_efault)
ENTRY(__retl_one)
retl
mov 1, %o0
ENDPROC(__retl_one)
ENTRY(__ret_one_asi)
wr %g0, ASI_AIUS, %asi
ret
restore %g0, 1, %o0
ENDPROC(__ret_one_asi)
ENTRY(__retl_one_asi)
wr %g0, ASI_AIUS, %asi
retl
mov 1, %o0
ENDPROC(__retl_one_asi)
ENTRY(__retl_o1)
retl
mov %o1, %o0
ENDPROC(__retl_o1)

Просмотреть файл

@ -252,9 +252,10 @@ struct irq_handler_data {
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
static int irq_choose_cpu(unsigned int virt_irq) static int irq_choose_cpu(unsigned int virt_irq)
{ {
cpumask_t mask = irq_desc[virt_irq].affinity; cpumask_t mask;
int cpuid; int cpuid;
cpumask_copy(&mask, irq_desc[virt_irq].affinity);
if (cpus_equal(mask, CPU_MASK_ALL)) { if (cpus_equal(mask, CPU_MASK_ALL)) {
static int irq_rover; static int irq_rover;
static DEFINE_SPINLOCK(irq_rover_lock); static DEFINE_SPINLOCK(irq_rover_lock);
@ -796,7 +797,7 @@ void fixup_irqs(void)
!(irq_desc[irq].status & IRQ_PER_CPU)) { !(irq_desc[irq].status & IRQ_PER_CPU)) {
if (irq_desc[irq].chip->set_affinity) if (irq_desc[irq].chip->set_affinity)
irq_desc[irq].chip->set_affinity(irq, irq_desc[irq].chip->set_affinity(irq,
&irq_desc[irq].affinity); irq_desc[irq].affinity);
} }
spin_unlock_irqrestore(&irq_desc[irq].lock, flags); spin_unlock_irqrestore(&irq_desc[irq].lock, flags);
} }

Просмотреть файл

@ -70,6 +70,7 @@ static void die_nmi(const char *str, struct pt_regs *regs, int do_panic)
printk(" on CPU%d, ip %08lx, registers:\n", printk(" on CPU%d, ip %08lx, registers:\n",
smp_processor_id(), regs->tpc); smp_processor_id(), regs->tpc);
show_regs(regs); show_regs(regs);
dump_stack();
bust_spinlocks(0); bust_spinlocks(0);

Просмотреть файл

@ -133,11 +133,16 @@ int __init pcr_arch_init(void)
case cheetah: case cheetah:
case cheetah_plus: case cheetah_plus:
case spitfire:
pcr_ops = &direct_pcr_ops; pcr_ops = &direct_pcr_ops;
pcr_enable = PCR_SUN4U_ENABLE; pcr_enable = PCR_SUN4U_ENABLE;
break; break;
case spitfire:
/* UltraSPARC-I/II and derivatives lack a profile
* counter overflow interrupt so we can't make use of
* their hardware currently.
*/
/* fallthrough */
default: default:
err = -ENODEV; err = -ENODEV;
goto out_unregister; goto out_unregister;

Просмотреть файл

@ -729,7 +729,7 @@ void timer_interrupt(int irq, struct pt_regs *regs)
irq_enter(); irq_enter();
kstat_this_cpu.irqs[0]++; kstat_incr_irqs_this_cpu(0, irq_to_desc(0));
if (unlikely(!evt->event_handler)) { if (unlikely(!evt->event_handler)) {
printk(KERN_WARNING printk(KERN_WARNING

Просмотреть файл

@ -6,13 +6,9 @@
#define EX_ST(x,y) \ #define EX_ST(x,y) \
98: x,y; \ 98: x,y; \
.section .fixup; \
.align 4; \
99: retl; \
mov %o1, %o0; \
.section __ex_table,"a";\ .section __ex_table,"a";\
.align 4; \ .align 4; \
.word 98b, 99b; \ .word 98b, __retl_o1; \
.text; \ .text; \
.align 4; .align 4;

Просмотреть файл

@ -5,13 +5,9 @@
#define EX_LD(x) \ #define EX_LD(x) \
98: x; \ 98: x; \
.section .fixup; \
.align 4; \
99: retl; \
mov 1, %o0; \
.section __ex_table,"a";\ .section __ex_table,"a";\
.align 4; \ .align 4; \
.word 98b, 99b; \ .word 98b, __retl_one; \
.text; \ .text; \
.align 4; .align 4;
@ -27,7 +23,7 @@
#define PREAMBLE \ #define PREAMBLE \
rd %asi, %g1; \ rd %asi, %g1; \
cmp %g1, ASI_AIUS; \ cmp %g1, ASI_AIUS; \
bne,pn %icc, memcpy_user_stub; \ bne,pn %icc, ___copy_in_user; \
nop nop
#endif #endif

Просмотреть файл

@ -5,13 +5,9 @@
#define EX_ST(x) \ #define EX_ST(x) \
98: x; \ 98: x; \
.section .fixup; \
.align 4; \
99: retl; \
mov 1, %o0; \
.section __ex_table,"a";\ .section __ex_table,"a";\
.align 4; \ .align 4; \
.word 98b, 99b; \ .word 98b, __retl_one; \
.text; \ .text; \
.align 4; .align 4;
@ -31,7 +27,7 @@
#define PREAMBLE \ #define PREAMBLE \
rd %asi, %g1; \ rd %asi, %g1; \
cmp %g1, ASI_AIUS; \ cmp %g1, ASI_AIUS; \
bne,pn %icc, memcpy_user_stub; \ bne,pn %icc, ___copy_in_user; \
nop nop
#endif #endif

Просмотреть файл

@ -5,14 +5,9 @@
#define EX_LD(x) \ #define EX_LD(x) \
98: x; \ 98: x; \
.section .fixup; \
.align 4; \
99: wr %g0, ASI_AIUS, %asi;\
retl; \
mov 1, %o0; \
.section __ex_table,"a";\ .section __ex_table,"a";\
.align 4; \ .align 4; \
.word 98b, 99b; \ .word 98b, __retl_one_asi;\
.text; \ .text; \
.align 4; .align 4;
@ -33,7 +28,7 @@
#define PREAMBLE \ #define PREAMBLE \
rd %asi, %g1; \ rd %asi, %g1; \
cmp %g1, ASI_AIUS; \ cmp %g1, ASI_AIUS; \
bne,pn %icc, memcpy_user_stub; \ bne,pn %icc, ___copy_in_user; \
nop nop
#endif #endif

Просмотреть файл

@ -5,14 +5,9 @@
#define EX_ST(x) \ #define EX_ST(x) \
98: x; \ 98: x; \
.section .fixup; \
.align 4; \
99: wr %g0, ASI_AIUS, %asi;\
retl; \
mov 1, %o0; \
.section __ex_table,"a";\ .section __ex_table,"a";\
.align 4; \ .align 4; \
.word 98b, 99b; \ .word 98b, __retl_one_asi;\
.text; \ .text; \
.align 4; .align 4;
@ -42,7 +37,7 @@
#define PREAMBLE \ #define PREAMBLE \
rd %asi, %g1; \ rd %asi, %g1; \
cmp %g1, ASI_AIUS; \ cmp %g1, ASI_AIUS; \
bne,pn %icc, memcpy_user_stub; \ bne,pn %icc, ___copy_in_user; \
nop nop
#endif #endif

Просмотреть файл

@ -6,13 +6,9 @@
#define EX_ST(x,y) \ #define EX_ST(x,y) \
98: x,y; \ 98: x,y; \
.section .fixup; \
.align 4; \
99: retl; \
mov %o1, %o0; \
.section __ex_table,"a";\ .section __ex_table,"a";\
.align 4; \ .align 4; \
.word 98b, 99b; \ .word 98b, __retl_o1; \
.text; \ .text; \
.align 4; .align 4;

Просмотреть файл

@ -5,14 +5,9 @@
#define EX_LD(x) \ #define EX_LD(x) \
98: x; \ 98: x; \
.section .fixup; \
.align 4; \
99: wr %g0, ASI_AIUS, %asi;\
ret; \
restore %g0, 1, %o0; \
.section __ex_table,"a";\ .section __ex_table,"a";\
.align 4; \ .align 4; \
.word 98b, 99b; \ .word 98b, __ret_one_asi;\
.text; \ .text; \
.align 4; .align 4;
@ -30,7 +25,7 @@
#define PREAMBLE \ #define PREAMBLE \
rd %asi, %g1; \ rd %asi, %g1; \
cmp %g1, ASI_AIUS; \ cmp %g1, ASI_AIUS; \
bne,pn %icc, memcpy_user_stub; \ bne,pn %icc, ___copy_in_user; \
nop nop
#endif #endif

Просмотреть файл

@ -5,14 +5,9 @@
#define EX_ST(x) \ #define EX_ST(x) \
98: x; \ 98: x; \
.section .fixup; \
.align 4; \
99: wr %g0, ASI_AIUS, %asi;\
ret; \
restore %g0, 1, %o0; \
.section __ex_table,"a";\ .section __ex_table,"a";\
.align 4; \ .align 4; \
.word 98b, 99b; \ .word 98b, __ret_one_asi;\
.text; \ .text; \
.align 4; .align 4;
@ -33,7 +28,7 @@
#define PREAMBLE \ #define PREAMBLE \
rd %asi, %g1; \ rd %asi, %g1; \
cmp %g1, ASI_AIUS; \ cmp %g1, ASI_AIUS; \
bne,pn %icc, memcpy_user_stub; \ bne,pn %icc, ___copy_in_user; \
nop nop
#endif #endif

Просмотреть файл

@ -5,13 +5,9 @@
#define EX_LD(x) \ #define EX_LD(x) \
98: x; \ 98: x; \
.section .fixup; \
.align 4; \
99: retl; \
mov 1, %o0; \
.section __ex_table,"a";\ .section __ex_table,"a";\
.align 4; \ .align 4; \
.word 98b, 99b; \ .word 98b, __retl_one; \
.text; \ .text; \
.align 4; .align 4;
@ -27,7 +23,7 @@
#define PREAMBLE \ #define PREAMBLE \
rd %asi, %g1; \ rd %asi, %g1; \
cmp %g1, ASI_AIUS; \ cmp %g1, ASI_AIUS; \
bne,pn %icc, memcpy_user_stub; \ bne,pn %icc, ___copy_in_user; \
nop; \ nop; \
#include "U1memcpy.S" #include "U1memcpy.S"

Просмотреть файл

@ -5,13 +5,9 @@
#define EX_ST(x) \ #define EX_ST(x) \
98: x; \ 98: x; \
.section .fixup; \
.align 4; \
99: retl; \
mov 1, %o0; \
.section __ex_table,"a";\ .section __ex_table,"a";\
.align 4; \ .align 4; \
.word 98b, 99b; \ .word 98b, __retl_one; \
.text; \ .text; \
.align 4; .align 4;
@ -27,7 +23,7 @@
#define PREAMBLE \ #define PREAMBLE \
rd %asi, %g1; \ rd %asi, %g1; \
cmp %g1, ASI_AIUS; \ cmp %g1, ASI_AIUS; \
bne,pn %icc, memcpy_user_stub; \ bne,pn %icc, ___copy_in_user; \
nop; \ nop; \
#include "U1memcpy.S" #include "U1memcpy.S"

Просмотреть файл

@ -5,13 +5,9 @@
#define EX_LD(x) \ #define EX_LD(x) \
98: x; \ 98: x; \
.section .fixup; \
.align 4; \
99: retl; \
mov 1, %o0; \
.section __ex_table,"a";\ .section __ex_table,"a";\
.align 4; \ .align 4; \
.word 98b, 99b; \ .word 98b, __retl_one; \
.text; \ .text; \
.align 4; .align 4;

Просмотреть файл

@ -5,13 +5,9 @@
#define EX_ST(x) \ #define EX_ST(x) \
98: x; \ 98: x; \
.section .fixup; \
.align 4; \
99: retl; \
mov 1, %o0; \
.section __ex_table,"a";\ .section __ex_table,"a";\
.align 4; \ .align 4; \
.word 98b, 99b; \ .word 98b, __retl_one; \
.text; \ .text; \
.align 4; .align 4;
@ -27,7 +23,7 @@
#define PREAMBLE \ #define PREAMBLE \
rd %asi, %g1; \ rd %asi, %g1; \
cmp %g1, ASI_AIUS; \ cmp %g1, ASI_AIUS; \
bne,pn %icc, memcpy_user_stub; \ bne,pn %icc, ___copy_in_user; \
nop; \ nop; \
#include "U3memcpy.S" #include "U3memcpy.S"

Просмотреть файл

@ -88,13 +88,9 @@ __bzero_done:
#define EX_ST(x,y) \ #define EX_ST(x,y) \
98: x,y; \ 98: x,y; \
.section .fixup; \
.align 4; \
99: retl; \
mov %o1, %o0; \
.section __ex_table,"a";\ .section __ex_table,"a";\
.align 4; \ .align 4; \
.word 98b, 99b; \ .word 98b, __retl_o1; \
.text; \ .text; \
.align 4; .align 4;

Просмотреть файл

@ -3,19 +3,16 @@
* Copyright (C) 1999, 2000, 2004 David S. Miller (davem@redhat.com) * Copyright (C) 1999, 2000, 2004 David S. Miller (davem@redhat.com)
*/ */
#include <linux/linkage.h>
#include <asm/asi.h> #include <asm/asi.h>
#define XCC xcc #define XCC xcc
#define EX(x,y) \ #define EX(x,y) \
98: x,y; \ 98: x,y; \
.section .fixup; \
.align 4; \
99: retl; \
mov 1, %o0; \
.section __ex_table,"a";\ .section __ex_table,"a";\
.align 4; \ .align 4; \
.word 98b, 99b; \ .word 98b, __retl_one; \
.text; \ .text; \
.align 4; .align 4;
@ -31,18 +28,7 @@
* to copy register windows around during thread cloning. * to copy register windows around during thread cloning.
*/ */
.globl ___copy_in_user ENTRY(___copy_in_user) /* %o0=dst, %o1=src, %o2=len */
.type ___copy_in_user,#function
___copy_in_user: /* %o0=dst, %o1=src, %o2=len */
/* Writing to %asi is _expensive_ so we hardcode it.
* Reading %asi to check for KERNEL_DS is comparatively
* cheap.
*/
rd %asi, %g1
cmp %g1, ASI_AIUS
bne,pn %icc, memcpy_user_stub
nop
cmp %o2, 0 cmp %o2, 0
be,pn %XCC, 85f be,pn %XCC, 85f
or %o0, %o1, %o3 or %o0, %o1, %o3
@ -53,22 +39,24 @@ ___copy_in_user: /* %o0=dst, %o1=src, %o2=len */
/* 16 < len <= 64 */ /* 16 < len <= 64 */
andcc %o3, 0x7, %g0 andcc %o3, 0x7, %g0
bne,pn %XCC, 90f bne,pn %XCC, 90f
sub %o0, %o1, %o3 nop
andn %o2, 0x7, %o4 andn %o2, 0x7, %o4
and %o2, 0x7, %o2 and %o2, 0x7, %o2
1: subcc %o4, 0x8, %o4 1: subcc %o4, 0x8, %o4
EX(ldxa [%o1] %asi, %o5) EX(ldxa [%o1] %asi, %o5)
EX(stxa %o5, [%o1 + %o3] ASI_AIUS) EX(stxa %o5, [%o0] %asi)
bgu,pt %XCC, 1b
add %o1, 0x8, %o1 add %o1, 0x8, %o1
bgu,pt %XCC, 1b
add %o0, 0x8, %o0
andcc %o2, 0x4, %g0 andcc %o2, 0x4, %g0
be,pt %XCC, 1f be,pt %XCC, 1f
nop nop
sub %o2, 0x4, %o2 sub %o2, 0x4, %o2
EX(lduwa [%o1] %asi, %o5) EX(lduwa [%o1] %asi, %o5)
EX(stwa %o5, [%o1 + %o3] ASI_AIUS) EX(stwa %o5, [%o0] %asi)
add %o1, 0x4, %o1 add %o1, 0x4, %o1
add %o0, 0x4, %o0
1: cmp %o2, 0 1: cmp %o2, 0
be,pt %XCC, 85f be,pt %XCC, 85f
nop nop
@ -78,14 +66,15 @@ ___copy_in_user: /* %o0=dst, %o1=src, %o2=len */
80: /* 0 < len <= 16 */ 80: /* 0 < len <= 16 */
andcc %o3, 0x3, %g0 andcc %o3, 0x3, %g0
bne,pn %XCC, 90f bne,pn %XCC, 90f
sub %o0, %o1, %o3 nop
82: 82:
subcc %o2, 4, %o2 subcc %o2, 4, %o2
EX(lduwa [%o1] %asi, %g1) EX(lduwa [%o1] %asi, %g1)
EX(stwa %g1, [%o1 + %o3] ASI_AIUS) EX(stwa %g1, [%o0] %asi)
bgu,pt %XCC, 82b
add %o1, 4, %o1 add %o1, 4, %o1
bgu,pt %XCC, 82b
add %o0, 4, %o0
85: retl 85: retl
clr %o0 clr %o0
@ -94,26 +83,10 @@ ___copy_in_user: /* %o0=dst, %o1=src, %o2=len */
90: 90:
subcc %o2, 1, %o2 subcc %o2, 1, %o2
EX(lduba [%o1] %asi, %g1) EX(lduba [%o1] %asi, %g1)
EX(stba %g1, [%o1 + %o3] ASI_AIUS) EX(stba %g1, [%o0] %asi)
bgu,pt %XCC, 90b
add %o1, 1, %o1 add %o1, 1, %o1
bgu,pt %XCC, 90b
add %o0, 1, %o0
retl retl
clr %o0 clr %o0
ENDPROC(___copy_in_user)
.size ___copy_in_user, .-___copy_in_user
/* Act like copy_{to,in}_user(), ie. return zero instead
* of original destination pointer. This is invoked when
* copy_{to,in}_user() finds that %asi is kernel space.
*/
.globl memcpy_user_stub
.type memcpy_user_stub,#function
memcpy_user_stub:
save %sp, -192, %sp
mov %i0, %o0
mov %i1, %o1
call memcpy
mov %i2, %o2
ret
restore %g0, %g0, %o0
.size memcpy_user_stub, .-memcpy_user_stub

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -50,7 +50,7 @@ config M386
config M486 config M486
bool "486" bool "486"
depends on X86_32 depends on X86_32
help ---help---
Select this for a 486 series processor, either Intel or one of the Select this for a 486 series processor, either Intel or one of the
compatible processors from AMD, Cyrix, IBM, or Intel. Includes DX, compatible processors from AMD, Cyrix, IBM, or Intel. Includes DX,
DX2, and DX4 variants; also SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or DX2, and DX4 variants; also SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or
@ -59,7 +59,7 @@ config M486
config M586 config M586
bool "586/K5/5x86/6x86/6x86MX" bool "586/K5/5x86/6x86/6x86MX"
depends on X86_32 depends on X86_32
help ---help---
Select this for an 586 or 686 series processor such as the AMD K5, Select this for an 586 or 686 series processor such as the AMD K5,
the Cyrix 5x86, 6x86 and 6x86MX. This choice does not the Cyrix 5x86, 6x86 and 6x86MX. This choice does not
assume the RDTSC (Read Time Stamp Counter) instruction. assume the RDTSC (Read Time Stamp Counter) instruction.
@ -67,21 +67,21 @@ config M586
config M586TSC config M586TSC
bool "Pentium-Classic" bool "Pentium-Classic"
depends on X86_32 depends on X86_32
help ---help---
Select this for a Pentium Classic processor with the RDTSC (Read Select this for a Pentium Classic processor with the RDTSC (Read
Time Stamp Counter) instruction for benchmarking. Time Stamp Counter) instruction for benchmarking.
config M586MMX config M586MMX
bool "Pentium-MMX" bool "Pentium-MMX"
depends on X86_32 depends on X86_32
help ---help---
Select this for a Pentium with the MMX graphics/multimedia Select this for a Pentium with the MMX graphics/multimedia
extended instructions. extended instructions.
config M686 config M686
bool "Pentium-Pro" bool "Pentium-Pro"
depends on X86_32 depends on X86_32
help ---help---
Select this for Intel Pentium Pro chips. This enables the use of Select this for Intel Pentium Pro chips. This enables the use of
Pentium Pro extended instructions, and disables the init-time guard Pentium Pro extended instructions, and disables the init-time guard
against the f00f bug found in earlier Pentiums. against the f00f bug found in earlier Pentiums.
@ -89,7 +89,7 @@ config M686
config MPENTIUMII config MPENTIUMII
bool "Pentium-II/Celeron(pre-Coppermine)" bool "Pentium-II/Celeron(pre-Coppermine)"
depends on X86_32 depends on X86_32
help ---help---
Select this for Intel chips based on the Pentium-II and Select this for Intel chips based on the Pentium-II and
pre-Coppermine Celeron core. This option enables an unaligned pre-Coppermine Celeron core. This option enables an unaligned
copy optimization, compiles the kernel with optimization flags copy optimization, compiles the kernel with optimization flags
@ -99,7 +99,7 @@ config MPENTIUMII
config MPENTIUMIII config MPENTIUMIII
bool "Pentium-III/Celeron(Coppermine)/Pentium-III Xeon" bool "Pentium-III/Celeron(Coppermine)/Pentium-III Xeon"
depends on X86_32 depends on X86_32
help ---help---
Select this for Intel chips based on the Pentium-III and Select this for Intel chips based on the Pentium-III and
Celeron-Coppermine core. This option enables use of some Celeron-Coppermine core. This option enables use of some
extended prefetch instructions in addition to the Pentium II extended prefetch instructions in addition to the Pentium II
@ -108,14 +108,14 @@ config MPENTIUMIII
config MPENTIUMM config MPENTIUMM
bool "Pentium M" bool "Pentium M"
depends on X86_32 depends on X86_32
help ---help---
Select this for Intel Pentium M (not Pentium-4 M) Select this for Intel Pentium M (not Pentium-4 M)
notebook chips. notebook chips.
config MPENTIUM4 config MPENTIUM4
bool "Pentium-4/Celeron(P4-based)/Pentium-4 M/older Xeon" bool "Pentium-4/Celeron(P4-based)/Pentium-4 M/older Xeon"
depends on X86_32 depends on X86_32
help ---help---
Select this for Intel Pentium 4 chips. This includes the Select this for Intel Pentium 4 chips. This includes the
Pentium 4, Pentium D, P4-based Celeron and Xeon, and Pentium 4, Pentium D, P4-based Celeron and Xeon, and
Pentium-4 M (not Pentium M) chips. This option enables compile Pentium-4 M (not Pentium M) chips. This option enables compile
@ -151,7 +151,7 @@ config MPENTIUM4
config MK6 config MK6
bool "K6/K6-II/K6-III" bool "K6/K6-II/K6-III"
depends on X86_32 depends on X86_32
help ---help---
Select this for an AMD K6-family processor. Enables use of Select this for an AMD K6-family processor. Enables use of
some extended instructions, and passes appropriate optimization some extended instructions, and passes appropriate optimization
flags to GCC. flags to GCC.
@ -159,22 +159,22 @@ config MK6
config MK7 config MK7
bool "Athlon/Duron/K7" bool "Athlon/Duron/K7"
depends on X86_32 depends on X86_32
help ---help---
Select this for an AMD Athlon K7-family processor. Enables use of Select this for an AMD Athlon K7-family processor. Enables use of
some extended instructions, and passes appropriate optimization some extended instructions, and passes appropriate optimization
flags to GCC. flags to GCC.
config MK8 config MK8
bool "Opteron/Athlon64/Hammer/K8" bool "Opteron/Athlon64/Hammer/K8"
help ---help---
Select this for an AMD Opteron or Athlon64 Hammer-family processor. Enables Select this for an AMD Opteron or Athlon64 Hammer-family processor.
use of some extended instructions, and passes appropriate optimization Enables use of some extended instructions, and passes appropriate
flags to GCC. optimization flags to GCC.
config MCRUSOE config MCRUSOE
bool "Crusoe" bool "Crusoe"
depends on X86_32 depends on X86_32
help ---help---
Select this for a Transmeta Crusoe processor. Treats the processor Select this for a Transmeta Crusoe processor. Treats the processor
like a 586 with TSC, and sets some GCC optimization flags (like a like a 586 with TSC, and sets some GCC optimization flags (like a
Pentium Pro with no alignment requirements). Pentium Pro with no alignment requirements).
@ -182,13 +182,13 @@ config MCRUSOE
config MEFFICEON config MEFFICEON
bool "Efficeon" bool "Efficeon"
depends on X86_32 depends on X86_32
help ---help---
Select this for a Transmeta Efficeon processor. Select this for a Transmeta Efficeon processor.
config MWINCHIPC6 config MWINCHIPC6
bool "Winchip-C6" bool "Winchip-C6"
depends on X86_32 depends on X86_32
help ---help---
Select this for an IDT Winchip C6 chip. Linux and GCC Select this for an IDT Winchip C6 chip. Linux and GCC
treat this chip as a 586TSC with some extended instructions treat this chip as a 586TSC with some extended instructions
and alignment requirements. and alignment requirements.
@ -196,7 +196,7 @@ config MWINCHIPC6
config MWINCHIP3D config MWINCHIP3D
bool "Winchip-2/Winchip-2A/Winchip-3" bool "Winchip-2/Winchip-2A/Winchip-3"
depends on X86_32 depends on X86_32
help ---help---
Select this for an IDT Winchip-2, 2A or 3. Linux and GCC Select this for an IDT Winchip-2, 2A or 3. Linux and GCC
treat this chip as a 586TSC with some extended instructions treat this chip as a 586TSC with some extended instructions
and alignment requirements. Also enable out of order memory and alignment requirements. Also enable out of order memory
@ -206,19 +206,19 @@ config MWINCHIP3D
config MGEODEGX1 config MGEODEGX1
bool "GeodeGX1" bool "GeodeGX1"
depends on X86_32 depends on X86_32
help ---help---
Select this for a Geode GX1 (Cyrix MediaGX) chip. Select this for a Geode GX1 (Cyrix MediaGX) chip.
config MGEODE_LX config MGEODE_LX
bool "Geode GX/LX" bool "Geode GX/LX"
depends on X86_32 depends on X86_32
help ---help---
Select this for AMD Geode GX and LX processors. Select this for AMD Geode GX and LX processors.
config MCYRIXIII config MCYRIXIII
bool "CyrixIII/VIA-C3" bool "CyrixIII/VIA-C3"
depends on X86_32 depends on X86_32
help ---help---
Select this for a Cyrix III or C3 chip. Presently Linux and GCC Select this for a Cyrix III or C3 chip. Presently Linux and GCC
treat this chip as a generic 586. Whilst the CPU is 686 class, treat this chip as a generic 586. Whilst the CPU is 686 class,
it lacks the cmov extension which gcc assumes is present when it lacks the cmov extension which gcc assumes is present when
@ -230,7 +230,7 @@ config MCYRIXIII
config MVIAC3_2 config MVIAC3_2
bool "VIA C3-2 (Nehemiah)" bool "VIA C3-2 (Nehemiah)"
depends on X86_32 depends on X86_32
help ---help---
Select this for a VIA C3 "Nehemiah". Selecting this enables usage Select this for a VIA C3 "Nehemiah". Selecting this enables usage
of SSE and tells gcc to treat the CPU as a 686. of SSE and tells gcc to treat the CPU as a 686.
Note, this kernel will not boot on older (pre model 9) C3s. Note, this kernel will not boot on older (pre model 9) C3s.
@ -238,14 +238,14 @@ config MVIAC3_2
config MVIAC7 config MVIAC7
bool "VIA C7" bool "VIA C7"
depends on X86_32 depends on X86_32
help ---help---
Select this for a VIA C7. Selecting this uses the correct cache Select this for a VIA C7. Selecting this uses the correct cache
shift and tells gcc to treat the CPU as a 686. shift and tells gcc to treat the CPU as a 686.
config MPSC config MPSC
bool "Intel P4 / older Netburst based Xeon" bool "Intel P4 / older Netburst based Xeon"
depends on X86_64 depends on X86_64
help ---help---
Optimize for Intel Pentium 4, Pentium D and older Nocona/Dempsey Optimize for Intel Pentium 4, Pentium D and older Nocona/Dempsey
Xeon CPUs with Intel 64bit which is compatible with x86-64. Xeon CPUs with Intel 64bit which is compatible with x86-64.
Note that the latest Xeons (Xeon 51xx and 53xx) are not based on the Note that the latest Xeons (Xeon 51xx and 53xx) are not based on the
@ -255,15 +255,17 @@ config MPSC
config MCORE2 config MCORE2
bool "Core 2/newer Xeon" bool "Core 2/newer Xeon"
help ---help---
Select this for Intel Core 2 and newer Core 2 Xeons (Xeon 51xx and 53xx)
CPUs. You can distinguish newer from older Xeons by the CPU family Select this for Intel Core 2 and newer Core 2 Xeons (Xeon 51xx and
in /proc/cpuinfo. Newer ones have 6 and older ones 15 (not a typo) 53xx) CPUs. You can distinguish newer from older Xeons by the CPU
family in /proc/cpuinfo. Newer ones have 6 and older ones 15
(not a typo)
config GENERIC_CPU config GENERIC_CPU
bool "Generic-x86-64" bool "Generic-x86-64"
depends on X86_64 depends on X86_64
help ---help---
Generic x86-64 CPU. Generic x86-64 CPU.
Run equally well on all x86-64 CPUs. Run equally well on all x86-64 CPUs.
@ -272,7 +274,7 @@ endchoice
config X86_GENERIC config X86_GENERIC
bool "Generic x86 support" bool "Generic x86 support"
depends on X86_32 depends on X86_32
help ---help---
Instead of just including optimizations for the selected Instead of just including optimizations for the selected
x86 variant (e.g. PII, Crusoe or Athlon), include some more x86 variant (e.g. PII, Crusoe or Athlon), include some more
generic optimizations as well. This will make the kernel generic optimizations as well. This will make the kernel
@ -292,25 +294,23 @@ config X86_CPU
# Define implied options from the CPU selection here # Define implied options from the CPU selection here
config X86_L1_CACHE_BYTES config X86_L1_CACHE_BYTES
int int
default "128" if GENERIC_CPU || MPSC default "128" if MPSC
default "64" if MK8 || MCORE2 default "64" if GENERIC_CPU || MK8 || MCORE2 || X86_32
depends on X86_64
config X86_INTERNODE_CACHE_BYTES config X86_INTERNODE_CACHE_BYTES
int int
default "4096" if X86_VSMP default "4096" if X86_VSMP
default X86_L1_CACHE_BYTES if !X86_VSMP default X86_L1_CACHE_BYTES if !X86_VSMP
depends on X86_64
config X86_CMPXCHG config X86_CMPXCHG
def_bool X86_64 || (X86_32 && !M386) def_bool X86_64 || (X86_32 && !M386)
config X86_L1_CACHE_SHIFT config X86_L1_CACHE_SHIFT
int int
default "7" if MPENTIUM4 || X86_GENERIC || GENERIC_CPU || MPSC default "7" if MPENTIUM4 || MPSC
default "4" if X86_ELAN || M486 || M386 || MGEODEGX1 default "4" if X86_ELAN || M486 || M386 || MGEODEGX1
default "5" if MWINCHIP3D || MWINCHIPC6 || MCRUSOE || MEFFICEON || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2 || MGEODE_LX default "5" if MWINCHIP3D || MWINCHIPC6 || MCRUSOE || MEFFICEON || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2 || MGEODE_LX
default "6" if MK7 || MK8 || MPENTIUMM || MCORE2 || MVIAC7 default "6" if MK7 || MK8 || MPENTIUMM || MCORE2 || MVIAC7 || X86_GENERIC || GENERIC_CPU
config X86_XADD config X86_XADD
def_bool y def_bool y
@ -319,15 +319,15 @@ config X86_XADD
config X86_PPRO_FENCE config X86_PPRO_FENCE
bool "PentiumPro memory ordering errata workaround" bool "PentiumPro memory ordering errata workaround"
depends on M686 || M586MMX || M586TSC || M586 || M486 || M386 || MGEODEGX1 depends on M686 || M586MMX || M586TSC || M586 || M486 || M386 || MGEODEGX1
help ---help---
Old PentiumPro multiprocessor systems had errata that could cause memory Old PentiumPro multiprocessor systems had errata that could cause
operations to violate the x86 ordering standard in rare cases. Enabling this memory operations to violate the x86 ordering standard in rare cases.
option will attempt to work around some (but not all) occurances of Enabling this option will attempt to work around some (but not all)
this problem, at the cost of much heavier spinlock and memory barrier occurances of this problem, at the cost of much heavier spinlock and
operations. memory barrier operations.
If unsure, say n here. Even distro kernels should think twice before enabling If unsure, say n here. Even distro kernels should think twice before
this: there are few systems, and an unlikely bug. enabling this: there are few systems, and an unlikely bug.
config X86_F00F_BUG config X86_F00F_BUG
def_bool y def_bool y
@ -412,14 +412,14 @@ config X86_DEBUGCTLMSR
menuconfig PROCESSOR_SELECT menuconfig PROCESSOR_SELECT
bool "Supported processor vendors" if EMBEDDED bool "Supported processor vendors" if EMBEDDED
help ---help---
This lets you choose what x86 vendor support code your kernel This lets you choose what x86 vendor support code your kernel
will include. will include.
config CPU_SUP_INTEL config CPU_SUP_INTEL
default y default y
bool "Support Intel processors" if PROCESSOR_SELECT bool "Support Intel processors" if PROCESSOR_SELECT
help ---help---
This enables detection, tunings and quirks for Intel processors This enables detection, tunings and quirks for Intel processors
You need this enabled if you want your kernel to run on an You need this enabled if you want your kernel to run on an
@ -433,7 +433,7 @@ config CPU_SUP_CYRIX_32
default y default y
bool "Support Cyrix processors" if PROCESSOR_SELECT bool "Support Cyrix processors" if PROCESSOR_SELECT
depends on !64BIT depends on !64BIT
help ---help---
This enables detection, tunings and quirks for Cyrix processors This enables detection, tunings and quirks for Cyrix processors
You need this enabled if you want your kernel to run on a You need this enabled if you want your kernel to run on a
@ -446,7 +446,7 @@ config CPU_SUP_CYRIX_32
config CPU_SUP_AMD config CPU_SUP_AMD
default y default y
bool "Support AMD processors" if PROCESSOR_SELECT bool "Support AMD processors" if PROCESSOR_SELECT
help ---help---
This enables detection, tunings and quirks for AMD processors This enables detection, tunings and quirks for AMD processors
You need this enabled if you want your kernel to run on an You need this enabled if you want your kernel to run on an
@ -460,7 +460,7 @@ config CPU_SUP_CENTAUR_32
default y default y
bool "Support Centaur processors" if PROCESSOR_SELECT bool "Support Centaur processors" if PROCESSOR_SELECT
depends on !64BIT depends on !64BIT
help ---help---
This enables detection, tunings and quirks for Centaur processors This enables detection, tunings and quirks for Centaur processors
You need this enabled if you want your kernel to run on a You need this enabled if you want your kernel to run on a
@ -474,7 +474,7 @@ config CPU_SUP_CENTAUR_64
default y default y
bool "Support Centaur processors" if PROCESSOR_SELECT bool "Support Centaur processors" if PROCESSOR_SELECT
depends on 64BIT depends on 64BIT
help ---help---
This enables detection, tunings and quirks for Centaur processors This enables detection, tunings and quirks for Centaur processors
You need this enabled if you want your kernel to run on a You need this enabled if you want your kernel to run on a
@ -488,7 +488,7 @@ config CPU_SUP_TRANSMETA_32
default y default y
bool "Support Transmeta processors" if PROCESSOR_SELECT bool "Support Transmeta processors" if PROCESSOR_SELECT
depends on !64BIT depends on !64BIT
help ---help---
This enables detection, tunings and quirks for Transmeta processors This enables detection, tunings and quirks for Transmeta processors
You need this enabled if you want your kernel to run on a You need this enabled if you want your kernel to run on a
@ -502,7 +502,7 @@ config CPU_SUP_UMC_32
default y default y
bool "Support UMC processors" if PROCESSOR_SELECT bool "Support UMC processors" if PROCESSOR_SELECT
depends on !64BIT depends on !64BIT
help ---help---
This enables detection, tunings and quirks for UMC processors This enables detection, tunings and quirks for UMC processors
You need this enabled if you want your kernel to run on a You need this enabled if you want your kernel to run on a
@ -521,7 +521,7 @@ config X86_PTRACE_BTS
bool "Branch Trace Store" bool "Branch Trace Store"
default y default y
depends on X86_DEBUGCTLMSR depends on X86_DEBUGCTLMSR
help ---help---
This adds a ptrace interface to the hardware's branch trace store. This adds a ptrace interface to the hardware's branch trace store.
Debuggers may use it to collect an execution trace of the debugged Debuggers may use it to collect an execution trace of the debugged

Просмотреть файл

@ -7,7 +7,7 @@ source "lib/Kconfig.debug"
config STRICT_DEVMEM config STRICT_DEVMEM
bool "Filter access to /dev/mem" bool "Filter access to /dev/mem"
help ---help---
If this option is disabled, you allow userspace (root) access to all If this option is disabled, you allow userspace (root) access to all
of memory, including kernel and userspace memory. Accidental of memory, including kernel and userspace memory. Accidental
access to this is obviously disastrous, but specific access can access to this is obviously disastrous, but specific access can
@ -25,7 +25,7 @@ config STRICT_DEVMEM
config X86_VERBOSE_BOOTUP config X86_VERBOSE_BOOTUP
bool "Enable verbose x86 bootup info messages" bool "Enable verbose x86 bootup info messages"
default y default y
help ---help---
Enables the informational output from the decompression stage Enables the informational output from the decompression stage
(e.g. bzImage) of the boot. If you disable this you will still (e.g. bzImage) of the boot. If you disable this you will still
see errors. Disable this if you want silent bootup. see errors. Disable this if you want silent bootup.
@ -33,7 +33,7 @@ config X86_VERBOSE_BOOTUP
config EARLY_PRINTK config EARLY_PRINTK
bool "Early printk" if EMBEDDED bool "Early printk" if EMBEDDED
default y default y
help ---help---
Write kernel log output directly into the VGA buffer or to a serial Write kernel log output directly into the VGA buffer or to a serial
port. port.
@ -47,7 +47,7 @@ config EARLY_PRINTK_DBGP
bool "Early printk via EHCI debug port" bool "Early printk via EHCI debug port"
default n default n
depends on EARLY_PRINTK && PCI depends on EARLY_PRINTK && PCI
help ---help---
Write kernel log output directly into the EHCI debug port. Write kernel log output directly into the EHCI debug port.
This is useful for kernel debugging when your machine crashes very This is useful for kernel debugging when your machine crashes very
@ -59,14 +59,14 @@ config EARLY_PRINTK_DBGP
config DEBUG_STACKOVERFLOW config DEBUG_STACKOVERFLOW
bool "Check for stack overflows" bool "Check for stack overflows"
depends on DEBUG_KERNEL depends on DEBUG_KERNEL
help ---help---
This option will cause messages to be printed if free stack space This option will cause messages to be printed if free stack space
drops below a certain limit. drops below a certain limit.
config DEBUG_STACK_USAGE config DEBUG_STACK_USAGE
bool "Stack utilization instrumentation" bool "Stack utilization instrumentation"
depends on DEBUG_KERNEL depends on DEBUG_KERNEL
help ---help---
Enables the display of the minimum amount of free stack which each Enables the display of the minimum amount of free stack which each
task has ever had available in the sysrq-T and sysrq-P debug output. task has ever had available in the sysrq-T and sysrq-P debug output.
@ -75,7 +75,7 @@ config DEBUG_STACK_USAGE
config DEBUG_PAGEALLOC config DEBUG_PAGEALLOC
bool "Debug page memory allocations" bool "Debug page memory allocations"
depends on DEBUG_KERNEL depends on DEBUG_KERNEL
help ---help---
Unmap pages from the kernel linear mapping after free_pages(). Unmap pages from the kernel linear mapping after free_pages().
This results in a large slowdown, but helps to find certain types This results in a large slowdown, but helps to find certain types
of memory corruptions. of memory corruptions.
@ -83,9 +83,9 @@ config DEBUG_PAGEALLOC
config DEBUG_PER_CPU_MAPS config DEBUG_PER_CPU_MAPS
bool "Debug access to per_cpu maps" bool "Debug access to per_cpu maps"
depends on DEBUG_KERNEL depends on DEBUG_KERNEL
depends on X86_SMP depends on SMP
default n default n
help ---help---
Say Y to verify that the per_cpu map being accessed has Say Y to verify that the per_cpu map being accessed has
been setup. Adds a fair amount of code to kernel memory been setup. Adds a fair amount of code to kernel memory
and decreases performance. and decreases performance.
@ -96,7 +96,7 @@ config X86_PTDUMP
bool "Export kernel pagetable layout to userspace via debugfs" bool "Export kernel pagetable layout to userspace via debugfs"
depends on DEBUG_KERNEL depends on DEBUG_KERNEL
select DEBUG_FS select DEBUG_FS
help ---help---
Say Y here if you want to show the kernel pagetable layout in a Say Y here if you want to show the kernel pagetable layout in a
debugfs file. This information is only useful for kernel developers debugfs file. This information is only useful for kernel developers
who are working in architecture specific areas of the kernel. who are working in architecture specific areas of the kernel.
@ -108,7 +108,7 @@ config DEBUG_RODATA
bool "Write protect kernel read-only data structures" bool "Write protect kernel read-only data structures"
default y default y
depends on DEBUG_KERNEL depends on DEBUG_KERNEL
help ---help---
Mark the kernel read-only data as write-protected in the pagetables, Mark the kernel read-only data as write-protected in the pagetables,
in order to catch accidental (and incorrect) writes to such const in order to catch accidental (and incorrect) writes to such const
data. This is recommended so that we can catch kernel bugs sooner. data. This is recommended so that we can catch kernel bugs sooner.
@ -117,7 +117,8 @@ config DEBUG_RODATA
config DEBUG_RODATA_TEST config DEBUG_RODATA_TEST
bool "Testcase for the DEBUG_RODATA feature" bool "Testcase for the DEBUG_RODATA feature"
depends on DEBUG_RODATA depends on DEBUG_RODATA
help default y
---help---
This option enables a testcase for the DEBUG_RODATA This option enables a testcase for the DEBUG_RODATA
feature as well as for the change_page_attr() infrastructure. feature as well as for the change_page_attr() infrastructure.
If in doubt, say "N" If in doubt, say "N"
@ -125,7 +126,7 @@ config DEBUG_RODATA_TEST
config DEBUG_NX_TEST config DEBUG_NX_TEST
tristate "Testcase for the NX non-executable stack feature" tristate "Testcase for the NX non-executable stack feature"
depends on DEBUG_KERNEL && m depends on DEBUG_KERNEL && m
help ---help---
This option enables a testcase for the CPU NX capability This option enables a testcase for the CPU NX capability
and the software setup of this feature. and the software setup of this feature.
If in doubt, say "N" If in doubt, say "N"
@ -133,7 +134,7 @@ config DEBUG_NX_TEST
config 4KSTACKS config 4KSTACKS
bool "Use 4Kb for kernel stacks instead of 8Kb" bool "Use 4Kb for kernel stacks instead of 8Kb"
depends on X86_32 depends on X86_32
help ---help---
If you say Y here the kernel will use a 4Kb stacksize for the If you say Y here the kernel will use a 4Kb stacksize for the
kernel stack attached to each process/thread. This facilitates kernel stack attached to each process/thread. This facilitates
running more threads on a system and also reduces the pressure running more threads on a system and also reduces the pressure
@ -144,7 +145,7 @@ config DOUBLEFAULT
default y default y
bool "Enable doublefault exception handler" if EMBEDDED bool "Enable doublefault exception handler" if EMBEDDED
depends on X86_32 depends on X86_32
help ---help---
This option allows trapping of rare doublefault exceptions that This option allows trapping of rare doublefault exceptions that
would otherwise cause a system to silently reboot. Disabling this would otherwise cause a system to silently reboot. Disabling this
option saves about 4k and might cause you much additional grey option saves about 4k and might cause you much additional grey
@ -154,7 +155,7 @@ config IOMMU_DEBUG
bool "Enable IOMMU debugging" bool "Enable IOMMU debugging"
depends on GART_IOMMU && DEBUG_KERNEL depends on GART_IOMMU && DEBUG_KERNEL
depends on X86_64 depends on X86_64
help ---help---
Force the IOMMU to on even when you have less than 4GB of Force the IOMMU to on even when you have less than 4GB of
memory and add debugging code. On overflow always panic. And memory and add debugging code. On overflow always panic. And
allow to enable IOMMU leak tracing. Can be disabled at boot allow to enable IOMMU leak tracing. Can be disabled at boot
@ -170,7 +171,7 @@ config IOMMU_LEAK
bool "IOMMU leak tracing" bool "IOMMU leak tracing"
depends on DEBUG_KERNEL depends on DEBUG_KERNEL
depends on IOMMU_DEBUG depends on IOMMU_DEBUG
help ---help---
Add a simple leak tracer to the IOMMU code. This is useful when you Add a simple leak tracer to the IOMMU code. This is useful when you
are debugging a buggy device driver that leaks IOMMU mappings. are debugging a buggy device driver that leaks IOMMU mappings.
@ -223,25 +224,25 @@ choice
config IO_DELAY_0X80 config IO_DELAY_0X80
bool "port 0x80 based port-IO delay [recommended]" bool "port 0x80 based port-IO delay [recommended]"
help ---help---
This is the traditional Linux IO delay used for in/out_p. This is the traditional Linux IO delay used for in/out_p.
It is the most tested hence safest selection here. It is the most tested hence safest selection here.
config IO_DELAY_0XED config IO_DELAY_0XED
bool "port 0xed based port-IO delay" bool "port 0xed based port-IO delay"
help ---help---
Use port 0xed as the IO delay. This frees up port 0x80 which is Use port 0xed as the IO delay. This frees up port 0x80 which is
often used as a hardware-debug port. often used as a hardware-debug port.
config IO_DELAY_UDELAY config IO_DELAY_UDELAY
bool "udelay based port-IO delay" bool "udelay based port-IO delay"
help ---help---
Use udelay(2) as the IO delay method. This provides the delay Use udelay(2) as the IO delay method. This provides the delay
while not having any side-effect on the IO port space. while not having any side-effect on the IO port space.
config IO_DELAY_NONE config IO_DELAY_NONE
bool "no port-IO delay" bool "no port-IO delay"
help ---help---
No port-IO delay. Will break on old boxes that require port-IO No port-IO delay. Will break on old boxes that require port-IO
delay for certain operations. Should work on most new machines. delay for certain operations. Should work on most new machines.
@ -275,18 +276,18 @@ config DEBUG_BOOT_PARAMS
bool "Debug boot parameters" bool "Debug boot parameters"
depends on DEBUG_KERNEL depends on DEBUG_KERNEL
depends on DEBUG_FS depends on DEBUG_FS
help ---help---
This option will cause struct boot_params to be exported via debugfs. This option will cause struct boot_params to be exported via debugfs.
config CPA_DEBUG config CPA_DEBUG
bool "CPA self-test code" bool "CPA self-test code"
depends on DEBUG_KERNEL depends on DEBUG_KERNEL
help ---help---
Do change_page_attr() self-tests every 30 seconds. Do change_page_attr() self-tests every 30 seconds.
config OPTIMIZE_INLINING config OPTIMIZE_INLINING
bool "Allow gcc to uninline functions marked 'inline'" bool "Allow gcc to uninline functions marked 'inline'"
help ---help---
This option determines if the kernel forces gcc to inline the functions This option determines if the kernel forces gcc to inline the functions
developers have marked 'inline'. Doing so takes away freedom from gcc to developers have marked 'inline'. Doing so takes away freedom from gcc to
do what it thinks is best, which is desirable for the gcc 3.x series of do what it thinks is best, which is desirable for the gcc 3.x series of
@ -299,4 +300,3 @@ config OPTIMIZE_INLINING
If unsure, say N. If unsure, say N.
endmenu endmenu

Просмотреть файл

@ -70,14 +70,17 @@ else
# this works around some issues with generating unwind tables in older gccs # this works around some issues with generating unwind tables in older gccs
# newer gccs do it by default # newer gccs do it by default
KBUILD_CFLAGS += -maccumulate-outgoing-args KBUILD_CFLAGS += -maccumulate-outgoing-args
endif
stackp := $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh ifdef CONFIG_CC_STACKPROTECTOR
stackp-$(CONFIG_CC_STACKPROTECTOR) := $(shell $(stackp) \ cc_has_sp := $(srctree)/scripts/gcc-x86_$(BITS)-has-stack-protector.sh
"$(CC)" -fstack-protector ) ifeq ($(shell $(CONFIG_SHELL) $(cc_has_sp) $(CC)),y)
stackp-$(CONFIG_CC_STACKPROTECTOR_ALL) += $(shell $(stackp) \ stackp-y := -fstack-protector
"$(CC)" -fstack-protector-all ) stackp-$(CONFIG_CC_STACKPROTECTOR_ALL) += -fstack-protector-all
KBUILD_CFLAGS += $(stackp-y) KBUILD_CFLAGS += $(stackp-y)
else
$(warning stack protector enabled but no compiler support)
endif
endif endif
# Stackpointer is addressed different for 32 bit and 64 bit x86 # Stackpointer is addressed different for 32 bit and 64 bit x86
@ -102,29 +105,6 @@ KBUILD_CFLAGS += -fno-asynchronous-unwind-tables
# prevent gcc from generating any FP code by mistake # prevent gcc from generating any FP code by mistake
KBUILD_CFLAGS += $(call cc-option,-mno-sse -mno-mmx -mno-sse2 -mno-3dnow,) KBUILD_CFLAGS += $(call cc-option,-mno-sse -mno-mmx -mno-sse2 -mno-3dnow,)
###
# Sub architecture support
# fcore-y is linked before mcore-y files.
# Default subarch .c files
mcore-y := arch/x86/mach-default/
# Voyager subarch support
mflags-$(CONFIG_X86_VOYAGER) := -Iarch/x86/include/asm/mach-voyager
mcore-$(CONFIG_X86_VOYAGER) := arch/x86/mach-voyager/
# generic subarchitecture
mflags-$(CONFIG_X86_GENERICARCH):= -Iarch/x86/include/asm/mach-generic
fcore-$(CONFIG_X86_GENERICARCH) += arch/x86/mach-generic/
mcore-$(CONFIG_X86_GENERICARCH) := arch/x86/mach-default/
# default subarch .h files
mflags-y += -Iarch/x86/include/asm/mach-default
# 64 bit does not support subarch support - clear sub arch variables
fcore-$(CONFIG_X86_64) :=
mcore-$(CONFIG_X86_64) :=
KBUILD_CFLAGS += $(mflags-y) KBUILD_CFLAGS += $(mflags-y)
KBUILD_AFLAGS += $(mflags-y) KBUILD_AFLAGS += $(mflags-y)
@ -150,9 +130,6 @@ core-$(CONFIG_LGUEST_GUEST) += arch/x86/lguest/
core-y += arch/x86/kernel/ core-y += arch/x86/kernel/
core-y += arch/x86/mm/ core-y += arch/x86/mm/
# Remaining sub architecture files
core-y += $(mcore-y)
core-y += arch/x86/crypto/ core-y += arch/x86/crypto/
core-y += arch/x86/vdso/ core-y += arch/x86/vdso/
core-$(CONFIG_IA32_EMULATION) += arch/x86/ia32/ core-$(CONFIG_IA32_EMULATION) += arch/x86/ia32/

Просмотреть файл

@ -2,6 +2,7 @@
* *
* Copyright (C) 1991, 1992 Linus Torvalds * Copyright (C) 1991, 1992 Linus Torvalds
* Copyright 2007-2008 rPath, Inc. - All Rights Reserved * Copyright 2007-2008 rPath, Inc. - All Rights Reserved
* Copyright 2009 Intel Corporation
* *
* This file is part of the Linux kernel, and is made available under * This file is part of the Linux kernel, and is made available under
* the terms of the GNU General Public License version 2. * the terms of the GNU General Public License version 2.
@ -15,16 +16,23 @@
#include "boot.h" #include "boot.h"
#define MAX_8042_LOOPS 100000 #define MAX_8042_LOOPS 100000
#define MAX_8042_FF 32
static int empty_8042(void) static int empty_8042(void)
{ {
u8 status; u8 status;
int loops = MAX_8042_LOOPS; int loops = MAX_8042_LOOPS;
int ffs = MAX_8042_FF;
while (loops--) { while (loops--) {
io_delay(); io_delay();
status = inb(0x64); status = inb(0x64);
if (status == 0xff) {
/* FF is a plausible, but very unlikely status */
if (!--ffs)
return -1; /* Assume no KBC present */
}
if (status & 1) { if (status & 1) {
/* Read and discard input data */ /* Read and discard input data */
io_delay(); io_delay();
@ -118,18 +126,14 @@ static void enable_a20_fast(void)
int enable_a20(void) int enable_a20(void)
{ {
#if defined(CONFIG_X86_ELAN) #ifdef CONFIG_X86_VOYAGER
/* Elan croaks if we try to touch the KBC */
enable_a20_fast();
while (!a20_test_long())
;
return 0;
#elif defined(CONFIG_X86_VOYAGER)
/* On Voyager, a20_test() is unsafe? */ /* On Voyager, a20_test() is unsafe? */
enable_a20_kbc(); enable_a20_kbc();
return 0; return 0;
#else #else
int loops = A20_ENABLE_LOOPS; int loops = A20_ENABLE_LOOPS;
int kbc_err;
while (loops--) { while (loops--) {
/* First, check to see if A20 is already enabled /* First, check to see if A20 is already enabled
(legacy free, etc.) */ (legacy free, etc.) */
@ -142,13 +146,16 @@ int enable_a20(void)
return 0; return 0;
/* Try enabling A20 through the keyboard controller */ /* Try enabling A20 through the keyboard controller */
empty_8042(); kbc_err = empty_8042();
if (a20_test_short()) if (a20_test_short())
return 0; /* BIOS worked, but with delayed reaction */ return 0; /* BIOS worked, but with delayed reaction */
if (!kbc_err) {
enable_a20_kbc(); enable_a20_kbc();
if (a20_test_long()) if (a20_test_long())
return 0; return 0;
}
/* Finally, try enabling the "fast A20 gate" */ /* Finally, try enabling the "fast A20 gate" */
enable_a20_fast(); enable_a20_fast();

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -46,78 +46,83 @@ void signal_fault(struct pt_regs *regs, void __user *frame, char *where);
int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from) int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from)
{ {
int err; int err = 0;
if (!access_ok(VERIFY_WRITE, to, sizeof(compat_siginfo_t))) if (!access_ok(VERIFY_WRITE, to, sizeof(compat_siginfo_t)))
return -EFAULT; return -EFAULT;
put_user_try {
/* If you change siginfo_t structure, please make sure that /* If you change siginfo_t structure, please make sure that
this code is fixed accordingly. this code is fixed accordingly.
It should never copy any pad contained in the structure It should never copy any pad contained in the structure
to avoid security leaks, but must copy the generic to avoid security leaks, but must copy the generic
3 ints plus the relevant union member. */ 3 ints plus the relevant union member. */
err = __put_user(from->si_signo, &to->si_signo); put_user_ex(from->si_signo, &to->si_signo);
err |= __put_user(from->si_errno, &to->si_errno); put_user_ex(from->si_errno, &to->si_errno);
err |= __put_user((short)from->si_code, &to->si_code); put_user_ex((short)from->si_code, &to->si_code);
if (from->si_code < 0) { if (from->si_code < 0) {
err |= __put_user(from->si_pid, &to->si_pid); put_user_ex(from->si_pid, &to->si_pid);
err |= __put_user(from->si_uid, &to->si_uid); put_user_ex(from->si_uid, &to->si_uid);
err |= __put_user(ptr_to_compat(from->si_ptr), &to->si_ptr); put_user_ex(ptr_to_compat(from->si_ptr), &to->si_ptr);
} else { } else {
/* /*
* First 32bits of unions are always present: * First 32bits of unions are always present:
* si_pid === si_band === si_tid === si_addr(LS half) * si_pid === si_band === si_tid === si_addr(LS half)
*/ */
err |= __put_user(from->_sifields._pad[0], put_user_ex(from->_sifields._pad[0],
&to->_sifields._pad[0]); &to->_sifields._pad[0]);
switch (from->si_code >> 16) { switch (from->si_code >> 16) {
case __SI_FAULT >> 16: case __SI_FAULT >> 16:
break; break;
case __SI_CHLD >> 16: case __SI_CHLD >> 16:
err |= __put_user(from->si_utime, &to->si_utime); put_user_ex(from->si_utime, &to->si_utime);
err |= __put_user(from->si_stime, &to->si_stime); put_user_ex(from->si_stime, &to->si_stime);
err |= __put_user(from->si_status, &to->si_status); put_user_ex(from->si_status, &to->si_status);
/* FALL THROUGH */ /* FALL THROUGH */
default: default:
case __SI_KILL >> 16: case __SI_KILL >> 16:
err |= __put_user(from->si_uid, &to->si_uid); put_user_ex(from->si_uid, &to->si_uid);
break; break;
case __SI_POLL >> 16: case __SI_POLL >> 16:
err |= __put_user(from->si_fd, &to->si_fd); put_user_ex(from->si_fd, &to->si_fd);
break; break;
case __SI_TIMER >> 16: case __SI_TIMER >> 16:
err |= __put_user(from->si_overrun, &to->si_overrun); put_user_ex(from->si_overrun, &to->si_overrun);
err |= __put_user(ptr_to_compat(from->si_ptr), put_user_ex(ptr_to_compat(from->si_ptr),
&to->si_ptr); &to->si_ptr);
break; break;
/* This is not generated by the kernel as of now. */ /* This is not generated by the kernel as of now. */
case __SI_RT >> 16: case __SI_RT >> 16:
case __SI_MESGQ >> 16: case __SI_MESGQ >> 16:
err |= __put_user(from->si_uid, &to->si_uid); put_user_ex(from->si_uid, &to->si_uid);
err |= __put_user(from->si_int, &to->si_int); put_user_ex(from->si_int, &to->si_int);
break; break;
} }
} }
} put_user_catch(err);
return err; return err;
} }
int copy_siginfo_from_user32(siginfo_t *to, compat_siginfo_t __user *from) int copy_siginfo_from_user32(siginfo_t *to, compat_siginfo_t __user *from)
{ {
int err; int err = 0;
u32 ptr32; u32 ptr32;
if (!access_ok(VERIFY_READ, from, sizeof(compat_siginfo_t))) if (!access_ok(VERIFY_READ, from, sizeof(compat_siginfo_t)))
return -EFAULT; return -EFAULT;
err = __get_user(to->si_signo, &from->si_signo); get_user_try {
err |= __get_user(to->si_errno, &from->si_errno); get_user_ex(to->si_signo, &from->si_signo);
err |= __get_user(to->si_code, &from->si_code); get_user_ex(to->si_errno, &from->si_errno);
get_user_ex(to->si_code, &from->si_code);
err |= __get_user(to->si_pid, &from->si_pid); get_user_ex(to->si_pid, &from->si_pid);
err |= __get_user(to->si_uid, &from->si_uid); get_user_ex(to->si_uid, &from->si_uid);
err |= __get_user(ptr32, &from->si_ptr); get_user_ex(ptr32, &from->si_ptr);
to->si_ptr = compat_ptr(ptr32); to->si_ptr = compat_ptr(ptr32);
} get_user_catch(err);
return err; return err;
} }
@ -142,17 +147,23 @@ asmlinkage long sys32_sigaltstack(const stack_ia32_t __user *uss_ptr,
struct pt_regs *regs) struct pt_regs *regs)
{ {
stack_t uss, uoss; stack_t uss, uoss;
int ret; int ret, err = 0;
mm_segment_t seg; mm_segment_t seg;
if (uss_ptr) { if (uss_ptr) {
u32 ptr; u32 ptr;
memset(&uss, 0, sizeof(stack_t)); memset(&uss, 0, sizeof(stack_t));
if (!access_ok(VERIFY_READ, uss_ptr, sizeof(stack_ia32_t)) || if (!access_ok(VERIFY_READ, uss_ptr, sizeof(stack_ia32_t)))
__get_user(ptr, &uss_ptr->ss_sp) || return -EFAULT;
__get_user(uss.ss_flags, &uss_ptr->ss_flags) ||
__get_user(uss.ss_size, &uss_ptr->ss_size)) get_user_try {
get_user_ex(ptr, &uss_ptr->ss_sp);
get_user_ex(uss.ss_flags, &uss_ptr->ss_flags);
get_user_ex(uss.ss_size, &uss_ptr->ss_size);
} get_user_catch(err);
if (err)
return -EFAULT; return -EFAULT;
uss.ss_sp = compat_ptr(ptr); uss.ss_sp = compat_ptr(ptr);
} }
@ -161,10 +172,16 @@ asmlinkage long sys32_sigaltstack(const stack_ia32_t __user *uss_ptr,
ret = do_sigaltstack(uss_ptr ? &uss : NULL, &uoss, regs->sp); ret = do_sigaltstack(uss_ptr ? &uss : NULL, &uoss, regs->sp);
set_fs(seg); set_fs(seg);
if (ret >= 0 && uoss_ptr) { if (ret >= 0 && uoss_ptr) {
if (!access_ok(VERIFY_WRITE, uoss_ptr, sizeof(stack_ia32_t)) || if (!access_ok(VERIFY_WRITE, uoss_ptr, sizeof(stack_ia32_t)))
__put_user(ptr_to_compat(uoss.ss_sp), &uoss_ptr->ss_sp) || return -EFAULT;
__put_user(uoss.ss_flags, &uoss_ptr->ss_flags) ||
__put_user(uoss.ss_size, &uoss_ptr->ss_size)) put_user_try {
put_user_ex(ptr_to_compat(uoss.ss_sp), &uoss_ptr->ss_sp);
put_user_ex(uoss.ss_flags, &uoss_ptr->ss_flags);
put_user_ex(uoss.ss_size, &uoss_ptr->ss_size);
} put_user_catch(err);
if (err)
ret = -EFAULT; ret = -EFAULT;
} }
return ret; return ret;
@ -174,18 +191,18 @@ asmlinkage long sys32_sigaltstack(const stack_ia32_t __user *uss_ptr,
* Do a signal return; undo the signal stack. * Do a signal return; undo the signal stack.
*/ */
#define COPY(x) { \ #define COPY(x) { \
err |= __get_user(regs->x, &sc->x); \ get_user_ex(regs->x, &sc->x); \
} }
#define COPY_SEG_CPL3(seg) { \ #define COPY_SEG_CPL3(seg) { \
unsigned short tmp; \ unsigned short tmp; \
err |= __get_user(tmp, &sc->seg); \ get_user_ex(tmp, &sc->seg); \
regs->seg = tmp | 3; \ regs->seg = tmp | 3; \
} }
#define RELOAD_SEG(seg) { \ #define RELOAD_SEG(seg) { \
unsigned int cur, pre; \ unsigned int cur, pre; \
err |= __get_user(pre, &sc->seg); \ get_user_ex(pre, &sc->seg); \
savesegment(seg, cur); \ savesegment(seg, cur); \
pre |= 3; \ pre |= 3; \
if (pre != cur) \ if (pre != cur) \
@ -209,13 +226,14 @@ static int ia32_restore_sigcontext(struct pt_regs *regs,
sc, sc->err, sc->ip, sc->cs, sc->flags); sc, sc->err, sc->ip, sc->cs, sc->flags);
#endif #endif
get_user_try {
/* /*
* Reload fs and gs if they have changed in the signal * Reload fs and gs if they have changed in the signal
* handler. This does not handle long fs/gs base changes in * handler. This does not handle long fs/gs base changes in
* the handler, but does not clobber them at least in the * the handler, but does not clobber them at least in the
* normal case. * normal case.
*/ */
err |= __get_user(gs, &sc->gs); get_user_ex(gs, &sc->gs);
gs |= 3; gs |= 3;
savesegment(gs, oldgs); savesegment(gs, oldgs);
if (gs != oldgs) if (gs != oldgs)
@ -232,16 +250,18 @@ static int ia32_restore_sigcontext(struct pt_regs *regs,
COPY_SEG_CPL3(cs); COPY_SEG_CPL3(cs);
COPY_SEG_CPL3(ss); COPY_SEG_CPL3(ss);
err |= __get_user(tmpflags, &sc->flags); get_user_ex(tmpflags, &sc->flags);
regs->flags = (regs->flags & ~FIX_EFLAGS) | (tmpflags & FIX_EFLAGS); regs->flags = (regs->flags & ~FIX_EFLAGS) | (tmpflags & FIX_EFLAGS);
/* disable syscall checks */ /* disable syscall checks */
regs->orig_ax = -1; regs->orig_ax = -1;
err |= __get_user(tmp, &sc->fpstate); get_user_ex(tmp, &sc->fpstate);
buf = compat_ptr(tmp); buf = compat_ptr(tmp);
err |= restore_i387_xstate_ia32(buf); err |= restore_i387_xstate_ia32(buf);
err |= __get_user(*pax, &sc->ax); get_user_ex(*pax, &sc->ax);
} get_user_catch(err);
return err; return err;
} }
@ -319,36 +339,38 @@ static int ia32_setup_sigcontext(struct sigcontext_ia32 __user *sc,
{ {
int tmp, err = 0; int tmp, err = 0;
put_user_try {
savesegment(gs, tmp); savesegment(gs, tmp);
err |= __put_user(tmp, (unsigned int __user *)&sc->gs); put_user_ex(tmp, (unsigned int __user *)&sc->gs);
savesegment(fs, tmp); savesegment(fs, tmp);
err |= __put_user(tmp, (unsigned int __user *)&sc->fs); put_user_ex(tmp, (unsigned int __user *)&sc->fs);
savesegment(ds, tmp); savesegment(ds, tmp);
err |= __put_user(tmp, (unsigned int __user *)&sc->ds); put_user_ex(tmp, (unsigned int __user *)&sc->ds);
savesegment(es, tmp); savesegment(es, tmp);
err |= __put_user(tmp, (unsigned int __user *)&sc->es); put_user_ex(tmp, (unsigned int __user *)&sc->es);
err |= __put_user(regs->di, &sc->di); put_user_ex(regs->di, &sc->di);
err |= __put_user(regs->si, &sc->si); put_user_ex(regs->si, &sc->si);
err |= __put_user(regs->bp, &sc->bp); put_user_ex(regs->bp, &sc->bp);
err |= __put_user(regs->sp, &sc->sp); put_user_ex(regs->sp, &sc->sp);
err |= __put_user(regs->bx, &sc->bx); put_user_ex(regs->bx, &sc->bx);
err |= __put_user(regs->dx, &sc->dx); put_user_ex(regs->dx, &sc->dx);
err |= __put_user(regs->cx, &sc->cx); put_user_ex(regs->cx, &sc->cx);
err |= __put_user(regs->ax, &sc->ax); put_user_ex(regs->ax, &sc->ax);
err |= __put_user(current->thread.trap_no, &sc->trapno); put_user_ex(current->thread.trap_no, &sc->trapno);
err |= __put_user(current->thread.error_code, &sc->err); put_user_ex(current->thread.error_code, &sc->err);
err |= __put_user(regs->ip, &sc->ip); put_user_ex(regs->ip, &sc->ip);
err |= __put_user(regs->cs, (unsigned int __user *)&sc->cs); put_user_ex(regs->cs, (unsigned int __user *)&sc->cs);
err |= __put_user(regs->flags, &sc->flags); put_user_ex(regs->flags, &sc->flags);
err |= __put_user(regs->sp, &sc->sp_at_signal); put_user_ex(regs->sp, &sc->sp_at_signal);
err |= __put_user(regs->ss, (unsigned int __user *)&sc->ss); put_user_ex(regs->ss, (unsigned int __user *)&sc->ss);
err |= __put_user(ptr_to_compat(fpstate), &sc->fpstate); put_user_ex(ptr_to_compat(fpstate), &sc->fpstate);
/* non-iBCS2 extensions.. */ /* non-iBCS2 extensions.. */
err |= __put_user(mask, &sc->oldmask); put_user_ex(mask, &sc->oldmask);
err |= __put_user(current->thread.cr2, &sc->cr2); put_user_ex(current->thread.cr2, &sc->cr2);
} put_user_catch(err);
return err; return err;
} }
@ -437,13 +459,17 @@ int ia32_setup_frame(int sig, struct k_sigaction *ka,
else else
restorer = &frame->retcode; restorer = &frame->retcode;
} }
err |= __put_user(ptr_to_compat(restorer), &frame->pretcode);
put_user_try {
put_user_ex(ptr_to_compat(restorer), &frame->pretcode);
/* /*
* These are actually not used anymore, but left because some * These are actually not used anymore, but left because some
* gdb versions depend on them as a marker. * gdb versions depend on them as a marker.
*/ */
err |= __put_user(*((u64 *)&code), (u64 *)frame->retcode); put_user_ex(*((u64 *)&code), (u64 *)frame->retcode);
} put_user_catch(err);
if (err) if (err)
return -EFAULT; return -EFAULT;
@ -496,41 +522,40 @@ int ia32_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
return -EFAULT; return -EFAULT;
err |= __put_user(sig, &frame->sig); put_user_try {
err |= __put_user(ptr_to_compat(&frame->info), &frame->pinfo); put_user_ex(sig, &frame->sig);
err |= __put_user(ptr_to_compat(&frame->uc), &frame->puc); put_user_ex(ptr_to_compat(&frame->info), &frame->pinfo);
put_user_ex(ptr_to_compat(&frame->uc), &frame->puc);
err |= copy_siginfo_to_user32(&frame->info, info); err |= copy_siginfo_to_user32(&frame->info, info);
if (err)
return -EFAULT;
/* Create the ucontext. */ /* Create the ucontext. */
if (cpu_has_xsave) if (cpu_has_xsave)
err |= __put_user(UC_FP_XSTATE, &frame->uc.uc_flags); put_user_ex(UC_FP_XSTATE, &frame->uc.uc_flags);
else else
err |= __put_user(0, &frame->uc.uc_flags); put_user_ex(0, &frame->uc.uc_flags);
err |= __put_user(0, &frame->uc.uc_link); put_user_ex(0, &frame->uc.uc_link);
err |= __put_user(current->sas_ss_sp, &frame->uc.uc_stack.ss_sp); put_user_ex(current->sas_ss_sp, &frame->uc.uc_stack.ss_sp);
err |= __put_user(sas_ss_flags(regs->sp), put_user_ex(sas_ss_flags(regs->sp),
&frame->uc.uc_stack.ss_flags); &frame->uc.uc_stack.ss_flags);
err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size); put_user_ex(current->sas_ss_size, &frame->uc.uc_stack.ss_size);
err |= ia32_setup_sigcontext(&frame->uc.uc_mcontext, fpstate, err |= ia32_setup_sigcontext(&frame->uc.uc_mcontext, fpstate,
regs, set->sig[0]); regs, set->sig[0]);
err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set)); err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
if (err)
return -EFAULT;
if (ka->sa.sa_flags & SA_RESTORER) if (ka->sa.sa_flags & SA_RESTORER)
restorer = ka->sa.sa_restorer; restorer = ka->sa.sa_restorer;
else else
restorer = VDSO32_SYMBOL(current->mm->context.vdso, restorer = VDSO32_SYMBOL(current->mm->context.vdso,
rt_sigreturn); rt_sigreturn);
err |= __put_user(ptr_to_compat(restorer), &frame->pretcode); put_user_ex(ptr_to_compat(restorer), &frame->pretcode);
/* /*
* Not actually used anymore, but left because some gdb * Not actually used anymore, but left because some gdb
* versions need it. * versions need it.
*/ */
err |= __put_user(*((u64 *)&code), (u64 *)frame->retcode); put_user_ex(*((u64 *)&code), (u64 *)frame->retcode);
} put_user_catch(err);
if (err) if (err)
return -EFAULT; return -EFAULT;

Просмотреть файл

@ -112,8 +112,8 @@ ENTRY(ia32_sysenter_target)
CFI_DEF_CFA rsp,0 CFI_DEF_CFA rsp,0
CFI_REGISTER rsp,rbp CFI_REGISTER rsp,rbp
SWAPGS_UNSAFE_STACK SWAPGS_UNSAFE_STACK
movq %gs:pda_kernelstack, %rsp movq PER_CPU_VAR(kernel_stack), %rsp
addq $(PDA_STACKOFFSET),%rsp addq $(KERNEL_STACK_OFFSET),%rsp
/* /*
* No need to follow this irqs on/off section: the syscall * No need to follow this irqs on/off section: the syscall
* disabled irqs, here we enable it straight after entry: * disabled irqs, here we enable it straight after entry:
@ -273,13 +273,13 @@ ENDPROC(ia32_sysenter_target)
ENTRY(ia32_cstar_target) ENTRY(ia32_cstar_target)
CFI_STARTPROC32 simple CFI_STARTPROC32 simple
CFI_SIGNAL_FRAME CFI_SIGNAL_FRAME
CFI_DEF_CFA rsp,PDA_STACKOFFSET CFI_DEF_CFA rsp,KERNEL_STACK_OFFSET
CFI_REGISTER rip,rcx CFI_REGISTER rip,rcx
/*CFI_REGISTER rflags,r11*/ /*CFI_REGISTER rflags,r11*/
SWAPGS_UNSAFE_STACK SWAPGS_UNSAFE_STACK
movl %esp,%r8d movl %esp,%r8d
CFI_REGISTER rsp,r8 CFI_REGISTER rsp,r8
movq %gs:pda_kernelstack,%rsp movq PER_CPU_VAR(kernel_stack),%rsp
/* /*
* No need to follow this irqs on/off section: the syscall * No need to follow this irqs on/off section: the syscall
* disabled irqs and here we enable it straight after entry: * disabled irqs and here we enable it straight after entry:

Просмотреть файл

@ -23,8 +23,6 @@
*/ */
static inline void aout_dump_thread(struct pt_regs *regs, struct user *dump) static inline void aout_dump_thread(struct pt_regs *regs, struct user *dump)
{ {
u16 gs;
/* changed the size calculations - should hopefully work better. lbt */ /* changed the size calculations - should hopefully work better. lbt */
dump->magic = CMAGIC; dump->magic = CMAGIC;
dump->start_code = 0; dump->start_code = 0;
@ -57,7 +55,7 @@ static inline void aout_dump_thread(struct pt_regs *regs, struct user *dump)
dump->regs.ds = (u16)regs->ds; dump->regs.ds = (u16)regs->ds;
dump->regs.es = (u16)regs->es; dump->regs.es = (u16)regs->es;
dump->regs.fs = (u16)regs->fs; dump->regs.fs = (u16)regs->fs;
savesegment(gs, gs); dump->regs.gs = get_user_gs(regs);
dump->regs.orig_ax = regs->orig_ax; dump->regs.orig_ax = regs->orig_ax;
dump->regs.ip = regs->ip; dump->regs.ip = regs->ip;
dump->regs.cs = (u16)regs->cs; dump->regs.cs = (u16)regs->cs;

Просмотреть файл

@ -102,9 +102,6 @@ static inline void disable_acpi(void)
acpi_noirq = 1; acpi_noirq = 1;
} }
/* Fixmap pages to reserve for ACPI boot-time tables (see fixmap.h) */
#define FIX_ACPI_PAGES 4
extern int acpi_gsi_to_irq(u32 gsi, unsigned int *irq); extern int acpi_gsi_to_irq(u32 gsi, unsigned int *irq);
static inline void acpi_noirq_set(void) { acpi_noirq = 1; } static inline void acpi_noirq_set(void) { acpi_noirq = 1; }

Просмотреть файл

@ -33,7 +33,13 @@
} while (0) } while (0)
#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86_32)
extern void generic_apic_probe(void); extern void generic_apic_probe(void);
#else
static inline void generic_apic_probe(void)
{
}
#endif
#ifdef CONFIG_X86_LOCAL_APIC #ifdef CONFIG_X86_LOCAL_APIC
@ -41,6 +47,21 @@ extern unsigned int apic_verbosity;
extern int local_apic_timer_c2_ok; extern int local_apic_timer_c2_ok;
extern int disable_apic; extern int disable_apic;
#ifdef CONFIG_SMP
extern void __inquire_remote_apic(int apicid);
#else /* CONFIG_SMP */
static inline void __inquire_remote_apic(int apicid)
{
}
#endif /* CONFIG_SMP */
static inline void default_inquire_remote_apic(int apicid)
{
if (apic_verbosity >= APIC_DEBUG)
__inquire_remote_apic(apicid);
}
/* /*
* Basic functions accessing APICs. * Basic functions accessing APICs.
*/ */
@ -124,12 +145,35 @@ struct apic_ops {
extern struct apic_ops *apic_ops; extern struct apic_ops *apic_ops;
#define apic_read (apic_ops->read) static inline u32 apic_read(u32 reg)
#define apic_write (apic_ops->write) {
#define apic_icr_read (apic_ops->icr_read) return apic_ops->read(reg);
#define apic_icr_write (apic_ops->icr_write) }
#define apic_wait_icr_idle (apic_ops->wait_icr_idle)
#define safe_apic_wait_icr_idle (apic_ops->safe_wait_icr_idle) static inline void apic_write(u32 reg, u32 val)
{
apic_ops->write(reg, val);
}
static inline u64 apic_icr_read(void)
{
return apic_ops->icr_read();
}
static inline void apic_icr_write(u32 low, u32 high)
{
apic_ops->icr_write(low, high);
}
static inline void apic_wait_icr_idle(void)
{
apic_ops->wait_icr_idle();
}
static inline u32 safe_apic_wait_icr_idle(void)
{
return apic_ops->safe_wait_icr_idle();
}
extern int get_physical_broadcast(void); extern int get_physical_broadcast(void);
@ -196,4 +240,22 @@ static inline void disable_local_APIC(void) { }
#endif /* !CONFIG_X86_LOCAL_APIC */ #endif /* !CONFIG_X86_LOCAL_APIC */
#ifdef CONFIG_X86_64
#define SET_APIC_ID(x) (apic->set_apic_id(x))
#else
#ifdef CONFIG_X86_LOCAL_APIC
static inline unsigned default_get_apic_id(unsigned long x)
{
unsigned int ver = GET_APIC_VERSION(apic_read(APIC_LVR));
if (APIC_XAPIC(ver))
return (x >> 24) & 0xFF;
else
return (x >> 24) & 0x0F;
}
#endif
#endif
#endif /* _ASM_X86_APIC_H */ #endif /* _ASM_X86_APIC_H */

Просмотреть файл

@ -0,0 +1,12 @@
#ifndef _ASM_X86_APICNUM_H
#define _ASM_X86_APICNUM_H
/* define MAX_IO_APICS */
#ifdef CONFIG_X86_32
# define MAX_IO_APICS 64
#else
# define MAX_IO_APICS 128
# define MAX_LOCAL_APIC 32768
#endif
#endif /* _ASM_X86_APICNUM_H */

Просмотреть файл

Просмотреть файл

@ -1,155 +0,0 @@
#ifndef __ASM_MACH_APIC_H
#define __ASM_MACH_APIC_H
#define xapic_phys_to_log_apicid(cpu) (per_cpu(x86_bios_cpu_apicid, cpu))
#define esr_disable (1)
static inline int apic_id_registered(void)
{
return (1);
}
static inline const cpumask_t *target_cpus(void)
{
#ifdef CONFIG_SMP
return &cpu_online_map;
#else
return &cpumask_of_cpu(0);
#endif
}
#undef APIC_DEST_LOGICAL
#define APIC_DEST_LOGICAL 0
#define APIC_DFR_VALUE (APIC_DFR_FLAT)
#define INT_DELIVERY_MODE (dest_Fixed)
#define INT_DEST_MODE (0) /* phys delivery to target proc */
#define NO_BALANCE_IRQ (0)
static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid)
{
return (0);
}
static inline unsigned long check_apicid_present(int bit)
{
return (1);
}
static inline unsigned long calculate_ldr(int cpu)
{
unsigned long val, id;
val = apic_read(APIC_LDR) & ~APIC_LDR_MASK;
id = xapic_phys_to_log_apicid(cpu);
val |= SET_APIC_LOGICAL_ID(id);
return val;
}
/*
* Set up the logical destination ID.
*
* Intel recommends to set DFR, LDR and TPR before enabling
* an APIC. See e.g. "AP-388 82489DX User's Manual" (Intel
* document number 292116). So here it goes...
*/
static inline void init_apic_ldr(void)
{
unsigned long val;
int cpu = smp_processor_id();
apic_write(APIC_DFR, APIC_DFR_VALUE);
val = calculate_ldr(cpu);
apic_write(APIC_LDR, val);
}
static inline void setup_apic_routing(void)
{
printk("Enabling APIC mode: %s. Using %d I/O APICs\n",
"Physflat", nr_ioapics);
}
static inline int multi_timer_check(int apic, int irq)
{
return (0);
}
static inline int apicid_to_node(int logical_apicid)
{
return apicid_2_node[hard_smp_processor_id()];
}
static inline int cpu_present_to_apicid(int mps_cpu)
{
if (mps_cpu < nr_cpu_ids)
return (int) per_cpu(x86_bios_cpu_apicid, mps_cpu);
return BAD_APICID;
}
static inline physid_mask_t apicid_to_cpu_present(int phys_apicid)
{
return physid_mask_of_physid(phys_apicid);
}
extern u8 cpu_2_logical_apicid[];
/* Mapping from cpu number to logical apicid */
static inline int cpu_to_logical_apicid(int cpu)
{
if (cpu >= nr_cpu_ids)
return BAD_APICID;
return cpu_physical_id(cpu);
}
static inline physid_mask_t ioapic_phys_id_map(physid_mask_t phys_map)
{
/* For clustered we don't have a good way to do this yet - hack */
return physids_promote(0xFFL);
}
static inline void setup_portio_remap(void)
{
}
static inline void enable_apic_mode(void)
{
}
static inline int check_phys_apicid_present(int boot_cpu_physical_apicid)
{
return (1);
}
/* As we are using single CPU as destination, pick only one CPU here */
static inline unsigned int cpu_mask_to_apicid(const cpumask_t *cpumask)
{
int cpu;
int apicid;
cpu = first_cpu(*cpumask);
apicid = cpu_to_logical_apicid(cpu);
return apicid;
}
static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *cpumask,
const struct cpumask *andmask)
{
int cpu;
/*
* We're using fixed IRQ delivery, can only return one phys APIC ID.
* May as well be the first.
*/
for_each_cpu_and(cpu, cpumask, andmask)
if (cpumask_test_cpu(cpu, cpu_online_mask))
break;
if (cpu < nr_cpu_ids)
return cpu_to_logical_apicid(cpu);
return BAD_APICID;
}
static inline u32 phys_pkg_id(u32 cpuid_apic, int index_msb)
{
return cpuid_apic >> index_msb;
}
#endif /* __ASM_MACH_APIC_H */

Просмотреть файл

@ -1,13 +0,0 @@
#ifndef __ASM_MACH_APICDEF_H
#define __ASM_MACH_APICDEF_H
#define APIC_ID_MASK (0xFF<<24)
static inline unsigned get_apic_id(unsigned long x)
{
return (((x)>>24)&0xFF);
}
#define GET_APIC_ID(x) get_apic_id(x)
#endif

Просмотреть файл

@ -1,22 +0,0 @@
#ifndef __ASM_MACH_IPI_H
#define __ASM_MACH_IPI_H
void send_IPI_mask_sequence(const struct cpumask *mask, int vector);
void send_IPI_mask_allbutself(const struct cpumask *mask, int vector);
static inline void send_IPI_mask(const struct cpumask *mask, int vector)
{
send_IPI_mask_sequence(mask, vector);
}
static inline void send_IPI_allbutself(int vector)
{
send_IPI_mask_allbutself(cpu_online_mask, vector);
}
static inline void send_IPI_all(int vector)
{
send_IPI_mask(cpu_online_mask, vector);
}
#endif /* __ASM_MACH_IPI_H */

Просмотреть файл

@ -1,5 +1,55 @@
/* /*
* Some macros to handle stack frames in assembly.
x86 function call convention, 64-bit:
-------------------------------------
arguments | callee-saved | extra caller-saved | return
[callee-clobbered] | | [callee-clobbered] |
---------------------------------------------------------------------------
rdi rsi rdx rcx r8-9 | rbx rbp [*] r12-15 | r10-11 | rax, rdx [**]
( rsp is obviously invariant across normal function calls. (gcc can 'merge'
functions when it sees tail-call optimization possibilities) rflags is
clobbered. Leftover arguments are passed over the stack frame.)
[*] In the frame-pointers case rbp is fixed to the stack frame.
[**] for struct return values wider than 64 bits the return convention is a
bit more complex: up to 128 bits width we return small structures
straight in rax, rdx. For structures larger than that (3 words or
larger) the caller puts a pointer to an on-stack return struct
[allocated in the caller's stack frame] into the first argument - i.e.
into rdi. All other arguments shift up by one in this case.
Fortunately this case is rare in the kernel.
For 32-bit we have the following conventions - kernel is built with
-mregparm=3 and -freg-struct-return:
x86 function calling convention, 32-bit:
----------------------------------------
arguments | callee-saved | extra caller-saved | return
[callee-clobbered] | | [callee-clobbered] |
-------------------------------------------------------------------------
eax edx ecx | ebx edi esi ebp [*] | <none> | eax, edx [**]
( here too esp is obviously invariant across normal function calls. eflags
is clobbered. Leftover arguments are passed over the stack frame. )
[*] In the frame-pointers case ebp is fixed to the stack frame.
[**] We build with -freg-struct-return, which on 32-bit means similar
semantics as on 64-bit: edx can be used for a second return value
(i.e. covering integer and structure sizes up to 64 bits) - after that
it gets more complex and more expensive: 3-word or larger struct returns
get done in the caller's frame and the pointer to the return struct goes
into regparm0, i.e. eax - the other arguments shift up and the
function's register parameters degenerate to regparm=2 in essence.
*/
/*
* 64-bit system call stack frame layout defines and helpers,
* for assembly code:
*/ */
#define R15 0 #define R15 0
@ -9,7 +59,7 @@
#define RBP 32 #define RBP 32
#define RBX 40 #define RBX 40
/* arguments: interrupts/non tracing syscalls only save upto here*/ /* arguments: interrupts/non tracing syscalls only save up to here: */
#define R11 48 #define R11 48
#define R10 56 #define R10 56
#define R9 64 #define R9 64
@ -22,7 +72,7 @@
#define ORIG_RAX 120 /* + error_code */ #define ORIG_RAX 120 /* + error_code */
/* end of arguments */ /* end of arguments */
/* cpu exception frame or undefined in case of fast syscall. */ /* cpu exception frame or undefined in case of fast syscall: */
#define RIP 128 #define RIP 128
#define CS 136 #define CS 136
#define EFLAGS 144 #define EFLAGS 144

Просмотреть файл

@ -7,6 +7,20 @@
#include <linux/nodemask.h> #include <linux/nodemask.h>
#include <linux/percpu.h> #include <linux/percpu.h>
#ifdef CONFIG_SMP
extern void prefill_possible_map(void);
#else /* CONFIG_SMP */
static inline void prefill_possible_map(void) {}
#define cpu_physical_id(cpu) boot_cpu_physical_apicid
#define safe_smp_processor_id() 0
#define stack_smp_processor_id() 0
#endif /* CONFIG_SMP */
struct x86_cpu { struct x86_cpu {
struct cpu cpu; struct cpu cpu;
}; };
@ -17,4 +31,7 @@ extern void arch_unregister_cpu(int);
#endif #endif
DECLARE_PER_CPU(int, cpu_state); DECLARE_PER_CPU(int, cpu_state);
extern unsigned int boot_cpu_id;
#endif /* _ASM_X86_CPU_H */ #endif /* _ASM_X86_CPU_H */

Просмотреть файл

@ -93,6 +93,7 @@
#define X86_FEATURE_XTOPOLOGY (3*32+22) /* cpu topology enum extensions */ #define X86_FEATURE_XTOPOLOGY (3*32+22) /* cpu topology enum extensions */
#define X86_FEATURE_TSC_RELIABLE (3*32+23) /* TSC is known to be reliable */ #define X86_FEATURE_TSC_RELIABLE (3*32+23) /* TSC is known to be reliable */
#define X86_FEATURE_NONSTOP_TSC (3*32+24) /* TSC does not stop in C states */ #define X86_FEATURE_NONSTOP_TSC (3*32+24) /* TSC does not stop in C states */
#define X86_FEATURE_CLFLUSH_MONITOR (3*32+25) /* "" clflush reqd with monitor */
/* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */ /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */
#define X86_FEATURE_XMM3 (4*32+ 0) /* "pni" SSE-3 */ #define X86_FEATURE_XMM3 (4*32+ 0) /* "pni" SSE-3 */

Просмотреть файл

@ -0,0 +1,32 @@
#ifndef _ASM_X86_CPUMASK_H
#define _ASM_X86_CPUMASK_H
#ifndef __ASSEMBLY__
#include <linux/cpumask.h>
#ifdef CONFIG_X86_64
extern cpumask_var_t cpu_callin_mask;
extern cpumask_var_t cpu_callout_mask;
extern cpumask_var_t cpu_initialized_mask;
extern cpumask_var_t cpu_sibling_setup_mask;
extern void setup_cpu_local_masks(void);
#else /* CONFIG_X86_32 */
extern cpumask_t cpu_callin_map;
extern cpumask_t cpu_callout_map;
extern cpumask_t cpu_initialized;
extern cpumask_t cpu_sibling_setup_map;
#define cpu_callin_mask ((struct cpumask *)&cpu_callin_map)
#define cpu_callout_mask ((struct cpumask *)&cpu_callout_map)
#define cpu_initialized_mask ((struct cpumask *)&cpu_initialized)
#define cpu_sibling_setup_mask ((struct cpumask *)&cpu_sibling_setup_map)
static inline void setup_cpu_local_masks(void) { }
#endif /* CONFIG_X86_32 */
#endif /* __ASSEMBLY__ */
#endif /* _ASM_X86_CPUMASK_H */

Просмотреть файл

@ -1,39 +1,21 @@
#ifndef _ASM_X86_CURRENT_H #ifndef _ASM_X86_CURRENT_H
#define _ASM_X86_CURRENT_H #define _ASM_X86_CURRENT_H
#ifdef CONFIG_X86_32
#include <linux/compiler.h> #include <linux/compiler.h>
#include <asm/percpu.h> #include <asm/percpu.h>
#ifndef __ASSEMBLY__
struct task_struct; struct task_struct;
DECLARE_PER_CPU(struct task_struct *, current_task); DECLARE_PER_CPU(struct task_struct *, current_task);
static __always_inline struct task_struct *get_current(void)
{
return x86_read_percpu(current_task);
}
#else /* X86_32 */
#ifndef __ASSEMBLY__
#include <asm/pda.h>
struct task_struct;
static __always_inline struct task_struct *get_current(void) static __always_inline struct task_struct *get_current(void)
{ {
return read_pda(pcurrent); return percpu_read(current_task);
} }
#else /* __ASSEMBLY__ */
#include <asm/asm-offsets.h>
#define GET_CURRENT(reg) movq %gs:(pda_pcurrent),reg
#endif /* __ASSEMBLY__ */
#endif /* X86_32 */
#define current get_current() #define current get_current()
#endif /* __ASSEMBLY__ */
#endif /* _ASM_X86_CURRENT_H */ #endif /* _ASM_X86_CURRENT_H */

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше