Commit 263cc27f authored by Andy Grover's avatar Andy Grover

Merge groveronline.com:/root/bk/linux-2.5

into groveronline.com:/root/bk/linux-acpi
parents a9b3ee51 cf5ba9c8
......@@ -28,8 +28,6 @@ JFS TODO list:
Plans for our near term development items
- enhance support for logfile on dedicated partition
- get access control list functionality operational
- get extended attributes functionality operational
Longer term work items
......@@ -37,7 +35,7 @@ Longer term work items
- add quota support
- add support for block sizes (512,1024,2048)
Please send bugs, comments, cards and letters to linuxjfs@us.ibm.com.
Please send bugs, comments, cards and letters to shaggy@austin.ibm.com.
The JFS mailing list can be subscribed to by using the link labeled
"Mail list Subscribe" at our web page http://oss.software.ibm.com/jfs/.
00-INDEX
- this file: info on the kernel build process
bug-list.txt
- known bugs in kbuild programs
commands.txt
- overview of kbuild commands
kconfig-language.txt
- specification of Config Language, the language in Kconfig files
random.txt
- description of generic config targets
makefiles.txt
- developer information for linux kernel makefiles
Bug List
21 January 1999
Michael Elizabeth Chastain, <mailto:mec@shout.net>
- If a variable has a value of "m" in the previous .config file,
and a type of bool in the Config script, then all the interpreters
get confused. This happens frequently when someone changes a
tristate option to a bool option and people in the field have
.config files with a value of 'm'. For example: CONFIG_PSMOUSE.
- CONFIG_MODVERSIONS has incorrect dependencies. If you have a
problem building the kernel, and you have CONFIG_MODVERSIONS turned
on, do a 'make dep' followed by 'make clean' before you try anything
else.
- 'make dep' uses multistage dependencies, so the .hdepend file contains
'touch' commands. As a result, building a kernel often touches files
in include/linux/*.h. This messes up CVS and other systems which like
to rely on file dates.
- 'make dep' fails for C files which include other C files, such as
drivers/cdrom/sbpcd2.c.
This diff is collapsed.
......@@ -9,20 +9,13 @@ modules packages aren't aware of some of the newer modular features
that the kernel now supports. The current required version is listed
in the file linux/Documentation/Changes.
* * * NOTE * * *
The kernel has been changed to remove kerneld support and use
the new kmod support. Keep this in mind when reading this file. Kmod
does the exact same thing as kerneld, but doesn't require an external
program (see Documentation/kmod.txt)
In the beginning...
-------------------
Anyway, your first step is to compile the kernel, as explained in the
file linux/README. It generally goes like:
make config
make dep
make *config <= usually menuconfig or xconfig
make clean
make zImage or make zlilo
......@@ -39,15 +32,16 @@ You will generally select the minimal resident set that is needed to boot:
plus those things that you just can't live without...
The set of modules is constantly increasing, and you will be able to select
the option "m" in "make config" for those features that the current kernel
the option "m" in "make menuconfig" for those features that the current kernel
can offer as loadable modules.
You also have a possibility to create modules that are less dependent on
the kernel version. This option can be selected during "make config", by
the kernel version. This option can be selected during "make *config", by
enabling CONFIG_MODVERSIONS, and is most useful on "stable" kernel versions,
such as the kernels from the 1.2 and 2.0 series.
such as the kernels from the 2.<even number> series.
If you have modules that are based on sources that are not included in
the official kernel sources, you will certainly like this option...
See below how to compile modules outside the official kernel.
Here is a sample of the available modules included in the kernel sources:
......@@ -83,22 +77,45 @@ When you have made the kernel, you create the modules by doing:
make modules
This will compile all modules and update the linux/modules directory.
In this directory you will then find a bunch of symbolic links,
pointing to the various object files in the kernel tree.
This will compile all modules. A module is identified by the
extension .ko, for kernel object.
Now, after you have created all your modules, you should also do:
make modules_install
This will copy all newly made modules into subdirectories under
"/lib/modules/kernel_release/", where "kernel_release" is something
like 2.0.1, or whatever the current kernel version is...
like 2.5.54, or whatever the current kernel version is.
Note: Installing modules may require root privileges.
As soon as you have rebooted the newly made kernel, you can install
and remove modules at will with the utilities: "insmod" and "rmmod".
After reading the man-page for insmod, you will also know how easy
it is to configure a module when you do "insmod" (hint: symbol=value).
Installing modules in a non-standard location
---------------------------------------------
When the modules needs to be installed under another directory
the INSTALL_MOD_PATH can be used to prefix "/lib/modules" as seen
in the following example:
make INSTALL_MOD_PATH=/frodo modules_install
This will install the modules in the directory /frodo/lib/modules.
/frodo can be a NFS mounted filesystem on another machine, allowing
out-of-the-box support for installation on remote machines.
Compiling modules outside the official kernel
---------------------------------------------
Often modules are developed outside the official kernel.
To keep up with changes in the build system the most portable way
to compile a module outside the kernel is to use the following command-line:
make -C path/to/kernel/src SUBDIRS=$PWD modules
This requires that a makefile exits made in accordance to
Documentation/kbuild/makefiles.txt.
Nifty features:
---------------
......
......@@ -54,7 +54,7 @@ CROSS_COMPILE =
# That's our default target when none is given on the command line
all: vmlinux
all: vmlinux modules
# Decide whether to build built-in, modular, or both.
# Normally, just do built-in.
......@@ -183,6 +183,8 @@ export CPPFLAGS NOSTDINC_FLAGS OBJCOPYFLAGS LDFLAGS
export CFLAGS CFLAGS_KERNEL CFLAGS_MODULE
export AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
export MODVERDIR := .tmp_versions
# The temporary file to save gcc -MD generated dependencies must not
# contain a comma
depfile = $(subst $(comma),_,$(@D)/.$(@F).d)
......@@ -190,7 +192,7 @@ depfile = $(subst $(comma),_,$(@D)/.$(@F).d)
noconfig_targets := xconfig menuconfig config oldconfig randconfig \
defconfig allyesconfig allnoconfig allmodconfig \
clean mrproper distclean \
help tags TAGS sgmldocs psdocs pdfdocs htmldocs \
help tags TAGS cscope sgmldocs psdocs pdfdocs htmldocs \
checkconfig checkhelp checkincludes
RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS \) -prune -o
......@@ -256,14 +258,22 @@ ifdef include_config
-include .config.cmd
ifdef CONFIG_MODULES
export EXPORT_FLAGS := -DEXPORT_SYMTAB
endif
ifndef CONFIG_FRAME_POINTER
CFLAGS += -fomit-frame-pointer
endif
# When we're building modules with modversions, we need to consider
# the built-in objects during the descend as well, in order to
# make sure the checksums are uptodate before we record them.
ifdef CONFIG_MODVERSIONS
ifeq ($(KBUILD_MODULES),1)
ifneq ($(KBUILD_BUILTIN),1)
KBUILD_BUILTIN := 1
endif
endif
endif
#
# INSTALL_PATH specifies where to place the updated kernel and system map
# images. Uncomment if you want to place them anywhere other than root.
......@@ -289,12 +299,12 @@ export MODLIB
# normal descending-into-subdirs phase, since at that time
# we cannot yet know if we will need to relink vmlinux.
# So we descend into init/ inside the rule for vmlinux again.
vmlinux-objs := $(HEAD) $(init-y) $(core-y) $(libs-y) $(drivers-y) $(net-y)
head-y += $(HEAD)
vmlinux-objs := $(head-y) $(init-y) $(core-y) $(libs-y) $(drivers-y) $(net-y)
quiet_cmd_vmlinux__ = LD $@
define cmd_vmlinux__
$(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) $(HEAD) $(init-y) \
$(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) $(head-y) $(init-y) \
--start-group \
$(core-y) \
$(libs-y) \
......@@ -384,7 +394,7 @@ $(sort $(vmlinux-objs)): $(SUBDIRS) ;
# Handle descending into subdirectories listed in $(SUBDIRS)
.PHONY: $(SUBDIRS)
$(SUBDIRS): .hdepend prepare
$(SUBDIRS): prepare
$(Q)$(MAKE) $(build)=$@
# Things we need done before we descend to build or make
......@@ -392,6 +402,16 @@ $(SUBDIRS): .hdepend prepare
.PHONY: prepare
prepare: include/linux/version.h include/asm include/config/MARKER
ifdef CONFIG_MODVERSIONS
ifdef KBUILD_MODULES
ifeq ($(origin SUBDIRS),file)
$(Q)rm -rf $(MODVERDIR)
else
@echo '*** Warning: Overriding SUBDIRS on the command line can cause'
@echo '*** inconsistencies with module symbol versions'
endif
endif
endif
@echo ' Starting the build. KBUILD_BUILTIN=$(KBUILD_BUILTIN) KBUILD_MODULES=$(KBUILD_MODULES)'
# We need to build init/vermagic.o before descending since all modules
......@@ -424,6 +444,8 @@ targets += arch/$(ARCH)/vmlinux.lds.s
$(Q)$(MAKE) $(build)=$(@D) $@
%.o: %.c scripts FORCE
$(Q)$(MAKE) $(build)=$(@D) $@
%/: scripts prepare FORCE
$(Q)$(MAKE) $(build)=$(@D)
%.ko: scripts FORCE
$(Q)$(MAKE) $(build)=$(@D) $@
%.lst: %.c scripts FORCE
......@@ -475,61 +497,11 @@ include/linux/version.h: Makefile
) > $@.tmp
@$(update-if-changed)
# Generate module versions
# ---------------------------------------------------------------------------
# The targets are still named depend / dep for traditional
# reasons, but the only thing we do here is generating
# the module version checksums.
.PHONY: depend dep $(patsubst %,_sfdep_%,$(SUBDIRS))
depend dep: .hdepend
# .hdepend is our (misnomed) marker for whether we've
# generated module versions
make-versions := $(strip $(if $(filter dep depend,$(MAKECMDGOALS)),1) \
$(if $(wildcard .hdepend),,1))
.hdepend: prepare FORCE
ifneq ($(make-versions),)
@$(MAKE) include/linux/modversions.h
@touch $@
endif
ifdef CONFIG_MODVERSIONS
# Update modversions.h, but only if it would change.
.PHONY: __rm_tmp_export-objs
__rm_tmp_export-objs:
@rm -rf .tmp_export-objs
include/linux/modversions.h: $(patsubst %,_modver_%,$(SUBDIRS))
@echo -n ' Generating $@'
@( echo "#ifndef _LINUX_MODVERSIONS_H";\
echo "#define _LINUX_MODVERSIONS_H"; \
echo "#include <linux/modsetver.h>"; \
cd .tmp_export-objs >/dev/null; \
for f in `find modules -name \*.ver -print | sort`; do \
echo "#include <linux/$${f}>"; \
done; \
echo "#endif"; \
) > $@.tmp; \
$(update-if-changed)
.PHONY: $(patsubst %, _modver_%, $(SUBDIRS))
$(patsubst %, _modver_%, $(SUBDIRS)): __rm_tmp_export-objs
$(Q)$(MAKE) -f scripts/Makefile.modver obj=$(patsubst _modver_%,%,$@)
else # !CONFIG_MODVERSIONS
.PHONY: include/linux/modversions.h
include/linux/modversions.h:
endif # CONFIG_MODVERSIONS
.PHONY: depend dep
depend dep:
@echo '*** Warning: make $@ is unnecessary now.'
# ---------------------------------------------------------------------------
# Modules
......@@ -538,12 +510,16 @@ ifdef CONFIG_MODULES
# Build modules
.PHONY: modules __modversions
modules: $(SUBDIRS) __modversions
ifdef CONFIG_MODVERSIONS
MODFLAGS += -include include/linux/modversions.h
endif
.PHONY: modules
modules: $(SUBDIRS)
__modversions: vmlinux $(SUBDIRS)
@echo ' Recording module symbol versions.';
$(Q)$(MAKE) -rR -f scripts/Makefile.modver
endif
# Install modules
......@@ -574,6 +550,7 @@ _modinst_post:
.PHONY: $(patsubst %, _modinst_%, $(SUBDIRS))
$(patsubst %, _modinst_%, $(SUBDIRS)) :
$(Q)$(MAKE) -rR -f scripts/Makefile.modinst obj=$(patsubst _modinst_%,%,$@)
else # CONFIG_MODULES
# Modules not configured
......@@ -624,7 +601,7 @@ spec:
rpm: clean spec
find . $(RCS_FIND_IGNORE) \
\( -size 0 -o -name .depend -o -name .hdepend \) \
\( -size 0 -o -name .depend -o -name .hdepend\) \
-type f -print | xargs rm -f
set -e; \
cd $(TOPDIR)/.. ; \
......@@ -718,25 +695,26 @@ MRPROPER_FILES += \
.menuconfig.log \
include/asm \
.hdepend include/linux/modversions.h \
tags TAGS kernel.spec \
tags TAGS cscope kernel.spec \
.tmp*
# Directories removed with 'make mrproper'
MRPROPER_DIRS += \
$(MODVERDIR) \
.tmp_export-objs \
include/config \
include/linux/modules
# clean - Delete all intermediate files
#
clean-dirs += $(ALL_SUBDIRS) Documentation/DocBook scripts
$(addprefix _clean_,$(clean-dirs)):
clean-dirs += $(addprefix _clean_,$(ALL_SUBDIRS) Documentation/DocBook scripts)
.PHONY: $(clean-dirs) clean archclean mrproper archmrproper distclean
$(clean-dirs):
$(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)
quiet_cmd_rmclean = RM $$(CLEAN_FILES)
cmd_rmclean = rm -f $(CLEAN_FILES)
clean: archclean $(addprefix _clean_,$(clean-dirs))
clean: archclean $(clean-dirs)
$(call cmd,rmclean)
@find . $(RCS_FIND_IGNORE) \
\( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
......@@ -775,6 +753,9 @@ define all-sources
-name '*.[chS]' -print )
endef
quiet_cmd_cscope = MAKE $@
cmd_cscope = $(all-sources) | cscope -k -b -i -
quiet_cmd_TAGS = MAKE $@
cmd_TAGS = $(all-sources) | etags -
......@@ -787,6 +768,9 @@ define cmd_tags
$(all-sources) | xargs ctags $$CTAGSF -a
endef
cscope: FORCE
$(call cmd,cscope)
TAGS: FORCE
$(call cmd,TAGS)
......
......@@ -458,6 +458,11 @@ config ALPHA_SRM
If unsure, say N.
config EARLY_PRINTK
bool
depends on ALPHA_GENERIC || ALPHA_SRM
default y
config ALPHA_EISA
bool
depends on ALPHA_ALCOR || ALPHA_MIKASA || ALPHA_SABLE || ALPHA_NORITAKE || ALPHA_RAWHIDE
......
......@@ -90,7 +90,7 @@ endif
# BWX is most important, but we don't really want any emulation ever.
CFLAGS += $(cflags-y) -Wa,-mev6
HEAD := arch/alpha/kernel/head.o
head-y := arch/alpha/kernel/head.o
core-y += arch/alpha/kernel/ arch/alpha/mm/
core-$(CONFIG_MATHEMU) += arch/alpha/math-emu/
......@@ -125,8 +125,6 @@ include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
archclean:
$(Q)$(MAKE) -f scripts/Makefile.clean obj=$(boot)
archmrproper:
CLEAN_FILES += include/asm-$(ARCH)/asm_offsets.h.tmp \
include/asm-$(ARCH)/asm_offsets.h
......
......@@ -6,8 +6,6 @@ EXTRA_TARGETS := head.o
EXTRA_AFLAGS := $(CFLAGS)
export-objs := alpha_ksyms.o core_marvel.o core_titan.o
obj-y := entry.o traps.o process.o init_task.o osf_sys.o irq.o \
irq_alpha.o signal.o setup.o ptrace.o time.o semaphore.o \
alpha_ksyms.o systbls.o err_common.o
......@@ -35,8 +33,13 @@ obj-y += err_titan.o err_marvel.o
obj-y += es1888.o smc37c669.o smc37c93x.o ns87312.o gct.o
obj-y += srmcons.o
else
# Misc support
obj-$(CONFIG_ALPHA_SRM) += srmcons.o
# Core logic support
obj-$(CONFIG_ALPHA_APECS) += core_apecs.o
obj-$(CONFIG_ALPHA_CIA) += core_cia.o
......
......@@ -40,7 +40,6 @@
extern struct hwrpb_struct *hwrpb;
extern void dump_thread(struct pt_regs *, struct user *);
extern int dump_fpu(struct pt_regs *, elf_fpregset_t *);
extern spinlock_t rtc_lock;
/* these are C runtime functions with special calling conventions: */
......@@ -144,7 +143,9 @@ EXPORT_SYMBOL(pci_dac_dma_to_offset);
#endif
EXPORT_SYMBOL(dump_thread);
EXPORT_SYMBOL(dump_fpu);
EXPORT_SYMBOL(dump_elf_thread);
EXPORT_SYMBOL(dump_elf_task);
EXPORT_SYMBOL(dump_elf_task_fp);
EXPORT_SYMBOL(hwrpb);
EXPORT_SYMBOL(start_thread);
EXPORT_SYMBOL(alpha_read_fp_reg);
......
This diff is collapsed.
......@@ -732,21 +732,6 @@ marvel_iounmap(unsigned long addr)
EXPORT_SYMBOL(marvel_ioremap);
EXPORT_SYMBOL(marvel_iounmap);
#endif
/*
* SRMCons support
*
* Marvel doesn't have a real serial console -- it's either graphics or
* server management based. If we're running on the server management based
* console, allow the srmcons callback driver to be a console device.
*/
int
marvel_srmcons_allowed(void)
{
u64 *pu64 = (u64 *)((u64)hwrpb + hwrpb->ctbt_offset);
return (pu64[7] == 2);
}
/*
......@@ -874,8 +859,6 @@ marvel_node_mem_size(int nid)
#include <linux/slab.h>
#include <linux/delay.h>
#define MARVEL_AGP_APER_SIZE (64 * 1024 * 1024)
struct marvel_agp_aperture {
struct pci_iommu_arena *arena;
long pg_start;
......@@ -887,11 +870,14 @@ marvel_agp_setup(alpha_agp_info *agp)
{
struct marvel_agp_aperture *aper;
if (!alpha_agpgart_size)
return -ENOMEM;
aper = kmalloc(sizeof(*aper), GFP_KERNEL);
if (aper == NULL) return -ENOMEM;
aper->arena = agp->hose->sg_pci;
aper->pg_count = MARVEL_AGP_APER_SIZE / PAGE_SIZE;
aper->pg_count = alpha_agpgart_size / PAGE_SIZE;
aper->pg_start = iommu_reserve(aper->arena, aper->pg_count,
aper->pg_count - 1);
......
......@@ -580,8 +580,6 @@ EXPORT_SYMBOL(titan_iounmap);
#include <linux/slab.h>
#include <linux/delay.h>
#define TITAN_AGP_APER_SIZE (64 * 1024 * 1024)
struct titan_agp_aperture {
struct pci_iommu_arena *arena;
long pg_start;
......@@ -593,12 +591,15 @@ titan_agp_setup(alpha_agp_info *agp)
{
struct titan_agp_aperture *aper;
if (!alpha_agpgart_size)
return -ENOMEM;
aper = kmalloc(sizeof(struct titan_agp_aperture), GFP_KERNEL);
if (aper == NULL)
return -ENOMEM;
aper->arena = agp->hose->sg_pci;
aper->pg_count = TITAN_AGP_APER_SIZE / PAGE_SIZE;
aper->pg_count = alpha_agpgart_size / PAGE_SIZE;
aper->pg_start = iommu_reserve(aper->arena, aper->pg_count,
aper->pg_count - 1);
if (aper->pg_start < 0) {
......
......@@ -534,7 +534,7 @@ show_interrupts(struct seq_file *p, void *v)
#else
for (j = 0; j < NR_CPUS; j++)
if (cpu_online(j))
seq_printf(p, "%10u ", kstat_cpu(i).irqs[j]);
seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
#endif
seq_printf(p, " %14s", irq_desc[i].handler->typename);
seq_printf(p, " %c%s",
......
......@@ -71,6 +71,8 @@ struct pci_iommu_arena;
#define IRONGATE_DEFAULT_MEM_BASE ((256*8-16)*1024*1024)
#define DEFAULT_AGP_APER_SIZE (64*1024*1024)
/*
* A small note about bridges and interrupts. The DECchip 21050 (and
* later) adheres to the PCI-PCI bridge specification. This says that
......@@ -153,6 +155,8 @@ extern struct pci_controller *pci_isa_hose;
/* Indicate that we trust the console to configure things properly. */
extern int pci_probe_only;
extern unsigned long alpha_agpgart_size;
extern void common_init_pci(void);
extern u8 common_swizzle(struct pci_dev *, u8 *);
extern struct pci_controller *alloc_pci_controller(void);
......
......@@ -313,7 +313,7 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
}
/*
* fill in the user structure for a core dump..
* Fill in the user structure for an ECOFF core dump.
*/
void
dump_thread(struct pt_regs * pt, struct user * dump)
......@@ -373,12 +373,81 @@ dump_thread(struct pt_regs * pt, struct user * dump)
memcpy((char *)dump->regs + EF_SIZE, sw->fp, 32 * 8);
}
int
dump_fpu(struct pt_regs * regs, elf_fpregset_t *r)
/*
* Fill in the user structure for a ELF core dump.
*/
void
dump_elf_thread(elf_greg_t *dest, struct pt_regs *pt, struct thread_info *ti)
{
/* switch stack follows right below pt_regs: */
struct switch_stack * sw = ((struct switch_stack *) regs) - 1;
memcpy(r, sw->fp, 32 * 8);
struct switch_stack * sw = ((struct switch_stack *) pt) - 1;
dest[ 0] = pt->r0;
dest[ 1] = pt->r1;
dest[ 2] = pt->r2;
dest[ 3] = pt->r3;
dest[ 4] = pt->r4;
dest[ 5] = pt->r5;
dest[ 6] = pt->r6;
dest[ 7] = pt->r7;
dest[ 8] = pt->r8;
dest[ 9] = sw->r9;
dest[10] = sw->r10;
dest[11] = sw->r11;
dest[12] = sw->r12;
dest[13] = sw->r13;
dest[14] = sw->r14;
dest[15] = sw->r15;
dest[16] = pt->r16;
dest[17] = pt->r17;
dest[18] = pt->r18;
dest[19] = pt->r19;
dest[20] = pt->r20;
dest[21] = pt->r21;
dest[22] = pt->r22;
dest[23] = pt->r23;
dest[24] = pt->r24;
dest[25] = pt->r25;
dest[26] = pt->r26;
dest[27] = pt->r27;
dest[28] = pt->r28;
dest[29] = pt->gp;
dest[30] = rdusp();
dest[31] = pt->pc;
/* Once upon a time this was the PS value. Which is stupid
since that is always 8 for usermode. Usurped for the more
useful value of the thread's UNIQUE field. */
dest[32] = ti->pcb.unique;
}
int
dump_elf_task(elf_greg_t *dest, struct task_struct *task)
{
struct thread_info *ti;
struct pt_regs *pt;
ti = task->thread_info;
pt = (struct pt_regs *)((unsigned long)ti + 2*PAGE_SIZE) - 1;
dump_elf_thread(dest, pt, ti);
return 1;
}
int
dump_elf_task_fp(elf_fpreg_t *dest, struct task_struct *task)
{
struct thread_info *ti;
struct pt_regs *pt;
struct switch_stack *sw;
ti = task->thread_info;
pt = (struct pt_regs *)((unsigned long)ti + 2*PAGE_SIZE) - 1;
sw = (struct switch_stack *)pt - 1;
memcpy(dest, sw->fp, 32 * 8);
return 1;
}
......
......@@ -53,7 +53,6 @@ extern int marvel_pa_to_nid(unsigned long);
extern int marvel_cpuid_to_nid(int);
extern unsigned long marvel_node_mem_start(int);
extern unsigned long marvel_node_mem_size(int);
extern int marvel_srmcons_allowed(void);
extern struct _alpha_agp_info *marvel_agp_info(void);
struct io7 *marvel_find_io7(int pe);
struct io7 *marvel_next_io7(struct io7 *prev);
......@@ -109,9 +108,15 @@ extern unsigned long wildfire_node_mem_size(int);
/* setup.c */
extern unsigned long srm_hae;
extern int boot_cpuid;
extern int srmcons_output;
/* srmcons.c */
#if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_SRM)
extern void register_srm_console(void);
extern void unregister_srm_console(void);
#else
#define register_srm_console()
#define unregister_srm_console()
#endif
/* smp.c */
extern void setup_smp(void);
......
......@@ -102,7 +102,9 @@ get_reg_addr(struct task_struct * task, unsigned long regno)
if (regno == 30) {
addr = &task->thread_info->pcb.usp;
} else if (regno == 31 || regno > 64) {
} else if (regno == 65) {
addr = &task->thread_info->pcb.unique;
} else if (regno == 31 || regno > 65) {
zero = 0;
addr = &zero;
} else {
......
......@@ -77,18 +77,25 @@ int boot_cpuid;
* "srmcons" specified in the boot command arguments allows us to
* see kernel messages during the period of time before the true
* console device is "registered" during console_init(). As of this
* version (2.4.10), time_init() is the last Alpha-specific code
* called before console_init(), so we put "unregister" code
* there to prevent schizophrenic console behavior later... ;-}
* console device is "registered" during console_init().
* As of this version (2.5.59), console_init() will call
* disable_early_printk() as the last action before initializing
* the console drivers. That's the last possible time srmcons can be
* unregistered without interfering with console behavior.
*
* By default, OFF; set it with a bootcommand arg of "srmcons".
* By default, OFF; set it with a bootcommand arg of "srmcons" or
* "console=srm". The meaning of these two args is:
* "srmcons" - early callback prints
* "console=srm" - full callback based console, including early prints
*/
int srmcons_output = 0;
/* Enforce a memory size limit; useful for testing. By default, none. */
unsigned long mem_size_limit = 0;
/* Set AGP GART window size (0 means disabled). */
unsigned long alpha_agpgart_size = DEFAULT_AGP_APER_SIZE;
#ifdef CONFIG_ALPHA_GENERIC
struct alpha_machine_vector alpha_mv;
int alpha_using_srm;
......@@ -461,57 +468,6 @@ page_is_ram(unsigned long pfn)
#undef PFN_PHYS
#undef PFN_MAX
#if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_SRM)
/*
* Manage the SRM callbacks as a "console".
*/
static struct console srmcons;
void __init register_srm_console(void)
{
register_console(&srmcons);
}
void __init unregister_srm_console(void)
{
unregister_console(&srmcons);
}
static void srm_console_write(struct console *co, const char *s,
unsigned count)
{
srm_printk(s);
}
static kdev_t srm_console_device(struct console *c)
{
/* Huh? */
return mk_kdev(TTY_MAJOR, 64 + c->index);
}
static int __init srm_console_setup(struct console *co, char *options)
{
return 1;
}
static struct console srmcons = {
.name = "srm0",
.write = srm_console_write,
.device = srm_console_device,
.setup = srm_console_setup,
.flags = CON_PRINTBUFFER | CON_ENABLED, /* fake it out */
.index = -1,
};
#else
void __init register_srm_console(void)
{
}
void __init unregister_srm_console(void)
{
}
#endif
void __init
setup_arch(char **cmdline_p)
{
......@@ -574,7 +530,16 @@ setup_arch(char **cmdline_p)
continue;
}
if (strncmp(p, "srmcons", 7) == 0) {
srmcons_output = 1;
srmcons_output |= 1;
continue;
}
if (strncmp(p, "console=srm", 11) == 0) {
srmcons_output |= 2;
continue;
}
if (strncmp(p, "gartsize=", 9) == 0) {
alpha_agpgart_size =
get_mem_size_limit(p+9) << PAGE_SHIFT;
continue;
}
}
......@@ -585,6 +550,13 @@ setup_arch(char **cmdline_p)
/* If we want SRM console printk echoing early, do it now. */
if (alpha_using_srm && srmcons_output) {
register_srm_console();
/*
* If "console=srm" was specified, clear the srmcons_output
* flag now so that time.c won't unregister_srm_console
*/
if (srmcons_output & 2)
srmcons_output = 0;
}
#ifdef CONFIG_MAGIC_SYSRQ
......@@ -688,6 +660,15 @@ setup_arch(char **cmdline_p)
paging_init();
}
void __init
disable_early_printk(void)
{
if (alpha_using_srm && srmcons_output) {
unregister_srm_console();
srmcons_output = 0;
}
}
static char sys_unknown[] = "Unknown";
static char systype_names[][16] = {
"0",
......
......@@ -544,9 +544,6 @@ smp_prepare_cpus(unsigned int max_cpus)
smp_tune_scheduling(boot_cpuid);
smp_setup_percpu_timer(boot_cpuid);
/* We have already have the boot CPU online.. */
set_bit(boot_cpuid, &cpu_online_map);
/* Nothing to do on a UP box, or when told not to. */
if (smp_num_probed == 1 || max_cpus == 0) {
cpu_present_mask = 1UL << boot_cpuid;
......@@ -574,7 +571,11 @@ smp_prepare_cpus(unsigned int max_cpus)
void __devinit
smp_prepare_boot_cpu(void)
{
/*
* Mark the boot cpu (current cpu) as both present and online
*/
set_bit(smp_processor_id(), &cpu_present_mask);
set_bit(smp_processor_id(), &cpu_online_map);
}
int __devinit
......
/*
* linux/arch/alpha/kernel/srmcons.c
*
* Callback based driver for SRM Console console device.
* (TTY driver and console driver)
*/
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/console.h>
#include <linux/delay.h>
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/timer.h>
#include <linux/tty.h>
#include <linux/tty_driver.h>
#include <linux/tty_flip.h>
#include <asm/console.h>
#include <asm/uaccess.h>
static spinlock_t srmcons_callback_lock = SPIN_LOCK_UNLOCKED;
static int srm_is_registered_console = 0;
/*
* The TTY driver
*/
#define MAX_SRM_CONSOLE_DEVICES 1 /* only support 1 console device */
static int srmcons_refcount;
static struct tty_struct *srmcons_table[MAX_SRM_CONSOLE_DEVICES];
static struct termios *srmcons_termios[MAX_SRM_CONSOLE_DEVICES];
static struct termios *srmcons_termios_locked[MAX_SRM_CONSOLE_DEVICES];
struct srmcons_private {
struct tty_struct *tty;
struct timer_list timer;
spinlock_t lock;
};
typedef union _srmcons_result {
struct {
unsigned long c :61;
unsigned long status :3;
} bits;
long as_long;
} srmcons_result;
/* called with callback_lock held */
static int
srmcons_do_receive_chars(struct tty_struct *tty)
{
srmcons_result result;
int count = 0, loops = 0;
do {
result.as_long = callback_getc(0);
if (result.bits.status < 2) {
tty_insert_flip_char(tty, (char)result.bits.c, 0);
count++;
}
} while((result.bits.status & 1) && (++loops < 10));
if (count)
tty_schedule_flip(tty);
return count;
}
static void
srmcons_receive_chars(unsigned long data)
{
struct srmcons_private *srmconsp = (struct srmcons_private *)data;
unsigned long flags;
int incr = 10;
local_irq_save(flags);
if (spin_trylock(&srmcons_callback_lock)) {
if (!srmcons_do_receive_chars(srmconsp->tty))
incr = 100;
spin_unlock(&srmcons_callback_lock);
}
spin_lock(&srmconsp->lock);
if (srmconsp->tty) {
srmconsp->timer.expires = jiffies + incr;
add_timer(&srmconsp->timer);
}
spin_unlock(&srmconsp->lock);
local_irq_restore(flags);
}
/* called with callback_lock held */
static int
srmcons_do_write(struct tty_struct *tty, const unsigned char *buf, int count)
{
unsigned char *str_cr = "\r";
long c, remaining = count;
srmcons_result result;
unsigned char *cur;
int need_cr;
for (cur = (unsigned char *)buf; remaining > 0; ) {
need_cr = 0;
/*
* Break it up into reasonable size chunks to allow a chance
* for input to get in
*/
for (c = 0; c < min_t(long, 128L, remaining) && !need_cr; c++)
if (cur[c] == '\n')
need_cr = 1;
while (c > 0) {
result.as_long = callback_puts(0, cur, c);
c -= result.bits.c;
remaining -= result.bits.c;
cur += result.bits.c;
/*
* Check for pending input iff a tty was provided
*/
if (tty)
srmcons_do_receive_chars(tty);
}
while (need_cr) {
result.as_long = callback_puts(0, str_cr, 1);
if (result.bits.c > 0)
need_cr = 0;
}
}
return count;
}
static int
srmcons_write(struct tty_struct *tty, int from_user,
const unsigned char *buf, int count)
{
unsigned long flags;
if (from_user) {
unsigned char tmp[512];
int ret = 0;
size_t c;
while ((c = count) > 0) {
if (c > sizeof(tmp))
c = sizeof(tmp);
c -= copy_from_user(tmp, buf, c);
if (!c) {
printk("%s: EFAULT (count %d)\n",
__FUNCTION__, count);
return -EFAULT;
}
spin_lock_irqsave(&srmcons_callback_lock, flags);
srmcons_do_write(tty, tmp, c);
spin_unlock_irqrestore(&srmcons_callback_lock, flags);
buf += c;
count -= c;
ret += c;
}
return ret;
}
spin_lock_irqsave(&srmcons_callback_lock, flags);
srmcons_do_write(tty, buf, count);
spin_unlock_irqrestore(&srmcons_callback_lock, flags);
return count;
}
static int
srmcons_write_room(struct tty_struct *tty)
{
return 512;
}
static int
srmcons_chars_in_buffer(struct tty_struct *tty)
{
return 0;
}
static int
srmcons_get_private_struct(struct srmcons_private **ps)
{
static struct srmcons_private *srmconsp = NULL;
static spinlock_t srmconsp_lock = SPIN_LOCK_UNLOCKED;
unsigned long flags;
int retval = 0;
spin_lock_irqsave(&srmconsp_lock, flags);
do {
if (srmconsp != NULL) {
*ps = srmconsp;
break;
}
srmconsp = kmalloc(sizeof(*srmconsp), GFP_KERNEL);
if (srmconsp == NULL) {
retval = -ENOMEM;
break;
}
srmconsp->tty = NULL;
srmconsp->lock = SPIN_LOCK_UNLOCKED;
init_timer(&srmconsp->timer);
*ps = srmconsp;
} while(0);
spin_unlock_irqrestore(&srmconsp_lock, flags);
return retval;
}
static int
srmcons_open(struct tty_struct *tty, struct file *filp)
{
struct srmcons_private *srmconsp;
unsigned long flags;
int retval;
retval = srmcons_get_private_struct(&srmconsp);
if (retval)
return retval;
spin_lock_irqsave(&srmconsp->lock, flags);
if (!srmconsp->tty) {
tty->driver_data = srmconsp;
srmconsp->tty = tty;
srmconsp->timer.function = srmcons_receive_chars;
srmconsp->timer.data = (unsigned long)srmconsp;
srmconsp->timer.expires = jiffies + 10;
add_timer(&srmconsp->timer);
}
spin_unlock_irqrestore(&srmconsp->lock, flags);
return 0;
}
static void
srmcons_close(struct tty_struct *tty, struct file *filp)
{
struct srmcons_private *srmconsp = tty->driver_data;
unsigned long flags;
spin_lock_irqsave(&srmconsp->lock, flags);
if (tty->count == 1) {
srmconsp->tty = NULL;
del_timer(&srmconsp->timer);
}
spin_unlock_irqrestore(&srmconsp->lock, flags);
}
static struct tty_driver srmcons_driver = {
.driver_name = "srm",
.name = "srm",
.magic = TTY_DRIVER_MAGIC,
.major = 0, /* dynamic */
.minor_start = 0,
.num = MAX_SRM_CONSOLE_DEVICES,
.type = TTY_DRIVER_TYPE_SYSTEM,
.subtype = SYSTEM_TYPE_SYSCONS,
.table = srmcons_table,
.termios = srmcons_termios,
.termios_locked = srmcons_termios_locked,
.refcount = &srmcons_refcount,
.open = srmcons_open,
.close = srmcons_close,
.write = srmcons_write,
.write_room = srmcons_write_room,
.chars_in_buffer= srmcons_chars_in_buffer,
};
static int __init
srmcons_init(void)
{
if (srm_is_registered_console) {
srmcons_driver.init_termios = tty_std_termios;
return tty_register_driver(&srmcons_driver);
}
return -ENODEV;
}
module_init(srmcons_init);
/*
* The console driver
*/
static void
srm_console_write(struct console *co, const char *s, unsigned count)
{
unsigned long flags;
spin_lock_irqsave(&srmcons_callback_lock, flags);
srmcons_do_write(NULL, s, count);
spin_unlock_irqrestore(&srmcons_callback_lock, flags);
}
static kdev_t
srm_console_device(struct console *co)
{
return mk_kdev(srmcons_driver.major,
srmcons_driver.minor_start + co->index);
}
static int __init
srm_console_setup(struct console *co, char *options)
{
return 0;
}
static struct console srmcons = {
.name = "srm",
.write = srm_console_write,
.device = srm_console_device,
.setup = srm_console_setup,
.flags = CON_PRINTBUFFER,
.index = -1,
};
void __init
register_srm_console(void)
{
if (!srm_is_registered_console) {
callback_open_console();
register_console(&srmcons);
srm_is_registered_console = 1;
}
}
void __init
unregister_srm_console(void)
{
if (srm_is_registered_console) {
callback_close_console();
unregister_console(&srmcons);
srm_is_registered_console = 0;
}
}
......@@ -31,6 +31,7 @@
#include <linux/pci.h>
#include <linux/init.h>
#include <linux/reboot.h>
#include <linux/bootmem.h>
#include <asm/ptrace.h>
#include <asm/system.h>
......@@ -174,6 +175,70 @@ nautilus_machine_check(unsigned long vector, unsigned long la_ptr,
mb();
}
extern void free_reserved_mem(void *, void *);
void __init
nautilus_init_pci(void)
{
struct pci_controller *hose = hose_head;
struct pci_bus *bus;
struct pci_dev *irongate;
unsigned long saved_io_start, saved_io_end;
unsigned long saved_mem_start, saved_mem_end;
unsigned long bus_align, bus_size, pci_mem;
unsigned long memtop = max_low_pfn << PAGE_SHIFT;
/* Scan our single hose. */
bus = pci_scan_bus(0, alpha_mv.pci_ops, hose);
hose->bus = bus;
hose->last_busno = bus->subordinate;
/* We're going to size the root bus, so we must
- have a non-NULL PCI device associated with the bus
- preserve hose resources. */
irongate = pci_find_slot(0, 0);
bus->self = irongate;
saved_io_start = bus->resource[0]->start;
saved_io_end = bus->resource[0]->end;
saved_mem_start = bus->resource[1]->start;
saved_mem_end = bus->resource[1]->end;
pci_bus_size_bridges(bus);
/* Don't care about IO. */
bus->resource[0]->start = saved_io_start;
bus->resource[0]->end = saved_io_end;
bus_align = bus->resource[1]->start;
bus_size = bus->resource[1]->end + 1 - bus_align;
/* Align to 16Mb. */
if (bus_align < 0x1000000UL)
bus_align = 0x1000000UL;
/* Restore hose MEM resource. */
bus->resource[1]->start = saved_mem_start;
bus->resource[1]->end = saved_mem_end;
pci_mem = (0x100000000UL - bus_size) & -bus_align;
if (pci_mem < memtop && pci_mem > alpha_mv.min_mem_address) {
free_reserved_mem(__va(alpha_mv.min_mem_address),
__va(pci_mem));
printk("nautilus_init_arch: %ldk freed\n",
(pci_mem - alpha_mv.min_mem_address) >> 10);
}
alpha_mv.min_mem_address = pci_mem;
if ((IRONGATE0->dev_vendor >> 16) > 0x7006) /* Albacore? */
IRONGATE0->pci_mem = pci_mem;
pci_bus_assign_resources(bus);
/* To break the loop in common_swizzle() */
bus->self = NULL;
pci_fixup_irqs(alpha_mv.pci_swizzle, alpha_mv.pci_map_irq);
}
/*
* The System Vectors
......@@ -196,7 +261,7 @@ struct alpha_machine_vector nautilus_mv __initmv = {
.init_arch = irongate_init_arch,
.init_irq = nautilus_init_irq,
.init_rtc = common_init_rtc,
.init_pci = common_init_pci,
.init_pci = nautilus_init_pci,
.kill_arch = nautilus_kill_arch,
.pci_map_irq = nautilus_map_irq,
.pci_swizzle = common_swizzle,
......
......@@ -383,21 +383,6 @@ time_init(void)
/* Startup the timer source. */
alpha_mv.init_rtc();
/*
* If we had wanted SRM console printk echoing early, undo it now.
*
* "srmcons" specified in the boot command arguments allows us to
* see kernel messages during the period of time before the true
* console device is "registered" during console_init(). As of this
* version (2.4.10), time_init() is the last Alpha-specific code
* called before console_init(), so we put this "unregister" code
* here to prevent schizophrenic console behavior later... ;-}
*/
if (alpha_using_srm && srmcons_output) {
unregister_srm_console();
srmcons_output = 0;
}
}
/*
......
......@@ -61,7 +61,7 @@ DATAADDR := .
ifeq ($(CONFIG_CPU_26),y)
PROCESSOR := armo
HEAD := arch/arm/mach-arc/head.o arch/arm/kernel/init_task.o
head-y := arch/arm/mach-arc/head.o arch/arm/kernel/init_task.o
LDFLAGS_BLOB += --oformat elf26-littlearm
ifeq ($(CONFIG_ROM_KERNEL),y)
DATAADDR := 0x02080000
......@@ -73,7 +73,7 @@ endif
ifeq ($(CONFIG_CPU_32),y)
PROCESSOR := armv
HEAD := arch/arm/kernel/head.o arch/arm/kernel/init_task.o
head-y := arch/arm/kernel/head.o arch/arm/kernel/init_task.o
LDFLAGS_BLOB += --oformat elf32-littlearm
textaddr-y := 0xC0008000
endif
......@@ -181,7 +181,6 @@ MRPROPER_FILES += \
include/asm-arm/mach-types.h
# We use MRPROPER_FILES and CLEAN_FILES now
archmrproper:
archclean:
$(Q)$(MAKE) $(clean)=$(boot)
......
......@@ -2,8 +2,6 @@
# Makefile for the linux kernel.
#
export-objs := sa1111.o sa1111-pcibuf.o sa1111-pcipool.o
obj-$(CONFIG_SA1111) += sa1111.o sa1111-pcibuf.o sa1111-pcipool.o
obj-$(CONFIG_PCI_HOST_PLX90X0) += plx90x0.o
......
......@@ -15,8 +15,6 @@ obj-m :=
obj-n :=
obj- :=
export-objs := armksyms.o apm.o dma.o ecard.o fiq.o io.o time.o
obj-$(CONFIG_APM) += apm.o
obj-$(CONFIG_ARCH_ACORN) += ecard.o time-acorn.o
obj-$(CONFIG_ARCH_CLPS7500) += time-acorn.o
......
......@@ -9,4 +9,3 @@ obj-m :=
obj-n :=
obj- :=
export-objs :=
......@@ -9,4 +9,3 @@ obj-m :=
obj-n :=
obj- :=
export-objs :=
......@@ -10,8 +10,6 @@ obj-m :=
obj-n :=
obj- :=
export-objs := oldlatches.o
obj-$(CONFIG_DEBUG_LL) += debug.o
EXTRA_TARGETS := head.o
......
......@@ -9,4 +9,3 @@ obj-m :=
obj-n :=
obj- :=
export-objs :=
......@@ -9,6 +9,4 @@ obj-m :=
obj-n :=
obj- :=
export-objs := io.o
obj-$(CONFIG_LEDS) += leds.o
......@@ -9,4 +9,3 @@ obj-m :=
obj-n :=
obj- :=
export-objs :=
......@@ -9,8 +9,6 @@ obj-m :=
obj-n :=
obj- :=
export-objs := arch.o netwinder-hw.o
pci-$(CONFIG_ARCH_CATS) += cats-pci.o
pci-$(CONFIG_ARCH_EBSA285) += ebsa285-pci.o
pci-$(CONFIG_ARCH_NETWINDER) += netwinder-pci.o
......
......@@ -9,7 +9,5 @@ obj-m :=
obj-n :=
obj- :=
export-objs :=
obj-$(CONFIG_PCI) += pci.o
obj-$(CONFIG_LEDS) += leds.o
......@@ -10,8 +10,6 @@ obj-m :=
obj-n :=
obj- :=
export-objs :=
obj-$(CONFIG_ARCH_IQ80310) += iq80310-pci.o iq80310-irq.o
ifneq ($(CONFIG_XSCALE_PMU_TIMER),y)
......
......@@ -9,4 +9,3 @@ obj-m :=
obj-n :=
obj- :=
export-objs :=
......@@ -2,8 +2,6 @@
# Makefile for the linux kernel.
#
export-objs := generic.o irq.o dma.o sa1111.o
# Common support (must be linked before board specific support)
obj-y += generic.o irq.o dma.o
obj-$(CONFIG_SA1111) += sa1111.o
......
......@@ -9,4 +9,3 @@ obj-m :=
obj-n :=
obj- :=
export-objs :=
......@@ -9,8 +9,6 @@ obj-n :=
obj- :=
led-y := leds.o
export-objs := dma.o generic.o pm.o
# This needs to be cleaned up. We probably need to have SA1100
# and SA1110 config symbols.
ifeq ($(CONFIG_CPU_FREQ),y)
......@@ -26,12 +24,10 @@ obj-$(CONFIG_SA1100_ADSBITSY) += adsbitsy.o
led-$(CONFIG_SA1100_ADSBITSY) += leds-adsbitsy.o
obj-$(CONFIG_SA1100_ASSABET) += assabet.o
export-objs += assabet.o
led-$(CONFIG_SA1100_ASSABET) += leds-assabet.o
obj-$(CONFIG_ASSABET_NEPONSET) += neponset.o
obj-$(CONFIG_SA1100_BADGE4) += badge4.o
export-objs += badge4.o
led-$(CONFIG_SA1100_BADGE4) += leds-badge4.o
obj-$(CONFIG_SA1100_BRUTUS) += brutus.o
......@@ -43,12 +39,9 @@ led-$(CONFIG_SA1100_CERF) += leds-cerf.o
obj-$(CONFIG_SA1100_EMPEG) += empeg.o
obj-$(CONFIG_SA1100_FLEXANET) += flexanet.o
export-objs += flexanet.o
led-$(CONFIG_SA1100_FLEXANET) += leds-flexanet.o
obj-$(CONFIG_SA1100_FREEBIRD) += freebird.o
export-objs += freebird.o
obj-$(CONFIG_SA1100_GRAPHICSCLIENT) += graphicsclient.o
led-$(CONFIG_SA1100_GRAPHICSCLIENT) += leds-graphicsclient.o
......@@ -56,13 +49,11 @@ obj-$(CONFIG_SA1100_GRAPHICSMASTER) += graphicsmaster.o
led-$(CONFIG_SA1100_GRAPHICSMASTER) += leds-graphicsmaster.o
obj-$(CONFIG_SA1100_H3600) += h3600.o
export-objs += h3600.o
obj-$(CONFIG_SA1100_HACKKIT) += hackkit.o
led-$(CONFIG_SA1100_HACKKIT) += leds-hackkit.o
obj-$(CONFIG_SA1100_HUW_WEBPANEL) += huw_webpanel.o
export-objs += huw_webpanel.o
obj-$(CONFIG_SA1100_ITSY) += itsy.o
......@@ -93,15 +84,12 @@ obj-$(CONFIG_SA1100_SIMPAD) += simpad.o
led-$(CONFIG_SA1100_SIMPAD) += leds-simpad.o
obj-$(CONFIG_SA1100_STORK) += stork.o
export-objs += stork.o
obj-$(CONFIG_SA1100_TRIZEPS) += trizeps.o
export-objs += trizeps.o
obj-$(CONFIG_SA1100_XP860) += xp860.o
obj-$(CONFIG_SA1100_YOPY) += yopy.o
export-objs += yopy.o
# LEDs support
obj-$(CONFIG_LEDS) += $(led-y)
......
......@@ -9,6 +9,4 @@ obj-m :=
obj-n :=
obj- :=
export-objs :=
obj-$(CONFIG_LEDS) += leds.o
......@@ -9,4 +9,3 @@ obj-m :=
obj-n :=
obj- :=
export-objs :=
......@@ -8,8 +8,6 @@ obj-y := init.o extable.o fault-common.o
obj-m :=
obj-n :=
obj- :=
export-objs := proc-syms.o discontig.o
ifeq ($(CONFIG_CPU_32),y)
obj-y += consistent.o fault-armv.o ioremap.o mm-armv.o
obj-$(CONFIG_MODULES) += proc-syms.o
......
......@@ -5,8 +5,6 @@
EXTRA_TARGETS := head.o
export-objs := ksyms.o
obj-y := process.o signal.o entry.o traps.o irq.o \
ptrace.o setup.o time.o sys_cris.o shadows.o \
debugport.o semaphore.o
......
......@@ -3,8 +3,7 @@
#
# This file is included by the global makefile so that you can add your own
# architecture-specific flags and dependencies. Remember to do have actions
# for "archclean" and "archdep" for cleaning up and making dependencies for
# this architecture
# for "archclean" cleaning up for this architecture.
#
# This file is subject to the terms and conditions of the GNU General Public
# License. See the file "COPYING" in the main directory of this archive
......@@ -76,7 +75,7 @@ mcore-$(CONFIG_X86_SUMMIT) := mach-default
# default subarch .h files
mflags-y += -Iinclude/asm-i386/mach-default
HEAD := arch/i386/kernel/head.o arch/i386/kernel/init_task.o
head-y := arch/i386/kernel/head.o arch/i386/kernel/init_task.o
libs-y += arch/i386/lib/
core-y += arch/i386/kernel/ \
......@@ -92,8 +91,7 @@ AFLAGS += $(mflags-y)
boot := arch/i386/boot
.PHONY: zImage bzImage compressed zlilo bzlilo zdisk bzdisk install \
clean archclean archmrproper
.PHONY: zImage bzImage compressed zlilo bzlilo zdisk bzdisk install
all: bzImage
......
......@@ -4,8 +4,6 @@
EXTRA_TARGETS := head.o init_task.o
export-objs := mca.o i386_ksyms.o time.o
obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o vm86.o \
ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_i386.o \
pci-dma.o i386_ksyms.o i387.o dmi_scan.o bootflag.o
......@@ -34,5 +32,4 @@ obj-y += sysenter.o
EXTRA_AFLAGS := -traditional
export-objs += scx200.o
obj-$(CONFIG_SCx200) += scx200.o
......@@ -3,4 +3,3 @@ obj-y += amd.o
obj-y += cyrix.o
obj-y += centaur.o
export-objs := main.o
......@@ -792,8 +792,8 @@ ENTRY(sys_call_table)
.long sys_io_getevents
.long sys_io_submit
.long sys_io_cancel
.long sys_ni_syscall /* 250 sys_alloc_hugepages - reuse this */
.long sys_ni_syscall /* was sys_free_hugepages - reuse this */
.long sys_fadvise64 /* 250 */
.long sys_ni_syscall
.long sys_exit_group
.long sys_lookup_dcookie
.long sys_epoll_create
......
......@@ -265,6 +265,41 @@ static inline void do_timer_interrupt(int irq, void *dev_id, struct pt_regs *reg
#endif
}
/*
* Lost tick detection and compensation
*/
static inline void detect_lost_tick(void)
{
/* read time since last interrupt */
unsigned long delta = timer->get_offset();
static unsigned long dbg_print;
/* check if delta is greater then two ticks */
if(delta >= 2*(1000000/HZ)){
/*
* only print debug info first 5 times
*/
/*
* AKPM: disable this for now; it's nice, but irritating.
*/
if (0 && dbg_print < 5) {
printk(KERN_WARNING "\nWarning! Detected %lu "
"micro-second gap between interrupts.\n",
delta);
printk(KERN_WARNING " Compensating for %lu lost "
"ticks.\n",
delta/(1000000/HZ)-1);
dump_stack();
dbg_print++;
}
/* calculate number of missed ticks */
delta = delta/(1000000/HZ)-1;
jiffies += delta;
}
}
/*
* This is the same as the above, except we _also_ save the current
* Time Stamp Counter value at the time of the timer interrupt, so that
......@@ -281,6 +316,7 @@ void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
*/
write_lock(&xtime_lock);
detect_lost_tick();
timer->mark_offset();
do_timer_interrupt(irq, NULL, regs);
......
......@@ -8,8 +8,6 @@
# Note 2! The CFLAGS definitions are now in the main makefile...
EXTRA_CFLAGS += -I../kernel
export-objs :=
obj-y := setup.o voyager_basic.o voyager_thread.o
obj-$(CONFIG_SMP) += voyager_smp.o voyager_cat.o
......@@ -2,8 +2,6 @@
# Makefile for the linux i386-specific parts of the memory manager.
#
export-objs := pageattr.o
obj-y := init.o pgtable.o fault.o ioremap.o extable.o pageattr.o
obj-$(CONFIG_DISCONTIGMEM) += discontig.o
......
......@@ -283,7 +283,7 @@ int try_to_free_low(int count)
break;
}
page = list_entry(p, struct page, list);
if ((page_zone(page))->name[0] != 'H') // Look for non-Highmem
if (!PageHighMem(page))
map = page;
}
if (map) {
......
......@@ -508,20 +508,36 @@ void __init mem_init(void)
#endif
}
#if CONFIG_X86_PAE
struct kmem_cache_s *pae_pgd_cachep;
#include <linux/slab.h>
kmem_cache_t *pmd_cache;
kmem_cache_t *pgd_cache;
void pmd_ctor(void *, kmem_cache_t *, unsigned long);
void pgd_ctor(void *, kmem_cache_t *, unsigned long);
void __init pgtable_cache_init(void)
{
if (PTRS_PER_PMD > 1) {
pmd_cache = kmem_cache_create("pae_pmd",
PTRS_PER_PMD*sizeof(pmd_t),
0,
SLAB_HWCACHE_ALIGN | SLAB_MUST_HWCACHE_ALIGN,
pmd_ctor,
NULL);
if (!pmd_cache)
panic("pgtable_cache_init(): cannot create pmd cache");
}
/*
* PAE pgds must be 16-byte aligned:
*/
pae_pgd_cachep = kmem_cache_create("pae_pgd", 32, 0,
SLAB_HWCACHE_ALIGN | SLAB_MUST_HWCACHE_ALIGN, NULL, NULL);
if (!pae_pgd_cachep)
panic("init_pae(): Cannot alloc pae_pgd SLAB cache");
pgd_cache = kmem_cache_create("pgd", PTRS_PER_PGD*sizeof(pgd_t), 0,
SLAB_HWCACHE_ALIGN | SLAB_MUST_HWCACHE_ALIGN, pgd_ctor, NULL);
if (!pgd_cache)
panic("pgtable_cache_init(): Cannot create pgd cache");
}
#endif
/* Put this after the callers, so that it cannot be inlined */
static int do_test_wp_bit(void)
......
......@@ -166,61 +166,60 @@ struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address)
return pte;
}
#if CONFIG_X86_PAE
extern kmem_cache_t *pmd_cache;
extern kmem_cache_t *pgd_cache;
pgd_t *pgd_alloc(struct mm_struct *mm)
void pmd_ctor(void *__pmd, kmem_cache_t *pmd_cache, unsigned long flags)
{
int i;
pgd_t *pgd = kmem_cache_alloc(pae_pgd_cachep, GFP_KERNEL);
clear_page(__pmd);
}
if (pgd) {
for (i = 0; i < USER_PTRS_PER_PGD; i++) {
unsigned long pmd = __get_free_page(GFP_KERNEL);
if (!pmd)
goto out_oom;
clear_page(pmd);
set_pgd(pgd + i, __pgd(1 + __pa(pmd)));
}
void pgd_ctor(void *__pgd, kmem_cache_t *pgd_cache, unsigned long flags)
{
pgd_t *pgd = __pgd;
if (PTRS_PER_PMD == 1)
memset(pgd, 0, USER_PTRS_PER_PGD * sizeof(pgd_t));
memcpy(pgd + USER_PTRS_PER_PGD,
swapper_pg_dir + USER_PTRS_PER_PGD,
(PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t));
}
return pgd;
out_oom:
for (i--; i >= 0; i--)
free_page((unsigned long)__va(pgd_val(pgd[i])-1));
kmem_cache_free(pae_pgd_cachep, pgd);
return NULL;
}
void pgd_free(pgd_t *pgd)
pgd_t *pgd_alloc(struct mm_struct *mm)
{
int i;
pgd_t *pgd = kmem_cache_alloc(pgd_cache, SLAB_KERNEL);
for (i = 0; i < USER_PTRS_PER_PGD; i++)
free_page((unsigned long)__va(pgd_val(pgd[i])-1));
kmem_cache_free(pae_pgd_cachep, pgd);
}
#else
pgd_t *pgd_alloc(struct mm_struct *mm)
{
pgd_t *pgd = (pgd_t *)__get_free_page(GFP_KERNEL);
if (PTRS_PER_PMD == 1)
return pgd;
else if (!pgd)
return NULL;
if (pgd) {
memset(pgd, 0, USER_PTRS_PER_PGD * sizeof(pgd_t));
memcpy(pgd + USER_PTRS_PER_PGD,
swapper_pg_dir + USER_PTRS_PER_PGD,
(PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t));
for (i = 0; i < USER_PTRS_PER_PGD; ++i) {
pmd_t *pmd = kmem_cache_alloc(pmd_cache, SLAB_KERNEL);
if (!pmd)
goto out_oom;
set_pgd(pgd + i, __pgd(1 + __pa((unsigned long long)((unsigned long)pmd))));
}
return pgd;
out_oom:
for (i--; i >= 0; --i)
kmem_cache_free(pmd_cache, (void *)__va(pgd_val(pgd[i])-1));
kmem_cache_free(pgd_cache, (void *)pgd);
return NULL;
}
void pgd_free(pgd_t *pgd)
{
free_page((unsigned long)pgd);
}
int i;
#endif /* CONFIG_X86_PAE */
if (PTRS_PER_PMD > 1) {
for (i = 0; i < USER_PTRS_PER_PGD; ++i) {
kmem_cache_free(pmd_cache, (void *)__va(pgd_val(pgd[i])-1));
set_pgd(pgd + i, __pgd(0));
}
}
kmem_cache_free(pgd_cache, (void *)pgd);
}
......@@ -31,7 +31,7 @@ cflags-$(CONFIG_ITANIUM_BSTEP_SPECIFIC) += -mb-step
cflags-$(CONFIG_IA64_SGI_SN) += -DBRINGUP
CFLAGS += $(cflags-y)
HEAD := arch/ia64/kernel/head.o arch/ia64/kernel/init_task.o
head-y := arch/ia64/kernel/head.o arch/ia64/kernel/init_task.o
libs-y += arch/ia64/lib/
core-y += arch/ia64/kernel/ arch/ia64/mm/
......@@ -51,14 +51,13 @@ drivers-$(CONFIG_IA64_SGI_SN) += arch/ia64/sn/fakeprom/
makeboot =$(Q)$(MAKE) -f scripts/Makefile.build obj=arch/ia64/boot $(1)
maketool =$(Q)$(MAKE) -f scripts/Makefile.build obj=arch/ia64/tools $(1)
.PHONY: boot compressed archclean archmrproper include/asm-ia64/offsets.h
.PHONY: boot compressed include/asm-ia64/offsets.h
all compressed: vmlinux.gz
vmlinux.gz: vmlinux
$(call makeboot,vmlinux.gz)
archmrproper:
archclean:
$(Q)$(MAKE) -f scripts/Makefile.clean obj=arch/ia64/boot
......
......@@ -5,6 +5,4 @@
# Copyright (C) Alex Williamson (alex_williamson@hp.com)
#
export-objs := sba_iommu.o
obj-y := sba_iommu.o
......@@ -4,8 +4,6 @@
EXTRA_TARGETS := head.o init_task.o
export-objs := ia64_ksyms.o
obj-y := acpi.o entry.o gate.o efi.o efi_stub.o ia64_ksyms.o \
irq.o irq_ia64.o irq_lsapic.o ivt.o \
machvec.o pal.o process.o perfmon.o ptrace.o sal.o \
......
......@@ -4,8 +4,6 @@
L_TARGET = lib.a
export-objs := swiotlb.o
obj-y := __divsi3.o __udivsi3.o __modsi3.o __umodsi3.o \
__divdi3.o __udivdi3.o __moddi3.o __umoddi3.o \
checksum.o clear_page.o csum_partial_copy.o copy_page.o \
......
......@@ -13,8 +13,6 @@ ifdef CONFIG_IA64_SGI_SN2
EXTRA_CFLAGS += -DSHUB_SWAP_WAR
endif
export-objs := hcl.o pci_dma.o
obj-$(CONFIG_IA64_SGI_SN) += stubs.o sgi_if.o xswitch.o klgraph_hack.o \
hcl.o labelcl.o invent.o sgi_io_sim.o \
klgraph_hack.o hcl_util.o cdl.o hubdev.o hubspc.o \
......
......@@ -38,8 +38,6 @@ EXTRA_CFLAGS := -DLITTLE_ENDIAN
.S.o:
$(CC) $(AFLAGS) $(AFLAGS_KERNEL) -c -o $*.o $<
export-objs = sn_ksyms.o iomv.o
obj-y = probe.o setup.o sn_asm.o sv.o bte.o iomv.o
obj-$(CONFIG_IA64_SGI_SN1) += irq.o mca.o
obj-$(CONFIG_IA64_SGI_SN2) += irq.o mca.o
......
......@@ -54,9 +54,9 @@ CFLAGS := $(subst -fomit-frame-pointer,,$(CFLAGS)) -g
endif
ifndef CONFIG_SUN3
HEAD := arch/m68k/kernel/head.o
head-y := arch/m68k/kernel/head.o
else
HEAD := arch/m68k/kernel/sun3-head.o
head-y := arch/m68k/kernel/sun3-head.o
endif
core-y += arch/m68k/kernel/ arch/m68k/mm/
......@@ -113,5 +113,3 @@ endif
archclean:
rm -f vmlinux.gz vmlinux.bz2
rm -f arch/m68k/kernel/m68k_defs.h arch/m68k/kernel/m68k_defs.d
archmrproper:
......@@ -2,8 +2,6 @@
# Makefile for Linux arch/m68k/amiga source directory
#
export-objs := amiga_ksyms.o
obj-y := config.o amiints.o cia.o chipram.o amisound.o amiga_ksyms.o
obj-$(CONFIG_AMIGA_PCMCIA) += pcmcia.o
......@@ -2,8 +2,6 @@
# Makefile for Linux arch/m68k/atari source directory
#
export-objs := atari_ksyms.o
obj-y := config.o time.o debug.o ataints.o stdma.o \
atasound.o stram.o atari_ksyms.o
......
......@@ -8,8 +8,6 @@ else
EXTRA_TARGETS := sun3-head.o
endif
export-objs := setup.o m68k_ksyms.o
obj-y := entry.o process.o traps.o ints.o signal.o ptrace.o \
sys_m68k.o time.o semaphore.o setup.o m68k_ksyms.o
......
......@@ -2,7 +2,5 @@
# Makefile for Linux arch/m68k/mac source directory
#
export-objs := mac_ksyms.o
obj-y := config.o bootparse.o macints.o iop.o via.o oss.o psc.o \
baboon.o macboing.o debug.o misc.o mac_ksyms.o
......@@ -2,6 +2,4 @@
# Makefile for Linux arch/m68k/mvme16x source directory
#
export-objs := mvme16x_ksyms.o
obj-y := config.o 16xints.o rtc.o mvme16x_ksyms.o
......@@ -2,8 +2,6 @@
# Makefile for Linux arch/m68k/sun3 source directory
#
export-objs := sun3_ksyms.o
obj-y := sun3_ksyms.o sun3ints.o sun3dvma.o sbus.o idprom.o
obj-$(CONFIG_SUN3) += config.o mmu_emu.o leds.o dvma.o \
......
......@@ -2,6 +2,4 @@
# Makefile for Linux arch/m68k/sun3x source directory
#
export-objs := sun3x_ksyms.o
obj-y := config.o time.o dvma.o prom.o
......@@ -84,7 +84,7 @@ CFLAGS += -DUTS_SYSNAME=\"uClinux\"
LDFLAGS_BLOB := --format binary --oformat elf32-m68k
HEAD := arch/m68knommu/platform/$(platform-y)/$(board-y)/crt0_$(model-y).o
head-y := arch/m68knommu/platform/$(platform-y)/$(board-y)/crt0_$(model-y).o
CLEAN_FILES := include/asm-$(ARCH)/asm-offsets.h.tmp \
include/asm-$(ARCH)/asm-offsets.h \
......@@ -98,8 +98,6 @@ libs-y += arch/m68knommu/lib/
prepare: include/asm-$(ARCH)/asm-offsets.h
archmrproper:
archclean:
$(call descend arch/$(ARCH)/boot, subdirclean)
......
......@@ -2,8 +2,6 @@
# Makefile for arch/m68knommu/kernel.
#
export-objs := m68k_ksyms.o
obj-y += entry.o init_task.o ints.o m68k_ksyms.o process.o ptrace.o \
semaphore.o setup.o signal.o syscalltable.o sys_m68k.o time.o \
traps.o
......
......@@ -256,7 +256,7 @@ endif
AFLAGS_vmlinux.lds.o := -DLOADADDR=$(LOADADDR)
HEAD := arch/mips/kernel/head.o arch/mips/kernel/init_task.o
head-y := arch/mips/kernel/head.o arch/mips/kernel/init_task.o
SUBDIRS := arch/mips/tools
......
......@@ -6,8 +6,6 @@
# Makefile for the Alchemy Au1000 CPU, generic files.
#
export-objs := serial.o
obj-y := prom.o dbg_io.o int-handler.o irq.o puts.o time.o reset.o
obj-$(CONFIG_AU1000_UART) += serial.o
......
......@@ -3,7 +3,6 @@
# under Linux.
#
export-objs := vacserial.o
obj-y := baget.o print.o setup.o time.o irq.o bagetIRQ.o \
reset.o wbflush.o
obj-$(CONFIG_SERIAL) += vacserial.o
......
......@@ -2,8 +2,6 @@
# Makefile for the DECstation family specific parts of the kernel
#
export-objs := wbflush.o
obj-y := int-handler.o setup.o irq.o time.o reset.o rtc-dec.o wbflush.o
obj-$(CONFIG_PROM_CONSOLE) += promcon.o
......@@ -5,8 +5,6 @@
# EXTRA_AFLAGS = -mips3 -mcpu=r4000 # not used?
EXTRA_TARGETS := head.o init_task.o
export-objs := mips_ksyms.o
obj-y += branch.o process.o signal.o entry.o \
traps.o ptrace.o vm86.o ioport.o reset.o \
semaphore.o setup.o syscall.o sysmips.o \
......
......@@ -2,7 +2,6 @@
# Makefile for the Linux/MIPS-specific parts of the memory manager.
#
export-objs += ioremap.o umap.o
obj-y += extable.o init.o ioremap.o fault.o loadmmu.o
obj-$(CONFIG_CPU_R3000) += r2300.o
......
......@@ -128,7 +128,7 @@ endif
LDFLAGS_vmlinux += -Ttext $(LOADADDR)
HEAD := arch/mips64/kernel/head.o arch/mips64/kernel/init_task.o
head-y := arch/mips64/kernel/head.o arch/mips64/kernel/init_task.o
SUBDIRS := arch/mips64/tools $(SUBDIRS)
core-y += arch/mips64/kernel/ arch/mips64/mm/
......
......@@ -4,8 +4,6 @@
EXTRA_TARGETS := head.o init_task.o
export-objs := mips64_ksyms.o
obj-y := branch.o entry.o proc.o process.o ptrace.o r4k_cache.o r4k_fpu.o \
r4k_genex.o r4k_switch.o r4k_tlb.o r4k_tlb_debug.o r4k_tlb_glue.o \
scall_64.o semaphore.o setup.o signal.o softfp.o syscall.o \
......
......@@ -2,8 +2,6 @@
# Makefile for the Linux/MIPS-specific parts of the memory manager.
#
export-objs += umap.o
obj-y := extable.o init.o fault.o loadmmu.o
obj-$(CONFIG_CPU_R4300) += r4xx0.o
......
......@@ -33,10 +33,10 @@ FINAL_LD=$(CROSS_COMPILE)ld --warn-common --warn-section-align
OBJCOPY_FLAGS =-O binary -R .note -R .comment -S
cflags-y := -D__linux__ -pipe -fno-strength-reduce
cflags-y := -pipe
# These should be on for older toolchains or SOM toolchains that don't
# enable them by default.
# These flags should be implied by an hppa-linux configuration, but they
# are not in gcc 3.2.
cflags-y += -mno-space-regs -mfast-indirect-calls
# No fixed-point multiply
......@@ -56,7 +56,6 @@ head-y := arch/parisc/kernel/head.o
head-$(CONFIG_PARISC64) := arch/parisc/kernel/head64.o
CFLAGS += $(cflags-y)
HEAD := $(head-y)
core-y += $(addprefix arch/parisc/, kernel/pdc_cons.o kernel/process.o \
mm/ kernel/ hpux/ math-emu/ kernel/init_task.o )
......@@ -96,9 +95,6 @@ include/asm-parisc/offsets.h: arch/parisc/kernel/asm-offsets.s
@$(generate-asm-offsets.h) < $< > $@.tmp
@$(update-if-changed)
archclean:
archmrproper:
CLEAN_FILES += palo.conf lifimage include/asm-parisc/offsets.h \
include/asm-parisc/offsets.h.tmp
......
......@@ -9,8 +9,6 @@ EXTRA_TARGETS := init_task.o pdc_cons.o process.o unaligned.o $(head-y)
AFLAGS_entry.o := -traditional
AFLAGS_pacache.o := -traditional
export-objs := parisc_ksyms.o
obj-y := cache.o pacache.o setup.o traps.o time.o irq.o \
pa7300lc.o syscall.o entry.o sys_parisc.o firmware.o \
ptrace.o hardware.o inventory.o drivers.o semaphore.o \
......
......@@ -243,7 +243,7 @@ int show_interrupts(struct seq_file *p, void *v)
for (i = 0; i <= MAX_CPU_IRQ; i++) {
struct irqaction *action = &region->action[i];
unsigned int irq_no = IRQ_FROM_REGION(regnr) + i;
int j=0;
int j = 0;
if (!action->handler)
continue;
......@@ -251,7 +251,7 @@ int show_interrupts(struct seq_file *p, void *v)
#ifdef CONFIG_SMP
for (; j < NR_CPUS; j++)
#endif
seq_printf(p, "%10u ", kstat_cpu(j).irqs[regnr][irq_no]);
seq_printf(p, "%10u ", kstat_cpu(j).irqs[irq_no]);
seq_printf(p, " %14s",
region->data.name ? region->data.name : "N/A");
......@@ -388,7 +388,7 @@ void do_irq(struct irqaction *action, int irq, struct pt_regs * regs)
int cpu = smp_processor_id();
irq_enter();
++kstat_cpu(cpu).irqs[IRQ_REGION(irq)][IRQ_OFFSET(irq)];
++kstat_cpu(cpu).irqs[irq];
DBG_IRQ(irq, ("do_irq(%d) %d+%d\n", irq, IRQ_REGION(irq), IRQ_OFFSET(irq)));
......
This diff is collapsed.
......@@ -31,10 +31,6 @@ EXPORT_SYMBOL(hppa_dma_ops);
EXPORT_SYMBOL(get_pci_node_path);
#endif
#ifdef CONFIG_IOMMU_CCIO
EXPORT_SYMBOL(ccio_get_fake);
#endif
#include <linux/sched.h>
#include <asm/irq.h>
EXPORT_SYMBOL(enable_irq);
......
......@@ -17,59 +17,6 @@ struct k_sigaction32 {
struct sigaction32 sa;
};
typedef unsigned int old_sigset_t32;
static int
put_old_sigset32(old_sigset_t32 *up, old_sigset_t *set)
{
old_sigset_t32 set32 = *set;
return put_user(set32, up);
}
static int
get_old_segset32(old_sigset_t32 *up, old_sigset_t *set)
{
old_sigset_t32 set32;
int r;
if ((r = get_user(set32, up)) == 0)
*set = set32;
return r;
}
long
sys32_sigpending(old_sigset_t32 *set)
{
extern long sys_sigpending(old_sigset_t *set);
old_sigset_t pending;
int ret;
KERNEL_SYSCALL(ret, sys_sigpending, &pending);
/* can't put_user an old_sigset_t -- it is too big */
if (put_old_sigset32(set, &pending))
return -EFAULT;
return ret;
}
int sys32_sigprocmask(int how, old_sigset_t32 *set,
old_sigset_t32 *oset)
{
extern int sys_sigprocmask(int how, old_sigset_t *set,
old_sigset_t *oset);
old_sigset_t s;
int ret;
if (set && get_old_segset32 (set, &s))
return -EFAULT;
KERNEL_SYSCALL(ret, sys_sigprocmask, how, set ? &s : NULL, oset ? &s : NULL);
if (!ret && oset && put_old_sigset32(oset, &s))
return -EFAULT;
return ret;
}
static inline void
sigset_32to64(sigset_t *s64, sigset_t32 *s32)
{
......
......@@ -314,74 +314,6 @@ asmlinkage long sys32_unimplemented(int r26, int r25, int r24, int r23,
return -ENOSYS;
}
/* 32-bit user apps use struct statfs which uses 'long's */
struct statfs32 {
__s32 f_type;
__s32 f_bsize;
__s32 f_blocks;
__s32 f_bfree;
__s32 f_bavail;
__s32 f_files;
__s32 f_ffree;
__kernel_fsid_t f_fsid;
__s32 f_namelen;
__s32 f_spare[6];
};
/* convert statfs struct to statfs32 struct and copy result to user */
static unsigned long statfs32_to_user(struct statfs32 *ust32, struct statfs *st)
{
struct statfs32 st32;
#undef CP
#define CP(a) st32.a = st->a
CP(f_type);
CP(f_bsize);
CP(f_blocks);
CP(f_bfree);
CP(f_bavail);
CP(f_files);
CP(f_ffree);
CP(f_fsid);
CP(f_namelen);
return copy_to_user(ust32, &st32, sizeof st32);
}
/* The following statfs calls are copies of code from linux/fs/open.c and
* should be checked against those from time to time */
asmlinkage long sys32_statfs(const char * path, struct statfs32 * buf)
{
struct nameidata nd;
int error;
error = user_path_walk(path, &nd);
if (!error) {
struct statfs tmp;
error = vfs_statfs(nd.dentry->d_inode->i_sb, &tmp);
if (!error && statfs32_to_user(buf, &tmp))
error = -EFAULT;
path_release(&nd);
}
return error;
}
asmlinkage long sys32_fstatfs(unsigned int fd, struct statfs32 * buf)
{
struct file * file;
struct statfs tmp;
int error;
error = -EBADF;
file = fget(fd);
if (!file)
goto out;
error = vfs_statfs(file->f_dentry->d_inode->i_sb, &tmp);
if (!error && statfs32_to_user(buf, &tmp))
error = -EFAULT;
fput(file);
out:
return error;
}
extern asmlinkage long sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg);
asmlinkage long sys32_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg)
......
......@@ -428,7 +428,7 @@ sys_call_table:
ENTRY_SAME(setreuid) /* 70 */
ENTRY_SAME(setregid)
ENTRY_SAME(mincore)
ENTRY_DIFF(sigpending)
ENTRY_COMP(sigpending)
ENTRY_SAME(sethostname)
/* Following 3 have linux-common-code structs containing longs -( */
ENTRY_DIFF(setrlimit) /* 75 */
......@@ -445,10 +445,7 @@ sys_call_table:
/* see stat comment */
ENTRY_COMP(newlstat)
ENTRY_SAME(readlink) /* 85 */
/* suspect we'll need some work for narrow shlibs on wide kernel */
/* NOTE this doesn't get used when I boot 32-bit userspace */
/* containing working shlib apps -- can this be nuked? */
ENTRY_UHOH(uselib)
ENTRY_SAME(ni_syscall) /* was uselib */
ENTRY_SAME(swapon)
ENTRY_SAME(reboot)
ENTRY_SAME(mmap2)
......@@ -461,12 +458,10 @@ sys_call_table:
ENTRY_SAME(getpriority)
ENTRY_SAME(setpriority)
ENTRY_SAME(recv)
ENTRY_DIFF(statfs)
ENTRY_DIFF(fstatfs) /* 100 */
ENTRY_COMP(statfs)
ENTRY_COMP(fstatfs) /* 100 */
ENTRY_SAME(stat64)
/* don't think hppa glibc even provides an entry pt for this
* so disable for now */
ENTRY_UHOH(socketcall)
ENTRY_SAME(ni_syscall) /* was socketcall */
ENTRY_SAME(syslog)
/* even though manpage says struct timeval contains longs, ours has
* time_t and suseconds_t -- both of which are safe wide/narrow */
......@@ -496,7 +491,7 @@ sys_call_table:
ENTRY_DIFF(adjtimex)
ENTRY_SAME(mprotect) /* 125 */
/* old_sigset_t forced to 32 bits. Beware glibc sigset_t */
ENTRY_DIFF(sigprocmask)
ENTRY_COMP(sigprocmask)
ENTRY_SAME(ni_syscall) /* create_module */
ENTRY_SAME(init_module)
ENTRY_SAME(delete_module)
......@@ -594,15 +589,9 @@ sys_call_table:
ENTRY_OURS(ftruncate64) /* 200 */
ENTRY_SAME(getdents64)
ENTRY_DIFF(fcntl64)
#ifdef CONFIG_XFS_FS
ENTRY_SAME(attrctl)
ENTRY_SAME(acl_get)
ENTRY_SAME(acl_set) /* 205 */
#else
ENTRY_SAME(ni_syscall)
ENTRY_SAME(ni_syscall)
ENTRY_SAME(ni_syscall) /* 205 */
#endif
ENTRY_SAME(gettid)
ENTRY_SAME(readahead)
ENTRY_SAME(ni_syscall) /* tkill */
......
......@@ -123,7 +123,11 @@ void dump_stack(void)
}
static int kstack_depth_to_print = 48;
#ifndef __LP64__
static int kstack_depth_to_print = 64 * 4;
#else
static int kstack_depth_to_print = 128 * 4;
#endif
void show_stack(unsigned long *sp)
{
......
......@@ -2,8 +2,6 @@
# Makefile for the linux MPC8xx ppc-specific parts of comm processor
#
export-objs := fec.o
obj-y := commproc.o uart.o
obj-$(CONFIG_FEC_ENET) += fec.o
......
......@@ -36,15 +36,12 @@ ifdef CONFIG_MORE_COMPILE_OPTIONS
CFLAGS += $(shell echo $(CONFIG_COMPILE_OPTIONS) | sed -e 's/"//g')
endif
head-y := head.o
head-$(CONFIG_8xx) := head_8xx.o
head-$(CONFIG_4xx) := head_4xx.o
head-$(CONFIG_440) := head_44x.o
head-y := arch/ppc/kernel/head.o
head-$(CONFIG_8xx) := arch/ppc/kernel/head_8xx.o
head-$(CONFIG_4xx) := arch/ppc/kernel/head_4xx.o
head-$(CONFIG_440) := arch/ppc/kernel/head_44x.o
HEAD := arch/ppc/kernel/$(head-y)
ifdef CONFIG_6xx
HEAD += arch/ppc/kernel/idle_6xx.o
endif
head-$(CONFIG_6xx) += arch/ppc/kernel/idle_6xx.o
core-y += arch/ppc/kernel/ arch/ppc/platforms/ \
arch/ppc/mm/ arch/ppc/lib/ arch/ppc/syslib/
......@@ -59,7 +56,7 @@ drivers-$(CONFIG_OCP) += arch/ppc/ocp/
BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd pImage vmlinux.sm
.PHONY: $(BOOT_TARGETS) clean archclean archmrproper
.PHONY: $(BOOT_TARGETS)
all: zImage
......@@ -78,8 +75,6 @@ $(BOOT_TARGETS): vmlinux
archclean:
$(Q)$(MAKE) $(clean)=arch/ppc/boot
archmrproper:
prepare: include/asm-$(ARCH)/offsets.h checkbin
arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
......
......@@ -2,8 +2,6 @@
# Makefile for Linux arch/m68k/amiga source directory
#
export-objs := amiga_ksyms.o
obj-y := config.o amiints.o cia.o time.o bootinfo.o amisound.o \
chipram.o amiga_ksyms.o
......
......@@ -17,8 +17,6 @@ HEAD-$(CONFIG_6xx) += idle_6xx.o
EXTRA_TARGETS := $(HEAD-y)
export-objs := ppc_ksyms.o time.o
obj-y := entry.o traps.o irq.o idle.o time.o misc.o \
process.o signal.o ptrace.o align.o \
semaphore.o syscalls.o setup.o \
......
......@@ -2,8 +2,6 @@
# Makefile for ppc-specific library files..
#
export-objs := dec_and_lock.o
obj-y := checksum.o string.o strcase.o dec_and_lock.o div64.o
obj-$(CONFIG_SMP) += locks.o
......@@ -9,6 +9,5 @@
#
# NB: cribbed from the drivers/sbus/Makefile -- PMM
export-objs := ocp.o ocp-driver.o ocp-probe.o
obj-y += ocp.o ocp-driver.o ocp-probe.o
#
# Makefile for the PowerPC 4xx linux kernel.
export-objs := ibm405lp.o
obj-$(CONFIG_ASH) += ash.o
obj-$(CONFIG_BEECH) += beech.o
obj-$(CONFIG_CEDAR) += cedar.o
......
......@@ -12,8 +12,6 @@ endif
# Extra CFLAGS so we don't have to do relative includes
CFLAGS_pmac_setup.o += -I$(TOPDIR)/arch/$(ARCH)/mm
export-objs := prep_setup.o
obj-$(CONFIG_APUS) += apus_setup.o
ifeq ($(CONFIG_APUS),y)
obj-$(CONFIG_PCI) += apus_pci.o
......
......@@ -12,8 +12,6 @@ endif
CFLAGS_prom_init.o += -mrelocatable-lib
CFLAGS_btext.o += -mrelocatable-lib
export-objs := ppc4xx_dma.o ppc4xx_pm.o
obj-$(CONFIG_PPCBUG_NVRAM) += prep_nvram.o
ifeq ($(CONFIG_4xx),y)
obj-$(CONFIG_4xx) += ppc4xx_pic.o
......
This diff is collapsed.
This diff is collapsed.
......@@ -4,7 +4,5 @@
L_TARGET = lib.a
export-objs := dec_and_lock.o
obj-y := checksum.o dec_and_lock.o string.o strcase.o
obj-y += copypage.o memcpy.o copyuser.o
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment