Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 12237
b: refs/heads/master
c: 0f3278d
h: refs/heads/master
i:
  12235: d4c88c6
v: v3
  • Loading branch information
Linus Torvalds committed Nov 4, 2005
1 parent e3b8d42 commit aed4a70
Show file tree
Hide file tree
Showing 256 changed files with 26,443 additions and 21,357 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: 15c84a470116b2a3b58a7353a6cf711c29a91854
refs/heads/master: 0f3278d14f0255e4cd9e07ccefc33ff12d8bb59c
41 changes: 40 additions & 1 deletion trunk/Documentation/arm/Samsung-S3C24XX/Overview.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ Adding New Machines

Any large scale modifications, or new drivers should be discussed
on the ARM kernel mailing list (linux-arm-kernel) before being
attempted.
attempted. See http://www.arm.linux.org.uk/mailinglists/ for the
mailing list information.


NAND
Expand Down Expand Up @@ -120,6 +121,43 @@ Clock Management
various clock units


Platform Data
-------------

Whenever a device has platform specific data that is specified
on a per-machine basis, care should be taken to ensure the
following:

1) that default data is not left in the device to confuse the
driver if a machine does not set it at startup

2) the data should (if possible) be marked as __initdata,
to ensure that the data is thrown away if the machine is
not the one currently in use.

The best way of doing this is to make a function that
kmalloc()s an area of memory, and copies the __initdata
and then sets the relevant device's platform data. Making
the function `__init` takes care of ensuring it is discarded
with the rest of the initialisation code

static __init void s3c24xx_xxx_set_platdata(struct xxx_data *pd)
{
struct s3c2410_xxx_mach_info *npd;

npd = kmalloc(sizeof(struct s3c2410_xxx_mach_info), GFP_KERNEL);
if (npd) {
memcpy(npd, pd, sizeof(struct s3c2410_xxx_mach_info));
s3c_device_xxx.dev.platform_data = npd;
} else {
printk(KERN_ERR "no memory for xxx platform data\n");
}
}

Note, since the code is marked as __init, it should not be
exported outside arch/arm/mach-s3c2410/, or exported to
modules via EXPORT_SYMBOL() and related functions.

Port Contributors
-----------------

Expand Down Expand Up @@ -149,6 +187,7 @@ Document Changes
06 Mar 2005 - BJD - Added Christer Weinigel
08 Mar 2005 - BJD - Added LCVR to list of people, updated introduction
08 Mar 2005 - BJD - Added section on adding machines
09 Sep 2005 - BJD - Added section on platform data

Document Author
---------------
Expand Down
66 changes: 57 additions & 9 deletions trunk/Documentation/serial/driver
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,15 @@ hardware.
line becoming inactive or the tty layer indicating we want
to stop transmission due to an XOFF character.

The driver should stop transmitting characters as soon as
possible.

Locking: port->lock taken.
Interrupts: locally disabled.
This call must not sleep

start_tx(port)
start transmitting characters.
Start transmitting characters.

Locking: port->lock taken.
Interrupts: locally disabled.
Expand Down Expand Up @@ -281,33 +284,78 @@ hardware.
Other functions
---------------

uart_update_timeout(port,cflag,quot)
uart_update_timeout(port,cflag,baud)
Update the FIFO drain timeout, port->timeout, according to the
number of bits, parity, stop bits and quotient.
number of bits, parity, stop bits and baud rate.

Locking: caller is expected to take port->lock
Interrupts: n/a

uart_get_baud_rate(port,termios)
uart_get_baud_rate(port,termios,old,min,max)
Return the numeric baud rate for the specified termios, taking
account of the special 38400 baud "kludge". The B0 baud rate
is mapped to 9600 baud.

If the baud rate is not within min..max, then if old is non-NULL,
the original baud rate will be tried. If that exceeds the
min..max constraint, 9600 baud will be returned. termios will
be updated to the baud rate in use.

Note: min..max must always allow 9600 baud to be selected.

Locking: caller dependent.
Interrupts: n/a

uart_get_divisor(port,termios,oldtermios)
Return the divsor (baud_base / baud) for the selected baud rate
specified by termios. If the baud rate is out of range, try
the original baud rate specified by oldtermios (if non-NULL).
If that fails, try 9600 baud.
uart_get_divisor(port,baud)
Return the divsor (baud_base / baud) for the specified baud
rate, appropriately rounded.

If 38400 baud and custom divisor is selected, return the
custom divisor instead.

Locking: caller dependent.
Interrupts: n/a

uart_match_port(port1,port2)
This utility function can be used to determine whether two
uart_port structures describe the same port.

Locking: n/a
Interrupts: n/a

uart_write_wakeup(port)
A driver is expected to call this function when the number of
characters in the transmit buffer have dropped below a threshold.

Locking: port->lock should be held.
Interrupts: n/a

uart_register_driver(drv)
Register a uart driver with the core driver. We in turn register
with the tty layer, and initialise the core driver per-port state.

drv->port should be NULL, and the per-port structures should be
registered using uart_add_one_port after this call has succeeded.

Locking: none
Interrupts: enabled

uart_unregister_driver()
Remove all references to a driver from the core driver. The low
level driver must have removed all its ports via the
uart_remove_one_port() if it registered them with uart_add_one_port().

Locking: none
Interrupts: enabled

uart_suspend_port()

uart_resume_port()

uart_add_one_port()

uart_remove_one_port()

Other notes
-----------

Expand Down
16 changes: 16 additions & 0 deletions trunk/arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,13 @@ config ARCH_VERSATILE
help
This enables support for ARM Ltd Versatile board.

config ARCH_REALVIEW
bool "RealView"
select ARM_AMBA
select ICST307
help
This enables support for ARM Ltd RealView boards.

config ARCH_IMX
bool "IMX"

Expand Down Expand Up @@ -244,6 +251,8 @@ source "arch/arm/mach-versatile/Kconfig"

source "arch/arm/mach-aaec2000/Kconfig"

source "arch/arm/mach-realview/Kconfig"

# Definitions to make life easier
config ARCH_ACORN
bool
Expand Down Expand Up @@ -340,6 +349,13 @@ config NR_CPUS
depends on SMP
default "4"

config HOTPLUG_CPU
bool "Support for hot-pluggable CPUs (EXPERIMENTAL)"
depends on SMP && HOTPLUG && EXPERIMENTAL
help
Say Y here to experiment with turning CPUs off and on. CPUs
can be controlled through /sys/devices/system/cpu.

config PREEMPT
bool "Preemptible Kernel (EXPERIMENTAL)"
depends on EXPERIMENTAL
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ textaddr-$(CONFIG_ARCH_FORTUNET) := 0xc0008000
machine-$(CONFIG_ARCH_IMX) := imx
machine-$(CONFIG_ARCH_H720X) := h720x
machine-$(CONFIG_ARCH_AAEC2000) := aaec2000
machine-$(CONFIG_ARCH_REALVIEW) := realview

ifeq ($(CONFIG_ARCH_EBSA110),y)
# This is what happens if you forget the IOCS16 line.
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/configs/ixp4xx_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ CONFIG_ARCH_IXCDP1100=y
CONFIG_ARCH_PRPMC1100=y
CONFIG_ARCH_IXDP4XX=y
CONFIG_CPU_IXP46X=y
CONFIG_MACH_GTWX5715=y
# CONFIG_MACH_GTWX5715 is not set

#
# IXP4xx Options
Expand Down
31 changes: 31 additions & 0 deletions trunk/arch/arm/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1050,3 +1050,34 @@ static int __init noirqdebug_setup(char *str)
}

__setup("noirqdebug", noirqdebug_setup);

#ifdef CONFIG_HOTPLUG_CPU
/*
* The CPU has been marked offline. Migrate IRQs off this CPU. If
* the affinity settings do not allow other CPUs, force them onto any
* available CPU.
*/
void migrate_irqs(void)
{
unsigned int i, cpu = smp_processor_id();

for (i = 0; i < NR_IRQS; i++) {
struct irqdesc *desc = irq_desc + i;

if (desc->cpu == cpu) {
unsigned int newcpu = any_online_cpu(desc->affinity);

if (newcpu == NR_CPUS) {
if (printk_ratelimit())
printk(KERN_INFO "IRQ%u no longer affine to CPU%u\n",
i, cpu);

cpus_setall(desc->affinity);
newcpu = any_online_cpu(desc->affinity);
}

route_irq(desc, i, newcpu);
}
}
}
#endif /* CONFIG_HOTPLUG_CPU */
9 changes: 9 additions & 0 deletions trunk/arch/arm/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <linux/interrupt.h>
#include <linux/kallsyms.h>
#include <linux/init.h>
#include <linux/cpu.h>

#include <asm/system.h>
#include <asm/io.h>
Expand Down Expand Up @@ -105,6 +106,14 @@ void cpu_idle(void)
/* endless idle loop with no priority at all */
while (1) {
void (*idle)(void) = pm_idle;

#ifdef CONFIG_HOTPLUG_CPU
if (cpu_is_offline(smp_processor_id())) {
leds_event(led_idle_start);
cpu_die();
}
#endif

if (!idle)
idle = default_idle;
preempt_disable();
Expand Down
Loading

0 comments on commit aed4a70

Please sign in to comment.