Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 18619
b: refs/heads/master
c: 1681b8e
h: refs/heads/master
i:
  18617: 6b0c4ad
  18615: db56926
v: v3
  • Loading branch information
Yasunori Goto authored and Tony Luck committed Jan 16, 2006
1 parent 13aa3e0 commit d31db78
Show file tree
Hide file tree
Showing 26 changed files with 1,828 additions and 71 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8dca6f33f026dc8a7fc2710b78a7521e899bd611
refs/heads/master: 1681b8e1588f9119899e422181f728b197b1fe34
28 changes: 13 additions & 15 deletions trunk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,12 @@ KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd)
$(if $(KBUILD_OUTPUT),, \
$(error output directory "$(saved-output)" does not exist))

.PHONY: $(MAKECMDGOALS) cdbuilddir
$(MAKECMDGOALS) _all: cdbuilddir
.PHONY: $(MAKECMDGOALS)

cdbuilddir:
$(filter-out _all,$(MAKECMDGOALS)) _all:
$(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \
KBUILD_SRC=$(CURDIR) \
KBUILD_EXTMOD="$(KBUILD_EXTMOD)" -f $(CURDIR)/Makefile $(MAKECMDGOALS)
KBUILD_EXTMOD="$(KBUILD_EXTMOD)" -f $(CURDIR)/Makefile $@

# Leave processing to above invocation of make
skip-makefile := 1
Expand Down Expand Up @@ -338,9 +337,8 @@ AFLAGS := -D__ASSEMBLY__

# Read KERNELRELEASE from .kernelrelease (if it exists)
KERNELRELEASE = $(shell cat .kernelrelease 2> /dev/null)
KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)

export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION \
export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE \
ARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \
CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE \
HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
Expand Down Expand Up @@ -435,7 +433,6 @@ export KBUILD_DEFCONFIG
config %config: scripts_basic outputmakefile FORCE
$(Q)mkdir -p include/linux
$(Q)$(MAKE) $(build)=scripts/kconfig $@
$(Q)$(MAKE) .kernelrelease

else
# ===========================================================================
Expand Down Expand Up @@ -545,7 +542,7 @@ export INSTALL_PATH ?= /boot
# makefile but the arguement can be passed to make if needed.
#

MODLIB = $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
MODLIB := $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
export MODLIB


Expand Down Expand Up @@ -786,10 +783,12 @@ endif
localver-full = $(localver)$(localver-auto)

# Store (new) KERNELRELASE string in .kernelrelease
kernelrelease = $(KERNELVERSION)$(localver-full)
kernelrelease = \
$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)$(localver-full)
.kernelrelease: FORCE
$(Q)rm -f $@
$(Q)echo $(kernelrelease) > $@
$(Q)rm -f .kernelrelease
$(Q)echo $(kernelrelease) > .kernelrelease
$(Q)echo " Building kernel $(kernelrelease)"


# Things we need to do before we recursively start building the kernel
Expand Down Expand Up @@ -899,7 +898,7 @@ define filechk_version.h
)
endef

include/linux/version.h: $(srctree)/Makefile .config FORCE
include/linux/version.h: $(srctree)/Makefile FORCE
$(call filechk,version.h)

# ---------------------------------------------------------------------------
Expand Down Expand Up @@ -1302,10 +1301,9 @@ checkstack:
$(PERL) $(src)/scripts/checkstack.pl $(ARCH)

kernelrelease:
$(if $(wildcard .kernelrelease), $(Q)echo $(KERNELRELEASE), \
$(error kernelrelease not valid - run 'make *config' to update it))
@echo $(KERNELRELEASE)
kernelversion:
@echo $(KERNELVERSION)
@echo $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)

# FIXME Should go into a make.lib or something
# ===========================================================================
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ static int powernowk8_verify(struct cpufreq_policy *pol)
}

