Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 40635
b: refs/heads/master
c: 7ca85ba
h: refs/heads/master
i:
  40633: 0122a24
  40631: 7f5595c
v: v3
  • Loading branch information
Steve French committed Oct 30, 2006
1 parent ada7bf6 commit 3f03b93
Show file tree
Hide file tree
Showing 232 changed files with 2,480 additions and 2,843 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: 895663cd92574367054e0eb604a7428852f359b8
refs/heads/master: 7ca85ba752e521f1b5ead1f3b91c562cc3910c7b
2 changes: 1 addition & 1 deletion trunk/Documentation/DocBook/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
DOCBOOKS := wanbook.xml z8530book.xml mcabook.xml videobook.xml \
kernel-hacking.xml kernel-locking.xml deviceiobook.xml \
procfs-guide.xml writing_usb_driver.xml \
kernel-api.xml filesystems.xml journal-api.xml lsm.xml usb.xml \
kernel-api.xml journal-api.xml lsm.xml usb.xml \
gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \
genericirq.xml

Expand Down
101 changes: 0 additions & 101 deletions trunk/Documentation/DocBook/filesystems.tmpl

This file was deleted.

60 changes: 60 additions & 0 deletions trunk/Documentation/DocBook/kernel-api.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,66 @@ X!Ilib/string.c
</sect1>
</chapter>

<chapter id="vfs">
<title>The Linux VFS</title>
<sect1><title>The Filesystem types</title>
!Iinclude/linux/fs.h
</sect1>
<sect1><title>The Directory Cache</title>
!Efs/dcache.c
!Iinclude/linux/dcache.h
</sect1>
<sect1><title>Inode Handling</title>
!Efs/inode.c
!Efs/bad_inode.c
</sect1>
<sect1><title>Registration and Superblocks</title>
!Efs/super.c
</sect1>
<sect1><title>File Locks</title>
!Efs/locks.c
!Ifs/locks.c
</sect1>
<sect1><title>Other Functions</title>
!Efs/mpage.c
!Efs/namei.c
!Efs/buffer.c
!Efs/bio.c
!Efs/seq_file.c
!Efs/filesystems.c
!Efs/fs-writeback.c
!Efs/block_dev.c
</sect1>
</chapter>

<chapter id="proc">
<title>The proc filesystem</title>

<sect1><title>sysctl interface</title>
!Ekernel/sysctl.c
</sect1>

<sect1><title>proc filesystem interface</title>
!Ifs/proc/base.c
</sect1>
</chapter>

<chapter id="sysfs">
<title>The Filesystem for Exporting Kernel Objects</title>
!Efs/sysfs/file.c
!Efs/sysfs/symlink.c
!Efs/sysfs/bin.c
</chapter>

<chapter id="debugfs">
<title>The debugfs filesystem</title>

<sect1><title>debugfs interface</title>
!Efs/debugfs/inode.c
!Efs/debugfs/file.c
</sect1>
</chapter>

<chapter id="relayfs">
<title>relay interface support</title>

Expand Down
39 changes: 31 additions & 8 deletions trunk/Documentation/mips/time.README
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,19 @@ The new time code provide the following services:

a) Implements functions required by Linux common code:
time_init
do_gettimeofday
do_settimeofday

b) provides an abstraction of RTC and null RTC implementation as default.
extern unsigned long (*rtc_get_time)(void);
extern int (*rtc_set_time)(unsigned long);

c) high-level and low-level timer interrupt routines where the timer
interrupt source may or may not be the CPU timer. The high-level
routine is dispatched through do_IRQ() while the low-level is
c) a set of gettimeoffset functions for different CPUs and different
needs.

d) high-level and low-level timer interrupt routines where the timer
interrupt source may or may not be the CPU timer. The high-level
routine is dispatched through do_IRQ() while the low-level is
dispatched in assemably code (usually int-handler.S)


Expand All @@ -68,7 +73,8 @@ the following functions or values:
c) (optional) board-specific RTC routines.

d) (optional) mips_hpt_frequency - It must be definied if the board
is using CPU counter for timer interrupt.
is using CPU counter for timer interrupt or it is using fixed rate
gettimeoffset().


PORTING GUIDE
Expand All @@ -83,6 +89,16 @@ Step 1: decide how you like to implement the time services.
If the answer is no, you need a timer to provide the timer interrupt
at 100 HZ speed.

You cannot use the fast gettimeoffset functions, i.e.,

unsigned long fixed_rate_gettimeoffset(void);
unsigned long calibrate_div32_gettimeoffset(void);
unsigned long calibrate_div64_gettimeoffset(void);

You can use null_gettimeoffset() will gives the same time resolution as
jiffy. Or you can implement your own gettimeoffset (probably based on
some ad hoc hardware on your machine.)

c) The following sub steps assume your CPU has counter register.
Do you plan to use the CPU counter register as the timer interrupt
or use an exnternal timer?
Expand All @@ -107,8 +123,8 @@ Step 3: implement rtc routines, board_time_init() and plat_timer_setup()
board_time_init() -
a) (optional) set up RTC routines,
b) (optional) calibrate and set the mips_hpt_frequency
(only needed if you intended to use cpu counter as timer interrupt
source)
(only needed if you intended to use fixed_rate_gettimeoffset
or use cpu counter as timer interrupt source)

