Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 16670
b: refs/heads/master
c: d8d8f6a
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Jan 6, 2006
1 parent 0646765 commit 367df8c
Show file tree
Hide file tree
Showing 81 changed files with 2,274 additions and 1,452 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a2167dc62e9142b9a4bfb20f7e001c0f0a26fd8c
refs/heads/master: d8d8f6a4fd635dcc9e4f946394c1fbde85eeab66
1 change: 1 addition & 0 deletions trunk/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*.a
*.s
*.ko
*.so
*.mod.c

#
Expand Down
40 changes: 40 additions & 0 deletions trunk/Documentation/kbuild/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ In this document you will find information about:
=== 5. Include files
--- 5.1 How to include files from the kernel include dir
--- 5.2 External modules using an include/ dir
--- 5.3 External modules using several directories
=== 6. Module installation
--- 6.1 INSTALL_MOD_PATH
--- 6.2 INSTALL_MOD_DIR
Expand Down Expand Up @@ -344,6 +345,45 @@ directory and therefore needs to deal with this in their kbuild file.
Note that in the assignment there is no space between -I and the path.
This is a kbuild limitation: there must be no space present.

--- 5.3 External modules using several directories

If an external module does not follow the usual kernel style but
decide to spread files over several directories then kbuild can
support this too.

Consider the following example:

|
+- src/complex_main.c
| +- hal/hardwareif.c
| +- hal/include/hardwareif.h
+- include/complex.h

To build a single module named complex.ko we then need the following
kbuild file:

Kbuild:
obj-m := complex.o
complex-y := src/complex_main.o
complex-y += src/hal/hardwareif.o

EXTRA_CFLAGS := -I$(src)/include
EXTRA_CFLAGS += -I$(src)src/hal/include


kbuild knows how to handle .o files located in another directory -
although this is NOT reccommended practice. The syntax is to specify
the directory relative to the directory where the Kbuild file is
located.

To find the .h files we have to explicitly tell kbuild where to look
for the .h files. When kbuild executes current directory is always
the root of the kernel tree (argument to -C) and therefore we have to
tell kbuild how to find the .h files using absolute paths.
$(src) will specify the absolute path to the directory where the
Kbuild file are located when being build as an external module.
Therefore -I$(src)/ is used to point out the directory of the Kbuild
file and any additional path are just appended.

=== 6. Module installation

Expand Down
8 changes: 8 additions & 0 deletions trunk/Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -910,6 +910,14 @@ running once the system is up.
nfsroot= [NFS] nfs root filesystem for disk-less boxes.
See Documentation/nfsroot.txt.

nfs.callback_tcpport=
[NFS] set the TCP port on which the NFSv4 callback
channel should listen.

nfs.idmap_cache_timeout=
[NFS] set the maximum lifetime for idmapper cache
entries.

nmi_watchdog= [KNL,BUGS=IA-32] Debugging features for SMP kernels

no387 [BUGS=IA-32] Tells the kernel to use the 387 maths
Expand Down
7 changes: 0 additions & 7 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -696,13 +696,6 @@ M: pc300@cyclades.com
W: http://www.cyclades.com/
S: Supported

DAC960 RAID CONTROLLER DRIVER
P: Dave Olien
M dmo@osdl.org
W: http://www.osdl.org/archive/dmo/DAC960
L: linux-kernel@vger.kernel.org
S: Maintained

DAMA SLAVE for AX.25
P: Joerg Reuter
M: jreuter@yaina.de
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/x86_64/ia32/.gitignore

This file was deleted.

90 changes: 57 additions & 33 deletions trunk/drivers/char/mmtimer.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
* Intel Multimedia Timer device implementation for SGI SN platforms.
* Timer device implementation for SGI SN platforms.
*
* 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
* for more details.
*
* Copyright (c) 2001-2004 Silicon Graphics, Inc. All rights reserved.
* Copyright (c) 2001-2006 Silicon Graphics, Inc. All rights reserved.
*
* This driver exports an API that should be supportable by any HPET or IA-PC
* multimedia timer. The code below is currently specific to the SGI Altix
Expand Down Expand Up @@ -45,7 +45,7 @@ MODULE_LICENSE("GPL");
/* name of the device, usually in /dev */
#define MMTIMER_NAME "mmtimer"
#define MMTIMER_DESC "SGI Altix RTC Timer"
#define MMTIMER_VERSION "2.0"
#define MMTIMER_VERSION "2.1"

#define RTC_BITS 55 /* 55 bits for this implementation */

Expand Down Expand Up @@ -227,10 +227,7 @@ typedef struct mmtimer {
struct tasklet_struct tasklet;
} mmtimer_t;

