Skip to content

Commit

Permalink
Merge branches 'x86/apic', 'x86/defconfig', 'x86/memtest', 'x86/mm' a…
Browse files Browse the repository at this point in the history
…nd 'linus' into x86/core
  • Loading branch information
Ingo Molnar committed Feb 26, 2009
6 parents 801c0be + b5f26d0 + 15d4fcd + 6382312 + 34754b6 + 694593e commit ecc25fb
Show file tree
Hide file tree
Showing 78 changed files with 8,355 additions and 229 deletions.
7 changes: 6 additions & 1 deletion Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1308,8 +1308,13 @@ and is between 256 and 4096 characters. It is defined in the file

memtest= [KNL,X86] Enable memtest
Format: <integer>
range: 0,4 : pattern number
default : 0 <disable>
Specifies the number of memtest passes to be
performed. Each pass selects another test
pattern from a given set of patterns. Memtest
fills the memory with this pattern, validates
memory contents and reserves bad memory
regions that are detected.

meye.*= [HW] Set MotionEye Camera parameters
See Documentation/video4linux/meye.txt.
Expand Down
6 changes: 6 additions & 0 deletions arch/arm/mach-rpc/riscpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <linux/serial_8250.h>
#include <linux/ata_platform.h>
#include <linux/io.h>
#include <linux/i2c.h>

#include <asm/elf.h>
#include <asm/mach-types.h>
Expand Down Expand Up @@ -201,8 +202,13 @@ static struct platform_device *devs[] __initdata = {
&pata_device,
};

static struct i2c_board_info i2c_rtc = {
I2C_BOARD_INFO("pcf8583", 0x50)
};

static int __init rpc_init(void)
{
i2c_register_board_info(0, &i2c_rtc, 1);
return platform_add_devices(devs, ARRAY_SIZE(devs));
}

Expand Down
6 changes: 4 additions & 2 deletions arch/x86/configs/i386_defconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.29-rc4
# Thu Feb 12 12:57:57 2009
# Tue Feb 24 15:50:58 2009
#
# CONFIG_64BIT is not set
CONFIG_X86_32=y
Expand Down Expand Up @@ -266,7 +266,9 @@ CONFIG_PREEMPT_VOLUNTARY=y
CONFIG_X86_LOCAL_APIC=y
CONFIG_X86_IO_APIC=y
CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y
# CONFIG_X86_MCE is not set
CONFIG_X86_MCE=y
CONFIG_X86_MCE_NONFATAL=y
CONFIG_X86_MCE_P4THERMAL=y
CONFIG_VM86=y
# CONFIG_TOSHIBA is not set
# CONFIG_I8K is not set
Expand Down
6 changes: 4 additions & 2 deletions arch/x86/configs/x86_64_defconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.29-rc4
# Thu Feb 12 12:57:29 2009
# Tue Feb 24 15:44:16 2009
#
CONFIG_64BIT=y
# CONFIG_X86_32 is not set
Expand Down Expand Up @@ -266,7 +266,9 @@ CONFIG_PREEMPT_VOLUNTARY=y
CONFIG_X86_LOCAL_APIC=y
CONFIG_X86_IO_APIC=y
CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y
# CONFIG_X86_MCE is not set
CONFIG_X86_MCE=y
CONFIG_X86_MCE_INTEL=y
CONFIG_X86_MCE_AMD=y
# CONFIG_I8K is not set
CONFIG_MICROCODE=y
CONFIG_MICROCODE_INTEL=y
Expand Down
4 changes: 2 additions & 2 deletions arch/x86/include/asm/uaccess_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ __copy_from_user(void *to, const void __user *from, unsigned long n)
}