plat_timer_setup() -
a) (optional) over-write any choices made above by time_init().
Expand Down Expand Up @@ -138,8 +154,8 @@ for some of the functions in time.c.
For example, you may define your own timer interrupt routine, which does
some of its own processing and then calls timer_interrupt().

You can also over-ride any of the built-in functions (RTC routines
and/or timer interrupt routine).
You can also over-ride any of the built-in functions (gettimeoffset,
RTC routines and/or timer interrupt routine).


PORTING NOTES FOR SMP
Expand Down Expand Up @@ -171,3 +187,10 @@ You need to decide on your timer interrupt sources.

You can also do the low-level version of those interrupt routines,
following similar dispatching routes described above.

Note about do_gettimeoffset():

It is very likely the CPU counter registers are not sync'ed up in a SMP box.
Therefore you cannot really use the many of the existing routines that
are based on CPU counter. You should wirte your own gettimeoffset rouinte
if you want intra-jiffy resolution.
2 changes: 1 addition & 1 deletion trunk/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 19
EXTRAVERSION =-rc4
EXTRAVERSION =-rc3
NAME=Avast! A bilge rat!

# *DOCUMENTATION*
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/cris/arch-v32/drivers/cryptocop.c
Original file line number Diff line number Diff line change
Expand Up @@ -2051,6 +2051,7 @@ static void cryptocop_job_queue_close(void)
spin_lock_irqsave(&cryptocop_process_lock, process_flags);

/* Empty the job queue. */
spin_lock_irqsave(&cryptocop_process_lock, process_flags);
for (i = 0; i < cryptocop_prio_no_prios; i++){
if (!list_empty(&(cryptocop_job_queues[i].jobs))){
list_for_each_safe(node, tmp, &(cryptocop_job_queues[i].jobs)) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/i386/kernel/apm.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
* (APM) BIOS Interface Specification, Revision 1.2, February 1996.
*
* [This document is available from Microsoft at:
* http://www.microsoft.com/whdc/archive/amp_12.mspx]
* http://www.microsoft.com/hwdev/busbios/amp_12.htm]
*/

#include <linux/module.h>
Expand Down
66 changes: 3 additions & 63 deletions trunk/arch/i386/kernel/io_apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,46 +91,6 @@ static struct irq_pin_list {
int apic, pin, next;
} irq_2_pin[PIN_MAP_SIZE];

struct io_apic {
unsigned int index;
unsigned int unused[3];
unsigned int data;
};

static __attribute_const__ struct io_apic __iomem *io_apic_base(int idx)
{
return (void __iomem *) __fix_to_virt(FIX_IO_APIC_BASE_0 + idx)
+ (mp_ioapics[idx].mpc_apicaddr & ~PAGE_MASK);
}

static inline unsigned int io_apic_read(unsigned int apic, unsigned int reg)
{
struct io_apic __iomem *io_apic = io_apic_base(apic);
writel(reg, &io_apic->index);
return readl(&io_apic->data);
}

static inline void io_apic_write(unsigned int apic, unsigned int reg, unsigned int value)
{
struct io_apic __iomem *io_apic = io_apic_base(apic);
writel(reg, &io_apic->index);
writel(value, &io_apic->data);
}

/*
* Re-write a value: to be used for read-modify-write
* cycles where the read already set up the index register.
*
* Older SiS APIC requires we rewrite the index register
*/
static inline void io_apic_modify(unsigned int apic, unsigned int reg, unsigned int value)
{
volatile struct io_apic *io_apic = io_apic_base(apic);
if (sis_apic_bug)
writel(reg, &io_apic->index);
writel(value, &io_apic->data);
}

union entry_union {
struct { u32 w1, w2; };
struct IO_APIC_route_entry entry;
Expand All @@ -147,33 +107,11 @@ static struct IO_APIC_route_entry ioapic_read_entry(int apic, int pin)
return eu.entry;
}

/*
* When we write a new IO APIC routing entry, we need to write the high
* word first! If the mask bit in the low word is clear, we will enable
* the interrupt, and we need to make sure the entry is fully populated
* before that happens.
*/
static void ioapic_write_entry(int apic, int pin, struct IO_APIC_route_entry e)
{
unsigned long flags;
union entry_union eu;
eu.entry = e;
spin_lock_irqsave(&ioapic_lock, flags);
io_apic_write(apic, 0x11 + 2*pin, eu.w2);
io_apic_write(apic, 0x10 + 2*pin, eu.w1);
spin_unlock_irqrestore(&ioapic_lock, flags);
}

/*
* When we mask an IO APIC routing entry, we need to write the low
* word first, in order to set the mask bit before we change the
* high bits!
*/
static void ioapic_mask_entry(int apic, int pin)
{
unsigned long flags;
union entry_union eu = { .entry.mask = 1 };

spin_lock_irqsave(&ioapic_lock, flags);
io_apic_write(apic, 0x10 + 2*pin, eu.w1);
io_apic_write(apic, 0x11 + 2*pin, eu.w2);
Expand Down Expand Up @@ -296,7 +234,9 @@ static void clear_IO_APIC_pin(unsigned int apic, unsigned int pin)
/*
* Disable it in the IO-APIC irq-routing table:
*/
ioapic_mask_entry(apic, pin);
memset(&entry, 0, sizeof(entry));
entry.mask = 1;
ioapic_write_entry(apic, pin, entry);
}

static void clear_IO_APIC (void)
Expand Down
Loading

0 comments on commit 3f03b93

Please sign in to comment.