Commit b9de2e44 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://namesys.com/bk/reiser3-linux-2.5

into home.transmeta.com:/home/torvalds/v2.5/linux
parents 70c452ad d743e951
......@@ -222,10 +222,10 @@ cmd_link_vmlinux = $(LD) $(LINKFLAGS) $(HEAD) $(INIT) \
define rule_link_vmlinux
set -e
echo Generating build number
echo ' Generating build number'
. scripts/mkversion > .tmpversion
mv -f .tmpversion .version
$(MAKE) -C init
+$(MAKE) -C init
$(call cmd,cmd_link_vmlinux)
$(cmd_link_vmlinux)
echo 'cmd_$@ := $(cmd_link_vmlinux)' > $(@D)/.$(@F).cmd
......@@ -243,14 +243,14 @@ $(sort $(vmlinux-objs)): $(SUBDIRS) ;
# Handle descending into subdirectories listed in $(SUBDIRS)
.PHONY: $(SUBDIRS)
$(SUBDIRS): .hdepend prepare include/config/MARKER
$(SUBDIRS): .hdepend prepare
@$(MAKE) -C $@
# Things we need done before we descend to build or make
# module versions are listed in "prepare"
.PHONY: prepare
prepare: include/linux/version.h include/asm
prepare: include/linux/version.h include/asm include/config/MARKER
# Single targets
# ---------------------------------------------------------------------------
......@@ -273,13 +273,13 @@ prepare: include/linux/version.h include/asm
# before switching between archs anyway.
include/asm:
@echo 'Making asm->asm-$(ARCH) symlink'
@echo ' Making asm->asm-$(ARCH) symlink'
@ln -s asm-$(ARCH) $@
# Split autoconf.h into include/linux/config/*
include/config/MARKER: scripts/split-include include/linux/autoconf.h
@echo 'Splitting include/linux/autoconf.h -> include/config'
@echo ' SPLIT include/linux/autoconf.h -> include/config/*'
@scripts/split-include include/linux/autoconf.h include/config
@touch $@
......@@ -306,7 +306,7 @@ include/linux/version.h: Makefile
echo '"$(KERNELRELEASE)" exceeds $(uts_len) characters' >&2; \
exit 1; \
fi;
@echo -n 'Generating $@'
@echo -n ' Generating $@'
@(echo \#define UTS_RELEASE \"$(KERNELRELEASE)\"; \
echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 + $(PATCHLEVEL) \\* 256 + $(SUBLEVEL)`; \
echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))'; \
......@@ -349,11 +349,11 @@ ifdef CONFIG_MODVERSIONS
include/linux/modversions.h: scripts/fixdep prepare FORCE
@rm -rf .tmp_export-objs
@$(MAKE) $(patsubst %,_sfdep_%,$(SUBDIRS))
@echo -n 'Generating $@'
@echo -n ' Generating $@'
@( echo "#ifndef _LINUX_MODVERSIONS_H";\
echo "#define _LINUX_MODVERSIONS_H"; \
echo "#include <linux/modsetver.h>"; \
for f in `cd .tmp_export-objs; find modules -name \*.ver -print`; do \
for f in `cd .tmp_export-objs; find modules -name \*.ver -print | sort`; do \
echo "#include <linux/$${f}>"; \
done; \
echo "#endif"; \
......@@ -574,9 +574,8 @@ make_with_config: .config
# files removed with 'make clean'
CLEAN_FILES += \
kernel/ksyms.lst include/linux/compile.h \
include/linux/compile.h \
vmlinux System.map \
.tmp* \
drivers/char/consolemap_deftbl.c drivers/video/promcon_tbl.c \
drivers/char/conmakehash \
drivers/char/drm/*-mod.c \
......@@ -616,9 +615,11 @@ MRPROPER_FILES += \
.hdepend scripts/split-include scripts/docproc \
scripts/fixdep $(TOPDIR)/include/linux/modversions.h \
tags TAGS kernel.spec \
.tmpversion
# directories removed with 'make mrproper'
MRPROPER_DIRS += \
.tmp_export-objs \
include/config \
$(TOPDIR)/include/linux/modules
......@@ -631,7 +632,7 @@ clean: archclean
@find . \( -name \*.[oas] -o -name core -o -name .\*.cmd -o \
-name .\*.tmp -o -name .\*.d \) -type f -print \
| grep -v lxdialog/ | xargs rm -f
@rm -rf $(CLEAN_FILES)
@rm -f $(CLEAN_FILES)
@$(MAKE) -C Documentation/DocBook clean
mrproper: clean archmrproper
......
This diff is collapsed.
......@@ -439,15 +439,16 @@ static int __init pci_v3_setup_resources(struct resource **resource)
#define SC_LBFADDR (IO_ADDRESS(INTEGRATOR_SC_BASE) + 0x20)
#define SC_LBFCODE (IO_ADDRESS(INTEGRATOR_SC_BASE) + 0x24)
static int v3_fault(unsigned long addr, struct pt_regs *regs)
static int
v3_pci_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
{
unsigned long pc = instruction_pointer(regs);
unsigned long instr = *(unsigned long *)pc;
#if 0
char buf[128];
sprintf(buf, "V3 fault: address=0x%08lx, pc=0x%08lx [%08lx] LBFADDR=%08x LBFCODE=%02x ISTAT=%02x\n",
addr, pc, instr, __raw_readl(SC_LBFADDR), __raw_readl(SC_LBFCODE) & 255,
sprintf(buf, "V3 fault: addr 0x%08lx, FSR 0x%03x, PC 0x%08lx [%08lx] LBFADDR=%08x LBFCODE=%02x ISTAT=%02x\n",
addr, fsr, pc, instr, __raw_readl(SC_LBFADDR), __raw_readl(SC_LBFCODE) & 255,
v3_readb(V3_LB_ISTAT));
printk(KERN_DEBUG "%s", buf);
printascii(buf);
......@@ -515,8 +516,6 @@ static void v3_irq(int irq, void *devid, struct pt_regs *regs)
#endif
}
extern int (*external_fault)(unsigned long addr, struct pt_regs *regs);
int __init pci_v3_setup(int nr, struct pci_sys_data *sys)
{
int ret = 0;
......@@ -547,7 +546,10 @@ void __init pci_v3_preinit(void)
/*
* Hook in our fault handler for PCI errors
*/
external_fault = v3_fault;
hook_fault_code(4, v3_pci_fault, SIGBUS, "external abort on linefetch");
hook_fault_code(6, v3_pci_fault, SIGBUS, "external abort on linefetch");
hook_fault_code(8, v3_pci_fault, SIGBUS, "external abort on non-linefetch");
hook_fault_code(10, v3_pci_fault, SIGBUS, "external abort on non-linefetch");
spin_lock_irqsave(&v3_lock, flags);
......
......@@ -106,19 +106,32 @@ static int iop310_pri_pci_status(void)
return ret;
}
static inline u32 iop310_pri_read(struct pci_dev *dev, int where)
{
unsigned long addr = iop310_cfg_address(dev, where);
u32 val;
__asm__ __volatile__(
"str %1, [%2]\n\t"
"ldr %0, [%3]\n\t"
"nop\n\t"
"nop\n\t"
"nop\n\t"
"nop\n\t"
: "=r" (val)
: "r" (addr), "r" (IOP310_POCCAR), "r" (IOP310_POCCDR));
return val;
}
static int
iop310_pri_rd_cfg_byte(struct pci_dev *dev, int where, u8 *p)
{
int ret;
u8 val;
*IOP310_POCCAR = iop310_cfg_address(dev, where);
val = (*IOP310_POCCDR) >> ((where & 3) * 8);
__asm__ __volatile__("nop; nop; nop; nop");
val = iop310_pri_read(dev, where) >> ((where & 3) * 8);
ret = iop310_pri_pci_status();
if (ret)
if (iop310_pri_pci_status())
val = 0xff;
*p = val;
......@@ -129,16 +142,11 @@ iop310_pri_rd_cfg_byte(struct pci_dev *dev, int where, u8 *p)
static int
iop310_pri_rd_cfg_word(struct pci_dev *dev, int where, u16 *p)
{
int ret;
u16 val;
*IOP310_POCCAR = iop310_cfg_address(dev, where);
val = (*IOP310_POCCDR) >> ((where & 2) * 8);
__asm__ __volatile__("nop; nop; nop; nop");
val = iop310_pri_read(dev, where) >> ((where & 3) * 8);
ret = iop310_pri_pci_status();
if (ret)
if (iop310_pri_pci_status())
val = 0xffff;
*p = val;
......@@ -149,16 +157,11 @@ iop310_pri_rd_cfg_word(struct pci_dev *dev, int where, u16 *p)
static int
iop310_pri_rd_cfg_dword(struct pci_dev *dev, int where, u32 *p)
{
int ret;
u32 val;
*IOP310_POCCAR = iop310_cfg_address(dev, where);
val = iop310_pri_read(dev, where);
val = *IOP310_POCCDR;
__asm__ __volatile__("nop; nop; nop; nop");
ret = iop310_pri_pci_status();
if (ret)
if (iop310_pri_pci_status())
val = 0xffffffff;
*p = val;
......@@ -169,16 +172,11 @@ iop310_pri_rd_cfg_dword(struct pci_dev *dev, int where, u32 *p)
static int
iop310_pri_wr_cfg_byte(struct pci_dev *dev, int where, u8 v)
{
int ret;
u32 val;
*IOP310_POCCAR = iop310_cfg_address(dev, where);
val = iop310_pri_read(dev, where);
val = *IOP310_POCCDR;
__asm__ __volatile__("nop; nop; nop; nop");
ret = iop310_pri_pci_status();
if (ret == 0) {
if (iop310_pri_pci_status() == 0) {
where = (where & 3) * 8;
val &= ~(0xff << where);
val |= v << where;
......@@ -191,16 +189,11 @@ iop310_pri_wr_cfg_byte(struct pci_dev *dev, int where, u8 v)
static int
iop310_pri_wr_cfg_word(struct pci_dev *dev, int where, u16 v)
{
int ret;
u32 val;
*IOP310_POCCAR = iop310_cfg_address(dev, where);
val = *IOP310_POCCDR;
__asm__ __volatile__("nop; nop; nop; nop");
val = iop310_pri_read(dev, where);
ret = iop310_pri_pci_status();
if (ret == 0) {
if (iop310_pri_pci_status() == 0) {
where = (where & 2) * 8;
val &= ~(0xffff << where);
val |= v << where;
......@@ -211,11 +204,21 @@ iop310_pri_wr_cfg_word(struct pci_dev *dev, int where, u16 v)
}
static int
iop310_pri_wr_cfg_dword(struct pci_dev *dev, int where, u32 v)
iop310_pri_wr_cfg_dword(struct pci_dev *dev, int where, u32 val)
{
*IOP310_POCCAR = iop310_cfg_address(dev, where);
*IOP310_POCCDR = v;
__asm__ __volatile__("nop; nop; nop; nop");
unsigned long addr;
addr = iop310_cfg_address(dev, where);
__asm__ __volatile__(
"str %1, [%2]\n\t"
"str %0, [%3]\n\t"
"nop\n\t"
"nop\n\t"
"nop\n\t"
"nop\n\t"
:
: "r" (val), "r" (addr), "r" (IOP310_POCCAR), "r" (IOP310_POCCDR));
return PCIBIOS_SUCCESSFUL;
}
......@@ -248,28 +251,38 @@ static int iop310_sec_pci_status(void)
ret = 1;
}
if (ret)
DBG("ERROR (%08lx %08lx)", usr, uisr);
DBG("ERROR (%08x %08x)", usr, uisr);
return ret;
}
static inline u32 iop310_sec_read(struct pci_dev *dev, int where)
{
unsigned long addr = iop310_cfg_address(dev, where);
u32 val;
__asm__ __volatile__(
"str %1, [%2]\n\t"
"ldr %0, [%3]\n\t"
"nop\n\t"
"nop\n\t"
"nop\n\t"
"nop\n\t"
: "=r" (val)
: "r" (addr), "r" (IOP310_SOCCAR), "r" (IOP310_SOCCDR));
return val;
}
static int
iop310_sec_rd_cfg_byte(struct pci_dev *dev, int where, u8 *p)
{
int ret;
u8 val;
DBG("rdb: %d:%02x.%x %02x ", dev->bus->number, PCI_SLOT(dev->devfn),
PCI_FUNC(dev->devfn), where);
*IOP310_SOCCAR = iop310_cfg_address(dev, where);
val = iop310_sec_read(dev, where) >> ((where & 3) * 8);
val = (*IOP310_SOCCDR) >> ((where & 3) * 8);
__asm__ __volatile__("nop; nop; nop; nop");
DBG(">= %08lx ", val);
ret = iop310_sec_pci_status();
if (ret)
if (iop310_sec_pci_status())
val = 0xff;
DBG("\n");
*p = val;
return PCIBIOS_SUCCESSFUL;
......@@ -278,21 +291,13 @@ iop310_sec_rd_cfg_byte(struct pci_dev *dev, int where, u8 *p)
static int
iop310_sec_rd_cfg_word(struct pci_dev *dev, int where, u16 *p)
{
int ret;
u16 val;
DBG("rdw: %d:%02x.%x %02x ", dev->bus->number, PCI_SLOT(dev->devfn),
PCI_FUNC(dev->devfn), where);
*IOP310_SOCCAR = iop310_cfg_address(dev, where);
val = (*IOP310_SOCCDR) >> ((where & 3) * 8);
__asm__ __volatile__("nop; nop; nop; nop");
val = iop310_sec_read(dev, where) >> ((where & 3) * 8);
DBG(">= %08lx ", val);
ret = iop310_sec_pci_status();
if (ret)
if (iop310_sec_pci_status())
val = 0xffff;
DBG("\n");
*p = val;
return PCIBIOS_SUCCESSFUL;
......@@ -301,21 +306,13 @@ iop310_sec_rd_cfg_word(struct pci_dev *dev, int where, u16 *p)
static int
iop310_sec_rd_cfg_dword(struct pci_dev *dev, int where, u32 *p)
{
int ret;
u32 val;
DBG("rdl: %d:%02x.%x %02x ", dev->bus->number, PCI_SLOT(dev->devfn),
PCI_FUNC(dev->devfn), where);
*IOP310_SOCCAR = iop310_cfg_address(dev, where);
val = *IOP310_SOCCDR;
__asm__ __volatile__("nop; nop; nop; nop");
val = iop310_sec_read(dev, where);
DBG(">= %08lx ", val);
ret = iop310_sec_pci_status();
if (ret)
if (iop310_sec_pci_status())
val = 0xffffffff;
DBG("\n");
*p = val;
return PCIBIOS_SUCCESSFUL;
......@@ -324,63 +321,54 @@ iop310_sec_rd_cfg_dword(struct pci_dev *dev, int where, u32 *p)
static int
iop310_sec_wr_cfg_byte(struct pci_dev *dev, int where, u8 v)
{
int ret;
u32 val;
DBG("wrb: %d:%02x.%x %02x ", dev->bus->number, PCI_SLOT(dev->devfn),
PCI_FUNC(dev->devfn), where);
*IOP310_SOCCAR = iop310_cfg_address(dev, where);
val = *IOP310_SOCCDR;
__asm__ __volatile__("nop; nop; nop; nop");
val = iop310_sec_read(dev, where);
DBG("<= %08lx", v);
ret = iop310_sec_pci_status();
if (ret == 0) {
if (iop310_sec_pci_status() == 0) {
where = (where & 3) * 8;
val &= ~(0xff << where);
val |= v << where;
*IOP310_SOCCDR = val;
}
DBG("\n");
return PCIBIOS_SUCCESSFUL;
}
static int
iop310_sec_wr_cfg_word(struct pci_dev *dev, int where, u16 v)
{
int ret;
u32 val;
DBG("wrw: %d:%02x.%x %02x ", dev->bus->number, PCI_SLOT(dev->devfn),
PCI_FUNC(dev->devfn), where);
*IOP310_SOCCAR = iop310_cfg_address(dev, where);
val = iop310_sec_read(dev, where);
val = *IOP310_SOCCDR;
__asm__ __volatile__("nop; nop; nop; nop");
DBG("<= %08lx", v);
ret = iop310_sec_pci_status();
if (ret == 0) {
if (iop310_sec_pci_status() == 0) {
where = (where & 2) * 8;
val &= ~(0xffff << where);
val |= v << where;
*IOP310_SOCCDR = val;
}
DBG("\n");
return PCIBIOS_SUCCESSFUL;
}
static int
iop310_sec_wr_cfg_dword(struct pci_dev *dev, int where, u32 v)
iop310_sec_wr_cfg_dword(struct pci_dev *dev, int where, u32 val)
{
DBG("wrl: %d:%02x.%x %02x ", dev->bus->number, PCI_SLOT(dev->devfn),
PCI_FUNC(dev->devfn), where);
*IOP310_SOCCAR = iop310_cfg_address(dev, where);
*IOP310_SOCCDR = v;
__asm__ __volatile__("nop; nop; nop; nop");
unsigned long addr;
addr = iop310_cfg_address(dev, where);
__asm__ __volatile__(
"str %1, [%2]\n\t"
"str %0, [%3]\n\t"
"nop\n\t"
"nop\n\t"
"nop\n\t"
"nop\n\t"
:
: "r" (val), "r" (addr), "r" (IOP310_SOCCAR), "r" (IOP310_SOCCDR));
DBG("<= %08lx\n", v);
return PCIBIOS_SUCCESSFUL;
}
......@@ -394,13 +382,34 @@ static struct pci_ops iop310_secondary_ops = {
};
/*
* When a PCI device does not exist during config cycles, the 80200 gets a
* bus error instead of returning 0xffffffff. This handler simply returns.
* When a PCI device does not exist during config cycles, the 80200 gets
* an external abort instead of returning 0xffffffff. If it was an
* imprecise abort, we need to correct the return address to point after
* the instruction. Also note that the Xscale manual says:
*
* "if a stall-until-complete LD or ST instruction triggers an
* imprecise fault, then that fault will be seen by the program
* within 3 instructions."
*
* This does not appear to be the case. With 8 NOPs after the load, we
* see the imprecise abort occuring on the STM of iop310_sec_pci_status()
* which is about 10 instructions away.
*
* Always trust reality!
*/
int iop310_pci_abort_handler(unsigned long addr, struct pt_regs *regs)
static int
iop310_pci_abort(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
{
DBG("PCI abort: address = %08x PC = %08x LR = %08lx\n",
addr, regs->ARM_pc, regs->ARM_lr);
DBG("PCI abort: address = 0x%08lx fsr = 0x%03x PC = 0x%08lx LR = 0x%08lx\n",
addr, fsr, regs->ARM_pc, regs->ARM_lr);
/*
* If it was an imprecise abort, then we need to correct the
* return address to be _after_ the instruction.
*/
if (fsr & (1 << 10))
regs->ARM_pc += 4;
return 0;
}
......@@ -515,6 +524,5 @@ void iop310_init(void)
*/
*IOP310_PCR &= 0xfff8;
external_fault = iop310_pci_abort_handler;
hook_fault_code(6, iop310_pci_abort, SIGBUS, "imprecise external abort");
}
......@@ -40,6 +40,7 @@ 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
led-$(CONFIG_SA1100_BRUTUS) += leds-brutus.o
......
/*
* linux/arch/arm/mach-sa1100/leds-badge4.c
*
* Author: Christopher Hoover <ch@hpl.hp.com>
* Copyright (C) 2002 Hewlett-Packard Company
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
#include <linux/config.h>
#include <linux/init.h>
#include <asm/hardware.h>
#include <asm/leds.h>
#include <asm/system.h>
#include "leds.h"
#define LED_STATE_ENABLED 1
#define LED_STATE_CLAIMED 2
static unsigned int led_state;
static unsigned int hw_led_state;
#define LED_RED GPIO_GPIO(7)
#define LED_GREEN GPIO_GPIO(9)
#define LED_MASK (LED_RED|LED_GREEN)
#define LED_IDLE LED_GREEN
#define LED_TIMER LED_RED
void badge4_leds_event(led_event_t evt)
{
unsigned long flags;
local_irq_save(flags);
switch (evt) {
case led_start:
GPDR |= LED_MASK;
hw_led_state = LED_MASK;
led_state = LED_STATE_ENABLED;
break;
case led_stop:
led_state &= ~LED_STATE_ENABLED;
break;
case led_claim:
led_state |= LED_STATE_CLAIMED;
hw_led_state = LED_MASK;
break;
case led_release:
led_state &= ~LED_STATE_CLAIMED;
hw_led_state = LED_MASK;
break;
#ifdef CONFIG_LEDS_TIMER
case led_timer:
if (!(led_state & LED_STATE_CLAIMED))
hw_led_state ^= LED_TIMER;
break;
#endif
#ifdef CONFIG_LEDS_CPU
case led_idle_start:
/* LED off when system is idle */
if (!(led_state & LED_STATE_CLAIMED))
hw_led_state &= ~LED_IDLE;
break;
case led_idle_end:
if (!(led_state & LED_STATE_CLAIMED))
hw_led_state |= LED_IDLE;
break;
#endif
case led_red_on:
if (!(led_state & LED_STATE_CLAIMED))
hw_led_state &= ~LED_RED;
break;
case led_red_off:
if (!(led_state & LED_STATE_CLAIMED))
hw_led_state |= LED_RED;
break;
case led_green_on:
if (!(led_state & LED_STATE_CLAIMED))
hw_led_state &= ~LED_GREEN;
break;
case led_green_off:
if (!(led_state & LED_STATE_CLAIMED))
hw_led_state |= LED_GREEN;
break;
default:
break;
}
if (led_state & LED_STATE_ENABLED) {
GPSR = hw_led_state;
GPCR = hw_led_state ^ LED_MASK;
}
local_irq_restore(flags);
}
......@@ -19,6 +19,8 @@ sa1100_leds_init(void)
leds_event = assabet_leds_event;
if (machine_is_consus())
leds_event = consus_leds_event;
if (machine_is_badge4())
leds_event = badge4_leds_event;
if (machine_is_brutus())
leds_event = brutus_leds_event;
if (machine_is_cerf())
......
extern void assabet_leds_event(led_event_t evt);
extern void badge4_leds_event(led_event_t evt);
extern void consus_leds_event(led_event_t evt);
extern void brutus_leds_event(led_event_t evt);
extern void cerf_leds_event(led_event_t evt);
......
......@@ -26,11 +26,11 @@ obj-$(CONFIG_ALIGNMENT_TRAP) += alignment.o
obj-$(CONFIG_DISCONTIGMEM) += discontig.o
# Select the processor-specific files
p-$(CONFIG_CPU_26) += proc-arm2,3.o
p-$(CONFIG_CPU_26) += proc-arm2_3.o
# ARMv3
p-$(CONFIG_CPU_ARM610) += proc-arm6,7.o tlb-v3.o copypage-v3.o
p-$(CONFIG_CPU_ARM710) += proc-arm6,7.o tlb-v3.o copypage-v3.o
p-$(CONFIG_CPU_ARM610) += proc-arm6_7.o tlb-v3.o copypage-v3.o
p-$(CONFIG_CPU_ARM710) += proc-arm6_7.o tlb-v3.o copypage-v3.o
# ARMv4
p-$(CONFIG_CPU_ARM720T) += proc-arm720.o tlb-v4.o copypage-v4wt.o abort-lv4t.o
......
......@@ -30,9 +30,7 @@
#include <asm/pgtable.h>
#include <asm/unaligned.h>
extern void
do_bad_area(struct task_struct *tsk, struct mm_struct *mm, unsigned long addr,
int error_code, struct pt_regs *regs);
#include "fault.h"
/*
* 32-bit misaligned trap handler (c) 1998 San Mehat (CCC) -July 1998
......@@ -130,31 +128,6 @@ static int proc_alignment_write(struct file *file, const char *buffer,
return count;
}
/*
* This needs to be done after sysctl_init, otherwise sys/ will be
* overwritten. Actually, this shouldn't be in sys/ at all since
* it isn't a sysctl, and it doesn't contain sysctl information.
* We now locate it in /proc/cpu/alignment instead.
*/
static int __init alignment_init(void)
{
struct proc_dir_entry *res;
res = proc_mkdir("cpu", NULL);
if (!res)
return -ENOMEM;
res = create_proc_entry("alignment", S_IWUSR | S_IRUGO, res);
if (!res)
return -ENOMEM;
res->read_proc = proc_alignment_read;
res->write_proc = proc_alignment_write;
return 0;
}
__initcall(alignment_init);
#endif /* CONFIG_PROC_FS */
union offset_union {
......@@ -486,7 +459,8 @@ do_alignment_ldmstm(unsigned long addr, unsigned long instr, struct pt_regs *reg
return TYPE_ERROR;
}
int do_alignment(unsigned long addr, int error_code, struct pt_regs *regs)
static int
do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
{
union offset_union offset;
unsigned long instr, instrptr;
......@@ -577,7 +551,7 @@ int do_alignment(unsigned long addr, int error_code, struct pt_regs *regs)
/*
* We got a fault - fix it up, or die.
*/
do_bad_area(current, current->mm, addr, error_code, regs);
do_bad_area(current, current->mm, addr, fsr, regs);
return 0;
bad:
......@@ -594,8 +568,8 @@ int do_alignment(unsigned long addr, int error_code, struct pt_regs *regs)
if (ai_usermode & 1)
printk("Alignment trap: %s (%d) PC=0x%08lx Instr=0x%08lx "
"Address=0x%08lx Code 0x%02x\n", current->comm,
current->pid, instrptr, instr, addr, error_code);
"Address=0x%08lx FSR 0x%03x\n", current->comm,
current->pid, instrptr, instr, addr, fsr);
if (ai_usermode & 2)
goto fixup;
......@@ -607,3 +581,34 @@ int do_alignment(unsigned long addr, int error_code, struct pt_regs *regs)
return 0;
}
/*
* This needs to be done after sysctl_init, otherwise sys/ will be
* overwritten. Actually, this shouldn't be in sys/ at all since
* it isn't a sysctl, and it doesn't contain sysctl information.
* We now locate it in /proc/cpu/alignment instead.
*/
static int __init alignment_init(void)
{
#ifdef CONFIG_PROC_FS
struct proc_dir_entry *res;
res = proc_mkdir("cpu", NULL);
if (!res)
return -ENOMEM;
res = create_proc_entry("alignment", S_IWUSR | S_IRUGO, res);
if (!res)
return -ENOMEM;
res->read_proc = proc_alignment_read;
res->write_proc = proc_alignment_write;
#endif
hook_fault_code(1, do_alignment, SIGILL, "alignment exception");
hook_fault_code(3, do_alignment, SIGILL, "alignment exception");
return 0;
}
__initcall(alignment_init);
......@@ -2,102 +2,62 @@
* linux/arch/arm/mm/fault-armv.c
*
* Copyright (C) 1995 Linus Torvalds
* Modifications for ARM processor (c) 1995-2001 Russell King
* Modifications for ARM processor (c) 1995-2002 Russell King
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <linux/config.h>
#include <linux/compiler.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/types.h>
#include <linux/ptrace.h>
#include <linux/mman.h>
#include <linux/mm.h>
#include <linux/interrupt.h>
#include <linux/proc_fs.h>
#include <linux/bitops.h>
#include <linux/init.h>
#include <asm/system.h>
#include <asm/uaccess.h>
#include <asm/pgalloc.h>
#include <asm/pgtable.h>
extern void die_if_kernel(const char *str, struct pt_regs *regs, int err);
extern void show_pte(struct mm_struct *mm, unsigned long addr);
extern int do_page_fault(unsigned long addr, int error_code,
struct pt_regs *regs);
extern int do_translation_fault(unsigned long addr, int error_code,
struct pt_regs *regs);
extern void do_bad_area(struct task_struct *tsk, struct mm_struct *mm,
unsigned long addr, int error_code,
struct pt_regs *regs);
#ifdef CONFIG_ALIGNMENT_TRAP
extern int do_alignment(unsigned long addr, int error_code, struct pt_regs *regs);
#else
#define do_alignment do_bad
#endif
#include "fault.h"
/*
* Some section permission faults need to be handled gracefully.
* They can happen due to a __{get,put}_user during an oops.
*/
static int
do_sect_fault(unsigned long addr, int error_code, struct pt_regs *regs)
do_sect_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
{
struct task_struct *tsk = current;
do_bad_area(tsk, tsk->active_mm, addr, error_code, regs);
do_bad_area(tsk, tsk->active_mm, addr, fsr, regs);
return 0;
}
/*
* Hook for things that need to trap external faults. Note that
* we don't guarantee that this will be the final version of the
* interface.
*/
int (*external_fault)(unsigned long addr, struct pt_regs *regs);
static int
do_external_fault(unsigned long addr, int error_code, struct pt_regs *regs)
{
if (external_fault)
return external_fault(addr, regs);
return 1;
}
/*
* This abort handler always returns "fault".
*/
static int
do_bad(unsigned long addr, int error_code, struct pt_regs *regs)
do_bad(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
{
return 1;
}
static const struct fsr_info {
int (*fn)(unsigned long addr, int error_code, struct pt_regs *regs);
static struct fsr_info {
int (*fn)(unsigned long addr, unsigned int fsr, struct pt_regs *regs);
int sig;
const char *name;
} fsr_info[] = {
{ do_bad, SIGSEGV, "vector exception" },
{ do_alignment, SIGILL, "alignment exception" },
{ do_bad, SIGILL, "alignment exception" },
{ do_bad, SIGKILL, "terminal exception" },
{ do_alignment, SIGILL, "alignment exception" },
{ do_external_fault, SIGBUS, "external abort on linefetch" },
{ do_bad, SIGILL, "alignment exception" },
{ do_bad, SIGBUS, "external abort on linefetch" },
{ do_translation_fault, SIGSEGV, "section translation fault" },
{ do_external_fault, SIGBUS, "external abort on linefetch" },
{ do_bad, SIGBUS, "external abort on linefetch" },
{ do_page_fault, SIGSEGV, "page translation fault" },
{ do_external_fault, SIGBUS, "external abort on non-linefetch" },
{ do_bad, SIGBUS, "external abort on non-linefetch" },
{ do_bad, SIGSEGV, "section domain fault" },
{ do_external_fault, SIGBUS, "external abort on non-linefetch" },
{ do_bad, SIGBUS, "external abort on non-linefetch" },
{ do_bad, SIGSEGV, "page domain fault" },
{ do_bad, SIGBUS, "external abort on translation" },
{ do_sect_fault, SIGSEGV, "section permission fault" },
......@@ -105,6 +65,17 @@ static const struct fsr_info {
{ do_page_fault, SIGSEGV, "page permission fault" }
};
void __init
hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int, struct pt_regs *),
int sig, const char *name)
{
if (nr >= 0 && nr < 16) {
fsr_info[nr].fn = fn;
fsr_info[nr].sig = sig;
fsr_info[nr].name = name;
}
}
/*
* Dispatch a data abort to the relevant handler.
*/
......
......@@ -23,9 +23,9 @@
#include <linux/init.h>
#include <asm/system.h>
#include <asm/uaccess.h>
#include <asm/pgtable.h>
#include <asm/unaligned.h>
#include "fault.h"
#ifdef CONFIG_CPU_26
#define FAULT_CODE_WRITE 0x02
......@@ -43,8 +43,6 @@
#define READ_FAULT(code) (!DO_COW(code))
#endif
NORET_TYPE void die(const char *msg, struct pt_regs *regs, int err) ATTRIB_NORET;
/*
* This is useful to dump out the page tables associated with
* 'addr' in mm 'mm'.
......@@ -101,7 +99,7 @@ void show_pte(struct mm_struct *mm, unsigned long addr)
* Oops. The kernel tried to access some page that wasn't present.
*/
static void
__do_kernel_fault(struct mm_struct *mm, unsigned long addr, int error_code,
__do_kernel_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr,
struct pt_regs *regs)
{
unsigned long fixup;
......@@ -127,7 +125,7 @@ __do_kernel_fault(struct mm_struct *mm, unsigned long addr, int error_code,
"paging request", addr);
show_pte(mm, addr);
die("Oops", regs, error_code);
die("Oops", regs, fsr);
do_exit(SIGKILL);
}
......@@ -136,20 +134,20 @@ __do_kernel_fault(struct mm_struct *mm, unsigned long addr, int error_code,
* User mode accesses just cause a SIGSEGV
*/
static void
__do_user_fault(struct task_struct *tsk, unsigned long addr, int error_code,
int code, struct pt_regs *regs)
__do_user_fault(struct task_struct *tsk, unsigned long addr,
unsigned int fsr, int code, struct pt_regs *regs)
{
struct siginfo si;
#ifdef CONFIG_DEBUG_USER
printk(KERN_DEBUG "%s: unhandled page fault at 0x%08lx, code 0x%03x\n",
tsk->comm, addr, error_code);
tsk->comm, addr, fsr);
show_pte(tsk->mm, addr);
show_regs(regs);
#endif
tsk->thread.address = addr;
tsk->thread.error_code = error_code;
tsk->thread.error_code = fsr;
tsk->thread.trap_no = 14;
si.si_signo = SIGSEGV;
si.si_errno = 0;
......@@ -160,20 +158,20 @@ __do_user_fault(struct task_struct *tsk, unsigned long addr, int error_code,
void
do_bad_area(struct task_struct *tsk, struct mm_struct *mm, unsigned long addr,
int error_code, struct pt_regs *regs)
unsigned int fsr, struct pt_regs *regs)
{
/*
* If we are in kernel mode at this point, we
* have no context to handle this fault with.
*/
if (user_mode(regs))
__do_user_fault(tsk, addr, error_code, SEGV_MAPERR, regs);
__do_user_fault(tsk, addr, fsr, SEGV_MAPERR, regs);
else
__do_kernel_fault(mm, addr, error_code, regs);
__do_kernel_fault(mm, addr, fsr, regs);
}
static int
__do_page_fault(struct mm_struct *mm, unsigned long addr, int error_code,
__do_page_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr,
struct task_struct *tsk)
{
struct vm_area_struct *vma;
......@@ -191,7 +189,7 @@ __do_page_fault(struct mm_struct *mm, unsigned long addr, int error_code,
* memory access, so we can handle it.
*/
good_area:
if (READ_FAULT(error_code)) /* read? */
if (READ_FAULT(fsr)) /* read? */
mask = VM_READ|VM_EXEC;
else
mask = VM_WRITE;
......@@ -206,7 +204,7 @@ __do_page_fault(struct mm_struct *mm, unsigned long addr, int error_code,
* than endlessly redo the fault.
*/
survive:
fault = handle_mm_fault(mm, vma, addr & PAGE_MASK, DO_COW(error_code));
fault = handle_mm_fault(mm, vma, addr & PAGE_MASK, DO_COW(fsr));
/*
* Handle the "normal" cases first - successful and sigbus
......@@ -239,7 +237,7 @@ __do_page_fault(struct mm_struct *mm, unsigned long addr, int error_code,
return fault;
}
int do_page_fault(unsigned long addr, int error_code, struct pt_regs *regs)
int do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
{
struct task_struct *tsk;
struct mm_struct *mm;
......@@ -256,7 +254,7 @@ int do_page_fault(unsigned long addr, int error_code, struct pt_regs *regs)
goto no_context;
down_read(&mm->mmap_sem);
fault = __do_page_fault(mm, addr, error_code, tsk);
fault = __do_page_fault(mm, addr, fsr, tsk);
up_read(&mm->mmap_sem);
/*
......@@ -287,7 +285,7 @@ int do_page_fault(unsigned long addr, int error_code, struct pt_regs *regs)
printk("VM: killing process %s\n", tsk->comm);
do_exit(SIGKILL);
} else
__do_user_fault(tsk, addr, error_code, fault == -1 ?
__do_user_fault(tsk, addr, fsr, fault == -1 ?
SEGV_ACCERR : SEGV_MAPERR, regs);
return 0;
......@@ -302,7 +300,7 @@ int do_page_fault(unsigned long addr, int error_code, struct pt_regs *regs)
* or user mode.
*/
tsk->thread.address = addr;
tsk->thread.error_code = error_code;
tsk->thread.error_code = fsr;
tsk->thread.trap_no = 14;
force_sig(SIGBUS, tsk);
#ifdef CONFIG_DEBUG_USER
......@@ -315,7 +313,7 @@ int do_page_fault(unsigned long addr, int error_code, struct pt_regs *regs)
return 0;
no_context:
__do_kernel_fault(mm, addr, error_code, regs);
__do_kernel_fault(mm, addr, fsr, regs);
return 0;
}
......@@ -336,7 +334,8 @@ int do_page_fault(unsigned long addr, int error_code, struct pt_regs *regs)
* interrupt or a critical region, and should only copy the information
* from the master page table, nothing more.
*/
int do_translation_fault(unsigned long addr, int error_code, struct pt_regs *regs)
int do_translation_fault(unsigned long addr, unsigned int fsr,
struct pt_regs *regs)
{
struct task_struct *tsk;
unsigned int offset;
......@@ -344,7 +343,7 @@ int do_translation_fault(unsigned long addr, int error_code, struct pt_regs *reg
pmd_t *pmd, *pmd_k;
if (addr < TASK_SIZE)
return do_page_fault(addr, error_code, regs);
return do_page_fault(addr, fsr, regs);
offset = __pgd_offset(addr);
......@@ -372,6 +371,6 @@ int do_translation_fault(unsigned long addr, int error_code, struct pt_regs *reg
bad_area:
tsk = current;
do_bad_area(tsk, tsk->active_mm, addr, error_code, regs);
do_bad_area(tsk, tsk->active_mm, addr, fsr, regs);
return 0;
}
void do_bad_area(struct task_struct *tsk, struct mm_struct *mm,
unsigned long addr, unsigned int fsr, struct pt_regs *regs);
void show_pte(struct mm_struct *mm, unsigned long addr);
int do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs);
int do_translation_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs);
......@@ -848,6 +848,7 @@ static void apm_cpu_idle(void)
case 1: apm_idle_done = 1;
break;
default: /* BIOS refused */
;
}
}
if (original_pm_idle)
......
......@@ -189,10 +189,10 @@ void __init smp_store_cpu_info(int id)
/* If we get here, it's not a certified SMP capable AMD system. */
printk (KERN_INFO "WARNING: This combination of AMD processors is not suitable for SMP.\n");
tainted |= TAINT_UNSAFE_SMP;
}
valid_k7:
valid_k7:
;
}
/*
......
......@@ -329,8 +329,8 @@ static void pcd_init_units( void )
}
int pcd_init (void) /* preliminary initialisation */
{ int i, unit;
{
int unit;
if (disable) return -1;
......
......@@ -381,8 +381,7 @@ void pd_init_units( void )
}
int pd_init (void)
{ int i;
{
request_queue_t * q;
if (disable) return -1;
......
......@@ -1507,7 +1507,6 @@ static int cdromplaytrkind(unsigned long arg)
static int cdromreadtochdr(unsigned long arg)
{
int status;
struct cdrom_tochdr tochdr;
tochdr.cdth_trk0 = disk_info.first;
......@@ -1519,7 +1518,6 @@ static int cdromreadtochdr(unsigned long arg)
static int cdromreadtocentry(unsigned long arg)
{
int status;
struct cdrom_tocentry entry;
struct cdrom_subchnl *tocptr;
......@@ -1646,7 +1644,6 @@ static int cdromseek(unsigned long arg)
#ifdef MULTISESSION
static int cdrommultisession(unsigned long arg)
{
int status;
struct cdrom_multisession ms;
if (copy_from_user(&ms, (void*) arg, sizeof ms))
......
......@@ -1012,7 +1012,6 @@ static int
sony_get_subchnl_info(long arg)
{
struct cdrom_subchnl schi;
int err;
/* Get attention stuff */
if (check_drive_status() != 0)
......
......@@ -48,7 +48,7 @@
#define MY_NAME THIS_MODULE->name
#endif
#define dbg(fmt, arg...) do { if (debug) printk(KERN_DEBUG "%s: "__FUNCTION__": " fmt , MY_NAME , ## arg); } while (0)
#define dbg(fmt, arg...) do { if (debug) printk(KERN_DEBUG "%s: %s: " fmt, MY_NAME, __FUNCTION__, ## arg); } while (0)
#define err(format, arg...) printk(KERN_ERR "%s: " format , MY_NAME , ## arg)
#define info(format, arg...) printk(KERN_INFO "%s: " format , MY_NAME , ## arg)
#define warn(format, arg...) printk(KERN_WARNING "%s: " format , MY_NAME , ## arg)
......
......@@ -41,7 +41,7 @@
#define MY_NAME THIS_MODULE->name
#endif
#define dbg(fmt, arg...) do { if (debug) printk(KERN_DEBUG "%s: "__FUNCTION__": " fmt , MY_NAME , ## arg); } while (0)
#define dbg(fmt, arg...) do { if (debug) printk(KERN_DEBUG "%s: %s: " fmt, MY_NAME, __FUNCTION__, ## arg); } while (0)
#define err(format, arg...) printk(KERN_ERR "%s: " format , MY_NAME , ## arg)
#define info(format, arg...) printk(KERN_INFO "%s: " format , MY_NAME , ## arg)
#define warn(format, arg...) printk(KERN_WARNING "%s: " format , MY_NAME , ## arg)
......
......@@ -381,10 +381,10 @@ int i2c_del_driver(struct i2c_driver *driver)
printk("i2c-core.o: while "
"unregistering driver "
"`%s', the client at "
"address %02x of
adapter `%s' could not
be detached; driver
not unloaded!",
"address %02x of "
"adapter `%s' could not "
"be detached; driver "
"not unloaded!",
driver->name,
client->addr,
adap->name);
......
......@@ -86,7 +86,7 @@ static unsigned int debug = 0;
#define PDEBUG(level, fmt, args...) \
do { \
if (debug >= level) \
info("[" __PRETTY_FUNCTION__ ":%d] " fmt, __LINE__ , ## args); \
info("[%s:%d] " fmt, __FUNCTION__, __LINE__ , ## args); \
} while (0)
......
......@@ -133,7 +133,7 @@ static void read_bulk_callback( struct urb *urb )
// Give this to the USB subsystem so it can tell us
// when more data arrives.
if ( (res = usb_submit_urb(ether_dev->rx_urb, GFP_KERNEL)) ) {
warn( __FUNCTION__ " failed submint rx_urb %d", res);
warn("%s failed submint rx_urb %d", __FUNCTION__, res);
}
// We are no longer busy, show us the frames!!!
......@@ -339,7 +339,7 @@ static int CDCEther_open(struct net_device *net)
// Turn on the USB and let the packets flow!!!
if ( (res = enable_net_traffic( ether_dev )) ) {
err( __FUNCTION__ "can't enable_net_traffic() - %d", res );
err("%s can't enable_net_traffic() - %d", __FUNCTION__, res );
return -EIO;
}
......@@ -353,7 +353,7 @@ static int CDCEther_open(struct net_device *net)
if ( (res = usb_submit_urb(ether_dev->rx_urb, GFP_KERNEL)) )
{
// Hmm... Okay...
warn( __FUNCTION__ " failed rx_urb %d", res );
warn("%s failed rx_urb %d", __FUNCTION__, res );
}
// Tell the kernel we are ready to start receiving from it
......@@ -411,6 +411,7 @@ static int CDCEther_ioctl( struct net_device *net, struct ifreq *rq, int cmd )
}
}
#if 0
static void CDC_SetEthernetPacketFilter (ether_dev_t *ether_dev)
{
usb_control_msg(ether_dev->usb,
......@@ -423,7 +424,7 @@ static void CDC_SetEthernetPacketFilter (ether_dev_t *ether_dev)
0, /* size */
HZ); /* timeout */
}
#endif
static void CDCEther_set_multicast( struct net_device *net )
{
......
......@@ -43,7 +43,7 @@
#define CDC_ETHER_REQ_GET_REGS 0xf0
#define CDC_ETHER_REQ_SET_REGS 0xf1
#define CDC_ETHER_REQ_SET_REG PIPERIDER_REQ_SET_REGS
#define ALIGN(x) x __attribute__((aligned(L1_CACHE_BYTES)))
#define L1_ALIGN(x) x __attribute__((aligned(L1_CACHE_BYTES)))
#define MODE_FLAG_PROMISCUOUS (1<<0)
#define MODE_FLAG_ALL_MULTICAST (1<<1)
......@@ -84,9 +84,9 @@ typedef struct _ether_dev_t {
__u8 bNumberPowerFilters;
int intr_interval;
struct urb *rx_urb, *tx_urb, *intr_urb;
unsigned char ALIGN(rx_buff[CDC_ETHER_MAX_MTU]);
unsigned char ALIGN(tx_buff[CDC_ETHER_MAX_MTU]);
unsigned char ALIGN(intr_buff[8]);
unsigned char L1_ALIGN(rx_buff[CDC_ETHER_MAX_MTU]);
unsigned char L1_ALIGN(tx_buff[CDC_ETHER_MAX_MTU]);
unsigned char L1_ALIGN(intr_buff[8]);
} ether_dev_t;
#define REQ_HDR_FUNC_DESCR 0x0001
......
......@@ -43,12 +43,14 @@
void cfb_imageblit(struct fb_info *p, struct fb_image *image)
{
int pad, ppw, shift, shift_right, shift_left, x2, y2, n, i, j, k, l = 7;
int pad, ppw;
int x2, y2, n, i, j, k, l = 7;
unsigned long tmp = ~0 << (BITS_PER_LONG - p->var.bits_per_pixel);
unsigned long fgx, bgx, fgcolor, bgcolor, eorx;
unsigned long end_index, end_mask;
unsigned long end_mask;
unsigned long *dst = NULL;
u8 *dst1, *src;
u8 *dst1;
u8 *src;
/*
* We could use hardware clipping but on many cards you get around hardware
......@@ -98,7 +100,7 @@ void cfb_imageblit(struct fb_info *p, struct fb_image *image)
end_mask = 0;
for (k = ppw; k > 0; k--) {
if (test_bit(l, src))
if (test_bit(l, (unsigned long *) src))
end_mask |= (tmp >> (p->var.bits_per_pixel*(k-1)));
l--;
if (l < 0) { l = 7; src++; }
......@@ -110,7 +112,7 @@ void cfb_imageblit(struct fb_info *p, struct fb_image *image)
if (n) {
end_mask = 0;
for (j = n; j > 0; j--) {
if (test_bit(l, src))
if (test_bit(l, (unsigned long *) src))
end_mask |= (tmp >> (p->var.bits_per_pixel*(j-1)));
l--;
if (l < 0) { l = 7; src++; }
......
......@@ -257,7 +257,7 @@ int
adfs_map_lookup(struct super_block *sb, unsigned int frag_id,
unsigned int offset)
{
struct adfs_sb_info *asb = &sb->u.adfs_sb;
struct adfs_sb_info *asb = ADFS_SB(sb);
unsigned int zone, mapoff;
int result;
......
......@@ -11,16 +11,16 @@
* these are normally enabled.
*/
#ifdef SMBFS_PARANOIA
#define PARANOIA(x...) printk(KERN_NOTICE __FUNCTION__ ": " x)
# define PARANOIA(f, a...) printk(KERN_NOTICE "%s: " f, __FUNCTION__, ## a)
#else
#define PARANOIA(x...) do { ; } while(0)
# define PARANOIA(f, a...) do { ; } while(0)
#endif
/* lots of debug messages */
#ifdef SMBFS_DEBUG_VERBOSE
#define VERBOSE(x...) printk(KERN_DEBUG __FUNCTION__ ": " x)
# define VERBOSE(f, a...) printk(KERN_DEBUG "%s: " f, __FUNCTION__, ## a)
#else
#define VERBOSE(x...) do { ; } while(0)
# define VERBOSE(f, a...) do { ; } while(0)
#endif
/*
......
......@@ -32,7 +32,7 @@ typedef struct { volatile int counter; } atomic_t;
#define atomic_read(v) ((v)->counter)
#define atomic_set(v,i) (((v)->counter) = (i))
static __inline__ void atomic_add(int i, volatile atomic_t *v)
static inline void atomic_add(int i, volatile atomic_t *v)
{
unsigned long flags;
......@@ -41,7 +41,7 @@ static __inline__ void atomic_add(int i, volatile atomic_t *v)
__restore_flags(flags);
}
static __inline__ void atomic_sub(int i, volatile atomic_t *v)
static inline void atomic_sub(int i, volatile atomic_t *v)
{
unsigned long flags;
......@@ -50,7 +50,7 @@ static __inline__ void atomic_sub(int i, volatile atomic_t *v)
__restore_flags(flags);
}
static __inline__ void atomic_inc(volatile atomic_t *v)
static inline void atomic_inc(volatile atomic_t *v)
{
unsigned long flags;
......@@ -59,7 +59,7 @@ static __inline__ void atomic_inc(volatile atomic_t *v)
__restore_flags(flags);
}
static __inline__ void atomic_dec(volatile atomic_t *v)
static inline void atomic_dec(volatile atomic_t *v)
{
unsigned long flags;
......@@ -68,7 +68,7 @@ static __inline__ void atomic_dec(volatile atomic_t *v)
__restore_flags(flags);
}
static __inline__ int atomic_dec_and_test(volatile atomic_t *v)
static inline int atomic_dec_and_test(volatile atomic_t *v)
{
unsigned long flags;
int val;
......@@ -94,7 +94,7 @@ static inline int atomic_add_negative(int i, volatile atomic_t *v)
return val < 0;
}
static __inline__ void atomic_clear_mask(unsigned long mask, unsigned long *addr)
static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
{
unsigned long flags;
......
......@@ -318,6 +318,12 @@ static inline unsigned long __ffs(unsigned long word)
return k;
}
/*
* fls: find last bit set.
*/
#define fls(x) generic_fls(x)
/*
* ffs: find first bit set. This is defined the same way as
* the libc and compiler builtin ffs routines, therefore
......@@ -332,15 +338,14 @@ static inline unsigned long __ffs(unsigned long word)
*/
static inline int sched_find_first_bit(unsigned long *b)
{
if (unlikely(b[0]))
return __ffs(b[0]);
if (unlikely(b[1]))
return __ffs(b[1]) + 32;
if (unlikely(b[2]))
return __ffs(b[2]) + 64;
if (b[3])
return __ffs(b[3]) + 96;
return __ffs(b[4]) + 128;
unsigned long v;
unsigned int off;
for (off = 0; v = b[off], off < 4; off++) {
if (unlikely(v))
break;
}
return __ffs(v) + off * 32;
}
/*
......
......@@ -24,6 +24,17 @@ extern int have_isa_bridge;
#define have_isa_bridge (0)
#endif
struct pt_regs;
void die(const char *msg, struct pt_regs *regs, int err)
__attribute__((noreturn));
void die_if_kernel(const char *str, struct pt_regs *regs, int err);
void hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int,
struct pt_regs *),
int sig, const char *name);
#include <asm/proc-fns.h>
#define xchg(ptr,x) \
......
......@@ -24,7 +24,7 @@ typedef struct list_head list_t;
#define LIST_HEAD_INIT(name) { &(name), &(name) }
#define LIST_HEAD(name) \
struct list_head name = LIST_HEAD_INIT(name)
list_t name = LIST_HEAD_INIT(name)
#define INIT_LIST_HEAD(ptr) do { \
(ptr)->next = (ptr); (ptr)->prev = (ptr); \
......@@ -36,9 +36,7 @@ typedef struct list_head list_t;
* This is only for internal list manipulation where we know
* the prev/next entries already!
*/
static __inline__ void __list_add(struct list_head * new,
struct list_head * prev,
struct list_head * next)
static inline void __list_add(list_t *new, list_t *prev, list_t *next)
{
next->prev = new;
new->next = next;
......@@ -54,7 +52,7 @@ static __inline__ void __list_add(struct list_head * new,
* Insert a new entry after the specified head.
* This is good for implementing stacks.
*/
static __inline__ void list_add(struct list_head *new, struct list_head *head)
static inline void list_add(list_t *new, list_t *head)
{
__list_add(new, head, head->next);
}
......@@ -67,7 +65,7 @@ static __inline__ void list_add(struct list_head *new, struct list_head *head)
* Insert a new entry before the specified head.
* This is useful for implementing queues.
*/
static __inline__ void list_add_tail(struct list_head *new, struct list_head *head)
static inline void list_add_tail(list_t *new, list_t *head)
{
__list_add(new, head->prev, head);
}
......@@ -79,8 +77,7 @@ static __inline__ void list_add_tail(struct list_head *new, struct list_head *he
* This is only for internal list manipulation where we know
* the prev/next entries already!
*/
static __inline__ void __list_del(struct list_head * prev,
struct list_head * next)
static inline void __list_del(list_t * prev, list_t * next)
{
next->prev = prev;
prev->next = next;
......@@ -91,7 +88,7 @@ static __inline__ void __list_del(struct list_head * prev,
* @entry: the element to delete from the list.
* Note: list_empty on entry does not return true after this, the entry is in an undefined state.
*/
static __inline__ void list_del(struct list_head *entry)
static inline void list_del(list_t *entry)
{
__list_del(entry->prev, entry->next);
entry->next = (void *) 0;
......@@ -102,17 +99,39 @@ static __inline__ void list_del(struct list_head *entry)
* list_del_init - deletes entry from list and reinitialize it.
* @entry: the element to delete from the list.
*/
static __inline__ void list_del_init(struct list_head *entry)
static inline void list_del_init(list_t *entry)
{
__list_del(entry->prev, entry->next);
INIT_LIST_HEAD(entry);
}
/**
* list_move - delete from one list and add as another's head
* @list: the entry to move
* @head: the head that will precede our entry
*/
static inline void list_move(list_t *list, list_t *head)
{
__list_del(list->prev, list->next);
list_add(list, head);
}
/**
* list_move_tail - delete from one list and add as another's tail
* @list: the entry to move
* @head: the head that will follow our entry
*/
static inline void list_move_tail(list_t *list, list_t *head)
{
__list_del(list->prev, list->next);
list_add_tail(list, head);
}
/**
* list_empty - tests whether a list is empty
* @head: the list to test.
*/
static __inline__ int list_empty(struct list_head *head)
static inline int list_empty(list_t *head)
{
return head->next == head;
}
......@@ -122,13 +141,13 @@ static __inline__ int list_empty(struct list_head *head)
* @list: the new list to add.
* @head: the place to add it in the first list.
*/
static __inline__ void list_splice(struct list_head *list, struct list_head *head)
static inline void list_splice(list_t *list, list_t *head)
{
struct list_head *first = list->next;
list_t *first = list->next;
if (first != list) {
struct list_head *last = list->prev;
struct list_head *at = head->next;
list_t *last = list->prev;
list_t *at = head->next;
first->prev = head;
head->next = first;
......@@ -140,7 +159,7 @@ static __inline__ void list_splice(struct list_head *list, struct list_head *hea
/**
* list_entry - get the struct for this entry
* @ptr: the &struct list_head pointer.
* @ptr: the &list_t pointer.
* @type: the type of the struct this is embedded in.
* @member: the name of the list_struct within the struct.
*/
......@@ -149,7 +168,7 @@ static __inline__ void list_splice(struct list_head *list, struct list_head *hea
/**
* list_for_each - iterate over a list
* @pos: the &struct list_head to use as a loop counter.
* @pos: the &list_t to use as a loop counter.
* @head: the head for your list.
*/
#define list_for_each(pos, head) \
......@@ -157,7 +176,7 @@ static __inline__ void list_splice(struct list_head *list, struct list_head *hea
pos = pos->next, prefetch(pos->next))
/**
* list_for_each_prev - iterate over a list backwards
* @pos: the &struct list_head to use as a loop counter.
* @pos: the &list_t to use as a loop counter.
* @head: the head for your list.
*/
#define list_for_each_prev(pos, head) \
......@@ -166,8 +185,8 @@ static __inline__ void list_splice(struct list_head *list, struct list_head *hea
/**
* list_for_each_safe - iterate over a list safe against removal of list entry
* @pos: the &struct list_head to use as a loop counter.
* @n: another &struct list_head to use as temporary storage
* @pos: the &list_t to use as a loop counter.
* @n: another &list_t to use as temporary storage
* @head: the head for your list.
*/
#define list_for_each_safe(pos, n, head) \
......
......@@ -22,5 +22,5 @@ $(TOPDIR)/include/linux/compile.h: ../include/linux/compile.h ;
# actual file if its content has changed.
../include/linux/compile.h: FORCE
@echo -n 'Generating $@'
@echo -n ' Generating $@'
@../scripts/mkcompile_h $@ "$(ARCH)" "$(CONFIG_SMP)" "$(CC) $(CFLAGS)"
......@@ -211,14 +211,14 @@ static void irda_connect_confirm(void *instance, void *sap,
switch (sk->type) {
case SOCK_STREAM:
if (max_sdu_size != 0) {
ERROR(__FUNCTION__ "(), max_sdu_size must be 0\n");
ERROR("%s: max_sdu_size must be 0\n", __FUNCTION__);
return;
}
self->max_data_size = irttp_get_max_seg_size(self->tsap);
break;
case SOCK_SEQPACKET:
if (max_sdu_size == 0) {
ERROR(__FUNCTION__ "(), max_sdu_size cannot be 0\n");
ERROR("%s: max_sdu_size cannot be 0\n", __FUNCTION__);
return;
}
self->max_data_size = max_sdu_size;
......@@ -270,14 +270,14 @@ static void irda_connect_indication(void *instance, void *sap,
switch (sk->type) {
case SOCK_STREAM:
if (max_sdu_size != 0) {
ERROR(__FUNCTION__ "(), max_sdu_size must be 0\n");
ERROR("%s: max_sdu_size must be 0\n", __FUNCTION__);
return;
}
self->max_data_size = irttp_get_max_seg_size(self->tsap);
break;
case SOCK_SEQPACKET:
if (max_sdu_size == 0) {
ERROR(__FUNCTION__ "(), max_sdu_size cannot be 0\n");
ERROR("%s: max_sdu_size cannot be 0\n", __FUNCTION__);
return;
}
self->max_data_size = max_sdu_size;
......@@ -374,7 +374,7 @@ static void irda_getvalue_confirm(int result, __u16 obj_id,
self = (struct irda_sock *) priv;
if (!self) {
WARNING(__FUNCTION__ "(), lost myself!\n");
WARNING("%s: lost myself!\n", __FUNCTION__);
return;
}
......@@ -424,7 +424,7 @@ static void irda_selective_discovery_indication(discovery_t *discovery,
self = (struct irda_sock *) priv;
if (!self) {
WARNING(__FUNCTION__ "(), lost myself!\n");
WARNING("%s: lost myself!\n", __FUNCTION__);
return;
}
......@@ -482,7 +482,7 @@ static int irda_open_tsap(struct irda_sock *self, __u8 tsap_sel, char *name)
notify_t notify;
if (self->tsap) {
WARNING(__FUNCTION__ "(), busy!\n");
WARNING("%s: busy!\n", __FUNCTION__);
return -EBUSY;
}
......@@ -559,7 +559,7 @@ static int irda_find_lsap_sel(struct irda_sock *self, char *name)
ASSERT(self != NULL, return -1;);
if (self->iriap) {
WARNING(__FUNCTION__ "(), busy with a previous query\n");
WARNING("%s: busy with a previous query\n", __FUNCTION__);
return -EBUSY;
}
......@@ -1141,7 +1141,7 @@ static int irda_create(struct socket *sock, int protocol)
self->max_sdu_size_rx = TTP_SAR_UNBOUND;
break;
default:
ERROR(__FUNCTION__ "(), protocol not supported!\n");
ERROR("%s: protocol not supported!\n", __FUNCTION__);
return -ESOCKTNOSUPPORT;
}
break;
......@@ -1208,9 +1208,6 @@ void irda_destroy_socket(struct irda_sock *self)
/*
* Function irda_release (sock)
*
*
*
*/
static int irda_release(struct socket *sock)
{
......@@ -1423,9 +1420,6 @@ static inline int irda_data_wait(struct sock *sk)
/*
* Function irda_recvmsg_stream (sock, msg, size, flags, scm)
*
*
*
*/
static int irda_recvmsg_stream(struct socket *sock, struct msghdr *msg,
int size, int flags, struct scm_cookie *scm)
......@@ -1655,9 +1649,6 @@ static int irda_sendmsg_ultra(struct socket *sock, struct msghdr *msg,
/*
* Function irda_shutdown (sk, how)
*
*
*
*/
static int irda_shutdown(struct socket *sock, int how)
{
......@@ -1693,9 +1684,6 @@ static int irda_shutdown(struct socket *sock, int how)
/*
* Function irda_poll (file, sock, wait)
*
*
*
*/
static unsigned int irda_poll(struct file * file, struct socket *sock,
poll_table *wait)
......@@ -1758,9 +1746,6 @@ static unsigned int irda_poll(struct file * file, struct socket *sock,
/*
* Function irda_ioctl (sock, cmd, arg)
*
*
*
*/
static int irda_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
{
......@@ -2024,9 +2009,8 @@ static int irda_setsockopt(struct socket *sock, int level, int optname,
"(), setting max_sdu_size = %d\n", opt);
self->max_sdu_size_rx = opt;
} else {
WARNING(__FUNCTION__
"(), not allowed to set MAXSDUSIZE for this "
"socket type!\n");
WARNING("%s: not allowed to set MAXSDUSIZE for this socket type!\n",
__FUNCTION__);
return -ENOPROTOOPT;
}
break;
......@@ -2121,9 +2105,6 @@ static int irda_extract_ias_value(struct irda_ias_set *ias_opt,
/*
* Function irda_getsockopt (sock, level, optname, optval, optlen)
*
*
*
*/
static int irda_getsockopt(struct socket *sock, int level, int optname,
char *optval, int *optlen)
......@@ -2301,8 +2282,8 @@ static int irda_getsockopt(struct socket *sock, int level, int optname,
/* Check that we can proceed with IAP */
if (self->iriap) {
WARNING(__FUNCTION__
"(), busy with a previous query\n");
WARNING("%s: busy with a previous query\n",
__FUNCTION__);
kfree(ias_opt);
return -EBUSY;
}
......
......@@ -106,15 +106,13 @@ int __init irda_device_init( void)
{
dongles = hashbin_new(HB_GLOBAL);
if (dongles == NULL) {
printk(KERN_WARNING
"IrDA: Can't allocate dongles hashbin!\n");
printk(KERN_WARNING "IrDA: Can't allocate dongles hashbin!\n");
return -ENOMEM;
}
tasks = hashbin_new(HB_GLOBAL);
if (tasks == NULL) {
printk(KERN_WARNING
"IrDA: Can't allocate tasks hashbin!\n");
printk(KERN_WARNING "IrDA: Can't allocate tasks hashbin!\n");
return -ENOMEM;
}
......@@ -210,8 +208,8 @@ int irda_device_set_dtr_rts(struct net_device *dev, int dtr, int rts)
IRDA_DEBUG(2, __FUNCTION__ "()\n");
if (!dev->do_ioctl) {
ERROR(__FUNCTION__ "(), do_ioctl not impl. by "
"device driver\n");
ERROR("%s: do_ioctl not impl. by device driver\n",
__FUNCTION__);
return -1;
}
......@@ -231,8 +229,8 @@ int irda_device_change_speed(struct net_device *dev, __u32 speed)
IRDA_DEBUG(2, __FUNCTION__ "()\n");
if (!dev->do_ioctl) {
ERROR(__FUNCTION__ "(), do_ioctl not impl. by "
"device driver\n");
ERROR("%s: do_ioctl not impl. by device driver\n",
__FUNCTION__);
return -1;
}
......@@ -257,8 +255,8 @@ int irda_device_is_receiving(struct net_device *dev)
IRDA_DEBUG(2, __FUNCTION__ "()\n");
if (!dev->do_ioctl) {
ERROR(__FUNCTION__ "(), do_ioctl not impl. by "
"device driver\n");
ERROR("%s: do_ioctl not impl. by device driver\n",
__FUNCTION__);
return -1;
}
......@@ -314,14 +312,14 @@ int irda_task_kick(struct irda_task *task)
do {
timeout = task->function(task);
if (count++ > 100) {
ERROR(__FUNCTION__ "(), error in task handler!\n");
ERROR("%s: error in task handler!\n", __FUNCTION__);
irda_task_delete(task);
return TRUE;
}
} while ((timeout == 0) && (task->state != IRDA_TASK_DONE));
if (timeout < 0) {
ERROR(__FUNCTION__ "(), Error executing task!\n");
ERROR("%s: Error executing task!\n", __FUNCTION__);
irda_task_delete(task);
return TRUE;
}
......@@ -491,7 +489,7 @@ dongle_t *irda_device_dongle_init(struct net_device *dev, int type)
sprintf(modname, "irda-dongle-%d", type);
request_module(modname);
}
#endif /* CONFIG_KMOD */
#endif
if (!(reg = hashbin_find(dongles, type, NULL))) {
ERROR("IrDA: Unable to find requested dongle\n");
......@@ -514,9 +512,6 @@ dongle_t *irda_device_dongle_init(struct net_device *dev, int type)
/*
* Function irda_device_dongle_cleanup (dongle)
*
*
*
*/
int irda_device_dongle_cleanup(dongle_t *dongle)
{
......@@ -531,15 +526,12 @@ int irda_device_dongle_cleanup(dongle_t *dongle)
/*
* Function irda_device_register_dongle (dongle)
*
*
*
*/
int irda_device_register_dongle(struct dongle_reg *new)
{
/* Check if this dongle has been registred before */
if (hashbin_find(dongles, new->type, NULL)) {
MESSAGE(__FUNCTION__ "(), Dongle already registered\n");
MESSAGE("%s: Dongle already registered\n", __FUNCTION__);
return 0;
}
......@@ -561,7 +553,7 @@ void irda_device_unregister_dongle(struct dongle_reg *dongle)
node = hashbin_remove(dongles, dongle->type, NULL);
if (!node) {
ERROR(__FUNCTION__ "(), dongle not found!\n");
ERROR("%s: dongle not found!\n", __FUNCTION__);
return;
}
}
......@@ -581,8 +573,8 @@ int irda_device_set_mode(struct net_device* dev, int mode)
IRDA_DEBUG(0, __FUNCTION__ "()\n");
if (!dev->do_ioctl) {
ERROR(__FUNCTION__ "(), set_raw_mode not impl. by "
"device driver\n");
ERROR("%s: set_raw_mode not impl. by device driver\n",
__FUNCTION__);
return -1;
}
......
......@@ -98,7 +98,7 @@ int __init iriap_init(void)
objects = hashbin_new(HB_LOCAL);
if (!objects) {
WARNING(__FUNCTION__ "(), Can't allocate objects hashbin!\n");
WARNING("%s: Can't allocate objects hashbin!\n", __FUNCTION__);
return -ENOMEM;
}
......@@ -164,7 +164,7 @@ struct iriap_cb *iriap_open(__u8 slsap_sel, int mode, void *priv,
self = kmalloc(sizeof(struct iriap_cb), GFP_ATOMIC);
if (!self) {
WARNING(__FUNCTION__ "(), Unable to kmalloc!\n");
WARNING("%s: Unable to kmalloc!\n", __FUNCTION__);
return NULL;
}
......@@ -261,7 +261,7 @@ static int iriap_register_lsap(struct iriap_cb *self, __u8 slsap_sel, int mode)
self->lsap = irlmp_open_lsap(slsap_sel, &notify, 0);
if (self->lsap == NULL) {
ERROR(__FUNCTION__ "(), Unable to allocated LSAP!\n");
ERROR("%s: Unable to allocated LSAP!\n", __FUNCTION__);
return -1;
}
self->slsap_sel = self->lsap->slsap_sel;
......@@ -318,9 +318,6 @@ static void iriap_disconnect_indication(void *instance, void *sap,
/*
* Function iriap_disconnect_request (handle)
*
*
*
*/
void iriap_disconnect_request(struct iriap_cb *self)
{
......@@ -840,8 +837,8 @@ static int iriap_data_indication(void *instance, void *sap,
}
opcode = frame[0];
if (~opcode & IAP_LST) {
WARNING(__FUNCTION__ "(), IrIAS multiframe commands or "
"results is not implemented yet!\n");
WARNING("%s:, IrIAS multiframe commands or "
"results is not implemented yet!\n", __FUNCTION__);
dev_kfree_skb(skb);
return 0;
}
......@@ -927,16 +924,16 @@ void iriap_call_indication(struct iriap_cb *self, struct sk_buff *skb)
opcode = fp[0];
if (~opcode & 0x80) {
WARNING(__FUNCTION__ "(), IrIAS multiframe commands or results"
"is not implemented yet!\n");
WARNING("%s: IrIAS multiframe commands or results"
"is not implemented yet!\n", __FUNCTION__);
return;
}
opcode &= 0x7f; /* Mask away LST bit */
switch (opcode) {
case GET_INFO_BASE:
WARNING(__FUNCTION__
"(), GetInfoBaseDetails not implemented yet!\n");
WARNING("%s: GetInfoBaseDetails not implemented yet!\n",
__FUNCTION__);
break;
case GET_VALUE_BY_CLASS:
iriap_getvaluebyclass_indication(self, skb);
......
......@@ -362,7 +362,7 @@ static void state_r_disconnect(struct iriap_cb *self, IRIAP_EVENT event,
case IAP_LM_CONNECT_INDICATION:
tx_skb = dev_alloc_skb(64);
if (tx_skb == NULL) {
WARNING(__FUNCTION__ "(), unable to malloc!\n");
WARNING("%s: unable to malloc!\n", __FUNCTION__);
return;
}
......@@ -392,9 +392,6 @@ static void state_r_disconnect(struct iriap_cb *self, IRIAP_EVENT event,
/*
* Function state_r_call (self, event, skb)
*
*
*
*/
static void state_r_call(struct iriap_cb *self, IRIAP_EVENT event,
struct sk_buff *skb)
......@@ -415,13 +412,10 @@ static void state_r_call(struct iriap_cb *self, IRIAP_EVENT event,
/*
* R-Connect FSM
*/
*/
/*
* Function state_r_waiting (self, event, skb)
*
*
*
*/
static void state_r_waiting(struct iriap_cb *self, IRIAP_EVENT event,
struct sk_buff *skb)
......@@ -500,12 +494,8 @@ static void state_r_returning(struct iriap_cb *self, IRIAP_EVENT event,
switch (event) {
case IAP_RECV_F_LST:
break;
default:
break;
}
}
......@@ -59,7 +59,7 @@ char *strndup(char *str, int max)
/* Allocate new string */
new_str = kmalloc(len + 1, GFP_ATOMIC);
if (new_str == NULL) {
WARNING(__FUNCTION__"(), Unable to kmalloc!\n");
WARNING("%s: Unable to kmalloc!\n", __FUNCTION__);
return NULL;
}
......@@ -272,7 +272,7 @@ int irias_object_change_attribute(char *obj_name, char *attrib_name,
/* Find object */
obj = hashbin_find(objects, 0, obj_name);
if (obj == NULL) {
WARNING(__FUNCTION__ "(), Unable to find object: %s\n",
WARNING("%s: Unable to find object: %s\n", __FUNCTION__,
obj_name);
return -1;
}
......@@ -280,7 +280,7 @@ int irias_object_change_attribute(char *obj_name, char *attrib_name,
/* Find attribute */
attrib = hashbin_find(obj->attribs, 0, attrib_name);
if (attrib == NULL) {
WARNING(__FUNCTION__ "(), Unable to find attribute: %s\n",
WARNING("%s: Unable to find attribute: %s\n", __FUNCTION__,
attrib_name);
return -1;
}
......@@ -319,7 +319,7 @@ void irias_add_integer_attrib(struct ias_object *obj, char *name, int value,
attrib = (struct ias_attrib *) kmalloc(sizeof(struct ias_attrib),
GFP_ATOMIC);
if (attrib == NULL) {
WARNING(__FUNCTION__ "(), Unable to allocate attribute!\n");
WARNING("%s: Unable to allocate attribute!\n", __FUNCTION__);
return;
}
memset(attrib, 0, sizeof( struct ias_attrib));
......@@ -354,8 +354,7 @@ void irias_add_octseq_attrib(struct ias_object *obj, char *name, __u8 *octets,
attrib = (struct ias_attrib *) kmalloc(sizeof(struct ias_attrib),
GFP_ATOMIC);
if (attrib == NULL) {
WARNING(__FUNCTION__
"(), Unable to allocate attribute!\n");
WARNING("%s: Unable to allocate attribute!\n", __FUNCTION__);
return;
}
memset(attrib, 0, sizeof( struct ias_attrib));
......@@ -388,7 +387,7 @@ void irias_add_string_attrib(struct ias_object *obj, char *name, char *value,
attrib = (struct ias_attrib *) kmalloc(sizeof( struct ias_attrib),
GFP_ATOMIC);
if (attrib == NULL) {
WARNING(__FUNCTION__ "(), Unable to allocate attribute!\n");
WARNING("%s: Unable to allocate attribute!\n", __FUNCTION__);
return;
}
memset(attrib, 0, sizeof( struct ias_attrib));
......@@ -413,7 +412,7 @@ struct ias_value *irias_new_integer_value(int integer)
value = kmalloc(sizeof(struct ias_value), GFP_ATOMIC);
if (value == NULL) {
WARNING(__FUNCTION__ "(), Unable to kmalloc!\n");
WARNING("%s: Unable to kmalloc!\n", __FUNCTION__);
return NULL;
}
memset(value, 0, sizeof(struct ias_value));
......@@ -438,7 +437,7 @@ struct ias_value *irias_new_string_value(char *string)
value = kmalloc(sizeof(struct ias_value), GFP_ATOMIC);
if (value == NULL) {
WARNING(__FUNCTION__ "(), Unable to kmalloc!\n");
WARNING("%s: Unable to kmalloc!\n", __FUNCTION__);
return NULL;
}
memset( value, 0, sizeof( struct ias_value));
......@@ -465,7 +464,7 @@ struct ias_value *irias_new_octseq_value(__u8 *octseq , int len)
value = kmalloc(sizeof(struct ias_value), GFP_ATOMIC);
if (value == NULL) {
WARNING(__FUNCTION__ "(), Unable to kmalloc!\n");
WARNING("%s: Unable to kmalloc!\n", __FUNCTION__);
return NULL;
}
memset(value, 0, sizeof(struct ias_value));
......@@ -478,7 +477,7 @@ struct ias_value *irias_new_octseq_value(__u8 *octseq , int len)
value->t.oct_seq = kmalloc(len, GFP_ATOMIC);
if (value->t.oct_seq == NULL){
WARNING(__FUNCTION__"(), Unable to kmalloc!\n");
WARNING("%s: Unable to kmalloc!\n", __FUNCTION__);
kfree(value);
return NULL;
}
......@@ -492,7 +491,7 @@ struct ias_value *irias_new_missing_value(void)
value = kmalloc(sizeof(struct ias_value), GFP_ATOMIC);
if (value == NULL) {
WARNING(__FUNCTION__ "(), Unable to kmalloc!\n");
WARNING("%s: Unable to kmalloc!\n", __FUNCTION__);
return NULL;
}
memset(value, 0, sizeof(struct ias_value));
......@@ -536,6 +535,3 @@ void irias_delete_value(struct ias_value *value)
}
kfree(value);
}
......@@ -82,7 +82,7 @@ int __init irlap_init(void)
/* Allocate master array */
irlap = hashbin_new(HB_LOCAL);
if (irlap == NULL) {
ERROR(__FUNCTION__ "(), can't allocate irlap hashbin!\n");
ERROR("%s: can't allocate irlap hashbin!\n", __FUNCTION__);
return -ENOMEM;
}
......@@ -477,7 +477,7 @@ void irlap_disconnect_indication(struct irlap_cb *self, LAP_REASON reason)
reason, NULL);
break;
default:
ERROR(__FUNCTION__ "(), Unknown reason %d\n", reason);
ERROR("%s: Unknown reason %d\n", __FUNCTION__, reason);
}
}
......@@ -599,9 +599,6 @@ void irlap_discovery_indication(struct irlap_cb *self, discovery_t *discovery)
/*
* Function irlap_status_indication (quality_of_link)
*
*
*
*/
void irlap_status_indication(struct irlap_cb *self, int quality_of_link)
{
......@@ -621,9 +618,6 @@ void irlap_status_indication(struct irlap_cb *self, int quality_of_link)
/*
* Function irlap_reset_indication (void)
*
*
*
*/
void irlap_reset_indication(struct irlap_cb *self)
{
......@@ -640,9 +634,6 @@ void irlap_reset_indication(struct irlap_cb *self)
/*
* Function irlap_reset_confirm (void)
*
*
*
*/
void irlap_reset_confirm(void)
{
......@@ -926,7 +917,6 @@ void irlap_init_qos_capabilities(struct irlap_cb *self,
* Function irlap_apply_default_connection_parameters (void, now)
*
* Use the default connection and transmission parameters
*
*/
void irlap_apply_default_connection_parameters(struct irlap_cb *self)
{
......@@ -1180,4 +1170,3 @@ int irlap_proc_read(char *buf, char **start, off_t offset, int len)
}
#endif /* CONFIG_PROC_FS */
......@@ -578,9 +578,9 @@ static int irlap_state_query(struct irlap_cb *self, IRLAP_EVENT event,
info->discovery->daddr);
if (!self->discovery_log) {
WARNING(__FUNCTION__ "(), discovery log is gone! "
WARNING("%s: discovery log is gone! "
"maybe the discovery timeout has been set to "
"short?\n");
"short?\n", __FUNCTION__);
break;
}
hashbin_insert(self->discovery_log,
......@@ -1353,7 +1353,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
del_timer(&self->final_timer);
irlap_data_indication(self, skb, TRUE);
irlap_next_state(self, LAP_XMIT_P);
printk(__FUNCTION__ "(): RECV_UI_FRAME: next state %s\n", irlap_state[self->state]);
printk("%s: RECV_UI_FRAME: next state %s\n", __FUNCTION__, irlap_state[self->state]);
irlap_start_poll_timer(self, self->poll_timeout);
}
break;
......@@ -2121,9 +2121,6 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event,
/*
* Function irlap_state_sclose (self, event, skb, info)
*
*
*
*/
static int irlap_state_sclose(struct irlap_cb *self, IRLAP_EVENT event,
struct sk_buff *skb, struct irlap_info *info)
......
......@@ -416,7 +416,7 @@ static void irlap_recv_discovery_xid_rsp(struct irlap_cb *self,
}
if ((discovery = kmalloc(sizeof(discovery_t), GFP_ATOMIC)) == NULL) {
WARNING(__FUNCTION__ "(), kmalloc failed!\n");
WARNING("%s: kmalloc failed!\n", __FUNCTION__);
return;
}
memset(discovery, 0, sizeof(discovery_t));
......@@ -509,7 +509,7 @@ static void irlap_recv_discovery_xid_cmd(struct irlap_cb *self,
if (info->s == 0xff) {
/* Check if things are sane at this point... */
if((discovery_info == NULL) || (skb->len < 3)) {
ERROR(__FUNCTION__ "(), discovery frame to short!\n");
ERROR("%s: discovery frame to short!\n", __FUNCTION__);
return;
}
......@@ -518,7 +518,7 @@ static void irlap_recv_discovery_xid_cmd(struct irlap_cb *self,
*/
discovery = kmalloc(sizeof(discovery_t), GFP_ATOMIC);
if (!discovery) {
WARNING(__FUNCTION__ "(), unable to malloc!\n");
WARNING("%s: unable to malloc!\n", __FUNCTION__);
return;
}
......@@ -1281,7 +1281,7 @@ int irlap_driver_rcv(struct sk_buff *skb, struct net_device *dev,
/* Check if frame is large enough for parsing */
if (skb->len < 2) {
ERROR(__FUNCTION__ "(), frame to short!\n");
ERROR("%s: frame to short!\n", __FUNCTION__);
dev_kfree_skb(skb);
return -1;
}
......@@ -1330,9 +1330,8 @@ int irlap_driver_rcv(struct sk_buff *skb, struct net_device *dev,
irlap_recv_srej_frame(self, skb, &info, command);
break;
default:
WARNING(__FUNCTION__
"() Unknown S-frame %02x received!\n",
info.control);
WARNING("%s: Unknown S-frame %02x received!\n",
__FUNCTION__, info.control);
break;
}
goto out;
......@@ -1369,8 +1368,8 @@ int irlap_driver_rcv(struct sk_buff *skb, struct net_device *dev,
irlap_recv_ui_frame(self, skb, &info);
break;
default:
WARNING(__FUNCTION__ "(), Unknown frame %02x received!\n",
info.control);
WARNING("%s: Unknown frame %02x received!\n",
__FUNCTION__, info.control);
break;
}
out:
......
......@@ -152,7 +152,7 @@ struct lsap_cb *irlmp_open_lsap(__u8 slsap_sel, notify_t *notify, __u8 pid)
/* Allocate new instance of a LSAP connection */
self = kmalloc(sizeof(struct lsap_cb), GFP_ATOMIC);
if (self == NULL) {
ERROR(__FUNCTION__ "(), can't allocate memory");
ERROR("%s: can't allocate memory", __FUNCTION__);
return NULL;
}
memset(self, 0, sizeof(struct lsap_cb));
......@@ -278,7 +278,7 @@ void irlmp_register_link(struct irlap_cb *irlap, __u32 saddr, notify_t *notify)
*/
lap = kmalloc(sizeof(struct lap_cb), GFP_KERNEL);
if (lap == NULL) {
ERROR(__FUNCTION__ "(), unable to kmalloc\n");
ERROR("%s: unable to kmalloc\n", __FUNCTION__);
return;
}
memset(lap, 0, sizeof(struct lap_cb));
......@@ -770,8 +770,8 @@ void irlmp_do_discovery(int nslots)
/* Make sure the value is sane */
if ((nslots != 1) && (nslots != 6) && (nslots != 8) && (nslots != 16)){
WARNING(__FUNCTION__
"(), invalid value for number of slots!\n");
WARNING("%s: invalid value for number of slots!\n",
__FUNCTION__);
nslots = sysctl_discovery_slots = 8;
}
......@@ -864,9 +864,6 @@ struct irda_device_info *irlmp_get_discoveries(int *pn, __u16 mask, int nslots)
#if 0
/*
* Function irlmp_check_services (discovery)
*
*
*
*/
void irlmp_check_services(discovery_t *discovery)
{
......@@ -1071,9 +1068,6 @@ void irlmp_data_indication(struct lsap_cb *self, struct sk_buff *skb)
/*
* Function irlmp_udata_request (self, skb)
*
*
*
*/
int irlmp_udata_request(struct lsap_cb *self, struct sk_buff *skb)
{
......@@ -1114,9 +1108,6 @@ void irlmp_udata_indication(struct lsap_cb *self, struct sk_buff *skb)
/*
* Function irlmp_connless_data_request (self, skb)
*
*
*
*/
#ifdef CONFIG_IRDA_ULTRA
int irlmp_connless_data_request(struct lsap_cb *self, struct sk_buff *skb)
......@@ -1802,6 +1793,3 @@ int irlmp_proc_read(char *buf, char **start, off_t offset, int len)
}
#endif /* PROC_FS */
......@@ -510,8 +510,8 @@ static int irlmp_state_disconnected(struct lsap_cb *self, IRLMP_EVENT event,
IRDA_DEBUG(4, __FUNCTION__ "(), LM_CONNECT_REQUEST\n");
if (self->conn_skb) {
WARNING(__FUNCTION__
"(), busy with another request!\n");
WARNING("%s: busy with another request!\n",
__FUNCTION__);
return -EBUSY;
}
self->conn_skb = skb;
......@@ -525,8 +525,8 @@ static int irlmp_state_disconnected(struct lsap_cb *self, IRLMP_EVENT event,
break;
case LM_CONNECT_INDICATION:
if (self->conn_skb) {
WARNING(__FUNCTION__
"(), busy with another request!\n");
WARNING("%s: busy with another request!\n",
__FUNCTION__);
return -EBUSY;
}
self->conn_skb = skb;
......
......@@ -94,7 +94,7 @@ int __init irttp_init(void)
irttp->tsaps = hashbin_new(HB_LOCAL);
if (!irttp->tsaps) {
ERROR(__FUNCTION__ "(), can't allocate IrTTP hashbin!\n");
ERROR("%s: can't allocate IrTTP hashbin!\n", __FUNCTION__);
return -ENOMEM;
}
......@@ -421,7 +421,7 @@ struct tsap_cb *irttp_open_tsap(__u8 stsap_sel, int credit, notify_t *notify)
*/
lsap = irlmp_open_lsap(stsap_sel, &ttp_notify, 0);
if (lsap == NULL) {
WARNING(__FUNCTION__ "(), unable to allocate LSAP!!\n");
WARNING("%s: unable to allocate LSAP!!\n", __FUNCTION__);
return NULL;
}
......@@ -497,7 +497,7 @@ int irttp_close_tsap(struct tsap_cb *self)
if (self->connected) {
/* Check if disconnect is not pending */
if (!test_bit(0, &self->disconnect_pend)) {
WARNING(__FUNCTION__ "(), TSAP still connected!\n");
WARNING("%s: TSAP still connected!\n", __FUNCTION__);
irttp_disconnect_request(self, NULL, P_NORMAL);
}
self->close_pend = TRUE;
......@@ -571,7 +571,7 @@ int irttp_data_request(struct tsap_cb *self, struct sk_buff *skb)
/* Check that nothing bad happens */
if ((skb->len == 0) || (!self->connected)) {
WARNING(__FUNCTION__ "(), No data, or not connected\n");
WARNING("%s: No data, or not connected\n", __FUNCTION__);
return -ENOTCONN;
}
......@@ -580,8 +580,8 @@ int irttp_data_request(struct tsap_cb *self, struct sk_buff *skb)
* inside an IrLAP frame
*/
if ((self->tx_max_sdu_size == 0) && (skb->len > self->max_seg_size)) {
ERROR(__FUNCTION__
"(), SAR disabled, and data is to large for IrLAP!\n");
ERROR("%s: SAR disabled, and data is to large for IrLAP!\n",
__FUNCTION__);
return -EMSGSIZE;
}
......@@ -593,8 +593,8 @@ int irttp_data_request(struct tsap_cb *self, struct sk_buff *skb)
(self->tx_max_sdu_size != TTP_SAR_UNBOUND) &&
(skb->len > self->tx_max_sdu_size))
{
ERROR(__FUNCTION__ "(), SAR enabled, "
"but data is larger than TxMaxSduSize!\n");
ERROR("%s: SAR enabled, but data is larger than TxMaxSduSize!\n",
__FUNCTION__);
return -EMSGSIZE;
}
/*
......@@ -1178,8 +1178,8 @@ static void irttp_connect_confirm(void *instance, void *sap,
/* Any errors in the parameter list? */
if (ret < 0) {
WARNING(__FUNCTION__
"(), error extracting parameters\n");
WARNING("%s: error extracting parameters\n",
__FUNCTION__);
dev_kfree_skb(skb);
/* Do not accept this connection attempt */
......@@ -1253,8 +1253,8 @@ void irttp_connect_indication(void *instance, void *sap, struct qos_info *qos,
/* Any errors in the parameter list? */
if (ret < 0) {
WARNING(__FUNCTION__
"(), error extracting parameters\n");
WARNING("%s: error extracting parameters\n",
__FUNCTION__);
dev_kfree_skb(skb);
/* Do not accept this connection attempt */
......
......@@ -72,9 +72,6 @@ static PV_HANDLER pv_insert_table[] = {
/*
* Function irda_insert_no_value (self, buf, len, pi, type, func)
*
*
*
*/
static int irda_insert_no_value(void *self, __u8 *buf, int len, __u8 pi,
PV_TYPE type, PI_HANDLER func)
......@@ -123,9 +120,6 @@ static int irda_extract_no_value(void *self, __u8 *buf, int len, __u8 pi,
/*
* Function irda_insert_integer (self, buf, len, pi, type, func)
*
*
*
*/
static int irda_insert_integer(void *self, __u8 *buf, int len, __u8 pi,
PV_TYPE type, PI_HANDLER func)
......@@ -162,7 +156,7 @@ static int irda_insert_integer(void *self, __u8 *buf, int len, __u8 pi,
}
/* Check if buffer is long enough for insertion */
if (len < (2+p.pl)) {
WARNING(__FUNCTION__ "(), buffer to short for insertion!\n");
WARNING("%s: buffer to short for insertion!\n", __FUNCTION__);
return -1;
}
IRDA_DEBUG(2, __FUNCTION__ "(), pi=%#x, pl=%d, pi=%d\n", p.pi, p.pl, p.pv.i);
......@@ -186,7 +180,7 @@ static int irda_insert_integer(void *self, __u8 *buf, int len, __u8 pi,
break;
default:
WARNING(__FUNCTION__ "() length %d not supported\n", p.pl);
WARNING("%s: length %d not supported\n", __FUNCTION__, p.pl);
/* Skip parameter */
return -1;
}
......@@ -213,8 +207,9 @@ static int irda_extract_integer(void *self, __u8 *buf, int len, __u8 pi,
/* Check if buffer is long enough for parsing */
if (len < (2+p.pl)) {
WARNING(__FUNCTION__ "(), buffer to short for parsing! "
"Need %d bytes, but len is only %d\n", p.pl, len);
WARNING("%s: buffer to short for parsing! "
"Need %d bytes, but len is only %d\n",
__FUNCTION__, p.pl, len);
return -1;
}
......@@ -223,9 +218,9 @@ static int irda_extract_integer(void *self, __u8 *buf, int len, __u8 pi,
* handler want a 16 bits integer then a 32 bits is not good enough
*/
if (((type & PV_MASK) != PV_INTEGER) && ((type & PV_MASK) != p.pl)) {
ERROR(__FUNCTION__ "(), invalid parameter length! "
ERROR("%s: invalid parameter length! "
"Expected %d bytes, but value had %d bytes!\n",
type & PV_MASK, p.pl);
__FUNCTION__, type & PV_MASK, p.pl);
/* Skip parameter */
return p.pl+2;
......@@ -251,7 +246,7 @@ static int irda_extract_integer(void *self, __u8 *buf, int len, __u8 pi,
le32_to_cpus(&p.pv.i);
break;
default:
WARNING(__FUNCTION__ "() length %d not supported\n", p.pl);
WARNING("%s: length %d not supported\n", __FUNCTION__, p.pl);
/* Skip parameter */
return p.pl+2;
......@@ -268,9 +263,6 @@ static int irda_extract_integer(void *self, __u8 *buf, int len, __u8 pi,
/*
* Function irda_extract_string (self, buf, len, type, func)
*
*
*
*/
static int irda_extract_string(void *self, __u8 *buf, int len, __u8 pi,
PV_TYPE type, PI_HANDLER func)
......@@ -288,8 +280,9 @@ static int irda_extract_string(void *self, __u8 *buf, int len, __u8 pi,
/* Check if buffer is long enough for parsing */
if (len < (2+p.pl)) {
WARNING(__FUNCTION__ "(), buffer to short for parsing! "
"Need %d bytes, but len is only %d\n", p.pl, len);
WARNING("%s: buffer to short for parsing! "
"Need %d bytes, but len is only %d\n",
__FUNCTION__, p.pl, len);
return -1;
}
......@@ -315,9 +308,6 @@ static int irda_extract_string(void *self, __u8 *buf, int len, __u8 pi,
/*
* Function irda_extract_octseq (self, buf, len, type, func)
*
*
*
*/
static int irda_extract_octseq(void *self, __u8 *buf, int len, __u8 pi,
PV_TYPE type, PI_HANDLER func)
......@@ -329,8 +319,9 @@ static int irda_extract_octseq(void *self, __u8 *buf, int len, __u8 pi,
/* Check if buffer is long enough for parsing */
if (len < (2+p.pl)) {
WARNING(__FUNCTION__ "(), buffer to short for parsing! "
"Need %d bytes, but len is only %d\n", p.pl, len);
WARNING("%s: buffer to short for parsing! "
"Need %d bytes, but len is only %d\n",
__FUNCTION__, p.pl, len);
return -1;
}
......@@ -380,7 +371,6 @@ int irda_param_pack(__u8 *buf, char *fmt, ...)
va_end(args);
return -1;
}
}
va_end(args);
......@@ -389,9 +379,6 @@ int irda_param_pack(__u8 *buf, char *fmt, ...)
/*
* Function irda_param_unpack (skb, fmt, ...)
*
*
*
*/
int irda_param_unpack(__u8 *buf, char *fmt, ...)
{
......@@ -475,7 +462,7 @@ int irda_param_insert(void *self, __u8 pi, __u8 *buf, int len,
/* Check if handler has been implemented */
if (!pi_minor_info->func) {
MESSAGE(__FUNCTION__"(), no handler for pi=%#x\n", pi);
MESSAGE("%s: no handler for pi=%#x\n", __FUNCTION__, pi);
/* Skip this parameter */
return -1;
}
......@@ -530,7 +517,7 @@ int irda_param_extract(void *self, __u8 *buf, int len, pi_param_info_t *info)
/* Check if handler has been implemented */
if (!pi_minor_info->func) {
MESSAGE(__FUNCTION__"(), no handler for pi=%#x\n", buf[n]);
MESSAGE("%s: no handler for pi=%#x\n", __FUNCTION__, buf[n]);
/* Skip this parameter */
return 2 + buf[n + 1]; /* Continue */
}
......
......@@ -295,7 +295,7 @@ static void state_link_escape(struct net_device *dev,
irda_device_set_media_busy(dev, TRUE);
break;
case CE:
WARNING(__FUNCTION__ "(), state not defined\n");
WARNING("%s: state not defined\n", __FUNCTION__);
break;
case EOF: /* Abort frame */
rx_buff->state = OUTSIDE_FRAME;
......@@ -371,5 +371,3 @@ static void state_inside_frame(struct net_device *dev,
break;
}
}
......@@ -22,7 +22,7 @@ TAIL=tail.tk
# Config.in files to depend on anyways. So I'll force it to remake.
kconfig.tk: $(TOPDIR)/arch/$(ARCH)/config.in tkparse $(HEADER) $(TAIL) FORCE
@echo Generating $@
@echo ' Generating $@'
@( \
if [ -f /usr/local/bin/wish ]; then \
echo '#!'"/usr/local/bin/wish -f"; \
......
......@@ -61,9 +61,9 @@
*
* It is invoked as
*
* fixdep <target> <topdir> <cmdline>
* fixdep <depfile> <target> <topdir> <cmdline>
*
* and will read the dependency file ".<target>.d".
* and will read the dependency file <depfile>
*
* The transformed dependency snipped is written to stdout.
*
......@@ -112,29 +112,20 @@
#define INT_FIG_ ntohl(0x4649475f)
char *topdir;
char *target;
char *depfile;
char *cmdline;
void usage(void)
{
fprintf(stderr, "Usage: fixdep <target> <topdir> <cmdline>\n");
fprintf(stderr, "Usage: fixdep <depfile> <target> <topdir> <cmdline>\n");
exit(1);
}
void print_cmdline(char *target, char *cmdline)
void print_cmdline(void)
{
char *s = strdup(target);
char *p = s;
if (!s) {
fprintf(stderr, "no mem!\n");
exit(2);
}
while ((p = strchr(p,'/')))
*p = '_';
printf("cmd_%s := %s\n\n", s, cmdline);
free(s);
printf("cmd_%s := %s\n\n", target, cmdline);
}
char * str_config = NULL;
......@@ -297,11 +288,11 @@ void parse_dep_file(void *map, size_t len)
p = strchr(m, ':');
if (!p) {
fprintf(stderr, "parse error at %d", __LINE__);
fprintf(stderr, "fixdep: parse error\n");
exit(1);
}
memcpy(s, m, p-m); s[p-m] = 0;
printf("%s: \\\n", s);
printf("%s: \\\n", target);
m = p+1;
clear_config();
......@@ -326,22 +317,20 @@ void parse_dep_file(void *map, size_t len)
printf("\n");
}
void print_deps(char *target)
void print_deps(void)
{
char filename[PATH_MAX];
struct stat st;
int fd;
void *map;
sprintf(filename, ".%s.d", target);
fd = open(filename, O_RDONLY);
fd = open(depfile, O_RDONLY);
if (fd < 0) {
perror(filename);
perror(depfile);
exit(2);
}
fstat(fd, &st);
if (st.st_size == 0) {
fprintf(stderr,"%s is empty\n",filename);
fprintf(stderr,"fixdep: %s is empty\n",depfile);
close(fd);
return;
}
......@@ -362,7 +351,7 @@ void traps(void)
char *test = "CONF";
if (*(int *)test != INT_CONF) {
fprintf(stderr, "sizeof(int) != 4 or wrong endianess? %#x\n",
fprintf(stderr, "fixdep: sizeof(int) != 4 or wrong endianess? %#x\n",
*(int *)test);
exit(2);
}
......@@ -370,19 +359,18 @@ void traps(void)
int main(int argc, char *argv[])
{
char *target, *cmdline;
traps();
if (argc != 4)
if (argc != 5)
usage();
target = argv[1];
topdir = argv[2];
cmdline = argv[3];
depfile = argv[1];
target = argv[2];
topdir = argv[3];
cmdline = argv[4];
print_cmdline(target, cmdline);
print_deps(target);
print_cmdline();
print_deps();
return 0;
}
......@@ -29,6 +29,7 @@
#include <sound/driver.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <sound/core.h>
#include <sound/emu10k1.h>
......
......@@ -29,6 +29,7 @@
#define __NO_VERSION__
#include <sound/driver.h>
#include <linux/time.h>
#include <linux/init.h>
#include <sound/core.h>
#include <sound/emu10k1.h>
......
......@@ -29,6 +29,7 @@
#include <sound/driver.h>
#include <linux/slab.h>
#include <linux/time.h>
#include <linux/init.h>
#include <sound/core.h>
#include <sound/emu10k1.h>
......
......@@ -28,6 +28,7 @@
#define __NO_VERSION__
#include <sound/driver.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <sound/core.h>
#include <sound/emu10k1.h>
......
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