Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 8492
b: refs/heads/master
c: 2f79f45
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Sep 11, 2005
1 parent e74b06c commit 2762a34
Show file tree
Hide file tree
Showing 45 changed files with 1,101 additions and 451 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: e130af5dab2abbf01c5d92ec5ac05912cf3d9aa7
refs/heads/master: 2f79f458d2ab4a77f1b9df8d0041e51ce085d7c0
1 change: 1 addition & 0 deletions trunk/Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,7 @@ running once the system is up.
keyboard and can not control its state
(Don't attempt to blink the leds)
i8042.noaux [HW] Don't check for auxiliary (== mouse) port
i8042.nokbd [HW] Don't check/create keyboard port
i8042.nomux [HW] Don't check presence of an active multiplexing
controller
i8042.nopnp [HW] Don't use ACPIPnP / PnPBIOS to discover KBD/AUX
Expand Down
5 changes: 3 additions & 2 deletions trunk/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# 1) Generate asm-offsets.h

#####
# 1) Generate asm-offsets.h
# 1) Generate asm-offsets.h
#

offsets-file := include/asm-$(ARCH)/asm-offsets.h
Expand All @@ -22,6 +22,7 @@ sed-$(CONFIG_MIPS) := "/^@@@/s///p"

quiet_cmd_offsets = GEN $@
define cmd_offsets
mkdir -p $(dir $@); \
cat $< | \
(set -e; \
echo "#ifndef __ASM_OFFSETS_H__"; \
Expand All @@ -43,6 +44,6 @@ arch/$(ARCH)/kernel/asm-offsets.s: arch/$(ARCH)/kernel/asm-offsets.c FORCE
$(Q)mkdir -p $(dir $@)
$(call if_changed_dep,cc_s_c)

$(srctree)/$(offsets-file): arch/$(ARCH)/kernel/asm-offsets.s Kbuild
$(obj)/$(offsets-file): arch/$(ARCH)/kernel/asm-offsets.s Kbuild
$(call cmd,offsets)

25 changes: 17 additions & 8 deletions trunk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ KALLSYMS = scripts/kallsyms
PERL = perl
CHECK = sparse

CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__
CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ $(CF)
MODFLAGS = -DMODULE
CFLAGS_MODULE = $(MODFLAGS)
AFLAGS_MODULE = $(MODFLAGS)
Expand Down Expand Up @@ -382,6 +382,9 @@ RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn --exclude CV
scripts_basic:
$(Q)$(MAKE) $(build)=scripts/basic

# To avoid any implicit rule to kick in, define an empty command.
scripts/basic/%: scripts_basic ;

.PHONY: outputmakefile
# outputmakefile generate a Makefile to be placed in output directory, if
# using a seperate output directory. This allows convinient use
Expand Down Expand Up @@ -444,9 +447,8 @@ ifeq ($(config-targets),1)
include $(srctree)/arch/$(ARCH)/Makefile
export KBUILD_DEFCONFIG

config: scripts_basic outputmakefile FORCE
$(Q)$(MAKE) $(build)=scripts/kconfig $@
%config: scripts_basic outputmakefile FORCE
config %config: scripts_basic outputmakefile FORCE
$(Q)mkdir -p include/linux
$(Q)$(MAKE) $(build)=scripts/kconfig $@

else
Expand Down Expand Up @@ -641,8 +643,13 @@ quiet_cmd_vmlinux__ ?= LD $@
# Generate new vmlinux version
quiet_cmd_vmlinux_version = GEN .version
cmd_vmlinux_version = set -e; \
. $(srctree)/scripts/mkversion > .tmp_version; \
mv -f .tmp_version .version; \
if [ ! -r .version ]; then \
rm -f .version; \
echo 1 >.version; \
else \
mv .version .old_version; \
expr 0$$(cat .old_version) + 1 >.version; \
fi; \
$(MAKE) $(build)=init

# Generate System.map
Expand Down Expand Up @@ -756,6 +763,7 @@ endif # ifdef CONFIG_KALLSYMS
# vmlinux image - including updated kernel symbols
vmlinux: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) $(kallsyms.o) FORCE
$(call if_changed_rule,vmlinux__)
$(Q)rm -f .old_version

# The actual objects are generated when descending,
# make sure no implicit rule kicks in
Expand Down Expand Up @@ -806,7 +814,7 @@ ifneq ($(KBUILD_MODULES),)
endif

prepare0: prepare prepare1 FORCE
$(Q)$(MAKE) $(build)=$(srctree)
$(Q)$(MAKE) $(build)=.

# All the preparing..
prepare-all: prepare0
Expand Down Expand Up @@ -848,7 +856,7 @@ include/asm:

# Split autoconf.h into include/linux/config/*

include/config/MARKER: include/linux/autoconf.h
include/config/MARKER: scripts/basic/split-include include/linux/autoconf.h
@echo ' SPLIT include/linux/autoconf.h -> include/config/*'
@scripts/basic/split-include include/linux/autoconf.h include/config
@touch $@
Expand Down Expand Up @@ -1053,6 +1061,7 @@ help:
@echo ' rpm - Build a kernel as an RPM package'
@echo ' tags/TAGS - Generate tags file for editors'
@echo ' cscope - Generate cscope index'
@echo ' kernelrelease - Output the release version string'
@echo ''
@echo 'Static analysers'
@echo ' buildcheck - List dangling references to vmlinux discarded sections'
Expand Down
11 changes: 3 additions & 8 deletions trunk/arch/i386/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,7 @@ SECTIONS
*(.exitcall.exit)
}