/* per CPU init entry point to the driver */
static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
static int __init powernowk8_cpu_init(struct cpufreq_policy *pol)
{
struct powernow_k8_data *data;
cpumask_t oldmask = CPU_MASK_ALL;
Expand Down Expand Up @@ -1141,7 +1141,7 @@ static struct cpufreq_driver cpufreq_amd64_driver = {
};

/* driver entry point for init */
static int __cpuinit powernowk8_init(void)
static int __init powernowk8_init(void)
{
unsigned int i, supported_cpus = 0;

Expand Down
36 changes: 36 additions & 0 deletions trunk/arch/ia64/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -635,3 +635,39 @@ mem_init (void)
ia32_mem_init();
#endif
}

#ifdef CONFIG_MEMORY_HOTPLUG
void online_page(struct page *page)
{
ClearPageReserved(page);
set_page_count(page, 1);
__free_page(page);
totalram_pages++;
num_physpages++;
}

int add_memory(u64 start, u64 size)
{
pg_data_t *pgdat;
struct zone *zone;
unsigned long start_pfn = start >> PAGE_SHIFT;
unsigned long nr_pages = size >> PAGE_SHIFT;
int ret;

pgdat = NODE_DATA(0);

zone = pgdat->node_zones + ZONE_NORMAL;
ret = __add_pages(zone, start_pfn, nr_pages);

if (ret)
printk("%s: Problem encountered in __add_pages() as ret=%d\n",
__FUNCTION__, ret);

return ret;
}

int remove_memory(u64 start, u64 size)
{
return -EINVAL;
}
#endif
2 changes: 1 addition & 1 deletion trunk/arch/x86_64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ config HPET_TIMER
<http://www.intel.com/hardwaredesign/hpetspec.htm>.

config X86_PM_TIMER
bool "PM timer" if EMBEDDED
bool "PM timer"
depends on ACPI
default y
help
Expand Down
5 changes: 4 additions & 1 deletion trunk/arch/x86_64/kernel/apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -499,10 +499,13 @@ static int lapic_resume(struct sys_device *dev)
if (!apic_pm_state.active)
return 0;

/* XXX: Pavel needs this for S3 resume, but can't explain why */
set_fixmap_nocache(FIX_APIC_BASE, APIC_DEFAULT_PHYS_BASE);

local_irq_save(flags);
rdmsr(MSR_IA32_APICBASE, l, h);
l &= ~MSR_IA32_APICBASE_BASE;
l |= MSR_IA32_APICBASE_ENABLE | mp_lapic_addr;
l |= MSR_IA32_APICBASE_ENABLE | APIC_DEFAULT_PHYS_BASE;
wrmsr(MSR_IA32_APICBASE, l, h);
apic_write(APIC_LVTERR, ERROR_APIC_VECTOR | APIC_LVT_MASKED);
apic_write(APIC_ID, apic_pm_state.apic_id);
Expand Down
5 changes: 3 additions & 2 deletions trunk/arch/x86_64/kernel/asm-offsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ int main(void)
ENTRY(irqcount);
ENTRY(cpunumber);
ENTRY(irqstackptr);
ENTRY(data_offset);
BLANK();
#undef ENTRY
#ifdef CONFIG_IA32_EMULATION
Expand All @@ -67,6 +66,8 @@ int main(void)
DEFINE(pbe_orig_address, offsetof(struct pbe, orig_address));
DEFINE(pbe_next, offsetof(struct pbe, next));
BLANK();
DEFINE(TSS_ist, offsetof(struct tss_struct, ist));
#if DEBUG_STKSZ > EXCEPTION_STKSZ
DEFINE(DEBUG_IST, DEBUG_STACK);
#endif
return 0;
}
12 changes: 7 additions & 5 deletions trunk/arch/x86_64/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include <asm/unistd.h>
#include <asm/thread_info.h>
#include <asm/hw_irq.h>
#include <asm/page.h>

.code64

Expand Down Expand Up @@ -675,6 +674,9 @@ ENTRY(spurious_interrupt)