/*
* Total number of comparators is comparators/node * MAX nodes/running kernel
*/
static mmtimer_t timers[NUM_COMPARATORS*MAX_COMPACT_NODES];
static mmtimer_t ** timers;

/**
* mmtimer_ioctl - ioctl interface for /dev/mmtimer
Expand Down Expand Up @@ -441,29 +438,29 @@ static irqreturn_t
mmtimer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
int i;
mmtimer_t *base = timers + cpu_to_node(smp_processor_id()) *
NUM_COMPARATORS;
unsigned long expires = 0;
int result = IRQ_NONE;
unsigned indx = cpu_to_node(smp_processor_id());

/*
* Do this once for each comparison register
*/
for (i = 0; i < NUM_COMPARATORS; i++) {
mmtimer_t *base = timers[indx] + i;
/* Make sure this doesn't get reused before tasklet_sched */
spin_lock(&base[i].lock);
if (base[i].cpu == smp_processor_id()) {
if (base[i].timer)
expires = base[i].timer->it.mmtimer.expires;
spin_lock(&base->lock);
if (base->cpu == smp_processor_id()) {
if (base->timer)
expires = base->timer->it.mmtimer.expires;
/* expires test won't work with shared irqs */
if ((mmtimer_int_pending(i) > 0) ||
(expires && (expires < rtc_time()))) {
mmtimer_clr_int_pending(i);
tasklet_schedule(&base[i].tasklet);
tasklet_schedule(&base->tasklet);
result = IRQ_HANDLED;
}
}
spin_unlock(&base[i].lock);
spin_unlock(&base->lock);
expires = 0;
}
return result;
Expand Down Expand Up @@ -523,7 +520,7 @@ static int sgi_timer_del(struct k_itimer *timr)
{
int i = timr->it.mmtimer.clock;
cnodeid_t nodeid = timr->it.mmtimer.node;
mmtimer_t *t = timers + nodeid * NUM_COMPARATORS +i;
mmtimer_t *t = timers[nodeid] + i;
unsigned long irqflags;

if (i != TIMER_OFF) {
Expand Down Expand Up @@ -609,11 +606,11 @@ static int sgi_timer_set(struct k_itimer *timr, int flags,
preempt_disable();

nodeid = cpu_to_node(smp_processor_id());
base = timers + nodeid * NUM_COMPARATORS;
retry:
/* Don't use an allocated timer, or a deleted one that's pending */
for(i = 0; i< NUM_COMPARATORS; i++) {
if (!base[i].timer && !base[i].tasklet.state) {
base = timers[nodeid] + i;
if (!base->timer && !base->tasklet.state) {
break;
}
}
Expand All @@ -623,14 +620,14 @@ static int sgi_timer_set(struct k_itimer *timr, int flags,
return -EBUSY;
}

spin_lock_irqsave(&base[i].lock, irqflags);
spin_lock_irqsave(&base->lock, irqflags);

if (base[i].timer || base[i].tasklet.state != 0) {
spin_unlock_irqrestore(&base[i].lock, irqflags);
if (base->timer || base->tasklet.state != 0) {
spin_unlock_irqrestore(&base->lock, irqflags);
goto retry;
}
base[i].timer = timr;
base[i].cpu = smp_processor_id();
base->timer = timr;
base->cpu = smp_processor_id();

timr->it.mmtimer.clock = i;
timr->it.mmtimer.node = nodeid;
Expand All @@ -645,11 +642,11 @@ static int sgi_timer_set(struct k_itimer *timr, int flags,
}
} else {
timr->it.mmtimer.expires -= period;
if (reschedule_periodic_timer(base+i))
if (reschedule_periodic_timer(base))
err = -EINVAL;
}

spin_unlock_irqrestore(&base[i].lock, irqflags);
spin_unlock_irqrestore(&base->lock, irqflags);

preempt_enable();

Expand All @@ -675,6 +672,7 @@ static struct k_clock sgi_clock = {
static int __init mmtimer_init(void)
{
unsigned i;
cnodeid_t node, maxn = -1;

if (!ia64_platform_is("sn2"))
return -1;
Expand All @@ -691,14 +689,6 @@ static int __init mmtimer_init(void)
mmtimer_femtoperiod = ((unsigned long)1E15 + sn_rtc_cycles_per_second /
2) / sn_rtc_cycles_per_second;

for (i=0; i< NUM_COMPARATORS*MAX_COMPACT_NODES; i++) {
spin_lock_init(&timers[i].lock);
timers[i].timer = NULL;
timers[i].cpu = 0;
timers[i].i = i % NUM_COMPARATORS;
tasklet_init(&timers[i].tasklet, mmtimer_tasklet, (unsigned long) (timers+i));
}

if (request_irq(SGI_MMTIMER_VECTOR, mmtimer_interrupt, SA_PERCPU_IRQ, MMTIMER_NAME, NULL)) {
printk(KERN_WARNING "%s: unable to allocate interrupt.",
MMTIMER_NAME);
Expand All @@ -712,6 +702,40 @@ static int __init mmtimer_init(void)
return -1;
}

/* Get max numbered node, calculate slots needed */
for_each_online_node(node) {
maxn = node;
}
maxn++;

/* Allocate list of node ptrs to mmtimer_t's */
timers = kmalloc(sizeof(mmtimer_t *)*maxn, GFP_KERNEL);
if (timers == NULL) {
printk(KERN_ERR "%s: failed to allocate memory for device\n",
MMTIMER_NAME);
return -1;
}

/* Allocate mmtimer_t's for each online node */
for_each_online_node(node) {
timers[node] = kmalloc_node(sizeof(mmtimer_t)*NUM_COMPARATORS, GFP_KERNEL, node);
if (timers[node] == NULL) {
printk(KERN_ERR "%s: failed to allocate memory for device\n",
MMTIMER_NAME);
return -1;
}
for (i=0; i< NUM_COMPARATORS; i++) {
mmtimer_t * base = timers[node] + i;

spin_lock_init(&base->lock);
base->timer = NULL;
base->cpu = 0;
base->i = i;
tasklet_init(&base->tasklet, mmtimer_tasklet,
(unsigned long) (base));
}
}

sgi_clock_period = sgi_clock.res = NSEC_PER_SEC / sn_rtc_cycles_per_second;
register_posix_clock(CLOCK_SGI_CYCLE, &sgi_clock);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/dvb/cinergyT2/cinergyT2.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ MODULE_PARM_DESC(debug, "Turn on/off debugging (default:off).");
#define dprintk(level, args...) \
do { \
if ((debug & level)) { \
printk("%s: %s(): ", __stringify(KBUILD_MODNAME), \
printk("%s: %s(): ", KBUILD_MODNAME, \
__FUNCTION__); \
printk(args); } \
} while (0)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/dvb/ttpci/budget.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ extern int budget_debug;
#endif

#define dprintk(level,args...) \
do { if ((budget_debug & level)) { printk("%s: %s(): ",__stringify(KBUILD_MODNAME), __FUNCTION__); printk(args); } } while (0)
do { if ((budget_debug & level)) { printk("%s: %s(): ", KBUILD_MODNAME, __FUNCTION__); printk(args); } } while (0)

struct budget_info {
char *name;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/video/tda9840.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ static int debug = 0; /* insmod parameter */
module_param(debug, int, 0644);
MODULE_PARM_DESC(debug, "Turn on/off device debugging (default:off).");
#define dprintk(args...) \
do { if (debug) { printk("%s: %s()[%d]: ",__stringify(KBUILD_MODNAME), __FUNCTION__, __LINE__); printk(args); } } while (0)
do { if (debug) { printk("%s: %s()[%d]: ", KBUILD_MODNAME, __FUNCTION__, __LINE__); printk(args); } } while (0)

#define SWITCH 0x00
#define LEVEL_ADJUST 0x02
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/video/tea6415c.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ static int debug = 0; /* insmod parameter */
module_param(debug, int, 0644);
MODULE_PARM_DESC(debug, "Turn on/off device debugging (default:off).");
#define dprintk(args...) \
do { if (debug) { printk("%s: %s()[%d]: ",__stringify(KBUILD_MODNAME), __FUNCTION__, __LINE__); printk(args); } } while (0)
do { if (debug) { printk("%s: %s()[%d]: ", KBUILD_MODNAME, __FUNCTION__, __LINE__); printk(args); } } while (0)

#define TEA6415C_NUM_INPUTS 8
#define TEA6415C_NUM_OUTPUTS 6
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/video/tea6420.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ static int debug = 0; /* insmod parameter */
module_param(debug, int, 0644);
MODULE_PARM_DESC(debug, "Turn on/off device debugging (default:off).");
#define dprintk(args...) \
do { if (debug) { printk("%s: %s()[%d]: ",__stringify(KBUILD_MODNAME), __FUNCTION__, __LINE__); printk(args); } } while (0)
do { if (debug) { printk("%s: %s()[%d]: ", KBUILD_MODNAME, __FUNCTION__, __LINE__); printk(args); } } while (0)

/* addresses to scan, found only at 0x4c and/or 0x4d (7-Bit) */
static unsigned short normal_i2c[] = { I2C_TEA6420_1, I2C_TEA6420_2, I2C_CLIENT_END };
Expand Down
Loading

0 comments on commit 367df8c

Please sign in to comment.