/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
STABS_DEBUG

DWARF_DEBUG
}
7 changes: 3 additions & 4 deletions trunk/arch/um/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ endef

ifneq ($(KBUILD_SRC),)
$(shell mkdir -p $(ARCH_DIR) && ln -fsn $(srctree)/$(ARCH_DIR)/Kconfig.$(SUBARCH) $(ARCH_DIR)/Kconfig.arch)
CLEAN_FILES += $(ARCH_DIR)/Kconfig.arch
else
$(shell cd $(ARCH_DIR) && ln -sf Kconfig.$(SUBARCH) Kconfig.arch)
endif
Expand Down Expand Up @@ -144,14 +143,14 @@ endef
#TT or skas makefiles and don't clean skas_ptregs.h.
CLEAN_FILES += linux x.i gmon.out $(ARCH_DIR)/include/uml-config.h \
$(GEN_HEADERS) $(ARCH_DIR)/include/skas_ptregs.h \
$(ARCH_DIR)/include/user_constants.h
$(ARCH_DIR)/include/user_constants.h $(ARCH_DIR)/Kconfig.arch

MRPROPER_FILES += $(SYMLINK_HEADERS) $(ARCH_SYMLINKS) \
$(addprefix $(ARCH_DIR)/kernel/,$(KERN_SYMLINKS)) $(ARCH_DIR)/os \
$(ARCH_DIR)/Kconfig.arch
$(addprefix $(ARCH_DIR)/kernel/,$(KERN_SYMLINKS)) $(ARCH_DIR)/os

archclean:
$(Q)$(MAKE) $(clean)=$(ARCH_DIR)/util
$(Q)$(MAKE) $(clean)=$(ARCH_DIR)/os-$(OS)/util
@find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \
-o -name '*.gcov' \) -type f -print | xargs rm -f

Expand Down
12 changes: 11 additions & 1 deletion trunk/arch/um/include/mem.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,17 @@ extern int physmem_subst_mapping(void *virt, int fd, __u64 offset, int w);
extern int is_remapped(void *virt);
extern int physmem_remove_mapping(void *virt);
extern void physmem_forget_descriptor(int fd);
extern unsigned long to_phys(void *virt);

extern unsigned long uml_physmem;
static inline unsigned long to_phys(void *virt)
{
return(((unsigned long) virt) - uml_physmem);
}

static inline void *to_virt(unsigned long phys)
{
return((void *) uml_physmem + phys);
}

#endif