/* error code is on the stack already */
/* handle NMI like exceptions that can happen everywhere */
#ifndef DEBUG_IST
# define DEBUG_IST 0
#endif
.macro paranoidentry sym, ist=0
SAVE_ALL
cld
Expand All @@ -693,11 +695,11 @@ ENTRY(spurious_interrupt)
movq ORIG_RAX(%rsp),%rsi
movq $-1,ORIG_RAX(%rsp)
.if \ist
subq $EXCEPTION_STKSZ, per_cpu__init_tss + TSS_ist + (\ist - 1) * 8(%rbp)
subq $EXCEPTION_STACK_SIZE, per_cpu__init_tss + TSS_ist + (\ist - 1) * 8(%rbp)
.endif
call \sym
.if \ist
addq $EXCEPTION_STKSZ, per_cpu__init_tss + TSS_ist + (\ist - 1) * 8(%rbp)
addq $EXCEPTION_STACK_SIZE, per_cpu__init_tss + TSS_ist + (\ist - 1) * 8(%rbp)
.endif
cli
.endm
Expand Down Expand Up @@ -916,7 +918,7 @@ KPROBE_ENTRY(debug)
INTR_FRAME
pushq $0
CFI_ADJUST_CFA_OFFSET 8
paranoidentry do_debug, DEBUG_STACK
paranoidentry do_debug, DEBUG_IST
jmp paranoid_exit
CFI_ENDPROC
.previous .text
Expand Down Expand Up @@ -974,7 +976,7 @@ KPROBE_ENTRY(int3)
INTR_FRAME
pushq $0
CFI_ADJUST_CFA_OFFSET 8
paranoidentry do_int3, DEBUG_STACK
paranoidentry do_int3, DEBUG_IST
jmp paranoid_exit
CFI_ENDPROC
.previous .text
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86_64/kernel/setup64.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ struct desc_ptr idt_descr = { 256 * 16, (unsigned long) idt_table };
char boot_cpu_stack[IRQSTACKSIZE] __attribute__((section(".bss.page_aligned")));

unsigned long __supported_pte_mask __read_mostly = ~0UL;
static int do_not_nx __cpuinitdata = 0;
static int do_not_nx __initdata = 0;

/* noexec=on|off
Control non executable mappings for 64bit processes.
Expand Down
20 changes: 14 additions & 6 deletions trunk/arch/x86_64/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,11 +262,19 @@ static void __init find_early_table_space(unsigned long end)
tables = round_up(puds * sizeof(pud_t), PAGE_SIZE) +
round_up(pmds * sizeof(pmd_t), PAGE_SIZE);

/* RED-PEN putting page tables only on node 0 could
cause a hotspot and fill up ZONE_DMA. The page tables
need roughly 0.5KB per GB. */
start = 0x8000;
table_start = find_e820_area(start, end, tables);
/* Put page tables beyond the DMA zones if possible.
RED-PEN might be better to spread them out more over
memory to avoid hotspots */
if (end > MAX_DMA32_PFN<<PAGE_SHIFT)
start = MAX_DMA32_PFN << PAGE_SHIFT;
else if (end > MAX_DMA_PFN << PAGE_SHIFT)
start = MAX_DMA_PFN << PAGE_SHIFT;
else
start = 0x8000;

table_start = find_e820_area(start, end, tables);
if (table_start == -1)
table_start = find_e820_area(0x8000, end, tables);
if (table_start == -1UL)
panic("Cannot find space for the kernel page tables");

Expand Down Expand Up @@ -531,7 +539,7 @@ void mark_rodata_ro(void)
#ifdef CONFIG_BLK_DEV_INITRD
void free_initrd_mem(unsigned long start, unsigned long end)
{
if (start >= end)
if (start < (unsigned long)&_end)
return;
printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10);
for (; start < end; start += PAGE_SIZE) {
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/block/ps2esdi.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
#include <linux/init.h>
#include <linux/ioport.h>
#include <linux/module.h>
#include <linux/hdreg.h>

#include <asm/system.h>
#include <asm/io.h>
Expand Down
Loading

0 comments on commit d31db78

Please sign in to comment.