Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75596
b: refs/heads/master
c: 1fc3858
h: refs/heads/master
v: v3
  • Loading branch information
Russell King authored and Russell King committed Jan 20, 2008
1 parent 81fa824 commit 5a53dfa
Show file tree
Hide file tree
Showing 66 changed files with 616 additions and 640 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: f6f2a5db6ddf164923c1f8af27d36c2d7ab994e0
refs/heads/master: 1fc3858a6358400195c067f8726cf3c86a180d80
23 changes: 0 additions & 23 deletions trunk/Documentation/local_ops.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,29 +45,6 @@ long fails. The definition looks like :
typedef struct { atomic_long_t a; } local_t;


* Rules to follow when using local atomic operations

- Variables touched by local ops must be per cpu variables.
- _Only_ the CPU owner of these variables must write to them.
- This CPU can use local ops from any context (process, irq, softirq, nmi, ...)
to update its local_t variables.
- Preemption (or interrupts) must be disabled when using local ops in
process context to make sure the process won't be migrated to a
different CPU between getting the per-cpu variable and doing the
actual local op.
- When using local ops in interrupt context, no special care must be
taken on a mainline kernel, since they will run on the local CPU with
preemption already disabled. I suggest, however, to explicitly
disable preemption anyway to make sure it will still work correctly on
-rt kernels.
- Reading the local cpu variable will provide the current copy of the
variable.
- Reads of these variables can be done from any CPU, because updates to
"long", aligned, variables are always atomic. Since no memory
synchronization is done by the writer CPU, an outdated copy of the
variable can be read when reading some _other_ cpu's variables.


* Rules to follow when using local atomic operations

- Variables touched by local ops must be per cpu variables.
Expand Down
5 changes: 4 additions & 1 deletion trunk/Documentation/networking/driver.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ Transmit path guidelines:
2) Do not forget to update netdev->trans_start to jiffies after
each new tx packet is given to the hardware.

3) Do not forget that once you return 0 from your hard_start_xmit
3) A hard_start_xmit method must not modify the shared parts of a
cloned SKB.

4) Do not forget that once you return 0 from your hard_start_xmit
method, it is your driver's responsibility to free up the SKB
and in some finite amount of time.

Expand Down
38 changes: 21 additions & 17 deletions trunk/Documentation/watchdog/watchdog-api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,27 @@ like this source file: see Documentation/watchdog/src/watchdog-simple.c
A more advanced driver could for example check that a HTTP server is
still responding before doing the write call to ping the watchdog.

When the device is closed, the watchdog is disabled. This is not
always such a good idea, since if there is a bug in the watchdog
daemon and it crashes the system will not reboot. Because of this,
some of the drivers support the configuration option "Disable watchdog
shutdown on close", CONFIG_WATCHDOG_NOWAYOUT. If it is set to Y when
compiling the kernel, there is no way of disabling the watchdog once
it has been started. So, if the watchdog daemon crashes, the system
will reboot after the timeout has passed. Watchdog devices also usually
support the nowayout module parameter so that this option can be controlled
at runtime.

Drivers will not disable the watchdog, unless a specific magic character 'V'
has been sent /dev/watchdog just before closing the file. If the userspace
daemon closes the file without sending this special character, the driver
will assume that the daemon (and userspace in general) died, and will stop
pinging the watchdog without disabling it first. This will then cause a
reboot if the watchdog is not re-opened in sufficient time.
When the device is closed, the watchdog is disabled, unless the "Magic
Close" feature is supported (see below). This is not always such a
good idea, since if there is a bug in the watchdog daemon and it
crashes the system will not reboot. Because of this, some of the
drivers support the configuration option "Disable watchdog shutdown on
close", CONFIG_WATCHDOG_NOWAYOUT. If it is set to Y when compiling
the kernel, there is no way of disabling the watchdog once it has been
started. So, if the watchdog daemon crashes, the system will reboot
after the timeout has passed. Watchdog devices also usually support
the nowayout module parameter so that this option can be controlled at
runtime.

Magic Close feature:

If a driver supports "Magic Close", the driver will not disable the
watchdog unless a specific magic character 'V' has been sent to
/dev/watchdog just before closing the file. If the userspace daemon
closes the file without sending this special character, the driver
will assume that the daemon (and userspace in general) died, and will
stop pinging the watchdog without disabling it first. This will then
cause a reboot if the watchdog is not re-opened in sufficient time.

The ioctl API:

Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
i386
x86_64
2 changes: 1 addition & 1 deletion trunk/arch/alpha/math-emu/math.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ alpha_fp_emul (unsigned long pc)
FP_UNPACK_SP(SB, &vb);
DR_c = DB_c;
DR_s = DB_s;
DR_e = DB_e;
DR_e = DB_e + (1024 - 128);
DR_f = SB_f << (52 - 23);
goto pack_d;
}
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1072,6 +1072,8 @@ source "drivers/rtc/Kconfig"

source "drivers/dma/Kconfig"

source "drivers/dca/Kconfig"

endmenu

source "fs/Kconfig"
Expand Down
6 changes: 2 additions & 4 deletions trunk/arch/arm/mach-pxa/sleep.S
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ pxa_cpu_save_cp:
pxa_cpu_save_sp:
@ preserve phys address of stack
mov r0, sp
mov r2, lr
str lr, [sp, #-4]!
bl sleep_phys_sp
ldr r1, =sleep_save_sp
str r0, [r1]
mov pc, r2
ldr pc, [sp], #4

/*
* pxa27x_cpu_suspend()
Expand Down Expand Up @@ -270,5 +270,3 @@ resume_after_mmu:
mar acc0, r2, r3
#endif
ldmfd sp!, {r4 - r12, pc} @ return to caller


33 changes: 15 additions & 18 deletions trunk/arch/cris/arch-v10/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
*/

#include <asm-generic/vmlinux.lds.h>

#include <asm/page.h>

jiffies = jiffies_64;
SECTIONS
{
Expand All @@ -23,7 +24,7 @@ SECTIONS
_stext = .;
__stext = .;
.text : {
*(.text)
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
*(.fixup)
Expand All @@ -49,10 +50,10 @@ SECTIONS
__edata = . ; /* End of data section */
_edata = . ;

. = ALIGN(8192); /* init_task and stack, must be aligned */
. = ALIGN(PAGE_SIZE); /* init_task and stack, must be aligned */
.data.init_task : { *(.data.init_task) }

. = ALIGN(8192); /* Init code and data */
. = ALIGN(PAGE_SIZE); /* Init code and data */
__init_begin = .;
.init.text : {
_sinittext = .;
Expand All @@ -66,13 +67,7 @@ SECTIONS
__setup_end = .;
.initcall.init : {
__initcall_start = .;
*(.initcall1.init);
*(.initcall2.init);
*(.initcall3.init);
*(.initcall4.init);
*(.initcall5.init);
*(.initcall6.init);
*(.initcall7.init);
INITCALLS
__initcall_end = .;
}

Expand All @@ -88,16 +83,18 @@ SECTIONS
__initramfs_start = .;
*(.init.ramfs)
__initramfs_end = .;
/* We fill to the next page, so we can discard all init
pages without needing to consider what payload might be
appended to the kernel image. */
FILL (0);
. = ALIGN (8192);
}
#endif

__vmlinux_end = .; /* last address of the physical file */
__init_end = .;

/*
* We fill to the next page, so we can discard all init
* pages without needing to consider what payload might be
* appended to the kernel image.
*/
. = ALIGN(PAGE_SIZE);

__init_end = .;

__data_end = . ; /* Move to _edata ? */
__bss_start = .; /* BSS */
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/sparc64/kernel/sun4v_tlb_miss.S
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ sun4v_itlb_error:

1: ba,pt %xcc, etrap
2: or %g7, %lo(2b), %g7
mov %l4, %o1
call sun4v_itlb_error_report
add %sp, PTREGS_OFF, %o0

Expand All @@ -241,6 +242,7 @@ sun4v_dtlb_error:

1: ba,pt %xcc, etrap
2: or %g7, %lo(2b), %g7
mov %l4, %o1
call sun4v_dtlb_error_report
add %sp, PTREGS_OFF, %o0

Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/sparc64/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -1950,6 +1950,8 @@ void sun4v_itlb_error_report(struct pt_regs *regs, int tl)
printk(KERN_EMERG "SUN4V-ITLB: Error at TPC[%lx], tl %d\n",
regs->tpc, tl);
print_symbol(KERN_EMERG "SUN4V-ITLB: TPC<%s>\n", regs->tpc);
printk(KERN_EMERG "SUN4V-ITLB: O7[%lx]\n", regs->u_regs[UREG_I7]);
print_symbol(KERN_EMERG "SUN4V-ITLB: O7<%s>\n", regs->u_regs[UREG_I7]);
printk(KERN_EMERG "SUN4V-ITLB: vaddr[%lx] ctx[%lx] "
"pte[%lx] error[%lx]\n",
sun4v_err_itlb_vaddr, sun4v_err_itlb_ctx,
Expand All @@ -1971,6 +1973,8 @@ void sun4v_dtlb_error_report(struct pt_regs *regs, int tl)
printk(KERN_EMERG "SUN4V-DTLB: Error at TPC[%lx], tl %d\n",
regs->tpc, tl);
print_symbol(KERN_EMERG "SUN4V-DTLB: TPC<%s>\n", regs->tpc);
printk(KERN_EMERG "SUN4V-DTLB: O7[%lx]\n", regs->u_regs[UREG_I7]);
print_symbol(KERN_EMERG "SUN4V-DTLB: O7<%s>\n", regs->u_regs[UREG_I7]);
printk(KERN_EMERG "SUN4V-DTLB: vaddr[%lx] ctx[%lx] "
"pte[%lx] error[%lx]\n",
sun4v_err_dtlb_vaddr, sun4v_err_dtlb_ctx,
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/x86/kernel/traps_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,7 @@ fastcall void do_##name(struct pt_regs * regs, long error_code) \
info.si_errno = 0; \
info.si_code = sicode; \
info.si_addr = (void __user *)siaddr; \
trace_hardirqs_fixup(); \
if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) \
== NOTIFY_STOP) \
return; \
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/x86/kernel/traps_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,7 @@ asmlinkage void do_##name(struct pt_regs * regs, long error_code) \
info.si_errno = 0; \
info.si_code = sicode; \
info.si_addr = (void __user *)siaddr; \
trace_hardirqs_fixup(); \
if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) \
== NOTIFY_STOP) \
return; \
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/oprofile/nmi_int.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ static int __init ppro_init(char ** cpu_type)

if (cpu_model == 14)
*cpu_type = "i386/core";
else if (cpu_model == 15)
else if (cpu_model == 15 || cpu_model == 23)
*cpu_type = "i386/core_2";
else if (cpu_model > 0xd)
return 0;
Expand Down
19 changes: 19 additions & 0 deletions trunk/drivers/ata/pata_pdc202xx_old.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,24 @@ static int pdc2026x_port_start(struct ata_port *ap)
return ata_sff_port_start(ap);
}