Expand Down
37 changes: 4 additions & 33 deletions trunk/arch/um/kernel/dyn.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -146,37 +146,8 @@ SECTIONS
}
_end = .;
PROVIDE (end = .);
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
/* DWARF debug sections.
Symbols in the DWARF debugging sections are relative to the beginning
of the section so we begin them at 0. */
/* DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
/* SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }

STABS_DEBUG

DWARF_DEBUG
}
5 changes: 0 additions & 5 deletions trunk/arch/um/kernel/ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,9 @@ EXPORT_SYMBOL(host_task_size);
EXPORT_SYMBOL(arch_validate);
EXPORT_SYMBOL(get_kmem_end);

EXPORT_SYMBOL(page_to_phys);
EXPORT_SYMBOL(phys_to_page);
EXPORT_SYMBOL(high_physmem);
EXPORT_SYMBOL(empty_zero_page);
EXPORT_SYMBOL(um_virt_to_phys);
EXPORT_SYMBOL(__virt_to_page);
EXPORT_SYMBOL(to_phys);
EXPORT_SYMBOL(to_virt);
EXPORT_SYMBOL(mode_tt);
EXPORT_SYMBOL(handle_page_fault);
EXPORT_SYMBOL(find_iomem);
Expand Down
35 changes: 0 additions & 35 deletions trunk/arch/um/kernel/physmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,16 +248,6 @@ unsigned long high_physmem;

extern unsigned long physmem_size;

void *to_virt(unsigned long phys)
{
return((void *) uml_physmem + phys);
}

unsigned long to_phys(void *virt)
{
return(((unsigned long) virt) - uml_physmem);
}

int init_maps(unsigned long physmem, unsigned long iomem, unsigned long highmem)
{
struct page *p, *map;
Expand Down Expand Up @@ -298,31 +288,6 @@ int init_maps(unsigned long physmem, unsigned long iomem, unsigned long highmem)
return(0);
}

struct page *phys_to_page(const unsigned long phys)
{
return(&mem_map[phys >> PAGE_SHIFT]);
}

struct page *__virt_to_page(const unsigned long virt)
{
return(&mem_map[__pa(virt) >> PAGE_SHIFT]);
}

phys_t page_to_phys(struct page *page)
{
return((page - mem_map) << PAGE_SHIFT);
}

pte_t mk_pte(struct page *page, pgprot_t pgprot)
{
pte_t pte;

pte_set_val(pte, page_to_phys(page), pgprot);
if(pte_present(pte))
pte_mknewprot(pte_mknewpage(pte));
return(pte);
}

/* Changed during early boot */
static unsigned long kmem_top = 0;

Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/um/kernel/trap_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ int handle_page_fault(unsigned long address, unsigned long ip,
if(is_write && !(vma->vm_flags & VM_WRITE))
goto out;

if(!(vma->vm_flags & (VM_READ | VM_EXEC)))
/* Don't require VM_READ|VM_EXEC for write faults! */
if(!is_write && !(vma->vm_flags & (VM_READ | VM_EXEC)))
goto out;

do {
Expand All @@ -84,8 +85,7 @@ int handle_page_fault(unsigned long address, unsigned long ip,
pte = pte_offset_kernel(pmd, address);
} while(!pte_present(*pte));
err = 0;
*pte = pte_mkyoung(*pte);
if(pte_write(*pte)) *pte = pte_mkdirty(*pte);
WARN_ON(!pte_young(*pte) || (is_write && !pte_dirty(*pte)));
flush_tlb_page(vma, address);
out:
up_read(&mm->mmap_sem);
Expand Down
14 changes: 5 additions & 9 deletions trunk/arch/um/kernel/uml.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,10 @@ SECTIONS
*(.bss)
*(COMMON)
}
_end = . ;
_end = .;
PROVIDE (end = .);
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }

STABS_DEBUG

DWARF_DEBUG
}
19 changes: 3 additions & 16 deletions trunk/arch/x86_64/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -194,20 +194,7 @@ SECTIONS
#endif
}

/* DWARF 2 */
.debug_info 0 : { *(.debug_info) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
/* SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }


.comment 0 : { *(.comment) }
STABS_DEBUG

DWARF_DEBUG
}
Loading

0 comments on commit 2762a34

Please sign in to comment.