static __always_inline unsigned long __copy_from_user_nocache(void *to,
const void __user *from, unsigned long n)
const void __user *from, unsigned long n, unsigned long total)
{
might_fault();
if (__builtin_constant_p(n)) {
Expand All @@ -180,7 +180,7 @@ static __always_inline unsigned long __copy_from_user_nocache(void *to,

static __always_inline unsigned long
__copy_from_user_inatomic_nocache(void *to, const void __user *from,
unsigned long n)
unsigned long n, unsigned long total)
{
return __copy_from_user_ll_nocache_nozero(to, from, n);
}
Expand Down
9 changes: 4 additions & 5 deletions arch/x86/include/asm/uaccess_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ extern long __copy_user_nocache(void *dst, const void __user *src,
unsigned size, int zerorest);

static inline int __copy_from_user_nocache(void *dst, const void __user *src,
unsigned size)
unsigned size, unsigned long total)
{
might_sleep();
/*
Expand All @@ -198,17 +198,16 @@ static inline int __copy_from_user_nocache(void *dst, const void __user *src,
* non-temporal stores here. Smaller writes get handled
* via regular __copy_from_user():
*/
if (likely(size >= PAGE_SIZE))
if (likely(total >= PAGE_SIZE))
return __copy_user_nocache(dst, src, size, 1);
else
return __copy_from_user(dst, src, size);
}

static inline int __copy_from_user_inatomic_nocache(void *dst,
const void __user *src,
unsigned size)
const void __user *src, unsigned size, unsigned total)
{
if (likely(size >= PAGE_SIZE))
if (likely(total >= PAGE_SIZE))
return __copy_user_nocache(dst, src, size, 0);
else
return __copy_from_user_inatomic(dst, src, size);
Expand Down
6 changes: 3 additions & 3 deletions arch/x86/kernel/alternative.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,12 +498,12 @@ void *text_poke_early(void *addr, const void *opcode, size_t len)
*/
void *__kprobes text_poke(void *addr, const void *opcode, size_t len)
{
unsigned long flags;
char *vaddr;
int nr_pages = 2;
struct page *pages[2];
int i;

might_sleep();
if (!core_kernel_text((unsigned long)addr)) {
pages[0] = vmalloc_to_page(addr);
pages[1] = vmalloc_to_page(addr + PAGE_SIZE);
Expand All @@ -517,9 +517,9 @@ void *__kprobes text_poke(void *addr, const void *opcode, size_t len)
nr_pages = 1;
vaddr = vmap(pages, nr_pages, VM_MAP, PAGE_KERNEL);
BUG_ON(!vaddr);
local_irq_save(flags);
local_irq_disable();
memcpy(&vaddr[(unsigned long)addr & ~PAGE_MASK], opcode, len);
local_irq_restore(flags);
local_irq_enable();
vunmap(vaddr);
sync_core();
/* Could also do a CLFLUSH here to speed up CPU recovery; but
Expand Down
57 changes: 24 additions & 33 deletions arch/x86/kernel/apic/summit_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
#include <linux/gfp.h>
#include <linux/smp.h>

static inline unsigned summit_get_apic_id(unsigned long x)
static unsigned summit_get_apic_id(unsigned long x)
{
return (x >> 24) & 0xFF;
}
Expand All @@ -58,7 +58,7 @@ static inline void summit_send_IPI_mask(const cpumask_t *mask, int vector)
default_send_IPI_mask_sequence_logical(mask, vector);
}

static inline void summit_send_IPI_allbutself(int vector)
static void summit_send_IPI_allbutself(int vector)
{
cpumask_t mask = cpu_online_map;
cpu_clear(smp_processor_id(), mask);
Expand All @@ -67,7 +67,7 @@ static inline void summit_send_IPI_allbutself(int vector)
summit_send_IPI_mask(&mask, vector);
}

static inline void summit_send_IPI_all(int vector)
static void summit_send_IPI_all(int vector)
{
summit_send_IPI_mask(&cpu_online_map, vector);
}
Expand All @@ -82,8 +82,8 @@ extern void setup_summit(void);
#define setup_summit() {}
#endif

static inline int
summit_mps_oem_check(struct mpc_table *mpc, char *oem, char *productid)
static int summit_mps_oem_check(struct mpc_table *mpc, char *oem,
char *productid)
{
if (!strncmp(oem, "IBM ENSW", 8) &&
(!strncmp(productid, "VIGIL SMP", 9)
Expand All @@ -98,7 +98,7 @@ summit_mps_oem_check(struct mpc_table *mpc, char *oem, char *productid)
}

/* Hook from generic ACPI tables.c */
static inline int summit_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
static int summit_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
{
if (!strncmp(oem_id, "IBM", 3) &&
(!strncmp(oem_table_id, "SERVIGIL", 8)
Expand Down Expand Up @@ -186,7 +186,7 @@ static inline int is_WPEG(struct rio_detail *rio){

#define SUMMIT_APIC_DFR_VALUE (APIC_DFR_CLUSTER)

static inline const cpumask_t *summit_target_cpus(void)
static const cpumask_t *summit_target_cpus(void)
{
/* CPU_MASK_ALL (0xff) has undefined behaviour with
* dest_LowestPrio mode logical clustered apic interrupt routing
Expand All @@ -195,19 +195,18 @@ static inline const cpumask_t *summit_target_cpus(void)
return &cpumask_of_cpu(0);
}

static inline unsigned long
summit_check_apicid_used(physid_mask_t bitmap, int apicid)
static unsigned long summit_check_apicid_used(physid_mask_t bitmap, int apicid)
{
return 0;
}

/* we don't use the phys_cpu_present_map to indicate apicid presence */
static inline unsigned long summit_check_apicid_present(int bit)
static unsigned long summit_check_apicid_present(int bit)
{
return 1;
}

static inline void summit_init_apic_ldr(void)
static void summit_init_apic_ldr(void)
{
unsigned long val, id;
int count = 0;
Expand All @@ -234,18 +233,18 @@ static inline void summit_init_apic_ldr(void)
apic_write(APIC_LDR, val);
}

static inline int summit_apic_id_registered(void)
static int summit_apic_id_registered(void)
{
return 1;
}

static inline void summit_setup_apic_routing(void)
static void summit_setup_apic_routing(void)
{
printk("Enabling APIC mode: Summit. Using %d I/O APICs\n",
nr_ioapics);
}

static inline int summit_apicid_to_node(int logical_apicid)
static int summit_apicid_to_node(int logical_apicid)
{
#ifdef CONFIG_SMP
return apicid_2_node[hard_smp_processor_id()];
Expand All @@ -266,49 +265,42 @@ static inline int summit_cpu_to_logical_apicid(int cpu)
#endif
}

static inline int summit_cpu_present_to_apicid(int mps_cpu)
static int summit_cpu_present_to_apicid(int mps_cpu)
{
if (mps_cpu < nr_cpu_ids)
return (int)per_cpu(x86_bios_cpu_apicid, mps_cpu);
else
return BAD_APICID;
}

static inline physid_mask_t
summit_ioapic_phys_id_map(physid_mask_t phys_id_map)
static physid_mask_t summit_ioapic_phys_id_map(physid_mask_t phys_id_map)
{
/* For clustered we don't have a good way to do this yet - hack */
return physids_promote(0x0F);
}

static inline physid_mask_t summit_apicid_to_cpu_present(int apicid)
static physid_mask_t summit_apicid_to_cpu_present(int apicid)
{
return physid_mask_of_physid(0);
}

static inline void summit_setup_portio_remap(void)
{
}

static inline int summit_check_phys_apicid_present(int boot_cpu_physical_apicid)
static int summit_check_phys_apicid_present(int boot_cpu_physical_apicid)
{
return 1;
}

static inline unsigned int summit_cpu_mask_to_apicid(const cpumask_t *cpumask)
static unsigned int summit_cpu_mask_to_apicid(const cpumask_t *cpumask)
{
int cpus_found = 0;
int num_bits_set;
int apicid;
int cpu;

num_bits_set = cpus_weight(*cpumask);
/* Return id to all */
if (num_bits_set >= nr_cpu_ids)
return 0xFF;
return BAD_APICID;
/*
* The cpus in the mask must all be on the apic cluster. If are not
* on the same apicid cluster return default value of target_cpus():
* The cpus in the mask must all be on the apic cluster.
*/
cpu = first_cpu(*cpumask);
apicid = summit_cpu_to_logical_apicid(cpu);
Expand All @@ -318,9 +310,9 @@ static inline unsigned int summit_cpu_mask_to_apicid(const cpumask_t *cpumask)
int new_apicid = summit_cpu_to_logical_apicid(cpu);

if (APIC_CLUSTER(apicid) != APIC_CLUSTER(new_apicid)) {
printk ("%s: Not a valid mask!\n", __func__);
printk("%s: Not a valid mask!\n", __func__);

return 0xFF;
return BAD_APICID;
}
apicid = apicid | new_apicid;
cpus_found++;
Expand All @@ -330,8 +322,7 @@ static inline unsigned int summit_cpu_mask_to_apicid(const cpumask_t *cpumask)
return apicid;
}

static inline unsigned int
summit_cpu_mask_to_apicid_and(const struct cpumask *inmask,
static unsigned int summit_cpu_mask_to_apicid_and(const struct cpumask *inmask,
const struct cpumask *andmask)
{
int apicid = summit_cpu_to_logical_apicid(0);
Expand All @@ -356,7 +347,7 @@ summit_cpu_mask_to_apicid_and(const struct cpumask *inmask,
*
* See Intel's IA-32 SW Dev's Manual Vol2 under CPUID.
*/
static inline int summit_phys_pkg_id(int cpuid_apic, int index_msb)
static int summit_phys_pkg_id(int cpuid_apic, int index_msb)
{
return hard_smp_processor_id() >> index_msb;
}
Expand Down
3 changes: 3 additions & 0 deletions arch/x86/kernel/e820.c
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,9 @@ void __init reserve_early_overlap_ok(u64 start, u64 end, char *name)
*/
void __init reserve_early(u64 start, u64 end, char *name)
{
if (start >= end)
return;

drop_overlaps_that_are_ok(start, end);
__reserve_early(start, end, name, 0);
}
Expand Down
Loading

0 comments on commit ecc25fb

Please sign in to comment.