/**
* pdc2026x_check_atapi_dma - Check whether ATAPI DMA can be supported for this command
* @qc: Metadata associated with taskfile to check
*
* Just say no - not supported on older Promise.
*
* LOCKING:
* None (inherited from caller).
*
* RETURNS: 0 when ATAPI DMA can be used
* 1 otherwise
*/

static int pdc2026x_check_atapi_dma(struct ata_queued_cmd *qc)
{
return 1;
}

static struct scsi_host_template pdc202xx_sht = {
.module = THIS_MODULE,
.name = DRV_NAME,
Expand Down Expand Up @@ -311,6 +329,7 @@ static struct ata_port_operations pdc2026x_port_ops = {
.post_internal_cmd = ata_bmdma_post_internal_cmd,
.cable_detect = pdc2026x_cable_detect,

.check_atapi_dma= pdc2026x_check_atapi_dma,
.bmdma_setup = ata_bmdma_setup,
.bmdma_start = pdc2026x_bmdma_start,
.bmdma_stop = pdc2026x_bmdma_stop,
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/cpufreq/cpufreq_conservative.c
Original file line number Diff line number Diff line change
Expand Up @@ -603,5 +603,9 @@ MODULE_DESCRIPTION ("'cpufreq_conservative' - A dynamic cpufreq governor for "
"optimised for use in a battery environment");
MODULE_LICENSE ("GPL");

#ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE
fs_initcall(cpufreq_gov_dbs_init);
#else
module_init(cpufreq_gov_dbs_init);
#endif
module_exit(cpufreq_gov_dbs_exit);
5 changes: 4 additions & 1 deletion trunk/drivers/cpufreq/cpufreq_ondemand.c
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,9 @@ MODULE_DESCRIPTION("'cpufreq_ondemand' - A dynamic cpufreq governor for "
"Low Latency Frequency Transition capable processors");
MODULE_LICENSE("GPL");

#ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND
fs_initcall(cpufreq_gov_dbs_init);
#else
module_init(cpufreq_gov_dbs_init);
#endif
module_exit(cpufreq_gov_dbs_exit);

4 changes: 4 additions & 0 deletions trunk/drivers/cpufreq/cpufreq_userspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,5 +231,9 @@ MODULE_AUTHOR ("Dominik Brodowski <linux@brodo.de>, Russell King <rmk@arm.linux.
MODULE_DESCRIPTION ("CPUfreq policy governor 'userspace'");
MODULE_LICENSE ("GPL");

#ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE
fs_initcall(cpufreq_gov_userspace_init);
#else
module_init(cpufreq_gov_userspace_init);
#endif
module_exit(cpufreq_gov_userspace_exit);
44 changes: 22 additions & 22 deletions trunk/drivers/infiniband/hw/ipath/ipath_ud.c
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,28 @@ void ipath_ud_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
}
}

/*
* The opcode is in the low byte when its in network order
* (top byte when in host order).
*/
opcode = be32_to_cpu(ohdr->bth[0]) >> 24;
if (qp->ibqp.qp_num > 1 &&
opcode == IB_OPCODE_UD_SEND_ONLY_WITH_IMMEDIATE) {
if (header_in_data) {
wc.imm_data = *(__be32 *) data;
data += sizeof(__be32);
} else
wc.imm_data = ohdr->u.ud.imm_data;
wc.wc_flags = IB_WC_WITH_IMM;
hdrsize += sizeof(u32);
} else if (opcode == IB_OPCODE_UD_SEND_ONLY) {
wc.imm_data = 0;
wc.wc_flags = 0;
} else {
dev->n_pkt_drops++;
goto bail;
}

/* Get the number of bytes the message was padded by. */
pad = (be32_to_cpu(ohdr->bth[0]) >> 20) & 3;
if (unlikely(tlen < (hdrsize + pad + 4))) {
Expand All @@ -481,28 +503,6 @@ void ipath_ud_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
*/
wc.byte_len = tlen + sizeof(struct ib_grh);

/*
* The opcode is in the low byte when its in network order
* (top byte when in host order).
*/
opcode = be32_to_cpu(ohdr->bth[0]) >> 24;
if (qp->ibqp.qp_num > 1 &&
opcode == IB_OPCODE_UD_SEND_ONLY_WITH_IMMEDIATE) {
if (header_in_data) {
wc.imm_data = *(__be32 *) data;
data += sizeof(__be32);
} else
wc.imm_data = ohdr->u.ud.imm_data;
wc.wc_flags = IB_WC_WITH_IMM;
hdrsize += sizeof(u32);
} else if (opcode == IB_OPCODE_UD_SEND_ONLY) {
wc.imm_data = 0;
wc.wc_flags = 0;
} else {
dev->n_pkt_drops++;
goto bail;
}

/*
* Get the next work request entry to find where to put the data.
*/
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/input/mouse/alps.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ static const struct alps_model_info alps_model_data[] = {
{ { 0x20, 0x02, 0x0e }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* XXX */
{ { 0x22, 0x02, 0x0a }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT },
{ { 0x22, 0x02, 0x14 }, 0xff, 0xff, ALPS_PASS | ALPS_DUALPOINT }, /* Dell Latitude D600 */
{ { 0x73, 0x02, 0x50 }, 0xcf, 0xff, ALPS_FW_BK_1 } /* Dell Vostro 1400 */
{ { 0x73, 0x02, 0x50 }, 0xcf, 0xcf, ALPS_FW_BK_1 } /* Dell Vostro 1400 */
};

/*
Expand Down
Loading

0 comments on commit 5a53dfa

Please sign in to comment.