Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
This commit is contained in:
commit
99ce567ba9
|
@ -49,6 +49,7 @@ include/linux/compile.h
|
||||||
include/linux/version.h
|
include/linux/version.h
|
||||||
include/linux/utsrelease.h
|
include/linux/utsrelease.h
|
||||||
include/linux/bounds.h
|
include/linux/bounds.h
|
||||||
|
include/generated
|
||||||
|
|
||||||
# stgit generated dirs
|
# stgit generated dirs
|
||||||
patches-*
|
patches-*
|
||||||
|
|
|
@ -277,8 +277,7 @@ or bottom half).
|
||||||
unfreeze_fs: called when VFS is unlocking a filesystem and making it writable
|
unfreeze_fs: called when VFS is unlocking a filesystem and making it writable
|
||||||
again.
|
again.
|
||||||
|
|
||||||
statfs: called when the VFS needs to get filesystem statistics. This
|
statfs: called when the VFS needs to get filesystem statistics.
|
||||||
is called with the kernel lock held
|
|
||||||
|
|
||||||
remount_fs: called when the filesystem is remounted. This is called
|
remount_fs: called when the filesystem is remounted. This is called
|
||||||
with the kernel lock held
|
with the kernel lock held
|
||||||
|
|
|
@ -316,6 +316,16 @@ more details, with real examples.
|
||||||
#arch/m68k/fpsp040/Makefile
|
#arch/m68k/fpsp040/Makefile
|
||||||
ldflags-y := -x
|
ldflags-y := -x
|
||||||
|
|
||||||
|
subdir-ccflags-y, subdir-asflags-y
|
||||||
|
The two flags listed above are similar to ccflags-y and as-falgs-y.
|
||||||
|
The difference is that the subdir- variants has effect for the kbuild
|
||||||
|
file where tey are present and all subdirectories.
|
||||||
|
Options specified using subdir-* are added to the commandline before
|
||||||
|
the options specified using the non-subdir variants.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
subdir-ccflags-y := -Werror
|
||||||
|
|
||||||
CFLAGS_$@, AFLAGS_$@
|
CFLAGS_$@, AFLAGS_$@
|
||||||
|
|
||||||
CFLAGS_$@ and AFLAGS_$@ only apply to commands in current
|
CFLAGS_$@ and AFLAGS_$@ only apply to commands in current
|
||||||
|
|
|
@ -231,6 +231,35 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||||
power state again in power transition.
|
power state again in power transition.
|
||||||
1 : disable the power state check
|
1 : disable the power state check
|
||||||
|
|
||||||
|
acpi_sci= [HW,ACPI] ACPI System Control Interrupt trigger mode
|
||||||
|
Format: { level | edge | high | low }
|
||||||
|
|
||||||
|
acpi_serialize [HW,ACPI] force serialization of AML methods
|
||||||
|
|
||||||
|
acpi_skip_timer_override [HW,ACPI]
|
||||||
|
Recognize and ignore IRQ0/pin2 Interrupt Override.
|
||||||
|
For broken nForce2 BIOS resulting in XT-PIC timer.
|
||||||
|
|
||||||
|
acpi_sleep= [HW,ACPI] Sleep options
|
||||||
|
Format: { s3_bios, s3_mode, s3_beep, s4_nohwsig,
|
||||||
|
old_ordering, s4_nonvs }
|
||||||
|
See Documentation/power/video.txt for information on
|
||||||
|
s3_bios and s3_mode.
|
||||||
|
s3_beep is for debugging; it makes the PC's speaker beep
|
||||||
|
as soon as the kernel's real-mode entry point is called.
|
||||||
|
s4_nohwsig prevents ACPI hardware signature from being
|
||||||
|
used during resume from hibernation.
|
||||||
|
old_ordering causes the ACPI 1.0 ordering of the _PTS
|
||||||
|
control method, with respect to putting devices into
|
||||||
|
low power states, to be enforced (the ACPI 2.0 ordering
|
||||||
|
of _PTS is used by default).
|
||||||
|
s4_nonvs prevents the kernel from saving/restoring the
|
||||||
|
ACPI NVS memory during hibernation.
|
||||||
|
|
||||||
|
acpi_use_timer_override [HW,ACPI]
|
||||||
|
Use timer override. For some broken Nvidia NF5 boards
|
||||||
|
that require a timer override, but don't have HPET
|
||||||
|
|
||||||
acpi_enforce_resources= [ACPI]
|
acpi_enforce_resources= [ACPI]
|
||||||
{ strict | lax | no }
|
{ strict | lax | no }
|
||||||
Check for resource conflicts between native drivers
|
Check for resource conflicts between native drivers
|
||||||
|
@ -250,6 +279,9 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||||
ad1848= [HW,OSS]
|
ad1848= [HW,OSS]
|
||||||
Format: <io>,<irq>,<dma>,<dma2>,<type>
|
Format: <io>,<irq>,<dma>,<dma2>,<type>
|
||||||
|
|
||||||
|
add_efi_memmap [EFI; X86] Include EFI memory map in
|
||||||
|
kernel's map of available physical RAM.
|
||||||
|
|
||||||
advansys= [HW,SCSI]
|
advansys= [HW,SCSI]
|
||||||
See header of drivers/scsi/advansys.c.
|
See header of drivers/scsi/advansys.c.
|
||||||
|
|
||||||
|
@ -1838,6 +1870,12 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||||
autoconfiguration.
|
autoconfiguration.
|
||||||
Ranges are in pairs (memory base and size).
|
Ranges are in pairs (memory base and size).
|
||||||
|
|
||||||
|
ports= [IP_VS_FTP] IPVS ftp helper module
|
||||||
|
Default is 21.
|
||||||
|
Up to 8 (IP_VS_APP_MAX_PORTS) ports
|
||||||
|
may be specified.
|
||||||
|
Format: <port>,<port>....
|
||||||
|
|
||||||
print-fatal-signals=
|
print-fatal-signals=
|
||||||
[KNL] debug: print fatal signals
|
[KNL] debug: print fatal signals
|
||||||
print-fatal-signals=1: print segfault info to
|
print-fatal-signals=1: print segfault info to
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
lguest
|
|
@ -3,11 +3,11 @@
|
||||||
/, /` - or, A Young Coder's Illustrated Hypervisor
|
/, /` - or, A Young Coder's Illustrated Hypervisor
|
||||||
\\"--\\ http://lguest.ozlabs.org
|
\\"--\\ http://lguest.ozlabs.org
|
||||||
|
|
||||||
Lguest is designed to be a minimal hypervisor for the Linux kernel, for
|
Lguest is designed to be a minimal 32-bit x86 hypervisor for the Linux kernel,
|
||||||
Linux developers and users to experiment with virtualization with the
|
for Linux developers and users to experiment with virtualization with the
|
||||||
minimum of complexity. Nonetheless, it should have sufficient
|
minimum of complexity. Nonetheless, it should have sufficient features to
|
||||||
features to make it useful for specific tasks, and, of course, you are
|
make it useful for specific tasks, and, of course, you are encouraged to fork
|
||||||
encouraged to fork and enhance it (see drivers/lguest/README).
|
and enhance it (see drivers/lguest/README).
|
||||||
|
|
||||||
Features:
|
Features:
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@ Running Lguest:
|
||||||
"Paravirtualized guest support" = Y
|
"Paravirtualized guest support" = Y
|
||||||
"Lguest guest support" = Y
|
"Lguest guest support" = Y
|
||||||
"High Memory Support" = off/4GB
|
"High Memory Support" = off/4GB
|
||||||
|
"PAE (Physical Address Extension) Support" = N
|
||||||
"Alignment value to which kernel should be aligned" = 0x100000
|
"Alignment value to which kernel should be aligned" = 0x100000
|
||||||
(CONFIG_PARAVIRT=y, CONFIG_LGUEST_GUEST=y, CONFIG_HIGHMEM64G=n and
|
(CONFIG_PARAVIRT=y, CONFIG_LGUEST_GUEST=y, CONFIG_HIGHMEM64G=n and
|
||||||
CONFIG_PHYSICAL_ALIGN=0x100000)
|
CONFIG_PHYSICAL_ALIGN=0x100000)
|
||||||
|
|
|
@ -511,10 +511,16 @@ SPI MASTER METHODS
|
||||||
This sets up the device clock rate, SPI mode, and word sizes.
|
This sets up the device clock rate, SPI mode, and word sizes.
|
||||||
Drivers may change the defaults provided by board_info, and then
|
Drivers may change the defaults provided by board_info, and then
|
||||||
call spi_setup(spi) to invoke this routine. It may sleep.
|
call spi_setup(spi) to invoke this routine. It may sleep.
|
||||||
|
|
||||||
Unless each SPI slave has its own configuration registers, don't
|
Unless each SPI slave has its own configuration registers, don't
|
||||||
change them right away ... otherwise drivers could corrupt I/O
|
change them right away ... otherwise drivers could corrupt I/O
|
||||||
that's in progress for other SPI devices.
|
that's in progress for other SPI devices.
|
||||||
|
|
||||||
|
** BUG ALERT: for some reason the first version of
|
||||||
|
** many spi_master drivers seems to get this wrong.
|
||||||
|
** When you code setup(), ASSUME that the controller
|
||||||
|
** is actively processing transfers for another device.
|
||||||
|
|
||||||
master->transfer(struct spi_device *spi, struct spi_message *message)
|
master->transfer(struct spi_device *spi, struct spi_message *message)
|
||||||
This must not sleep. Its responsibility is arrange that the
|
This must not sleep. Its responsibility is arrange that the
|
||||||
transfer happens and its complete() callback is issued. The two
|
transfer happens and its complete() callback is issued. The two
|
||||||
|
|
30
MAINTAINERS
30
MAINTAINERS
|
@ -1287,6 +1287,14 @@ S: Maintained
|
||||||
F: Documentation/video4linux/bttv/
|
F: Documentation/video4linux/bttv/
|
||||||
F: drivers/media/video/bt8xx/bttv*
|
F: drivers/media/video/bt8xx/bttv*
|
||||||
|
|
||||||
|
CACHEFILES: FS-CACHE BACKEND FOR CACHING ON MOUNTED FILESYSTEMS
|
||||||
|
P: David Howells
|
||||||
|
M: dhowells@redhat.com
|
||||||
|
L: linux-cachefs@redhat.com
|
||||||
|
S: Supported
|
||||||
|
F: Documentation/filesystems/caching/cachefiles.txt
|
||||||
|
F: fs/cachefiles/
|
||||||
|
|
||||||
CAFE CMOS INTEGRATED CAMERA CONTROLLER DRIVER
|
CAFE CMOS INTEGRATED CAMERA CONTROLLER DRIVER
|
||||||
P: Jonathan Corbet
|
P: Jonathan Corbet
|
||||||
M: corbet@lwn.net
|
M: corbet@lwn.net
|
||||||
|
@ -2057,6 +2065,8 @@ F: drivers/infiniband/hw/ehca/
|
||||||
EMBEDDED LINUX
|
EMBEDDED LINUX
|
||||||
P: Paul Gortmaker
|
P: Paul Gortmaker
|
||||||
M: paul.gortmaker@windriver.com
|
M: paul.gortmaker@windriver.com
|
||||||
|
P: Matt Mackall
|
||||||
|
M: mpm@selenic.com
|
||||||
P: David Woodhouse
|
P: David Woodhouse
|
||||||
M: dwmw2@infradead.org
|
M: dwmw2@infradead.org
|
||||||
L: linux-embedded@vger.kernel.org
|
L: linux-embedded@vger.kernel.org
|
||||||
|
@ -2325,6 +2335,15 @@ F: Documentation/power/freezing-of-tasks.txt
|
||||||
F: include/linux/freezer.h
|
F: include/linux/freezer.h
|
||||||
F: kernel/freezer.c
|
F: kernel/freezer.c
|
||||||
|
|
||||||
|
FS-CACHE: LOCAL CACHING FOR NETWORK FILESYSTEMS
|
||||||
|
P: David Howells
|
||||||
|
M: dhowells@redhat.com
|
||||||
|
L: linux-cachefs@redhat.com
|
||||||
|
S: Supported
|
||||||
|
F: Documentation/filesystems/caching/
|
||||||
|
F: fs/fscache/
|
||||||
|
F: include/linux/fscache*.h
|
||||||
|
|
||||||
FTRACE
|
FTRACE
|
||||||
P: Steven Rostedt
|
P: Steven Rostedt
|
||||||
M: rostedt@goodmis.org
|
M: rostedt@goodmis.org
|
||||||
|
@ -2545,7 +2564,6 @@ F: kernel/power/
|
||||||
F: include/linux/suspend.h
|
F: include/linux/suspend.h
|
||||||
F: include/linux/freezer.h
|
F: include/linux/freezer.h
|
||||||
F: include/linux/pm.h
|
F: include/linux/pm.h
|
||||||
F: include/asm-*/suspend*.h
|
|
||||||
F: arch/*/include/asm/suspend*.h
|
F: arch/*/include/asm/suspend*.h
|
||||||
|
|
||||||
HID CORE LAYER
|
HID CORE LAYER
|
||||||
|
@ -3323,7 +3341,7 @@ P: Eduard - Gabriel Munteanu
|
||||||
M: eduard.munteanu@linux360.ro
|
M: eduard.munteanu@linux360.ro
|
||||||
L: linux-kernel@vger.kernel.org
|
L: linux-kernel@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: Documentation/vm/kmemtrace.txt
|
F: Documentation/trace/kmemtrace.txt
|
||||||
F: include/trace/kmemtrace.h
|
F: include/trace/kmemtrace.h
|
||||||
F: kernel/trace/kmemtrace.c
|
F: kernel/trace/kmemtrace.c
|
||||||
|
|
||||||
|
@ -5235,7 +5253,12 @@ M: perex@perex.cz
|
||||||
P: Takashi Iwai
|
P: Takashi Iwai
|
||||||
M: tiwai@suse.de
|
M: tiwai@suse.de
|
||||||
L: alsa-devel@alsa-project.org (subscribers-only)
|
L: alsa-devel@alsa-project.org (subscribers-only)
|
||||||
|
W: http://www.alsa-project.org/
|
||||||
|
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
|
||||||
|
T: git git://git.alsa-project.org/alsa-kernel.git
|
||||||
S: Maintained
|
S: Maintained
|
||||||
|
F: Documentation/sound/
|
||||||
|
F: include/sound/
|
||||||
F: sound/
|
F: sound/
|
||||||
|
|
||||||
SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEMENT (ASoC)
|
SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEMENT (ASoC)
|
||||||
|
@ -5382,7 +5405,6 @@ F: kernel/power/
|
||||||
F: include/linux/suspend.h
|
F: include/linux/suspend.h
|
||||||
F: include/linux/freezer.h
|
F: include/linux/freezer.h
|
||||||
F: include/linux/pm.h
|
F: include/linux/pm.h
|
||||||
F: include/asm-*/suspend.h
|
|
||||||
|
|
||||||
SVGA HANDLING
|
SVGA HANDLING
|
||||||
P: Martin Mares
|
P: Martin Mares
|
||||||
|
@ -5616,7 +5638,7 @@ L: uclinux-dev@uclinux.org (subscribers-only)
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: arch/m68knommu/
|
F: arch/m68knommu/
|
||||||
|
|
||||||
UCLINUX FOR RENESAS H8/300
|
UCLINUX FOR RENESAS H8/300 (H8300)
|
||||||
P: Yoshinori Sato
|
P: Yoshinori Sato
|
||||||
M: ysato@users.sourceforge.jp
|
M: ysato@users.sourceforge.jp
|
||||||
W: http://uclinux-h8.sourceforge.jp/
|
W: http://uclinux-h8.sourceforge.jp/
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -1200,7 +1200,7 @@ CLEAN_FILES += vmlinux System.map \
|
||||||
.tmp_kallsyms* .tmp_version .tmp_vmlinux* .tmp_System.map
|
.tmp_kallsyms* .tmp_version .tmp_vmlinux* .tmp_System.map
|
||||||
|
|
||||||
# Directories & files removed with 'make mrproper'
|
# Directories & files removed with 'make mrproper'
|
||||||
MRPROPER_DIRS += include/config include2 usr/include
|
MRPROPER_DIRS += include/config include2 usr/include include/generated
|
||||||
MRPROPER_FILES += .config .config.old include/asm .version .old_version \
|
MRPROPER_FILES += .config .config.old include/asm .version .old_version \
|
||||||
include/linux/autoconf.h include/linux/version.h \
|
include/linux/autoconf.h include/linux/version.h \
|
||||||
include/linux/utsrelease.h \
|
include/linux/utsrelease.h \
|
||||||
|
|
|
@ -177,21 +177,12 @@ asmlinkage long sys_oabi_fstatat64(int dfd,
|
||||||
int flag)
|
int flag)
|
||||||
{
|
{
|
||||||
struct kstat stat;
|
struct kstat stat;
|
||||||
int error = -EINVAL;
|
int error;
|
||||||
|
|
||||||
if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0)
|
error = vfs_fstatat(dfd, filename, &stat, flag);
|
||||||
goto out;
|
if (error)
|
||||||
|
|
||||||
if (flag & AT_SYMLINK_NOFOLLOW)
|
|
||||||
error = vfs_lstat_fd(dfd, filename, &stat);
|
|
||||||
else
|
|
||||||
error = vfs_stat_fd(dfd, filename, &stat);
|
|
||||||
|
|
||||||
if (!error)
|
|
||||||
error = cp_oldabi_stat64(&stat, statbuf);
|
|
||||||
|
|
||||||
out:
|
|
||||||
return error;
|
return error;
|
||||||
|
return cp_oldabi_stat64(&stat, statbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct oabi_flock64 {
|
struct oabi_flock64 {
|
||||||
|
|
|
@ -85,7 +85,7 @@ static struct irqaction at91rm9200_timer_irq = {
|
||||||
.handler = at91rm9200_timer_interrupt
|
.handler = at91rm9200_timer_interrupt
|
||||||
};
|
};
|
||||||
|
|
||||||
static cycle_t read_clk32k(void)
|
static cycle_t read_clk32k(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
return read_CRTR();
|
return read_CRTR();
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ static u32 pit_cnt; /* access only w/system irq blocked */
|
||||||
* Clocksource: just a monotonic counter of MCK/16 cycles.
|
* Clocksource: just a monotonic counter of MCK/16 cycles.
|
||||||
* We don't care whether or not PIT irqs are enabled.
|
* We don't care whether or not PIT irqs are enabled.
|
||||||
*/
|
*/
|
||||||
static cycle_t read_pit_clk(void)
|
static cycle_t read_pit_clk(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
u32 elapsed;
|
u32 elapsed;
|
||||||
|
|
|
@ -238,7 +238,7 @@ static void __init timer_init(void)
|
||||||
/*
|
/*
|
||||||
* clocksource
|
* clocksource
|
||||||
*/
|
*/
|
||||||
static cycle_t read_cycles(void)
|
static cycle_t read_cycles(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
struct timer_s *t = &timers[TID_CLOCKSOURCE];
|
struct timer_s *t = &timers[TID_CLOCKSOURCE];
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ static void __init imx_timer_hardware_init(void)
|
||||||
IMX_TCTL(TIMER_BASE) = TCTL_FRR | TCTL_CLK_PCLK1 | TCTL_TEN;
|
IMX_TCTL(TIMER_BASE) = TCTL_FRR | TCTL_CLK_PCLK1 | TCTL_TEN;
|
||||||
}
|
}
|
||||||
|
|
||||||
cycle_t imx_get_cycles(void)
|
cycle_t imx_get_cycles(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
return IMX_TCN(TIMER_BASE);
|
return IMX_TCN(TIMER_BASE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -401,7 +401,7 @@ void __init ixp4xx_sys_init(void)
|
||||||
/*
|
/*
|
||||||
* clocksource
|
* clocksource
|
||||||
*/
|
*/
|
||||||
cycle_t ixp4xx_get_cycles(void)
|
cycle_t ixp4xx_get_cycles(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
return *IXP4XX_OSTS;
|
return *IXP4XX_OSTS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,12 +57,12 @@ static irqreturn_t msm_timer_interrupt(int irq, void *dev_id)
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
static cycle_t msm_gpt_read(void)
|
static cycle_t msm_gpt_read(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
return readl(MSM_GPT_BASE + TIMER_COUNT_VAL);
|
return readl(MSM_GPT_BASE + TIMER_COUNT_VAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static cycle_t msm_dgt_read(void)
|
static cycle_t msm_dgt_read(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
return readl(MSM_DGT_BASE + TIMER_COUNT_VAL) >> MSM_DGT_SHIFT;
|
return readl(MSM_DGT_BASE + TIMER_COUNT_VAL) >> MSM_DGT_SHIFT;
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,7 +104,7 @@ static struct irqaction netx_timer_irq = {
|
||||||
.handler = netx_timer_interrupt,
|
.handler = netx_timer_interrupt,
|
||||||
};
|
};
|
||||||
|
|
||||||
cycle_t netx_get_cycles(void)
|
cycle_t netx_get_cycles(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
return readl(NETX_GPIO_COUNTER_CURRENT(TIMER_CLOCKSOURCE));
|
return readl(NETX_GPIO_COUNTER_CURRENT(TIMER_CLOCKSOURCE));
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#define TIMER_CLOCKEVENT 1
|
#define TIMER_CLOCKEVENT 1
|
||||||
static u32 latch;
|
static u32 latch;
|
||||||
|
|
||||||
static cycle_t ns9360_clocksource_read(void)
|
static cycle_t ns9360_clocksource_read(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
return __raw_readl(SYS_TR(TIMER_CLOCKSOURCE));
|
return __raw_readl(SYS_TR(TIMER_CLOCKSOURCE));
|
||||||
}
|
}
|
||||||
|
|
|
@ -198,7 +198,7 @@ static struct irqaction omap_mpu_timer2_irq = {
|
||||||
.handler = omap_mpu_timer2_interrupt,
|
.handler = omap_mpu_timer2_interrupt,
|
||||||
};
|
};
|
||||||
|
|
||||||
static cycle_t mpu_read(void)
|
static cycle_t mpu_read(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
return ~omap_mpu_timer_read(1);
|
return ~omap_mpu_timer_read(1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -138,7 +138,7 @@ static inline void __init omap2_gp_clocksource_init(void) {}
|
||||||
* clocksource
|
* clocksource
|
||||||
*/
|
*/
|
||||||
static struct omap_dm_timer *gpt_clocksource;
|
static struct omap_dm_timer *gpt_clocksource;
|
||||||
static cycle_t clocksource_read_cycles(void)
|
static cycle_t clocksource_read_cycles(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
return (cycle_t)omap_dm_timer_read_counter(gpt_clocksource);
|
return (cycle_t)omap_dm_timer_read_counter(gpt_clocksource);
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,7 +125,7 @@ static struct clock_event_device ckevt_pxa_osmr0 = {
|
||||||
.set_mode = pxa_osmr0_set_mode,
|
.set_mode = pxa_osmr0_set_mode,
|
||||||
};
|
};
|
||||||
|
|
||||||
static cycle_t pxa_read_oscr(void)
|
static cycle_t pxa_read_oscr(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
return OSCR;
|
return OSCR;
|
||||||
}
|
}
|
||||||
|
|
|
@ -715,7 +715,7 @@ static struct irqaction realview_timer_irq = {
|
||||||
.handler = realview_timer_interrupt,
|
.handler = realview_timer_interrupt,
|
||||||
};
|
};
|
||||||
|
|
||||||
static cycle_t realview_get_cycles(void)
|
static cycle_t realview_get_cycles(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
return ~readl(timer3_va_base + TIMER_VALUE);
|
return ~readl(timer3_va_base + TIMER_VALUE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -948,7 +948,7 @@ static struct irqaction versatile_timer_irq = {
|
||||||
.handler = versatile_timer_interrupt,
|
.handler = versatile_timer_interrupt,
|
||||||
};
|
};
|
||||||
|
|
||||||
static cycle_t versatile_get_cycles(void)
|
static cycle_t versatile_get_cycles(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
return ~readl(TIMER3_VA_BASE + TIMER_VALUE);
|
return ~readl(TIMER3_VA_BASE + TIMER_VALUE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ static enum clock_event_mode clockevent_mode = CLOCK_EVT_MODE_UNUSED;
|
||||||
|
|
||||||
/* clock source */
|
/* clock source */
|
||||||
|
|
||||||
static cycle_t mxc_get_cycles(void)
|
static cycle_t mxc_get_cycles(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
return __raw_readl(TIMER_BASE + MXC_TCN);
|
return __raw_readl(TIMER_BASE + MXC_TCN);
|
||||||
}
|
}
|
||||||
|
|
|
@ -185,7 +185,7 @@ console_initcall(omap_add_serial_console);
|
||||||
|
|
||||||
#include <linux/clocksource.h>
|
#include <linux/clocksource.h>
|
||||||
|
|
||||||
static cycle_t omap_32k_read(void)
|
static cycle_t omap_32k_read(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
return omap_readl(TIMER_32K_SYNCHRONIZED);
|
return omap_readl(TIMER_32K_SYNCHRONIZED);
|
||||||
}
|
}
|
||||||
|
@ -207,7 +207,7 @@ unsigned long long sched_clock(void)
|
||||||
{
|
{
|
||||||
unsigned long long ret;
|
unsigned long long ret;
|
||||||
|
|
||||||
ret = (unsigned long long)omap_32k_read();
|
ret = (unsigned long long)omap_32k_read(&clocksource_32k);
|
||||||
ret = (ret * clocksource_32k.mult_orig) >> clocksource_32k.shift;
|
ret = (ret * clocksource_32k.mult_orig) >> clocksource_32k.shift;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ static u32 ticks_per_jiffy;
|
||||||
/*
|
/*
|
||||||
* Clocksource handling.
|
* Clocksource handling.
|
||||||
*/
|
*/
|
||||||
static cycle_t orion_clksrc_read(void)
|
static cycle_t orion_clksrc_read(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
return 0xffffffff - readl(TIMER0_VAL);
|
return 0xffffffff - readl(TIMER0_VAL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#include <mach/pm.h>
|
#include <mach/pm.h>
|
||||||
|
|
||||||
|
|
||||||
static cycle_t read_cycle_count(void)
|
static cycle_t read_cycle_count(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
return (cycle_t)sysreg_read(COUNT);
|
return (cycle_t)sysreg_read(COUNT);
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,16 +58,11 @@ static inline unsigned long long cycles_2_ns(cycle_t cyc)
|
||||||
return (cyc * cyc2ns_scale) >> CYC2NS_SCALE_FACTOR;
|
return (cyc * cyc2ns_scale) >> CYC2NS_SCALE_FACTOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static cycle_t read_cycles(void)
|
static cycle_t read_cycles(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
return __bfin_cycles_off + (get_cycles() << __bfin_cycles_mod);
|
return __bfin_cycles_off + (get_cycles() << __bfin_cycles_mod);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long long sched_clock(void)
|
|
||||||
{
|
|
||||||
return cycles_2_ns(read_cycles());
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct clocksource clocksource_bfin = {
|
static struct clocksource clocksource_bfin = {
|
||||||
.name = "bfin_cycles",
|
.name = "bfin_cycles",
|
||||||
.rating = 350,
|
.rating = 350,
|
||||||
|
@ -77,6 +72,11 @@ static struct clocksource clocksource_bfin = {
|
||||||
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
|
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
unsigned long long sched_clock(void)
|
||||||
|
{
|
||||||
|
return cycles_2_ns(read_cycles(&clocksource_bfin));
|
||||||
|
}
|
||||||
|
|
||||||
static int __init bfin_clocksource_init(void)
|
static int __init bfin_clocksource_init(void)
|
||||||
{
|
{
|
||||||
set_cyc2ns_scale(get_cclk() / 1000);
|
set_cyc2ns_scale(get_cclk() / 1000);
|
||||||
|
|
|
@ -46,7 +46,6 @@
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
|
|
||||||
#ifdef CONFIG_BLK_DEV_INITRD
|
#ifdef CONFIG_BLK_DEV_INITRD
|
||||||
#include <linux/blk.h>
|
|
||||||
#include <asm/pgtable.h>
|
#include <asm/pgtable.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,29 @@ int __nongpreldata pcibios_last_bus = -1;
|
||||||
struct pci_bus *__nongpreldata pci_root_bus;
|
struct pci_bus *__nongpreldata pci_root_bus;
|
||||||
struct pci_ops *__nongpreldata pci_root_ops;
|
struct pci_ops *__nongpreldata pci_root_ops;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The accessible PCI window does not cover the entire CPU address space, but
|
||||||
|
* there are devices we want to access outside of that window, so we need to
|
||||||
|
* insert specific PCI bus resources instead of using the platform-level bus
|
||||||
|
* resources directly for the PCI root bus.
|
||||||
|
*
|
||||||
|
* These are configured and inserted by pcibios_init() and are attached to the
|
||||||
|
* root bus by pcibios_fixup_bus().
|
||||||
|
*/
|
||||||
|
static struct resource pci_ioport_resource = {
|
||||||
|
.name = "PCI IO",
|
||||||
|
.start = 0,
|
||||||
|
.end = IO_SPACE_LIMIT,
|
||||||
|
.flags = IORESOURCE_IO,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct resource pci_iomem_resource = {
|
||||||
|
.name = "PCI mem",
|
||||||
|
.start = 0,
|
||||||
|
.end = -1,
|
||||||
|
.flags = IORESOURCE_MEM,
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Functions for accessing PCI configuration space
|
* Functions for accessing PCI configuration space
|
||||||
*/
|
*/
|
||||||
|
@ -304,6 +327,12 @@ void __init pcibios_fixup_bus(struct pci_bus *bus)
|
||||||
#if 0
|
#if 0
|
||||||
printk("### PCIBIOS_FIXUP_BUS(%d)\n",bus->number);
|
printk("### PCIBIOS_FIXUP_BUS(%d)\n",bus->number);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (bus->number == 0) {
|
||||||
|
bus->resource[0] = &pci_ioport_resource;
|
||||||
|
bus->resource[1] = &pci_iomem_resource;
|
||||||
|
}
|
||||||
|
|
||||||
pci_read_bridge_bases(bus);
|
pci_read_bridge_bases(bus);
|
||||||
|
|
||||||
if (bus->number == 0) {
|
if (bus->number == 0) {
|
||||||
|
@ -350,28 +379,36 @@ int __init pcibios_init(void)
|
||||||
/* enable PCI arbitration */
|
/* enable PCI arbitration */
|
||||||
__reg_MB86943_pci_arbiter = MB86943_PCIARB_EN;
|
__reg_MB86943_pci_arbiter = MB86943_PCIARB_EN;
|
||||||
|
|
||||||
ioport_resource.start = (__reg_MB86943_sl_pci_io_base << 9) & 0xfffffc00;
|
pci_ioport_resource.start = (__reg_MB86943_sl_pci_io_base << 9) & 0xfffffc00;
|
||||||
ioport_resource.end = (__reg_MB86943_sl_pci_io_range << 9) | 0x3ff;
|
pci_ioport_resource.end = (__reg_MB86943_sl_pci_io_range << 9) | 0x3ff;
|
||||||
ioport_resource.end += ioport_resource.start;
|
pci_ioport_resource.end += pci_ioport_resource.start;
|
||||||
|
|
||||||
printk("PCI IO window: %08llx-%08llx\n",
|
printk("PCI IO window: %08llx-%08llx\n",
|
||||||
(unsigned long long) ioport_resource.start,
|
(unsigned long long) pci_ioport_resource.start,
|
||||||
(unsigned long long) ioport_resource.end);
|
(unsigned long long) pci_ioport_resource.end);
|
||||||
|
|
||||||
iomem_resource.start = (__reg_MB86943_sl_pci_mem_base << 9) & 0xfffffc00;
|
pci_iomem_resource.start = (__reg_MB86943_sl_pci_mem_base << 9) & 0xfffffc00;
|
||||||
|
pci_iomem_resource.end = (__reg_MB86943_sl_pci_mem_range << 9) | 0x3ff;
|
||||||
|
pci_iomem_resource.end += pci_iomem_resource.start;
|
||||||
|
|
||||||
/* Reserve somewhere to write to flush posted writes. */
|
/* Reserve somewhere to write to flush posted writes. This is used by
|
||||||
iomem_resource.start += 0x400;
|
* __flush_PCI_writes() from asm/io.h to force the write FIFO in the
|
||||||
|
* CPU-PCI bridge to flush as this doesn't happen automatically when a
|
||||||
iomem_resource.end = (__reg_MB86943_sl_pci_mem_range << 9) | 0x3ff;
|
* read is performed on the MB93090 development kit motherboard.
|
||||||
iomem_resource.end += iomem_resource.start;
|
*/
|
||||||
|
pci_iomem_resource.start += 0x400;
|
||||||
|
|
||||||
printk("PCI MEM window: %08llx-%08llx\n",
|
printk("PCI MEM window: %08llx-%08llx\n",
|
||||||
(unsigned long long) iomem_resource.start,
|
(unsigned long long) pci_iomem_resource.start,
|
||||||
(unsigned long long) iomem_resource.end);
|
(unsigned long long) pci_iomem_resource.end);
|
||||||
printk("PCI DMA memory: %08lx-%08lx\n",
|
printk("PCI DMA memory: %08lx-%08lx\n",
|
||||||
dma_coherent_mem_start, dma_coherent_mem_end);
|
dma_coherent_mem_start, dma_coherent_mem_end);
|
||||||
|
|
||||||
|
if (insert_resource(&iomem_resource, &pci_iomem_resource) < 0)
|
||||||
|
panic("Unable to insert PCI IOMEM resource\n");
|
||||||
|
if (insert_resource(&ioport_resource, &pci_ioport_resource) < 0)
|
||||||
|
panic("Unable to insert PCI IOPORT resource\n");
|
||||||
|
|
||||||
if (!pci_probe)
|
if (!pci_probe)
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
|
|
||||||
|
|
|
@ -445,7 +445,6 @@ paravirt_set_rr0_to_rr4(unsigned long val0, unsigned long val1,
|
||||||
register unsigned long ia64_intri_res asm ("r8"); \
|
register unsigned long ia64_intri_res asm ("r8"); \
|
||||||
register unsigned long __reg asm ("r8") = (reg); \
|
register unsigned long __reg asm ("r8") = (reg); \
|
||||||
\
|
\
|
||||||
BUILD_BUG_ON(!__builtin_constant_p(reg)); \
|
|
||||||
asm volatile (paravirt_alt_bundle(__PARAVIRT_BR, \
|
asm volatile (paravirt_alt_bundle(__PARAVIRT_BR, \
|
||||||
PARAVIRT_TYPE(GETREG) \
|
PARAVIRT_TYPE(GETREG) \
|
||||||
+ (reg)) \
|
+ (reg)) \
|
||||||
|
@ -464,7 +463,6 @@ paravirt_set_rr0_to_rr4(unsigned long val0, unsigned long val1,
|
||||||
register unsigned long ia64_clobber1 asm ("r8"); \
|
register unsigned long ia64_clobber1 asm ("r8"); \
|
||||||
register unsigned long ia64_clobber2 asm ("r9"); \
|
register unsigned long ia64_clobber2 asm ("r9"); \
|
||||||
\
|
\
|
||||||
BUILD_BUG_ON(!__builtin_constant_p(reg)); \
|
|
||||||
asm volatile (paravirt_alt_bundle(__PARAVIRT_BR, \
|
asm volatile (paravirt_alt_bundle(__PARAVIRT_BR, \
|
||||||
PARAVIRT_TYPE(SETREG) \
|
PARAVIRT_TYPE(SETREG) \
|
||||||
+ (reg)) \
|
+ (reg)) \
|
||||||
|
|
|
@ -21,7 +21,7 @@ void __init cyclone_setup(void)
|
||||||
|
|
||||||
static void __iomem *cyclone_mc;
|
static void __iomem *cyclone_mc;
|
||||||
|
|
||||||
static cycle_t read_cyclone(void)
|
static cycle_t read_cyclone(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
return (cycle_t)readq((void __iomem *)cyclone_mc);
|
return (cycle_t)readq((void __iomem *)cyclone_mc);
|
||||||
}
|
}
|
||||||
|
|
|
@ -225,6 +225,7 @@ smp_send_reschedule (int cpu)
|
||||||
{
|
{
|
||||||
platform_send_ipi(cpu, IA64_IPI_RESCHEDULE, IA64_IPI_DM_INT, 0);
|
platform_send_ipi(cpu, IA64_IPI_RESCHEDULE, IA64_IPI_DM_INT, 0);
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(smp_send_reschedule);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Called with preemption disabled.
|
* Called with preemption disabled.
|
||||||
|
@ -300,15 +301,12 @@ smp_flush_tlb_mm (struct mm_struct *mm)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
smp_call_function_mask(mm->cpu_vm_mask,
|
||||||
|
(void (*)(void *))local_finish_flush_tlb_mm, mm, 1);
|
||||||
|
local_irq_disable();
|
||||||
|
local_finish_flush_tlb_mm(mm);
|
||||||
|
local_irq_enable();
|
||||||
preempt_enable();
|
preempt_enable();
|
||||||
/*
|
|
||||||
* We could optimize this further by using mm->cpu_vm_mask to track which CPUs
|
|
||||||
* have been running in the address space. It's not clear that this is worth the
|
|
||||||
* trouble though: to avoid races, we have to raise the IPI on the target CPU
|
|
||||||
* anyhow, and once a CPU is interrupted, the cost of local_flush_tlb_all() is
|
|
||||||
* rather trivial.
|
|
||||||
*/
|
|
||||||
on_each_cpu((void (*)(void *))local_finish_flush_tlb_mm, mm, 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void arch_send_call_function_single_ipi(int cpu)
|
void arch_send_call_function_single_ipi(int cpu)
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
#include "fsyscall_gtod_data.h"
|
#include "fsyscall_gtod_data.h"
|
||||||
|
|
||||||
static cycle_t itc_get_cycles(void);
|
static cycle_t itc_get_cycles(struct clocksource *cs);
|
||||||
|
|
||||||
struct fsyscall_gtod_data_t fsyscall_gtod_data = {
|
struct fsyscall_gtod_data_t fsyscall_gtod_data = {
|
||||||
.lock = SEQLOCK_UNLOCKED,
|
.lock = SEQLOCK_UNLOCKED,
|
||||||
|
@ -383,7 +383,7 @@ ia64_init_itm (void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static cycle_t itc_get_cycles(void)
|
static cycle_t itc_get_cycles(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
u64 lcycle, now, ret;
|
u64 lcycle, now, ret;
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
extern unsigned long sn_rtc_cycles_per_second;
|
extern unsigned long sn_rtc_cycles_per_second;
|
||||||
|
|
||||||
static cycle_t read_sn2(void)
|
static cycle_t read_sn2(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
return (cycle_t)readq(RTC_COUNTER_ADDR);
|
return (cycle_t)readq(RTC_COUNTER_ADDR);
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,7 +75,7 @@ static struct irqaction m68328_timer_irq = {
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
static cycle_t m68328_read_clk(void)
|
static cycle_t m68328_read_clk(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
u32 cycles;
|
u32 cycles;
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
#define DMA_DTMR_CLK_DIV_16 (2 << 1)
|
#define DMA_DTMR_CLK_DIV_16 (2 << 1)
|
||||||
#define DMA_DTMR_ENABLE (1 << 0)
|
#define DMA_DTMR_ENABLE (1 << 0)
|
||||||
|
|
||||||
static cycle_t cf_dt_get_cycles(void)
|
static cycle_t cf_dt_get_cycles(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
return __raw_readl(DTCN0);
|
return __raw_readl(DTCN0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,7 +125,7 @@ static struct irqaction pit_irq = {
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
static cycle_t pit_read_clk(void)
|
static cycle_t pit_read_clk(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
u32 cycles;
|
u32 cycles;
|
||||||
|
|
|
@ -78,7 +78,7 @@ static struct irqaction mcftmr_timer_irq = {
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
static cycle_t mcftmr_read_clk(void)
|
static cycle_t mcftmr_read_clk(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
u32 cycles;
|
u32 cycles;
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
static struct txx9_tmr_reg __iomem *txx9_cs_tmrptr;
|
static struct txx9_tmr_reg __iomem *txx9_cs_tmrptr;
|
||||||
|
|
||||||
static cycle_t txx9_cs_read(void)
|
static cycle_t txx9_cs_read(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
return __raw_readl(&txx9_cs_tmrptr->trr);
|
return __raw_readl(&txx9_cs_tmrptr->trr);
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
#include <asm/sibyte/sb1250.h>
|
#include <asm/sibyte/sb1250.h>
|
||||||
|
|
||||||
static cycle_t bcm1480_hpt_read(void)
|
static cycle_t bcm1480_hpt_read(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
return (cycle_t) __raw_readq(IOADDR(A_SCD_ZBBUS_CYCLE_COUNT));
|
return (cycle_t) __raw_readq(IOADDR(A_SCD_ZBBUS_CYCLE_COUNT));
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#include <asm/dec/ioasic.h>
|
#include <asm/dec/ioasic.h>
|
||||||
#include <asm/dec/ioasic_addrs.h>
|
#include <asm/dec/ioasic_addrs.h>
|
||||||
|
|
||||||
static cycle_t dec_ioasic_hpt_read(void)
|
static cycle_t dec_ioasic_hpt_read(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
return ioasic_read(IO_REG_FCTR);
|
return ioasic_read(IO_REG_FCTR);
|
||||||
}
|
}
|
||||||
|
@ -47,13 +47,13 @@ void __init dec_ioasic_clocksource_init(void)
|
||||||
while (!ds1287_timer_state())
|
while (!ds1287_timer_state())
|
||||||
;
|
;
|
||||||
|
|
||||||
start = dec_ioasic_hpt_read();
|
start = dec_ioasic_hpt_read(&clocksource_dec);
|
||||||
|
|
||||||
while (i--)
|
while (i--)
|
||||||
while (!ds1287_timer_state())
|
while (!ds1287_timer_state())
|
||||||
;
|
;
|
||||||
|
|
||||||
end = dec_ioasic_hpt_read();
|
end = dec_ioasic_hpt_read(&clocksource_dec);
|
||||||
|
|
||||||
freq = (end - start) * 10;
|
freq = (end - start) * 10;
|
||||||
printk(KERN_INFO "I/O ASIC clock frequency %dHz\n", freq);
|
printk(KERN_INFO "I/O ASIC clock frequency %dHz\n", freq);
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
#include <asm/time.h>
|
#include <asm/time.h>
|
||||||
|
|
||||||
static cycle_t c0_hpt_read(void)
|
static cycle_t c0_hpt_read(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
return read_c0_count();
|
return read_c0_count();
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
* The HPT is free running from SB1250_HPT_VALUE down to 0 then starts over
|
* The HPT is free running from SB1250_HPT_VALUE down to 0 then starts over
|
||||||
* again.
|
* again.
|
||||||
*/
|
*/
|
||||||
static cycle_t sb1250_hpt_read(void)
|
static cycle_t sb1250_hpt_read(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
unsigned int count;
|
unsigned int count;
|
||||||
|
|
||||||
|
|
|
@ -128,7 +128,7 @@ void __init setup_pit_timer(void)
|
||||||
* to just read by itself. So use jiffies to emulate a free
|
* to just read by itself. So use jiffies to emulate a free
|
||||||
* running counter:
|
* running counter:
|
||||||
*/
|
*/
|
||||||
static cycle_t pit_read(void)
|
static cycle_t pit_read(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
int count;
|
int count;
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
static unsigned long cpj;
|
static unsigned long cpj;
|
||||||
|
|
||||||
static cycle_t hpt_read(void)
|
static cycle_t hpt_read(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
return read_c0_count2();
|
return read_c0_count2();
|
||||||
}
|
}
|
||||||
|
|
|
@ -159,7 +159,7 @@ static void __init hub_rt_clock_event_global_init(void)
|
||||||
setup_irq(irq, &hub_rt_irqaction);
|
setup_irq(irq, &hub_rt_irqaction);
|
||||||
}
|
}
|
||||||
|
|
||||||
static cycle_t hub_rt_read(void)
|
static cycle_t hub_rt_read(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
return REMOTE_HUB_L(cputonasid(0), PI_RT_COUNT);
|
return REMOTE_HUB_L(cputonasid(0), PI_RT_COUNT);
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,7 +77,7 @@
|
||||||
#include <linux/clockchips.h>
|
#include <linux/clockchips.h>
|
||||||
#include <linux/clocksource.h>
|
#include <linux/clocksource.h>
|
||||||
|
|
||||||
static cycle_t rtc_read(void);
|
static cycle_t rtc_read(struct clocksource *);
|
||||||
static struct clocksource clocksource_rtc = {
|
static struct clocksource clocksource_rtc = {
|
||||||
.name = "rtc",
|
.name = "rtc",
|
||||||
.rating = 400,
|
.rating = 400,
|
||||||
|
@ -88,7 +88,7 @@ static struct clocksource clocksource_rtc = {
|
||||||
.read = rtc_read,
|
.read = rtc_read,
|
||||||
};
|
};
|
||||||
|
|
||||||
static cycle_t timebase_read(void);
|
static cycle_t timebase_read(struct clocksource *);
|
||||||
static struct clocksource clocksource_timebase = {
|
static struct clocksource clocksource_timebase = {
|
||||||
.name = "timebase",
|
.name = "timebase",
|
||||||
.rating = 400,
|
.rating = 400,
|
||||||
|
@ -766,12 +766,12 @@ unsigned long read_persistent_clock(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* clocksource code */
|
/* clocksource code */
|
||||||
static cycle_t rtc_read(void)
|
static cycle_t rtc_read(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
return (cycle_t)get_rtc();
|
return (cycle_t)get_rtc();
|
||||||
}
|
}
|
||||||
|
|
||||||
static cycle_t timebase_read(void)
|
static cycle_t timebase_read(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
return (cycle_t)get_tb();
|
return (cycle_t)get_tb();
|
||||||
}
|
}
|
||||||
|
|
|
@ -702,20 +702,12 @@ asmlinkage long sys32_fstatat64(unsigned int dfd, char __user *filename,
|
||||||
struct stat64_emu31 __user* statbuf, int flag)
|
struct stat64_emu31 __user* statbuf, int flag)
|
||||||
{
|
{
|
||||||
struct kstat stat;
|
struct kstat stat;
|
||||||
int error = -EINVAL;
|
int error;
|
||||||
|
|
||||||
if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0)
|
error = vfs_fstatat(dfd, filename, &stat, flag);
|
||||||
goto out;
|
if (error)
|
||||||
|
|
||||||
if (flag & AT_SYMLINK_NOFOLLOW)
|
|
||||||
error = vfs_lstat_fd(dfd, filename, &stat);
|
|
||||||
else
|
|
||||||
error = vfs_stat_fd(dfd, filename, &stat);
|
|
||||||
|
|
||||||
if (!error)
|
|
||||||
error = cp_stat64(statbuf, &stat);
|
|
||||||
out:
|
|
||||||
return error;
|
return error;
|
||||||
|
return cp_stat64(statbuf, &stat);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -201,7 +201,7 @@ unsigned long read_persistent_clock(void)
|
||||||
return ts.tv_sec;
|
return ts.tv_sec;
|
||||||
}
|
}
|
||||||
|
|
||||||
static cycle_t read_tod_clock(void)
|
static cycle_t read_tod_clock(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
return get_clock();
|
return get_clock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,6 +63,15 @@ asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
|
||||||
unsigned long prot, unsigned long flags,
|
unsigned long prot, unsigned long flags,
|
||||||
unsigned long fd, unsigned long pgoff)
|
unsigned long fd, unsigned long pgoff)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* The shift for mmap2 is constant, regardless of PAGE_SIZE
|
||||||
|
* setting.
|
||||||
|
*/
|
||||||
|
if (pgoff & ((1 << (PAGE_SHIFT - 12)) - 1))
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
pgoff >>= PAGE_SHIFT - 12;
|
||||||
|
|
||||||
return do_mmap2(addr, len, prot, flags, fd, pgoff);
|
return do_mmap2(addr, len, prot, flags, fd, pgoff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -209,7 +209,7 @@ unsigned long long sched_clock(void)
|
||||||
if (!clocksource_sh.rating)
|
if (!clocksource_sh.rating)
|
||||||
return (unsigned long long)jiffies * (NSEC_PER_SEC / HZ);
|
return (unsigned long long)jiffies * (NSEC_PER_SEC / HZ);
|
||||||
|
|
||||||
cycles = clocksource_sh.read();
|
cycles = clocksource_sh.read(&clocksource_sh);
|
||||||
return cyc2ns(&clocksource_sh, cycles);
|
return cyc2ns(&clocksource_sh, cycles);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -81,7 +81,7 @@ static int tmu_timer_stop(void)
|
||||||
*/
|
*/
|
||||||
static int tmus_are_scaled;
|
static int tmus_are_scaled;
|
||||||
|
|
||||||
static cycle_t tmu_timer_read(void)
|
static cycle_t tmu_timer_read(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
return ((cycle_t)(~_tmu_read(TMU1)))<<tmus_are_scaled;
|
return ((cycle_t)(~_tmu_read(TMU1)))<<tmus_are_scaled;
|
||||||
}
|
}
|
||||||
|
|
|
@ -206,21 +206,12 @@ asmlinkage long compat_sys_fstatat64(unsigned int dfd, char __user *filename,
|
||||||
struct compat_stat64 __user * statbuf, int flag)
|
struct compat_stat64 __user * statbuf, int flag)
|
||||||
{
|
{
|
||||||
struct kstat stat;
|
struct kstat stat;
|
||||||
int error = -EINVAL;
|
int error;
|
||||||
|
|
||||||
if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0)
|
error = vfs_fstatat(dfd, filename, &stat, flag);
|
||||||
goto out;
|
if (error)
|
||||||
|
|
||||||
if (flag & AT_SYMLINK_NOFOLLOW)
|
|
||||||
error = vfs_lstat_fd(dfd, filename, &stat);
|
|
||||||
else
|
|
||||||
error = vfs_stat_fd(dfd, filename, &stat);
|
|
||||||
|
|
||||||
if (!error)
|
|
||||||
error = cp_compat_stat64(&stat, statbuf);
|
|
||||||
|
|
||||||
out:
|
|
||||||
return error;
|
return error;
|
||||||
|
return cp_compat_stat64(&stat, statbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
asmlinkage long compat_sys_sysfs(int option, u32 arg1, u32 arg2)
|
asmlinkage long compat_sys_sysfs(int option, u32 arg1, u32 arg2)
|
||||||
|
|
|
@ -814,6 +814,11 @@ void udelay(unsigned long usecs)
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(udelay);
|
EXPORT_SYMBOL(udelay);
|
||||||
|
|
||||||
|
static cycle_t clocksource_tick_read(struct clocksource *cs)
|
||||||
|
{
|
||||||
|
return tick_ops->get_tick();
|
||||||
|
}
|
||||||
|
|
||||||
void __init time_init(void)
|
void __init time_init(void)
|
||||||
{
|
{
|
||||||
unsigned long freq = sparc64_init_timers();
|
unsigned long freq = sparc64_init_timers();
|
||||||
|
@ -827,7 +832,7 @@ void __init time_init(void)
|
||||||
clocksource_tick.mult =
|
clocksource_tick.mult =
|
||||||
clocksource_hz2mult(freq,
|
clocksource_hz2mult(freq,
|
||||||
clocksource_tick.shift);
|
clocksource_tick.shift);
|
||||||
clocksource_tick.read = tick_ops->get_tick;
|
clocksource_tick.read = clocksource_tick_read;
|
||||||
|
|
||||||
printk("clocksource: mult[%x] shift[%d]\n",
|
printk("clocksource: mult[%x] shift[%d]\n",
|
||||||
clocksource_tick.mult, clocksource_tick.shift);
|
clocksource_tick.mult, clocksource_tick.shift);
|
||||||
|
|
|
@ -36,7 +36,7 @@ source "drivers/leds/Kconfig"
|
||||||
|
|
||||||
#This is just to shut up some Kconfig warnings, so no prompt.
|
#This is just to shut up some Kconfig warnings, so no prompt.
|
||||||
config INPUT
|
config INPUT
|
||||||
bool
|
tristate
|
||||||
default n
|
default n
|
||||||
|
|
||||||
source "arch/um/Kconfig.debug"
|
source "arch/um/Kconfig.debug"
|
||||||
|
|
|
@ -65,7 +65,7 @@ static irqreturn_t um_timer(int irq, void *dev)
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
static cycle_t itimer_read(void)
|
static cycle_t itimer_read(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
return os_nsecs() / 1000;
|
return os_nsecs() / 1000;
|
||||||
}
|
}
|
||||||
|
|
|
@ -129,21 +129,12 @@ asmlinkage long sys32_fstatat(unsigned int dfd, char __user *filename,
|
||||||
struct stat64 __user *statbuf, int flag)
|
struct stat64 __user *statbuf, int flag)
|
||||||
{
|
{
|
||||||
struct kstat stat;
|
struct kstat stat;
|
||||||
int error = -EINVAL;
|
int error;
|
||||||
|
|
||||||
if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0)
|
error = vfs_fstatat(dfd, filename, &stat, flag);
|
||||||
goto out;
|
if (error)
|
||||||
|
|
||||||
if (flag & AT_SYMLINK_NOFOLLOW)
|
|
||||||
error = vfs_lstat_fd(dfd, filename, &stat);
|
|
||||||
else
|
|
||||||
error = vfs_stat_fd(dfd, filename, &stat);
|
|
||||||
|
|
||||||
if (!error)
|
|
||||||
error = cp_stat64(statbuf, &stat);
|
|
||||||
|
|
||||||
out:
|
|
||||||
return error;
|
return error;
|
||||||
|
return cp_stat64(statbuf, &stat);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
#define LHCALL_FLUSH_ASYNC 0
|
#define LHCALL_FLUSH_ASYNC 0
|
||||||
#define LHCALL_LGUEST_INIT 1
|
#define LHCALL_LGUEST_INIT 1
|
||||||
#define LHCALL_SHUTDOWN 2
|
#define LHCALL_SHUTDOWN 2
|
||||||
#define LHCALL_LOAD_GDT 3
|
|
||||||
#define LHCALL_NEW_PGTABLE 4
|
#define LHCALL_NEW_PGTABLE 4
|
||||||
#define LHCALL_FLUSH_TLB 5
|
#define LHCALL_FLUSH_TLB 5
|
||||||
#define LHCALL_LOAD_IDT_ENTRY 6
|
#define LHCALL_LOAD_IDT_ENTRY 6
|
||||||
|
@ -17,6 +16,7 @@
|
||||||
#define LHCALL_SET_PMD 15
|
#define LHCALL_SET_PMD 15
|
||||||
#define LHCALL_LOAD_TLS 16
|
#define LHCALL_LOAD_TLS 16
|
||||||
#define LHCALL_NOTIFY 17
|
#define LHCALL_NOTIFY 17
|
||||||
|
#define LHCALL_LOAD_GDT_ENTRY 18
|
||||||
|
|
||||||
#define LGUEST_TRAP_ENTRY 0x1F
|
#define LGUEST_TRAP_ENTRY 0x1F
|
||||||
|
|
||||||
|
|
|
@ -722,7 +722,7 @@ static int hpet_cpuhp_notify(struct notifier_block *n,
|
||||||
/*
|
/*
|
||||||
* Clock source related code
|
* Clock source related code
|
||||||
*/
|
*/
|
||||||
static cycle_t read_hpet(void)
|
static cycle_t read_hpet(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
return (cycle_t)hpet_readl(HPET_COUNTER);
|
return (cycle_t)hpet_readl(HPET_COUNTER);
|
||||||
}
|
}
|
||||||
|
@ -756,7 +756,7 @@ static int hpet_clocksource_register(void)
|
||||||
hpet_restart_counter();
|
hpet_restart_counter();
|
||||||
|
|
||||||
/* Verify whether hpet counter works */
|
/* Verify whether hpet counter works */
|
||||||
t1 = read_hpet();
|
t1 = hpet_readl(HPET_COUNTER);
|
||||||
rdtscll(start);
|
rdtscll(start);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -770,7 +770,7 @@ static int hpet_clocksource_register(void)
|
||||||
rdtscll(now);
|
rdtscll(now);
|
||||||
} while ((now - start) < 200000UL);
|
} while ((now - start) < 200000UL);
|
||||||
|
|
||||||
if (t1 == read_hpet()) {
|
if (t1 == hpet_readl(HPET_COUNTER)) {
|
||||||
printk(KERN_WARNING
|
printk(KERN_WARNING
|
||||||
"HPET counter not counting. HPET disabled\n");
|
"HPET counter not counting. HPET disabled\n");
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
|
@ -129,7 +129,7 @@ void __init setup_pit_timer(void)
|
||||||
* to just read by itself. So use jiffies to emulate a free
|
* to just read by itself. So use jiffies to emulate a free
|
||||||
* running counter:
|
* running counter:
|
||||||
*/
|
*/
|
||||||
static cycle_t pit_read(void)
|
static cycle_t pit_read(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
static int old_count;
|
static int old_count;
|
||||||
static u32 old_jifs;
|
static u32 old_jifs;
|
||||||
|
|
|
@ -77,6 +77,11 @@ static cycle_t kvm_clock_read(void)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static cycle_t kvm_clock_get_cycles(struct clocksource *cs)
|
||||||
|
{
|
||||||
|
return kvm_clock_read();
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If we don't do that, there is the possibility that the guest
|
* If we don't do that, there is the possibility that the guest
|
||||||
* will calibrate under heavy load - thus, getting a lower lpj -
|
* will calibrate under heavy load - thus, getting a lower lpj -
|
||||||
|
@ -107,7 +112,7 @@ static void kvm_get_preset_lpj(void)
|
||||||
|
|
||||||
static struct clocksource kvm_clock = {
|
static struct clocksource kvm_clock = {
|
||||||
.name = "kvm-clock",
|
.name = "kvm-clock",
|
||||||
.read = kvm_clock_read,
|
.read = kvm_clock_get_cycles,
|
||||||
.rating = 400,
|
.rating = 400,
|
||||||
.mask = CLOCKSOURCE_MASK(64),
|
.mask = CLOCKSOURCE_MASK(64),
|
||||||
.mult = 1 << KVM_SCALE,
|
.mult = 1 << KVM_SCALE,
|
||||||
|
|
|
@ -699,7 +699,7 @@ static struct clocksource clocksource_tsc;
|
||||||
* code, which is necessary to support wrapping clocksources like pm
|
* code, which is necessary to support wrapping clocksources like pm
|
||||||
* timer.
|
* timer.
|
||||||
*/
|
*/
|
||||||
static cycle_t read_tsc(void)
|
static cycle_t read_tsc(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
cycle_t ret = (cycle_t)get_cycles();
|
cycle_t ret = (cycle_t)get_cycles();
|
||||||
|
|
||||||
|
|
|
@ -283,7 +283,7 @@ void __devinit vmi_time_ap_init(void)
|
||||||
/** vmi clocksource */
|
/** vmi clocksource */
|
||||||
static struct clocksource clocksource_vmi;
|
static struct clocksource clocksource_vmi;
|
||||||
|
|
||||||
static cycle_t read_real_cycles(void)
|
static cycle_t read_real_cycles(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
cycle_t ret = (cycle_t)vmi_timer_ops.get_cycle_counter(VMI_CYCLES_REAL);
|
cycle_t ret = (cycle_t)vmi_timer_ops.get_cycle_counter(VMI_CYCLES_REAL);
|
||||||
return max(ret, clocksource_vmi.cycle_last);
|
return max(ret, clocksource_vmi.cycle_last);
|
||||||
|
|
|
@ -273,15 +273,15 @@ static void lguest_load_idt(const struct desc_ptr *desc)
|
||||||
* controls the entire thing and the Guest asks it to make changes using the
|
* controls the entire thing and the Guest asks it to make changes using the
|
||||||
* LOAD_GDT hypercall.
|
* LOAD_GDT hypercall.
|
||||||
*
|
*
|
||||||
* This is the opposite of the IDT code where we have a LOAD_IDT_ENTRY
|
* This is the exactly like the IDT code.
|
||||||
* hypercall and use that repeatedly to load a new IDT. I don't think it
|
|
||||||
* really matters, but wouldn't it be nice if they were the same? Wouldn't
|
|
||||||
* it be even better if you were the one to send the patch to fix it?
|
|
||||||
*/
|
*/
|
||||||
static void lguest_load_gdt(const struct desc_ptr *desc)
|
static void lguest_load_gdt(const struct desc_ptr *desc)
|
||||||
{
|
{
|
||||||
BUG_ON((desc->size + 1) / 8 != GDT_ENTRIES);
|
unsigned int i;
|
||||||
kvm_hypercall2(LHCALL_LOAD_GDT, __pa(desc->address), GDT_ENTRIES);
|
struct desc_struct *gdt = (void *)desc->address;
|
||||||
|
|
||||||
|
for (i = 0; i < (desc->size+1)/8; i++)
|
||||||
|
kvm_hypercall3(LHCALL_LOAD_GDT_ENTRY, i, gdt[i].a, gdt[i].b);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* For a single GDT entry which changes, we do the lazy thing: alter our GDT,
|
/* For a single GDT entry which changes, we do the lazy thing: alter our GDT,
|
||||||
|
@ -291,7 +291,9 @@ static void lguest_write_gdt_entry(struct desc_struct *dt, int entrynum,
|
||||||
const void *desc, int type)
|
const void *desc, int type)
|
||||||
{
|
{
|
||||||
native_write_gdt_entry(dt, entrynum, desc, type);
|
native_write_gdt_entry(dt, entrynum, desc, type);
|
||||||
kvm_hypercall2(LHCALL_LOAD_GDT, __pa(dt), GDT_ENTRIES);
|
/* Tell Host about this new entry. */
|
||||||
|
kvm_hypercall3(LHCALL_LOAD_GDT_ENTRY, entrynum,
|
||||||
|
dt[entrynum].a, dt[entrynum].b);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* OK, I lied. There are three "thread local storage" GDT entries which change
|
/* OK, I lied. There are three "thread local storage" GDT entries which change
|
||||||
|
@ -661,7 +663,7 @@ static unsigned long lguest_tsc_khz(void)
|
||||||
|
|
||||||
/* If we can't use the TSC, the kernel falls back to our lower-priority
|
/* If we can't use the TSC, the kernel falls back to our lower-priority
|
||||||
* "lguest_clock", where we read the time value given to us by the Host. */
|
* "lguest_clock", where we read the time value given to us by the Host. */
|
||||||
static cycle_t lguest_clock_read(void)
|
static cycle_t lguest_clock_read(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
unsigned long sec, nsec;
|
unsigned long sec, nsec;
|
||||||
|
|
||||||
|
|
|
@ -213,6 +213,11 @@ cycle_t xen_clocksource_read(void)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static cycle_t xen_clocksource_get_cycles(struct clocksource *cs)
|
||||||
|
{
|
||||||
|
return xen_clocksource_read();
|
||||||
|
}
|
||||||
|
|
||||||
static void xen_read_wallclock(struct timespec *ts)
|
static void xen_read_wallclock(struct timespec *ts)
|
||||||
{
|
{
|
||||||
struct shared_info *s = HYPERVISOR_shared_info;
|
struct shared_info *s = HYPERVISOR_shared_info;
|
||||||
|
@ -241,7 +246,7 @@ int xen_set_wallclock(unsigned long now)
|
||||||
static struct clocksource xen_clocksource __read_mostly = {
|
static struct clocksource xen_clocksource __read_mostly = {
|
||||||
.name = "xen",
|
.name = "xen",
|
||||||
.rating = 400,
|
.rating = 400,
|
||||||
.read = xen_clocksource_read,
|
.read = xen_clocksource_get_cycles,
|
||||||
.mask = ~0,
|
.mask = ~0,
|
||||||
.mult = 1<<XEN_SHIFT, /* time directly in nanoseconds */
|
.mult = 1<<XEN_SHIFT, /* time directly in nanoseconds */
|
||||||
.shift = XEN_SHIFT,
|
.shift = XEN_SHIFT,
|
||||||
|
|
|
@ -300,9 +300,9 @@ static int acpi_suspend_state_valid(suspend_state_t pm_state)
|
||||||
static struct platform_suspend_ops acpi_suspend_ops = {
|
static struct platform_suspend_ops acpi_suspend_ops = {
|
||||||
.valid = acpi_suspend_state_valid,
|
.valid = acpi_suspend_state_valid,
|
||||||
.begin = acpi_suspend_begin,
|
.begin = acpi_suspend_begin,
|
||||||
.prepare = acpi_pm_prepare,
|
.prepare_late = acpi_pm_prepare,
|
||||||
.enter = acpi_suspend_enter,
|
.enter = acpi_suspend_enter,
|
||||||
.finish = acpi_pm_finish,
|
.wake = acpi_pm_finish,
|
||||||
.end = acpi_pm_end,
|
.end = acpi_pm_end,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -328,9 +328,9 @@ static int acpi_suspend_begin_old(suspend_state_t pm_state)
|
||||||
static struct platform_suspend_ops acpi_suspend_ops_old = {
|
static struct platform_suspend_ops acpi_suspend_ops_old = {
|
||||||
.valid = acpi_suspend_state_valid,
|
.valid = acpi_suspend_state_valid,
|
||||||
.begin = acpi_suspend_begin_old,
|
.begin = acpi_suspend_begin_old,
|
||||||
.prepare = acpi_pm_disable_gpes,
|
.prepare_late = acpi_pm_disable_gpes,
|
||||||
.enter = acpi_suspend_enter,
|
.enter = acpi_suspend_enter,
|
||||||
.finish = acpi_pm_finish,
|
.wake = acpi_pm_finish,
|
||||||
.end = acpi_pm_end,
|
.end = acpi_pm_end,
|
||||||
.recover = acpi_pm_finish,
|
.recover = acpi_pm_finish,
|
||||||
};
|
};
|
||||||
|
|
|
@ -891,7 +891,8 @@ int device_add(struct device *dev)
|
||||||
set_dev_node(dev, dev_to_node(parent));
|
set_dev_node(dev, dev_to_node(parent));
|
||||||
|
|
||||||
/* first, register with generic layer. */
|
/* first, register with generic layer. */
|
||||||
error = kobject_add(&dev->kobj, dev->kobj.parent, "%s", dev_name(dev));
|
/* we require the name to be set before, and pass NULL */
|
||||||
|
error = kobject_add(&dev->kobj, dev->kobj.parent, NULL);
|
||||||
if (error)
|
if (error)
|
||||||
goto Error;
|
goto Error;
|
||||||
|
|
||||||
|
|
|
@ -1226,7 +1226,7 @@ int agp_generic_alloc_pages(struct agp_bridge_data *bridge, struct agp_memory *m
|
||||||
int i, ret = -ENOMEM;
|
int i, ret = -ENOMEM;
|
||||||
|
|
||||||
for (i = 0; i < num_pages; i++) {
|
for (i = 0; i < num_pages; i++) {
|
||||||
page = alloc_page(GFP_KERNEL | GFP_DMA32);
|
page = alloc_page(GFP_KERNEL | GFP_DMA32 | __GFP_ZERO);
|
||||||
/* agp_free_memory() needs gart address */
|
/* agp_free_memory() needs gart address */
|
||||||
if (page == NULL)
|
if (page == NULL)
|
||||||
goto out;
|
goto out;
|
||||||
|
@ -1257,7 +1257,7 @@ void *agp_generic_alloc_page(struct agp_bridge_data *bridge)
|
||||||
{
|
{
|
||||||
struct page * page;
|
struct page * page;
|
||||||
|
|
||||||
page = alloc_page(GFP_KERNEL | GFP_DMA32);
|
page = alloc_page(GFP_KERNEL | GFP_DMA32 | __GFP_ZERO);
|
||||||
if (page == NULL)
|
if (page == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ static u32 hpet_nhpet, hpet_max_freq = HPET_USER_FREQ;
|
||||||
#ifdef CONFIG_IA64
|
#ifdef CONFIG_IA64
|
||||||
static void __iomem *hpet_mctr;
|
static void __iomem *hpet_mctr;
|
||||||
|
|
||||||
static cycle_t read_hpet(void)
|
static cycle_t read_hpet(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
return (cycle_t)read_counter((void __iomem *)hpet_mctr);
|
return (cycle_t)read_counter((void __iomem *)hpet_mctr);
|
||||||
}
|
}
|
||||||
|
|
|
@ -285,6 +285,11 @@ enum ipmi_stat_indexes {
|
||||||
/* Events that were received with the proper format. */
|
/* Events that were received with the proper format. */
|
||||||
IPMI_STAT_events,
|
IPMI_STAT_events,
|
||||||
|
|
||||||
|
/* Retransmissions on IPMB that failed. */
|
||||||
|
IPMI_STAT_dropped_rexmit_ipmb_commands,
|
||||||
|
|
||||||
|
/* Retransmissions on LAN that failed. */
|
||||||
|
IPMI_STAT_dropped_rexmit_lan_commands,
|
||||||
|
|
||||||
/* This *must* remain last, add new values above this. */
|
/* This *must* remain last, add new values above this. */
|
||||||
IPMI_NUM_STATS
|
IPMI_NUM_STATS
|
||||||
|
@ -445,6 +450,20 @@ static DEFINE_MUTEX(smi_watchers_mutex);
|
||||||
#define ipmi_get_stat(intf, stat) \
|
#define ipmi_get_stat(intf, stat) \
|
||||||
((unsigned int) atomic_read(&(intf)->stats[IPMI_STAT_ ## stat]))
|
((unsigned int) atomic_read(&(intf)->stats[IPMI_STAT_ ## stat]))
|
||||||
|
|
||||||
|
static int is_lan_addr(struct ipmi_addr *addr)
|
||||||
|
{
|
||||||
|
return addr->addr_type == IPMI_LAN_ADDR_TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int is_ipmb_addr(struct ipmi_addr *addr)
|
||||||
|
{
|
||||||
|
return addr->addr_type == IPMI_IPMB_ADDR_TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int is_ipmb_bcast_addr(struct ipmi_addr *addr)
|
||||||
|
{
|
||||||
|
return addr->addr_type == IPMI_IPMB_BROADCAST_ADDR_TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
static void free_recv_msg_list(struct list_head *q)
|
static void free_recv_msg_list(struct list_head *q)
|
||||||
{
|
{
|
||||||
|
@ -601,8 +620,7 @@ ipmi_addr_equal(struct ipmi_addr *addr1, struct ipmi_addr *addr2)
|
||||||
return (smi_addr1->lun == smi_addr2->lun);
|
return (smi_addr1->lun == smi_addr2->lun);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((addr1->addr_type == IPMI_IPMB_ADDR_TYPE)
|
if (is_ipmb_addr(addr1) || is_ipmb_bcast_addr(addr1)) {
|
||||||
|| (addr1->addr_type == IPMI_IPMB_BROADCAST_ADDR_TYPE)) {
|
|
||||||
struct ipmi_ipmb_addr *ipmb_addr1
|
struct ipmi_ipmb_addr *ipmb_addr1
|
||||||
= (struct ipmi_ipmb_addr *) addr1;
|
= (struct ipmi_ipmb_addr *) addr1;
|
||||||
struct ipmi_ipmb_addr *ipmb_addr2
|
struct ipmi_ipmb_addr *ipmb_addr2
|
||||||
|
@ -612,7 +630,7 @@ ipmi_addr_equal(struct ipmi_addr *addr1, struct ipmi_addr *addr2)
|
||||||
&& (ipmb_addr1->lun == ipmb_addr2->lun));
|
&& (ipmb_addr1->lun == ipmb_addr2->lun));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (addr1->addr_type == IPMI_LAN_ADDR_TYPE) {
|
if (is_lan_addr(addr1)) {
|
||||||
struct ipmi_lan_addr *lan_addr1
|
struct ipmi_lan_addr *lan_addr1
|
||||||
= (struct ipmi_lan_addr *) addr1;
|
= (struct ipmi_lan_addr *) addr1;
|
||||||
struct ipmi_lan_addr *lan_addr2
|
struct ipmi_lan_addr *lan_addr2
|
||||||
|
@ -644,14 +662,13 @@ int ipmi_validate_addr(struct ipmi_addr *addr, int len)
|
||||||
|| (addr->channel < 0))
|
|| (addr->channel < 0))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if ((addr->addr_type == IPMI_IPMB_ADDR_TYPE)
|
if (is_ipmb_addr(addr) || is_ipmb_bcast_addr(addr)) {
|
||||||
|| (addr->addr_type == IPMI_IPMB_BROADCAST_ADDR_TYPE)) {
|
|
||||||
if (len < sizeof(struct ipmi_ipmb_addr))
|
if (len < sizeof(struct ipmi_ipmb_addr))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (addr->addr_type == IPMI_LAN_ADDR_TYPE) {
|
if (is_lan_addr(addr)) {
|
||||||
if (len < sizeof(struct ipmi_lan_addr))
|
if (len < sizeof(struct ipmi_lan_addr))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1503,8 +1520,7 @@ static int i_ipmi_request(ipmi_user_t user,
|
||||||
memcpy(&(smi_msg->data[2]), msg->data, msg->data_len);
|
memcpy(&(smi_msg->data[2]), msg->data, msg->data_len);
|
||||||
smi_msg->data_size = msg->data_len + 2;
|
smi_msg->data_size = msg->data_len + 2;
|
||||||
ipmi_inc_stat(intf, sent_local_commands);
|
ipmi_inc_stat(intf, sent_local_commands);
|
||||||
} else if ((addr->addr_type == IPMI_IPMB_ADDR_TYPE)
|
} else if (is_ipmb_addr(addr) || is_ipmb_bcast_addr(addr)) {
|
||||||
|| (addr->addr_type == IPMI_IPMB_BROADCAST_ADDR_TYPE)) {
|
|
||||||
struct ipmi_ipmb_addr *ipmb_addr;
|
struct ipmi_ipmb_addr *ipmb_addr;
|
||||||
unsigned char ipmb_seq;
|
unsigned char ipmb_seq;
|
||||||
long seqid;
|
long seqid;
|
||||||
|
@ -1583,8 +1599,6 @@ static int i_ipmi_request(ipmi_user_t user,
|
||||||
|
|
||||||
spin_lock_irqsave(&(intf->seq_lock), flags);
|
spin_lock_irqsave(&(intf->seq_lock), flags);
|
||||||
|
|
||||||
ipmi_inc_stat(intf, sent_ipmb_commands);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create a sequence number with a 1 second
|
* Create a sequence number with a 1 second
|
||||||
* timeout and 4 retries.
|
* timeout and 4 retries.
|
||||||
|
@ -1606,6 +1620,8 @@ static int i_ipmi_request(ipmi_user_t user,
|
||||||
goto out_err;
|
goto out_err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ipmi_inc_stat(intf, sent_ipmb_commands);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Store the sequence number in the message,
|
* Store the sequence number in the message,
|
||||||
* so that when the send message response
|
* so that when the send message response
|
||||||
|
@ -1635,7 +1651,7 @@ static int i_ipmi_request(ipmi_user_t user,
|
||||||
*/
|
*/
|
||||||
spin_unlock_irqrestore(&(intf->seq_lock), flags);
|
spin_unlock_irqrestore(&(intf->seq_lock), flags);
|
||||||
}
|
}
|
||||||
} else if (addr->addr_type == IPMI_LAN_ADDR_TYPE) {
|
} else if (is_lan_addr(addr)) {
|
||||||
struct ipmi_lan_addr *lan_addr;
|
struct ipmi_lan_addr *lan_addr;
|
||||||
unsigned char ipmb_seq;
|
unsigned char ipmb_seq;
|
||||||
long seqid;
|
long seqid;
|
||||||
|
@ -1696,8 +1712,6 @@ static int i_ipmi_request(ipmi_user_t user,
|
||||||
|
|
||||||
spin_lock_irqsave(&(intf->seq_lock), flags);
|
spin_lock_irqsave(&(intf->seq_lock), flags);
|
||||||
|
|
||||||
ipmi_inc_stat(intf, sent_lan_commands);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create a sequence number with a 1 second
|
* Create a sequence number with a 1 second
|
||||||
* timeout and 4 retries.
|
* timeout and 4 retries.
|
||||||
|
@ -1719,6 +1733,8 @@ static int i_ipmi_request(ipmi_user_t user,
|
||||||
goto out_err;
|
goto out_err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ipmi_inc_stat(intf, sent_lan_commands);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Store the sequence number in the message,
|
* Store the sequence number in the message,
|
||||||
* so that when the send message response
|
* so that when the send message response
|
||||||
|
@ -1937,6 +1953,10 @@ static int stat_file_read_proc(char *page, char **start, off_t off,
|
||||||
ipmi_get_stat(intf, invalid_events));
|
ipmi_get_stat(intf, invalid_events));
|
||||||
out += sprintf(out, "events: %u\n",
|
out += sprintf(out, "events: %u\n",
|
||||||
ipmi_get_stat(intf, events));
|
ipmi_get_stat(intf, events));
|
||||||
|
out += sprintf(out, "failed rexmit LAN msgs: %u\n",
|
||||||
|
ipmi_get_stat(intf, dropped_rexmit_lan_commands));
|
||||||
|
out += sprintf(out, "failed rexmit IPMB msgs: %u\n",
|
||||||
|
ipmi_get_stat(intf, dropped_rexmit_ipmb_commands));
|
||||||
|
|
||||||
return (out - ((char *) page));
|
return (out - ((char *) page));
|
||||||
}
|
}
|
||||||
|
@ -3264,6 +3284,114 @@ static int handle_lan_get_msg_cmd(ipmi_smi_t intf,
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This routine will handle "Get Message" command responses with
|
||||||
|
* channels that use an OEM Medium. The message format belongs to
|
||||||
|
* the OEM. See IPMI 2.0 specification, Chapter 6 and
|
||||||
|
* Chapter 22, sections 22.6 and 22.24 for more details.
|
||||||
|
*/
|
||||||
|
static int handle_oem_get_msg_cmd(ipmi_smi_t intf,
|
||||||
|
struct ipmi_smi_msg *msg)
|
||||||
|
{
|
||||||
|
struct cmd_rcvr *rcvr;
|
||||||
|
int rv = 0;
|
||||||
|
unsigned char netfn;
|
||||||
|
unsigned char cmd;
|
||||||
|
unsigned char chan;
|
||||||
|
ipmi_user_t user = NULL;
|
||||||
|
struct ipmi_system_interface_addr *smi_addr;
|
||||||
|
struct ipmi_recv_msg *recv_msg;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* We expect the OEM SW to perform error checking
|
||||||
|
* so we just do some basic sanity checks
|
||||||
|
*/
|
||||||
|
if (msg->rsp_size < 4) {
|
||||||
|
/* Message not big enough, just ignore it. */
|
||||||
|
ipmi_inc_stat(intf, invalid_commands);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (msg->rsp[2] != 0) {
|
||||||
|
/* An error getting the response, just ignore it. */
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This is an OEM Message so the OEM needs to know how
|
||||||
|
* handle the message. We do no interpretation.
|
||||||
|
*/
|
||||||
|
netfn = msg->rsp[0] >> 2;
|
||||||
|
cmd = msg->rsp[1];
|
||||||
|
chan = msg->rsp[3] & 0xf;
|
||||||
|
|
||||||
|
rcu_read_lock();
|
||||||
|
rcvr = find_cmd_rcvr(intf, netfn, cmd, chan);
|
||||||
|
if (rcvr) {
|
||||||
|
user = rcvr->user;
|
||||||
|
kref_get(&user->refcount);
|
||||||
|
} else
|
||||||
|
user = NULL;
|
||||||
|
rcu_read_unlock();
|
||||||
|
|
||||||
|
if (user == NULL) {
|
||||||
|
/* We didn't find a user, just give up. */
|
||||||
|
ipmi_inc_stat(intf, unhandled_commands);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Don't do anything with these messages, just allow
|
||||||
|
* them to be freed.
|
||||||
|
*/
|
||||||
|
|
||||||
|
rv = 0;
|
||||||
|
} else {
|
||||||
|
/* Deliver the message to the user. */
|
||||||
|
ipmi_inc_stat(intf, handled_commands);
|
||||||
|
|
||||||
|
recv_msg = ipmi_alloc_recv_msg();
|
||||||
|
if (!recv_msg) {
|
||||||
|
/*
|
||||||
|
* We couldn't allocate memory for the
|
||||||
|
* message, so requeue it for handling
|
||||||
|
* later.
|
||||||
|
*/
|
||||||
|
rv = 1;
|
||||||
|
kref_put(&user->refcount, free_user);
|
||||||
|
} else {
|
||||||
|
/*
|
||||||
|
* OEM Messages are expected to be delivered via
|
||||||
|
* the system interface to SMS software. We might
|
||||||
|
* need to visit this again depending on OEM
|
||||||
|
* requirements
|
||||||
|
*/
|
||||||
|
smi_addr = ((struct ipmi_system_interface_addr *)
|
||||||
|
&(recv_msg->addr));
|
||||||
|
smi_addr->addr_type = IPMI_SYSTEM_INTERFACE_ADDR_TYPE;
|
||||||
|
smi_addr->channel = IPMI_BMC_CHANNEL;
|
||||||
|
smi_addr->lun = msg->rsp[0] & 3;
|
||||||
|
|
||||||
|
recv_msg->user = user;
|
||||||
|
recv_msg->user_msg_data = NULL;
|
||||||
|
recv_msg->recv_type = IPMI_OEM_RECV_TYPE;
|
||||||
|
recv_msg->msg.netfn = msg->rsp[0] >> 2;
|
||||||
|
recv_msg->msg.cmd = msg->rsp[1];
|
||||||
|
recv_msg->msg.data = recv_msg->msg_data;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The message starts at byte 4 which follows the
|
||||||
|
* the Channel Byte in the "GET MESSAGE" command
|
||||||
|
*/
|
||||||
|
recv_msg->msg.data_len = msg->rsp_size - 4;
|
||||||
|
memcpy(recv_msg->msg_data,
|
||||||
|
&(msg->rsp[4]),
|
||||||
|
msg->rsp_size - 4);
|
||||||
|
deliver_response(recv_msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
static void copy_event_into_recv_msg(struct ipmi_recv_msg *recv_msg,
|
static void copy_event_into_recv_msg(struct ipmi_recv_msg *recv_msg,
|
||||||
struct ipmi_smi_msg *msg)
|
struct ipmi_smi_msg *msg)
|
||||||
{
|
{
|
||||||
|
@ -3519,6 +3647,17 @@ static int handle_new_recv_msg(ipmi_smi_t intf,
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** We need to make sure the channels have been initialized.
|
||||||
|
** The channel_handler routine will set the "curr_channel"
|
||||||
|
** equal to or greater than IPMI_MAX_CHANNELS when all the
|
||||||
|
** channels for this interface have been initialized.
|
||||||
|
*/
|
||||||
|
if (intf->curr_channel < IPMI_MAX_CHANNELS) {
|
||||||
|
requeue = 1; /* Just put the message back for now */
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
switch (intf->channels[chan].medium) {
|
switch (intf->channels[chan].medium) {
|
||||||
case IPMI_CHANNEL_MEDIUM_IPMB:
|
case IPMI_CHANNEL_MEDIUM_IPMB:
|
||||||
if (msg->rsp[4] & 0x04) {
|
if (msg->rsp[4] & 0x04) {
|
||||||
|
@ -3554,12 +3693,21 @@ static int handle_new_recv_msg(ipmi_smi_t intf,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
/* Check for OEM Channels. Clients had better
|
||||||
|
register for these commands. */
|
||||||
|
if ((intf->channels[chan].medium
|
||||||
|
>= IPMI_CHANNEL_MEDIUM_OEM_MIN)
|
||||||
|
&& (intf->channels[chan].medium
|
||||||
|
<= IPMI_CHANNEL_MEDIUM_OEM_MAX)) {
|
||||||
|
requeue = handle_oem_get_msg_cmd(intf, msg);
|
||||||
|
} else {
|
||||||
/*
|
/*
|
||||||
* We don't handle the channel type, so just
|
* We don't handle the channel type, so just
|
||||||
* free the message.
|
* free the message.
|
||||||
*/
|
*/
|
||||||
requeue = 0;
|
requeue = 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} else if ((msg->rsp[0] == ((IPMI_NETFN_APP_REQUEST|1) << 2))
|
} else if ((msg->rsp[0] == ((IPMI_NETFN_APP_REQUEST|1) << 2))
|
||||||
&& (msg->rsp[1] == IPMI_READ_EVENT_MSG_BUFFER_CMD)) {
|
&& (msg->rsp[1] == IPMI_READ_EVENT_MSG_BUFFER_CMD)) {
|
||||||
|
@ -3730,7 +3878,7 @@ static void check_msg_timeout(ipmi_smi_t intf, struct seq_table *ent,
|
||||||
list_add_tail(&msg->link, timeouts);
|
list_add_tail(&msg->link, timeouts);
|
||||||
if (ent->broadcast)
|
if (ent->broadcast)
|
||||||
ipmi_inc_stat(intf, timed_out_ipmb_broadcasts);
|
ipmi_inc_stat(intf, timed_out_ipmb_broadcasts);
|
||||||
else if (ent->recv_msg->addr.addr_type == IPMI_LAN_ADDR_TYPE)
|
else if (is_lan_addr(&ent->recv_msg->addr))
|
||||||
ipmi_inc_stat(intf, timed_out_lan_commands);
|
ipmi_inc_stat(intf, timed_out_lan_commands);
|
||||||
else
|
else
|
||||||
ipmi_inc_stat(intf, timed_out_ipmb_commands);
|
ipmi_inc_stat(intf, timed_out_ipmb_commands);
|
||||||
|
@ -3744,15 +3892,17 @@ static void check_msg_timeout(ipmi_smi_t intf, struct seq_table *ent,
|
||||||
*/
|
*/
|
||||||
ent->timeout = MAX_MSG_TIMEOUT;
|
ent->timeout = MAX_MSG_TIMEOUT;
|
||||||
ent->retries_left--;
|
ent->retries_left--;
|
||||||
if (ent->recv_msg->addr.addr_type == IPMI_LAN_ADDR_TYPE)
|
|
||||||
ipmi_inc_stat(intf, retransmitted_lan_commands);
|
|
||||||
else
|
|
||||||
ipmi_inc_stat(intf, retransmitted_ipmb_commands);
|
|
||||||
|
|
||||||
smi_msg = smi_from_recv_msg(intf, ent->recv_msg, slot,
|
smi_msg = smi_from_recv_msg(intf, ent->recv_msg, slot,
|
||||||
ent->seqid);
|
ent->seqid);
|
||||||
if (!smi_msg)
|
if (!smi_msg) {
|
||||||
|
if (is_lan_addr(&ent->recv_msg->addr))
|
||||||
|
ipmi_inc_stat(intf,
|
||||||
|
dropped_rexmit_lan_commands);
|
||||||
|
else
|
||||||
|
ipmi_inc_stat(intf,
|
||||||
|
dropped_rexmit_ipmb_commands);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
spin_unlock_irqrestore(&intf->seq_lock, *flags);
|
spin_unlock_irqrestore(&intf->seq_lock, *flags);
|
||||||
|
|
||||||
|
@ -3764,10 +3914,17 @@ static void check_msg_timeout(ipmi_smi_t intf, struct seq_table *ent,
|
||||||
* resent.
|
* resent.
|
||||||
*/
|
*/
|
||||||
handlers = intf->handlers;
|
handlers = intf->handlers;
|
||||||
if (handlers)
|
if (handlers) {
|
||||||
|
if (is_lan_addr(&ent->recv_msg->addr))
|
||||||
|
ipmi_inc_stat(intf,
|
||||||
|
retransmitted_lan_commands);
|
||||||
|
else
|
||||||
|
ipmi_inc_stat(intf,
|
||||||
|
retransmitted_ipmb_commands);
|
||||||
|
|
||||||
intf->handlers->sender(intf->send_info,
|
intf->handlers->sender(intf->send_info,
|
||||||
smi_msg, 0);
|
smi_msg, 0);
|
||||||
else
|
} else
|
||||||
ipmi_free_smi_msg(smi_msg);
|
ipmi_free_smi_msg(smi_msg);
|
||||||
|
|
||||||
spin_lock_irqsave(&intf->seq_lock, *flags);
|
spin_lock_irqsave(&intf->seq_lock, *flags);
|
||||||
|
|
|
@ -82,12 +82,6 @@
|
||||||
#define SI_SHORT_TIMEOUT_USEC 250 /* .25ms when the SM request a
|
#define SI_SHORT_TIMEOUT_USEC 250 /* .25ms when the SM request a
|
||||||
short timeout */
|
short timeout */
|
||||||
|
|
||||||
/* Bit for BMC global enables. */
|
|
||||||
#define IPMI_BMC_RCV_MSG_INTR 0x01
|
|
||||||
#define IPMI_BMC_EVT_MSG_INTR 0x02
|
|
||||||
#define IPMI_BMC_EVT_MSG_BUFF 0x04
|
|
||||||
#define IPMI_BMC_SYS_LOG 0x08
|
|
||||||
|
|
||||||
enum si_intf_state {
|
enum si_intf_state {
|
||||||
SI_NORMAL,
|
SI_NORMAL,
|
||||||
SI_GETTING_FLAGS,
|
SI_GETTING_FLAGS,
|
||||||
|
@ -220,6 +214,9 @@ struct smi_info {
|
||||||
OEM2_DATA_AVAIL)
|
OEM2_DATA_AVAIL)
|
||||||
unsigned char msg_flags;
|
unsigned char msg_flags;
|
||||||
|
|
||||||
|
/* Does the BMC have an event buffer? */
|
||||||
|
char has_event_buffer;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If set to true, this will request events the next time the
|
* If set to true, this will request events the next time the
|
||||||
* state machine is idle.
|
* state machine is idle.
|
||||||
|
@ -968,7 +965,8 @@ static void request_events(void *send_info)
|
||||||
{
|
{
|
||||||
struct smi_info *smi_info = send_info;
|
struct smi_info *smi_info = send_info;
|
||||||
|
|
||||||
if (atomic_read(&smi_info->stop_operation))
|
if (atomic_read(&smi_info->stop_operation) ||
|
||||||
|
!smi_info->has_event_buffer)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
atomic_set(&smi_info->req_events, 1);
|
atomic_set(&smi_info->req_events, 1);
|
||||||
|
@ -2407,26 +2405,9 @@ static struct of_platform_driver ipmi_of_platform_driver = {
|
||||||
};
|
};
|
||||||
#endif /* CONFIG_PPC_OF */
|
#endif /* CONFIG_PPC_OF */
|
||||||
|
|
||||||
|
static int wait_for_msg_done(struct smi_info *smi_info)
|
||||||
static int try_get_dev_id(struct smi_info *smi_info)
|
|
||||||
{
|
{
|
||||||
unsigned char msg[2];
|
|
||||||
unsigned char *resp;
|
|
||||||
unsigned long resp_len;
|
|
||||||
enum si_sm_result smi_result;
|
enum si_sm_result smi_result;
|
||||||
int rv = 0;
|
|
||||||
|
|
||||||
resp = kmalloc(IPMI_MAX_MSG_LENGTH, GFP_KERNEL);
|
|
||||||
if (!resp)
|
|
||||||
return -ENOMEM;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Do a Get Device ID command, since it comes back with some
|
|
||||||
* useful info.
|
|
||||||
*/
|
|
||||||
msg[0] = IPMI_NETFN_APP_REQUEST << 2;
|
|
||||||
msg[1] = IPMI_GET_DEVICE_ID_CMD;
|
|
||||||
smi_info->handlers->start_transaction(smi_info->si_sm, msg, 2);
|
|
||||||
|
|
||||||
smi_result = smi_info->handlers->event(smi_info->si_sm, 0);
|
smi_result = smi_info->handlers->event(smi_info->si_sm, 0);
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
@ -2441,16 +2422,39 @@ static int try_get_dev_id(struct smi_info *smi_info)
|
||||||
} else
|
} else
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (smi_result == SI_SM_HOSED) {
|
if (smi_result == SI_SM_HOSED)
|
||||||
/*
|
/*
|
||||||
* We couldn't get the state machine to run, so whatever's at
|
* We couldn't get the state machine to run, so whatever's at
|
||||||
* the port is probably not an IPMI SMI interface.
|
* the port is probably not an IPMI SMI interface.
|
||||||
*/
|
*/
|
||||||
rv = -ENODEV;
|
return -ENODEV;
|
||||||
goto out;
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Otherwise, we got some data. */
|
static int try_get_dev_id(struct smi_info *smi_info)
|
||||||
|
{
|
||||||
|
unsigned char msg[2];
|
||||||
|
unsigned char *resp;
|
||||||
|
unsigned long resp_len;
|
||||||
|
int rv = 0;
|
||||||
|
|
||||||
|
resp = kmalloc(IPMI_MAX_MSG_LENGTH, GFP_KERNEL);
|
||||||
|
if (!resp)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Do a Get Device ID command, since it comes back with some
|
||||||
|
* useful info.
|
||||||
|
*/
|
||||||
|
msg[0] = IPMI_NETFN_APP_REQUEST << 2;
|
||||||
|
msg[1] = IPMI_GET_DEVICE_ID_CMD;
|
||||||
|
smi_info->handlers->start_transaction(smi_info->si_sm, msg, 2);
|
||||||
|
|
||||||
|
rv = wait_for_msg_done(smi_info);
|
||||||
|
if (rv)
|
||||||
|
goto out;
|
||||||
|
|
||||||
resp_len = smi_info->handlers->get_result(smi_info->si_sm,
|
resp_len = smi_info->handlers->get_result(smi_info->si_sm,
|
||||||
resp, IPMI_MAX_MSG_LENGTH);
|
resp, IPMI_MAX_MSG_LENGTH);
|
||||||
|
|
||||||
|
@ -2462,6 +2466,88 @@ static int try_get_dev_id(struct smi_info *smi_info)
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int try_enable_event_buffer(struct smi_info *smi_info)
|
||||||
|
{
|
||||||
|
unsigned char msg[3];
|
||||||
|
unsigned char *resp;
|
||||||
|
unsigned long resp_len;
|
||||||
|
int rv = 0;
|
||||||
|
|
||||||
|
resp = kmalloc(IPMI_MAX_MSG_LENGTH, GFP_KERNEL);
|
||||||
|
if (!resp)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
msg[0] = IPMI_NETFN_APP_REQUEST << 2;
|
||||||
|
msg[1] = IPMI_GET_BMC_GLOBAL_ENABLES_CMD;
|
||||||
|
smi_info->handlers->start_transaction(smi_info->si_sm, msg, 2);
|
||||||
|
|
||||||
|
rv = wait_for_msg_done(smi_info);
|
||||||
|
if (rv) {
|
||||||
|
printk(KERN_WARNING
|
||||||
|
"ipmi_si: Error getting response from get global,"
|
||||||
|
" enables command, the event buffer is not"
|
||||||
|
" enabled.\n");
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
resp_len = smi_info->handlers->get_result(smi_info->si_sm,
|
||||||
|
resp, IPMI_MAX_MSG_LENGTH);
|
||||||
|
|
||||||
|
if (resp_len < 4 ||
|
||||||
|
resp[0] != (IPMI_NETFN_APP_REQUEST | 1) << 2 ||
|
||||||
|
resp[1] != IPMI_GET_BMC_GLOBAL_ENABLES_CMD ||
|
||||||
|
resp[2] != 0) {
|
||||||
|
printk(KERN_WARNING
|
||||||
|
"ipmi_si: Invalid return from get global"
|
||||||
|
" enables command, cannot enable the event"
|
||||||
|
" buffer.\n");
|
||||||
|
rv = -EINVAL;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (resp[3] & IPMI_BMC_EVT_MSG_BUFF)
|
||||||
|
/* buffer is already enabled, nothing to do. */
|
||||||
|
goto out;
|
||||||
|
|
||||||
|
msg[0] = IPMI_NETFN_APP_REQUEST << 2;
|
||||||
|
msg[1] = IPMI_SET_BMC_GLOBAL_ENABLES_CMD;
|
||||||
|
msg[2] = resp[3] | IPMI_BMC_EVT_MSG_BUFF;
|
||||||
|
smi_info->handlers->start_transaction(smi_info->si_sm, msg, 3);
|
||||||
|
|
||||||
|
rv = wait_for_msg_done(smi_info);
|
||||||
|
if (rv) {
|
||||||
|
printk(KERN_WARNING
|
||||||
|
"ipmi_si: Error getting response from set global,"
|
||||||
|
" enables command, the event buffer is not"
|
||||||
|
" enabled.\n");
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
resp_len = smi_info->handlers->get_result(smi_info->si_sm,
|
||||||
|
resp, IPMI_MAX_MSG_LENGTH);
|
||||||
|
|
||||||
|
if (resp_len < 3 ||
|
||||||
|
resp[0] != (IPMI_NETFN_APP_REQUEST | 1) << 2 ||
|
||||||
|
resp[1] != IPMI_SET_BMC_GLOBAL_ENABLES_CMD) {
|
||||||
|
printk(KERN_WARNING
|
||||||
|
"ipmi_si: Invalid return from get global,"
|
||||||
|
"enables command, not enable the event"
|
||||||
|
" buffer.\n");
|
||||||
|
rv = -EINVAL;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (resp[2] != 0)
|
||||||
|
/*
|
||||||
|
* An error when setting the event buffer bit means
|
||||||
|
* that the event buffer is not supported.
|
||||||
|
*/
|
||||||
|
rv = -ENOENT;
|
||||||
|
out:
|
||||||
|
kfree(resp);
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
static int type_file_read_proc(char *page, char **start, off_t off,
|
static int type_file_read_proc(char *page, char **start, off_t off,
|
||||||
int count, int *eof, void *data)
|
int count, int *eof, void *data)
|
||||||
{
|
{
|
||||||
|
@ -2847,6 +2933,10 @@ static int try_smi_init(struct smi_info *new_smi)
|
||||||
new_smi->intf_num = smi_num;
|
new_smi->intf_num = smi_num;
|
||||||
smi_num++;
|
smi_num++;
|
||||||
|
|
||||||
|
rv = try_enable_event_buffer(new_smi);
|
||||||
|
if (rv == 0)
|
||||||
|
new_smi->has_event_buffer = 1;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Start clearing the flags before we enable interrupts or the
|
* Start clearing the flags before we enable interrupts or the
|
||||||
* timer to avoid racing with the timer.
|
* timer to avoid racing with the timer.
|
||||||
|
@ -2863,7 +2953,7 @@ static int try_smi_init(struct smi_info *new_smi)
|
||||||
*/
|
*/
|
||||||
new_smi->pdev = platform_device_alloc("ipmi_si",
|
new_smi->pdev = platform_device_alloc("ipmi_si",
|
||||||
new_smi->intf_num);
|
new_smi->intf_num);
|
||||||
if (rv) {
|
if (!new_smi->pdev) {
|
||||||
printk(KERN_ERR
|
printk(KERN_ERR
|
||||||
"ipmi_si_intf:"
|
"ipmi_si_intf:"
|
||||||
" Unable to allocate platform device\n");
|
" Unable to allocate platform device\n");
|
||||||
|
|
|
@ -2274,7 +2274,7 @@ rescan_last_byte:
|
||||||
continue; /* nothing to display */
|
continue; /* nothing to display */
|
||||||
}
|
}
|
||||||
/* Glyph not found */
|
/* Glyph not found */
|
||||||
if ((!(vc->vc_utf && !vc->vc_disp_ctrl) && c < 128) && !(c & ~charmask)) {
|
if ((!(vc->vc_utf && !vc->vc_disp_ctrl) || c < 128) && !(c & ~charmask)) {
|
||||||
/* In legacy mode use the glyph we get by a 1:1 mapping.
|
/* In legacy mode use the glyph we get by a 1:1 mapping.
|
||||||
This would make absolutely no sense with Unicode in mind,
|
This would make absolutely no sense with Unicode in mind,
|
||||||
but do this for ASCII characters since a font may lack
|
but do this for ASCII characters since a font may lack
|
||||||
|
|
|
@ -57,7 +57,7 @@ u32 acpi_pm_read_verified(void)
|
||||||
return v2;
|
return v2;
|
||||||
}
|
}
|
||||||
|
|
||||||
static cycle_t acpi_pm_read(void)
|
static cycle_t acpi_pm_read(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
return (cycle_t)read_pmtmr();
|
return (cycle_t)read_pmtmr();
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,7 @@ static int __init acpi_pm_good_setup(char *__str)
|
||||||
}
|
}
|
||||||
__setup("acpi_pm_good", acpi_pm_good_setup);
|
__setup("acpi_pm_good", acpi_pm_good_setup);
|
||||||
|
|
||||||
static cycle_t acpi_pm_read_slow(void)
|
static cycle_t acpi_pm_read_slow(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
return (cycle_t)acpi_pm_read_verified();
|
return (cycle_t)acpi_pm_read_verified();
|
||||||
}
|
}
|
||||||
|
@ -156,9 +156,9 @@ static int verify_pmtmr_rate(void)
|
||||||
unsigned long count, delta;
|
unsigned long count, delta;
|
||||||
|
|
||||||
mach_prepare_counter();
|
mach_prepare_counter();
|
||||||
value1 = clocksource_acpi_pm.read();
|
value1 = clocksource_acpi_pm.read(&clocksource_acpi_pm);
|
||||||
mach_countup(&count);
|
mach_countup(&count);
|
||||||
value2 = clocksource_acpi_pm.read();
|
value2 = clocksource_acpi_pm.read(&clocksource_acpi_pm);
|
||||||
delta = (value2 - value1) & ACPI_PM_MASK;
|
delta = (value2 - value1) & ACPI_PM_MASK;
|
||||||
|
|
||||||
/* Check that the PMTMR delta is within 5% of what we expect */
|
/* Check that the PMTMR delta is within 5% of what we expect */
|
||||||
|
@ -195,9 +195,9 @@ static int __init init_acpi_pm_clocksource(void)
|
||||||
/* "verify" this timing source: */
|
/* "verify" this timing source: */
|
||||||
for (j = 0; j < ACPI_PM_MONOTONICITY_CHECKS; j++) {
|
for (j = 0; j < ACPI_PM_MONOTONICITY_CHECKS; j++) {
|
||||||
udelay(100 * j);
|
udelay(100 * j);
|
||||||
value1 = clocksource_acpi_pm.read();
|
value1 = clocksource_acpi_pm.read(&clocksource_acpi_pm);
|
||||||
for (i = 0; i < ACPI_PM_READ_CHECKS; i++) {
|
for (i = 0; i < ACPI_PM_READ_CHECKS; i++) {
|
||||||
value2 = clocksource_acpi_pm.read();
|
value2 = clocksource_acpi_pm.read(&clocksource_acpi_pm);
|
||||||
if (value2 == value1)
|
if (value2 == value1)
|
||||||
continue;
|
continue;
|
||||||
if (value2 > value1)
|
if (value2 > value1)
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
int use_cyclone = 0;
|
int use_cyclone = 0;
|
||||||
static void __iomem *cyclone_ptr;
|
static void __iomem *cyclone_ptr;
|
||||||
|
|
||||||
static cycle_t read_cyclone(void)
|
static cycle_t read_cyclone(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
return (cycle_t)readl(cyclone_ptr);
|
return (cycle_t)readl(cyclone_ptr);
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ MODULE_PARM_DESC(ppm, "+-adjust to actual XO freq (ppm)");
|
||||||
/* The base timer frequency, * 27 if selected */
|
/* The base timer frequency, * 27 if selected */
|
||||||
#define HRT_FREQ 1000000
|
#define HRT_FREQ 1000000
|
||||||
|
|
||||||
static cycle_t read_hrt(void)
|
static cycle_t read_hrt(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
/* Read the timer value */
|
/* Read the timer value */
|
||||||
return (cycle_t) inl(scx200_cb_base + SCx200_TIMER_OFFSET);
|
return (cycle_t) inl(scx200_cb_base + SCx200_TIMER_OFFSET);
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
static void __iomem *tcaddr;
|
static void __iomem *tcaddr;
|
||||||
|
|
||||||
static cycle_t tc_get_cycles(void)
|
static cycle_t tc_get_cycles(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
u32 lower, upper;
|
u32 lower, upper;
|
||||||
|
|
|
@ -674,7 +674,7 @@ static void mpc85xx_mc_check(struct mem_ctl_info *mci)
|
||||||
int row_index;
|
int row_index;
|
||||||
|
|
||||||
err_detect = in_be32(pdata->mc_vbase + MPC85XX_MC_ERR_DETECT);
|
err_detect = in_be32(pdata->mc_vbase + MPC85XX_MC_ERR_DETECT);
|
||||||
if (err_detect)
|
if (!err_detect)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mpc85xx_mc_printk(mci, KERN_ERR, "Err Detect Register: %#8.8x\n",
|
mpc85xx_mc_printk(mci, KERN_ERR, "Err Detect Register: %#8.8x\n",
|
||||||
|
|
|
@ -159,6 +159,9 @@ void drm_master_put(struct drm_master **master)
|
||||||
int drm_setmaster_ioctl(struct drm_device *dev, void *data,
|
int drm_setmaster_ioctl(struct drm_device *dev, void *data,
|
||||||
struct drm_file *file_priv)
|
struct drm_file *file_priv)
|
||||||
{
|
{
|
||||||
|
if (file_priv->is_master)
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (file_priv->minor->master && file_priv->minor->master != file_priv->master)
|
if (file_priv->minor->master && file_priv->minor->master != file_priv->master)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -169,6 +172,7 @@ int drm_setmaster_ioctl(struct drm_device *dev, void *data,
|
||||||
file_priv->minor->master != file_priv->master) {
|
file_priv->minor->master != file_priv->master) {
|
||||||
mutex_lock(&dev->struct_mutex);
|
mutex_lock(&dev->struct_mutex);
|
||||||
file_priv->minor->master = drm_master_get(file_priv->master);
|
file_priv->minor->master = drm_master_get(file_priv->master);
|
||||||
|
file_priv->is_master = 1;
|
||||||
mutex_unlock(&dev->struct_mutex);
|
mutex_unlock(&dev->struct_mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,10 +182,15 @@ int drm_setmaster_ioctl(struct drm_device *dev, void *data,
|
||||||
int drm_dropmaster_ioctl(struct drm_device *dev, void *data,
|
int drm_dropmaster_ioctl(struct drm_device *dev, void *data,
|
||||||
struct drm_file *file_priv)
|
struct drm_file *file_priv)
|
||||||
{
|
{
|
||||||
if (!file_priv->master)
|
if (!file_priv->is_master)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
if (!file_priv->minor->master)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
mutex_lock(&dev->struct_mutex);
|
mutex_lock(&dev->struct_mutex);
|
||||||
drm_master_put(&file_priv->minor->master);
|
drm_master_put(&file_priv->minor->master);
|
||||||
|
file_priv->is_master = 0;
|
||||||
mutex_unlock(&dev->struct_mutex);
|
mutex_unlock(&dev->struct_mutex);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -132,6 +132,7 @@ void drm_sysfs_destroy(void)
|
||||||
*/
|
*/
|
||||||
static void drm_sysfs_device_release(struct device *dev)
|
static void drm_sysfs_device_release(struct device *dev)
|
||||||
{
|
{
|
||||||
|
memset(dev, 0, sizeof(struct device));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -481,11 +481,13 @@ static int via_wait_idle(drm_via_private_t * dev_priv)
|
||||||
{
|
{
|
||||||
int count = 10000000;
|
int count = 10000000;
|
||||||
|
|
||||||
while (!(VIA_READ(VIA_REG_STATUS) & VIA_VR_QUEUE_BUSY) && count--);
|
while (!(VIA_READ(VIA_REG_STATUS) & VIA_VR_QUEUE_BUSY) && --count)
|
||||||
|
;
|
||||||
|
|
||||||
while (count-- && (VIA_READ(VIA_REG_STATUS) &
|
while (count && (VIA_READ(VIA_REG_STATUS) &
|
||||||
(VIA_CMD_RGTR_BUSY | VIA_2D_ENG_BUSY |
|
(VIA_CMD_RGTR_BUSY | VIA_2D_ENG_BUSY |
|
||||||
VIA_3D_ENG_BUSY))) ;
|
VIA_3D_ENG_BUSY)))
|
||||||
|
--count;
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -705,7 +707,7 @@ static int via_cmdbuf_size(struct drm_device *dev, void *data, struct drm_file *
|
||||||
switch (d_siz->func) {
|
switch (d_siz->func) {
|
||||||
case VIA_CMDBUF_SPACE:
|
case VIA_CMDBUF_SPACE:
|
||||||
while (((tmp_size = via_cmdbuf_space(dev_priv)) < d_siz->size)
|
while (((tmp_size = via_cmdbuf_space(dev_priv)) < d_siz->size)
|
||||||
&& count--) {
|
&& --count) {
|
||||||
if (!d_siz->wait) {
|
if (!d_siz->wait) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -717,7 +719,7 @@ static int via_cmdbuf_size(struct drm_device *dev, void *data, struct drm_file *
|
||||||
break;
|
break;
|
||||||
case VIA_CMDBUF_LAG:
|
case VIA_CMDBUF_LAG:
|
||||||
while (((tmp_size = via_cmdbuf_lag(dev_priv)) > d_siz->size)
|
while (((tmp_size = via_cmdbuf_lag(dev_priv)) > d_siz->size)
|
||||||
&& count--) {
|
&& --count) {
|
||||||
if (!d_siz->wait) {
|
if (!d_siz->wait) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -236,6 +236,7 @@ static const struct ide_dma_ops cs5536_dma_ops = {
|
||||||
.dma_test_irq = ide_dma_test_irq,
|
.dma_test_irq = ide_dma_test_irq,
|
||||||
.dma_lost_irq = ide_dma_lost_irq,
|
.dma_lost_irq = ide_dma_lost_irq,
|
||||||
.dma_timer_expiry = ide_dma_sff_timer_expiry,
|
.dma_timer_expiry = ide_dma_sff_timer_expiry,
|
||||||
|
.dma_sff_read_status = ide_dma_sff_read_status,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct ide_port_info cs5536_info = {
|
static const struct ide_port_info cs5536_info = {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* Portions Copyright (C) 2001 Sun Microsystems, Inc.
|
* Portions Copyright (C) 2001 Sun Microsystems, Inc.
|
||||||
* Portions Copyright (C) 2003 Red Hat Inc
|
* Portions Copyright (C) 2003 Red Hat Inc
|
||||||
* Portions Copyright (C) 2007 Bartlomiej Zolnierkiewicz
|
* Portions Copyright (C) 2007 Bartlomiej Zolnierkiewicz
|
||||||
* Portions Copyright (C) 2005-2008 MontaVista Software, Inc.
|
* Portions Copyright (C) 2005-2009 MontaVista Software, Inc.
|
||||||
*
|
*
|
||||||
* Thanks to HighPoint Technologies for their assistance, and hardware.
|
* Thanks to HighPoint Technologies for their assistance, and hardware.
|
||||||
* Special Thanks to Jon Burchmore in SanDiego for the deep pockets, his
|
* Special Thanks to Jon Burchmore in SanDiego for the deep pockets, his
|
||||||
|
@ -114,6 +114,8 @@
|
||||||
* the register setting lists into the table indexed by the clock selected
|
* the register setting lists into the table indexed by the clock selected
|
||||||
* - set the correct hwif->ultra_mask for each individual chip
|
* - set the correct hwif->ultra_mask for each individual chip
|
||||||
* - add Ultra and MW DMA mode filtering for the HPT37[24] based SATA cards
|
* - add Ultra and MW DMA mode filtering for the HPT37[24] based SATA cards
|
||||||
|
* - stop resetting HPT370's state machine before each DMA transfer as that has
|
||||||
|
* caused more harm than good
|
||||||
* Sergei Shtylyov, <sshtylyov@ru.mvista.com> or <source@mvista.com>
|
* Sergei Shtylyov, <sshtylyov@ru.mvista.com> or <source@mvista.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -133,7 +135,7 @@
|
||||||
#define DRV_NAME "hpt366"
|
#define DRV_NAME "hpt366"
|
||||||
|
|
||||||
/* various tuning parameters */
|
/* various tuning parameters */
|
||||||
#define HPT_RESET_STATE_ENGINE
|
#undef HPT_RESET_STATE_ENGINE
|
||||||
#undef HPT_DELAY_INTERRUPT
|
#undef HPT_DELAY_INTERRUPT
|
||||||
|
|
||||||
static const char *quirk_drives[] = {
|
static const char *quirk_drives[] = {
|
||||||
|
@ -808,7 +810,7 @@ static void hpt370_irq_timeout(ide_drive_t *drive)
|
||||||
/* get DMA command mode */
|
/* get DMA command mode */
|
||||||
dma_cmd = inb(hwif->dma_base + ATA_DMA_CMD);
|
dma_cmd = inb(hwif->dma_base + ATA_DMA_CMD);
|
||||||
/* stop DMA */
|
/* stop DMA */
|
||||||
outb(dma_cmd & ~0x1, hwif->dma_base + ATA_DMA_CMD);
|
outb(dma_cmd & ~ATA_DMA_START, hwif->dma_base + ATA_DMA_CMD);
|
||||||
hpt370_clear_engine(drive);
|
hpt370_clear_engine(drive);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -825,11 +827,11 @@ static int hpt370_dma_end(ide_drive_t *drive)
|
||||||
ide_hwif_t *hwif = drive->hwif;
|
ide_hwif_t *hwif = drive->hwif;
|
||||||
u8 dma_stat = inb(hwif->dma_base + ATA_DMA_STATUS);
|
u8 dma_stat = inb(hwif->dma_base + ATA_DMA_STATUS);
|
||||||
|
|
||||||
if (dma_stat & 0x01) {
|
if (dma_stat & ATA_DMA_ACTIVE) {
|
||||||
/* wait a little */
|
/* wait a little */
|
||||||
udelay(20);
|
udelay(20);
|
||||||
dma_stat = inb(hwif->dma_base + ATA_DMA_STATUS);
|
dma_stat = inb(hwif->dma_base + ATA_DMA_STATUS);
|
||||||
if (dma_stat & 0x01)
|
if (dma_stat & ATA_DMA_ACTIVE)
|
||||||
hpt370_irq_timeout(drive);
|
hpt370_irq_timeout(drive);
|
||||||
}
|
}
|
||||||
return ide_dma_end(drive);
|
return ide_dma_end(drive);
|
||||||
|
@ -851,7 +853,7 @@ static int hpt374_dma_test_irq(ide_drive_t *drive)
|
||||||
|
|
||||||
dma_stat = inb(hwif->dma_base + ATA_DMA_STATUS);
|
dma_stat = inb(hwif->dma_base + ATA_DMA_STATUS);
|
||||||
/* return 1 if INTR asserted */
|
/* return 1 if INTR asserted */
|
||||||
if (dma_stat & 4)
|
if (dma_stat & ATA_DMA_INTR)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -102,11 +102,14 @@ void ide_complete_cmd(ide_drive_t *drive, struct ide_cmd *cmd, u8 stat, u8 err)
|
||||||
drive->dev_flags |= IDE_DFLAG_PARKED;
|
drive->dev_flags |= IDE_DFLAG_PARKED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rq && rq->cmd_type == REQ_TYPE_ATA_TASKFILE)
|
if (rq && rq->cmd_type == REQ_TYPE_ATA_TASKFILE) {
|
||||||
memcpy(rq->special, cmd, sizeof(*cmd));
|
struct ide_cmd *orig_cmd = rq->special;
|
||||||
|
|
||||||
if (cmd->tf_flags & IDE_TFLAG_DYN)
|
if (cmd->tf_flags & IDE_TFLAG_DYN)
|
||||||
kfree(cmd);
|
kfree(orig_cmd);
|
||||||
|
else
|
||||||
|
memcpy(orig_cmd, cmd, sizeof(*cmd));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* obsolete, blk_rq_bytes() should be used instead */
|
/* obsolete, blk_rq_bytes() should be used instead */
|
||||||
|
|
|
@ -1682,7 +1682,7 @@ static int __devinit pmac_ide_init_dma(ide_hwif_t *hwif,
|
||||||
* The +2 is +1 for the stop command and +1 to allow for
|
* The +2 is +1 for the stop command and +1 to allow for
|
||||||
* aligning the start address to a multiple of 16 bytes.
|
* aligning the start address to a multiple of 16 bytes.
|
||||||
*/
|
*/
|
||||||
pmif->dma_table_cpu = (struct dbdma_cmd*)pci_alloc_consistent(
|
pmif->dma_table_cpu = pci_alloc_consistent(
|
||||||
dev,
|
dev,
|
||||||
(MAX_DCMDS + 2) * sizeof(struct dbdma_cmd),
|
(MAX_DCMDS + 2) * sizeof(struct dbdma_cmd),
|
||||||
&hwif->dmatable_dma);
|
&hwif->dmatable_dma);
|
||||||
|
|
|
@ -819,6 +819,7 @@ static const struct parisc_device_id hp_sdc_tbl[] = {
|
||||||
MODULE_DEVICE_TABLE(parisc, hp_sdc_tbl);
|
MODULE_DEVICE_TABLE(parisc, hp_sdc_tbl);
|
||||||
|
|
||||||
static int __init hp_sdc_init_hppa(struct parisc_device *d);
|
static int __init hp_sdc_init_hppa(struct parisc_device *d);
|
||||||
|
static struct delayed_work moduleloader_work;
|
||||||
|
|
||||||
static struct parisc_driver hp_sdc_driver = {
|
static struct parisc_driver hp_sdc_driver = {
|
||||||
.name = "hp_sdc",
|
.name = "hp_sdc",
|
||||||
|
@ -930,8 +931,15 @@ static int __init hp_sdc_init(void)
|
||||||
|
|
||||||
#if defined(__hppa__)
|
#if defined(__hppa__)
|
||||||
|
|
||||||
|
static void request_module_delayed(struct work_struct *work)
|
||||||
|
{
|
||||||
|
request_module("hp_sdc_mlc");
|
||||||
|
}
|
||||||
|
|
||||||
static int __init hp_sdc_init_hppa(struct parisc_device *d)
|
static int __init hp_sdc_init_hppa(struct parisc_device *d)
|
||||||
{
|
{
|
||||||
|
int ret;
|
||||||
|
|
||||||
if (!d)
|
if (!d)
|
||||||
return 1;
|
return 1;
|
||||||
if (hp_sdc.dev != NULL)
|
if (hp_sdc.dev != NULL)
|
||||||
|
@ -944,13 +952,26 @@ static int __init hp_sdc_init_hppa(struct parisc_device *d)
|
||||||
hp_sdc.data_io = d->hpa.start + 0x800;
|
hp_sdc.data_io = d->hpa.start + 0x800;
|
||||||
hp_sdc.status_io = d->hpa.start + 0x801;
|
hp_sdc.status_io = d->hpa.start + 0x801;
|
||||||
|
|
||||||
return hp_sdc_init();
|
INIT_DELAYED_WORK(&moduleloader_work, request_module_delayed);
|
||||||
|
|
||||||
|
ret = hp_sdc_init();
|
||||||
|
/* after sucessfull initialization give SDC some time to settle
|
||||||
|
* and then load the hp_sdc_mlc upper layer driver */
|
||||||
|
if (!ret)
|
||||||
|
schedule_delayed_work(&moduleloader_work,
|
||||||
|
msecs_to_jiffies(2000));
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* __hppa__ */
|
#endif /* __hppa__ */
|
||||||
|
|
||||||
static void hp_sdc_exit(void)
|
static void hp_sdc_exit(void)
|
||||||
{
|
{
|
||||||
|
/* do nothing if we don't have a SDC */
|
||||||
|
if (!hp_sdc.dev)
|
||||||
|
return;
|
||||||
|
|
||||||
write_lock_irq(&hp_sdc.lock);
|
write_lock_irq(&hp_sdc.lock);
|
||||||
|
|
||||||
/* Turn off all maskable "sub-function" irq's. */
|
/* Turn off all maskable "sub-function" irq's. */
|
||||||
|
@ -969,6 +990,7 @@ static void hp_sdc_exit(void)
|
||||||
tasklet_kill(&hp_sdc.task);
|
tasklet_kill(&hp_sdc.task);
|
||||||
|
|
||||||
#if defined(__hppa__)
|
#if defined(__hppa__)
|
||||||
|
cancel_delayed_work_sync(&moduleloader_work);
|
||||||
if (unregister_parisc_driver(&hp_sdc_driver))
|
if (unregister_parisc_driver(&hp_sdc_driver))
|
||||||
printk(KERN_WARNING PREFIX "Error unregistering HP SDC");
|
printk(KERN_WARNING PREFIX "Error unregistering HP SDC");
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -158,7 +158,8 @@ void free_interrupts(void);
|
||||||
/* segments.c: */
|
/* segments.c: */
|
||||||
void setup_default_gdt_entries(struct lguest_ro_state *state);
|
void setup_default_gdt_entries(struct lguest_ro_state *state);
|
||||||
void setup_guest_gdt(struct lg_cpu *cpu);
|
void setup_guest_gdt(struct lg_cpu *cpu);
|
||||||
void load_guest_gdt(struct lg_cpu *cpu, unsigned long table, u32 num);
|
void load_guest_gdt_entry(struct lg_cpu *cpu, unsigned int i,
|
||||||
|
u32 low, u32 hi);
|
||||||
void guest_load_tls(struct lg_cpu *cpu, unsigned long tls_array);
|
void guest_load_tls(struct lg_cpu *cpu, unsigned long tls_array);
|
||||||
void copy_gdt(const struct lg_cpu *cpu, struct desc_struct *gdt);
|
void copy_gdt(const struct lg_cpu *cpu, struct desc_struct *gdt);
|
||||||
void copy_gdt_tls(const struct lg_cpu *cpu, struct desc_struct *gdt);
|
void copy_gdt_tls(const struct lg_cpu *cpu, struct desc_struct *gdt);
|
||||||
|
|
|
@ -144,18 +144,19 @@ void copy_gdt(const struct lg_cpu *cpu, struct desc_struct *gdt)
|
||||||
gdt[i] = cpu->arch.gdt[i];
|
gdt[i] = cpu->arch.gdt[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
/*H:620 This is where the Guest asks us to load a new GDT (LHCALL_LOAD_GDT).
|
/*H:620 This is where the Guest asks us to load a new GDT entry
|
||||||
* We copy it from the Guest and tweak the entries. */
|
* (LHCALL_LOAD_GDT_ENTRY). We tweak the entry and copy it in. */
|
||||||
void load_guest_gdt(struct lg_cpu *cpu, unsigned long table, u32 num)
|
void load_guest_gdt_entry(struct lg_cpu *cpu, u32 num, u32 lo, u32 hi)
|
||||||
{
|
{
|
||||||
/* We assume the Guest has the same number of GDT entries as the
|
/* We assume the Guest has the same number of GDT entries as the
|
||||||
* Host, otherwise we'd have to dynamically allocate the Guest GDT. */
|
* Host, otherwise we'd have to dynamically allocate the Guest GDT. */
|
||||||
if (num > ARRAY_SIZE(cpu->arch.gdt))
|
if (num > ARRAY_SIZE(cpu->arch.gdt))
|
||||||
kill_guest(cpu, "too many gdt entries %i", num);
|
kill_guest(cpu, "too many gdt entries %i", num);
|
||||||
|
|
||||||
/* We read the whole thing in, then fix it up. */
|
/* Set it up, then fix it. */
|
||||||
__lgread(cpu, cpu->arch.gdt, table, num * sizeof(cpu->arch.gdt[0]));
|
cpu->arch.gdt[num].a = lo;
|
||||||
fixup_gdt_table(cpu, 0, ARRAY_SIZE(cpu->arch.gdt));
|
cpu->arch.gdt[num].b = hi;
|
||||||
|
fixup_gdt_table(cpu, num, num+1);
|
||||||
/* Mark that the GDT changed so the core knows it has to copy it again,
|
/* Mark that the GDT changed so the core knows it has to copy it again,
|
||||||
* even if the Guest is run on the same CPU. */
|
* even if the Guest is run on the same CPU. */
|
||||||
cpu->changed |= CHANGED_GDT;
|
cpu->changed |= CHANGED_GDT;
|
||||||
|
|
|
@ -324,6 +324,11 @@ static void rewrite_hypercall(struct lg_cpu *cpu)
|
||||||
u8 insn[3] = {0xcd, 0x1f, 0x90};
|
u8 insn[3] = {0xcd, 0x1f, 0x90};
|
||||||
|
|
||||||
__lgwrite(cpu, guest_pa(cpu, cpu->regs->eip), insn, sizeof(insn));
|
__lgwrite(cpu, guest_pa(cpu, cpu->regs->eip), insn, sizeof(insn));
|
||||||
|
/* The above write might have caused a copy of that page to be made
|
||||||
|
* (if it was read-only). We need to make sure the Guest has
|
||||||
|
* up-to-date pagetables. As this doesn't happen often, we can just
|
||||||
|
* drop them all. */
|
||||||
|
guest_pagetable_clear_all(cpu);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool is_hypercall(struct lg_cpu *cpu)
|
static bool is_hypercall(struct lg_cpu *cpu)
|
||||||
|
@ -563,8 +568,8 @@ void __exit lguest_arch_host_fini(void)
|
||||||
int lguest_arch_do_hcall(struct lg_cpu *cpu, struct hcall_args *args)
|
int lguest_arch_do_hcall(struct lg_cpu *cpu, struct hcall_args *args)
|
||||||
{
|
{
|
||||||
switch (args->arg0) {
|
switch (args->arg0) {
|
||||||
case LHCALL_LOAD_GDT:
|
case LHCALL_LOAD_GDT_ENTRY:
|
||||||
load_guest_gdt(cpu, args->arg1, args->arg2);
|
load_guest_gdt_entry(cpu, args->arg1, args->arg2, args->arg3);
|
||||||
break;
|
break;
|
||||||
case LHCALL_LOAD_IDT_ENTRY:
|
case LHCALL_LOAD_IDT_ENTRY:
|
||||||
load_guest_idt_entry(cpu, args->arg1, args->arg2, args->arg3);
|
load_guest_idt_entry(cpu, args->arg1, args->arg2, args->arg3);
|
||||||
|
|
|
@ -1479,6 +1479,7 @@ void bitmap_cond_end_sync(struct bitmap *bitmap, sector_t sector)
|
||||||
s += blocks;
|
s += blocks;
|
||||||
}
|
}
|
||||||
bitmap->last_end_sync = jiffies;
|
bitmap->last_end_sync = jiffies;
|
||||||
|
sysfs_notify(&bitmap->mddev->kobj, NULL, "sync_completed");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void bitmap_set_memory_bits(struct bitmap *bitmap, sector_t offset, int needed)
|
static void bitmap_set_memory_bits(struct bitmap *bitmap, sector_t offset, int needed)
|
||||||
|
@ -1589,7 +1590,7 @@ void bitmap_destroy(mddev_t *mddev)
|
||||||
int bitmap_create(mddev_t *mddev)
|
int bitmap_create(mddev_t *mddev)
|
||||||
{
|
{
|
||||||
struct bitmap *bitmap;
|
struct bitmap *bitmap;
|
||||||
unsigned long blocks = mddev->resync_max_sectors;
|
sector_t blocks = mddev->resync_max_sectors;
|
||||||
unsigned long chunks;
|
unsigned long chunks;
|
||||||
unsigned long pages;
|
unsigned long pages;
|
||||||
struct file *file = mddev->bitmap_file;
|
struct file *file = mddev->bitmap_file;
|
||||||
|
@ -1631,8 +1632,8 @@ int bitmap_create(mddev_t *mddev)
|
||||||
bitmap->chunkshift = ffz(~bitmap->chunksize);
|
bitmap->chunkshift = ffz(~bitmap->chunksize);
|
||||||
|
|
||||||
/* now that chunksize and chunkshift are set, we can use these macros */
|
/* now that chunksize and chunkshift are set, we can use these macros */
|
||||||
chunks = (blocks + CHUNK_BLOCK_RATIO(bitmap) - 1) /
|
chunks = (blocks + CHUNK_BLOCK_RATIO(bitmap) - 1) >>
|
||||||
CHUNK_BLOCK_RATIO(bitmap);
|
CHUNK_BLOCK_SHIFT(bitmap);
|
||||||
pages = (chunks + PAGE_COUNTER_RATIO - 1) / PAGE_COUNTER_RATIO;
|
pages = (chunks + PAGE_COUNTER_RATIO - 1) / PAGE_COUNTER_RATIO;
|
||||||
|
|
||||||
BUG_ON(!pages);
|
BUG_ON(!pages);
|
||||||
|
|
|
@ -2017,6 +2017,8 @@ repeat:
|
||||||
clear_bit(MD_CHANGE_PENDING, &mddev->flags);
|
clear_bit(MD_CHANGE_PENDING, &mddev->flags);
|
||||||
spin_unlock_irq(&mddev->write_lock);
|
spin_unlock_irq(&mddev->write_lock);
|
||||||
wake_up(&mddev->sb_wait);
|
wake_up(&mddev->sb_wait);
|
||||||
|
if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery))
|
||||||
|
sysfs_notify(&mddev->kobj, NULL, "sync_completed");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2086,6 +2088,7 @@ state_store(mdk_rdev_t *rdev, const char *buf, size_t len)
|
||||||
* -writemostly - clears write_mostly
|
* -writemostly - clears write_mostly
|
||||||
* blocked - sets the Blocked flag
|
* blocked - sets the Blocked flag
|
||||||
* -blocked - clears the Blocked flag
|
* -blocked - clears the Blocked flag
|
||||||
|
* insync - sets Insync providing device isn't active
|
||||||
*/
|
*/
|
||||||
int err = -EINVAL;
|
int err = -EINVAL;
|
||||||
if (cmd_match(buf, "faulty") && rdev->mddev->pers) {
|
if (cmd_match(buf, "faulty") && rdev->mddev->pers) {
|
||||||
|
@ -2117,6 +2120,9 @@ state_store(mdk_rdev_t *rdev, const char *buf, size_t len)
|
||||||
set_bit(MD_RECOVERY_NEEDED, &rdev->mddev->recovery);
|
set_bit(MD_RECOVERY_NEEDED, &rdev->mddev->recovery);
|
||||||
md_wakeup_thread(rdev->mddev->thread);
|
md_wakeup_thread(rdev->mddev->thread);
|
||||||
|
|
||||||
|
err = 0;
|
||||||
|
} else if (cmd_match(buf, "insync") && rdev->raid_disk == -1) {
|
||||||
|
set_bit(In_sync, &rdev->flags);
|
||||||
err = 0;
|
err = 0;
|
||||||
}
|
}
|
||||||
if (!err && rdev->sysfs_state)
|
if (!err && rdev->sysfs_state)
|
||||||
|
@ -2190,7 +2196,7 @@ slot_store(mdk_rdev_t *rdev, const char *buf, size_t len)
|
||||||
} else if (rdev->mddev->pers) {
|
} else if (rdev->mddev->pers) {
|
||||||
mdk_rdev_t *rdev2;
|
mdk_rdev_t *rdev2;
|
||||||
/* Activating a spare .. or possibly reactivating
|
/* Activating a spare .. or possibly reactivating
|
||||||
* if we every get bitmaps working here.
|
* if we ever get bitmaps working here.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (rdev->raid_disk != -1)
|
if (rdev->raid_disk != -1)
|
||||||
|
@ -3482,12 +3488,15 @@ sync_completed_show(mddev_t *mddev, char *page)
|
||||||
{
|
{
|
||||||
unsigned long max_sectors, resync;
|
unsigned long max_sectors, resync;
|
||||||
|
|
||||||
|
if (!test_bit(MD_RECOVERY_RUNNING, &mddev->recovery))
|
||||||
|
return sprintf(page, "none\n");
|
||||||
|
|
||||||
if (test_bit(MD_RECOVERY_SYNC, &mddev->recovery))
|
if (test_bit(MD_RECOVERY_SYNC, &mddev->recovery))
|
||||||
max_sectors = mddev->resync_max_sectors;
|
max_sectors = mddev->resync_max_sectors;
|
||||||
else
|
else
|
||||||
max_sectors = mddev->dev_sectors;
|
max_sectors = mddev->dev_sectors;
|
||||||
|
|
||||||
resync = (mddev->curr_resync - atomic_read(&mddev->recovery_active));
|
resync = mddev->curr_resync_completed;
|
||||||
return sprintf(page, "%lu / %lu\n", resync, max_sectors);
|
return sprintf(page, "%lu / %lu\n", resync, max_sectors);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6334,18 +6343,13 @@ void md_do_sync(mddev_t *mddev)
|
||||||
sector_t sectors;
|
sector_t sectors;
|
||||||
|
|
||||||
skipped = 0;
|
skipped = 0;
|
||||||
if (j >= mddev->resync_max) {
|
|
||||||
sysfs_notify(&mddev->kobj, NULL, "sync_completed");
|
|
||||||
wait_event(mddev->recovery_wait,
|
|
||||||
mddev->resync_max > j
|
|
||||||
|| kthread_should_stop());
|
|
||||||
}
|
|
||||||
if (kthread_should_stop())
|
|
||||||
goto interrupted;
|
|
||||||
|
|
||||||
if (mddev->curr_resync > mddev->curr_resync_completed &&
|
if ((mddev->curr_resync > mddev->curr_resync_completed &&
|
||||||
(mddev->curr_resync - mddev->curr_resync_completed)
|
(mddev->curr_resync - mddev->curr_resync_completed)
|
||||||
> (max_sectors >> 4)) {
|
> (max_sectors >> 4)) ||
|
||||||
|
(j - mddev->curr_resync_completed)*2
|
||||||
|
>= mddev->resync_max - mddev->curr_resync_completed
|
||||||
|
) {
|
||||||
/* time to update curr_resync_completed */
|
/* time to update curr_resync_completed */
|
||||||
blk_unplug(mddev->queue);
|
blk_unplug(mddev->queue);
|
||||||
wait_event(mddev->recovery_wait,
|
wait_event(mddev->recovery_wait,
|
||||||
|
@ -6353,7 +6357,17 @@ void md_do_sync(mddev_t *mddev)
|
||||||
mddev->curr_resync_completed =
|
mddev->curr_resync_completed =
|
||||||
mddev->curr_resync;
|
mddev->curr_resync;
|
||||||
set_bit(MD_CHANGE_CLEAN, &mddev->flags);
|
set_bit(MD_CHANGE_CLEAN, &mddev->flags);
|
||||||
|
sysfs_notify(&mddev->kobj, NULL, "sync_completed");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (j >= mddev->resync_max)
|
||||||
|
wait_event(mddev->recovery_wait,
|
||||||
|
mddev->resync_max > j
|
||||||
|
|| kthread_should_stop());
|
||||||
|
|
||||||
|
if (kthread_should_stop())
|
||||||
|
goto interrupted;
|
||||||
|
|
||||||
sectors = mddev->pers->sync_request(mddev, j, &skipped,
|
sectors = mddev->pers->sync_request(mddev, j, &skipped,
|
||||||
currspeed < speed_min(mddev));
|
currspeed < speed_min(mddev));
|
||||||
if (sectors == 0) {
|
if (sectors == 0) {
|
||||||
|
@ -6461,6 +6475,7 @@ void md_do_sync(mddev_t *mddev)
|
||||||
|
|
||||||
skip:
|
skip:
|
||||||
mddev->curr_resync = 0;
|
mddev->curr_resync = 0;
|
||||||
|
mddev->curr_resync_completed = 0;
|
||||||
mddev->resync_min = 0;
|
mddev->resync_min = 0;
|
||||||
mddev->resync_max = MaxSector;
|
mddev->resync_max = MaxSector;
|
||||||
sysfs_notify(&mddev->kobj, NULL, "sync_completed");
|
sysfs_notify(&mddev->kobj, NULL, "sync_completed");
|
||||||
|
|
|
@ -12,10 +12,17 @@
|
||||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _MD_K_H
|
#ifndef _MD_MD_H
|
||||||
#define _MD_K_H
|
#define _MD_MD_H
|
||||||
|
|
||||||
#ifdef CONFIG_BLOCK
|
#include <linux/blkdev.h>
|
||||||
|
#include <linux/kobject.h>
|
||||||
|
#include <linux/list.h>
|
||||||
|
#include <linux/mm.h>
|
||||||
|
#include <linux/mutex.h>
|
||||||
|
#include <linux/timer.h>
|
||||||
|
#include <linux/wait.h>
|
||||||
|
#include <linux/workqueue.h>
|
||||||
|
|
||||||
#define MaxSector (~(sector_t)0)
|
#define MaxSector (~(sector_t)0)
|
||||||
|
|
||||||
|
@ -408,10 +415,6 @@ static inline void safe_put_page(struct page *p)
|
||||||
if (p) put_page(p);
|
if (p) put_page(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_BLOCK */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
extern int register_md_personality(struct mdk_personality *p);
|
extern int register_md_personality(struct mdk_personality *p);
|
||||||
extern int unregister_md_personality(struct mdk_personality *p);
|
extern int unregister_md_personality(struct mdk_personality *p);
|
||||||
extern mdk_thread_t * md_register_thread(void (*run) (mddev_t *mddev),
|
extern mdk_thread_t * md_register_thread(void (*run) (mddev_t *mddev),
|
||||||
|
@ -434,3 +437,5 @@ extern void md_new_event(mddev_t *mddev);
|
||||||
extern int md_allow_write(mddev_t *mddev);
|
extern int md_allow_write(mddev_t *mddev);
|
||||||
extern void md_wait_for_blocked_rdev(mdk_rdev_t *rdev, mddev_t *mddev);
|
extern void md_wait_for_blocked_rdev(mdk_rdev_t *rdev, mddev_t *mddev);
|
||||||
extern void md_set_array_sectors(mddev_t *mddev, sector_t array_sectors);
|
extern void md_set_array_sectors(mddev_t *mddev, sector_t array_sectors);
|
||||||
|
|
||||||
|
#endif /* _MD_MD_H */
|
||||||
|
|
|
@ -3845,6 +3845,7 @@ static sector_t reshape_request(mddev_t *mddev, sector_t sector_nr, int *skipped
|
||||||
wait_event(conf->wait_for_overlap,
|
wait_event(conf->wait_for_overlap,
|
||||||
atomic_read(&conf->reshape_stripes)==0);
|
atomic_read(&conf->reshape_stripes)==0);
|
||||||
mddev->reshape_position = conf->reshape_progress;
|
mddev->reshape_position = conf->reshape_progress;
|
||||||
|
mddev->curr_resync_completed = mddev->curr_resync;
|
||||||
conf->reshape_checkpoint = jiffies;
|
conf->reshape_checkpoint = jiffies;
|
||||||
set_bit(MD_CHANGE_DEVS, &mddev->flags);
|
set_bit(MD_CHANGE_DEVS, &mddev->flags);
|
||||||
md_wakeup_thread(mddev->thread);
|
md_wakeup_thread(mddev->thread);
|
||||||
|
@ -3854,6 +3855,7 @@ static sector_t reshape_request(mddev_t *mddev, sector_t sector_nr, int *skipped
|
||||||
conf->reshape_safe = mddev->reshape_position;
|
conf->reshape_safe = mddev->reshape_position;
|
||||||
spin_unlock_irq(&conf->device_lock);
|
spin_unlock_irq(&conf->device_lock);
|
||||||
wake_up(&conf->wait_for_overlap);
|
wake_up(&conf->wait_for_overlap);
|
||||||
|
sysfs_notify(&mddev->kobj, NULL, "sync_completed");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mddev->delta_disks < 0) {
|
if (mddev->delta_disks < 0) {
|
||||||
|
@ -3938,11 +3940,13 @@ static sector_t reshape_request(mddev_t *mddev, sector_t sector_nr, int *skipped
|
||||||
* then we need to write out the superblock.
|
* then we need to write out the superblock.
|
||||||
*/
|
*/
|
||||||
sector_nr += reshape_sectors;
|
sector_nr += reshape_sectors;
|
||||||
if (sector_nr >= mddev->resync_max) {
|
if ((sector_nr - mddev->curr_resync_completed) * 2
|
||||||
|
>= mddev->resync_max - mddev->curr_resync_completed) {
|
||||||
/* Cannot proceed until we've updated the superblock... */
|
/* Cannot proceed until we've updated the superblock... */
|
||||||
wait_event(conf->wait_for_overlap,
|
wait_event(conf->wait_for_overlap,
|
||||||
atomic_read(&conf->reshape_stripes) == 0);
|
atomic_read(&conf->reshape_stripes) == 0);
|
||||||
mddev->reshape_position = conf->reshape_progress;
|
mddev->reshape_position = conf->reshape_progress;
|
||||||
|
mddev->curr_resync_completed = mddev->curr_resync;
|
||||||
conf->reshape_checkpoint = jiffies;
|
conf->reshape_checkpoint = jiffies;
|
||||||
set_bit(MD_CHANGE_DEVS, &mddev->flags);
|
set_bit(MD_CHANGE_DEVS, &mddev->flags);
|
||||||
md_wakeup_thread(mddev->thread);
|
md_wakeup_thread(mddev->thread);
|
||||||
|
@ -3953,6 +3957,7 @@ static sector_t reshape_request(mddev_t *mddev, sector_t sector_nr, int *skipped
|
||||||
conf->reshape_safe = mddev->reshape_position;
|
conf->reshape_safe = mddev->reshape_position;
|
||||||
spin_unlock_irq(&conf->device_lock);
|
spin_unlock_irq(&conf->device_lock);
|
||||||
wake_up(&conf->wait_for_overlap);
|
wake_up(&conf->wait_for_overlap);
|
||||||
|
sysfs_notify(&mddev->kobj, NULL, "sync_completed");
|
||||||
}
|
}
|
||||||
return reshape_sectors;
|
return reshape_sectors;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5934,7 +5934,7 @@ mpt_config(MPT_ADAPTER *ioc, CONFIGPARMS *pCfg)
|
||||||
|
|
||||||
/* Initalize the timer
|
/* Initalize the timer
|
||||||
*/
|
*/
|
||||||
init_timer(&pCfg->timer);
|
init_timer_on_stack(&pCfg->timer);
|
||||||
pCfg->timer.data = (unsigned long) ioc;
|
pCfg->timer.data = (unsigned long) ioc;
|
||||||
pCfg->timer.function = mpt_timer_expired;
|
pCfg->timer.function = mpt_timer_expired;
|
||||||
pCfg->wait_done = 0;
|
pCfg->wait_done = 0;
|
||||||
|
|
|
@ -375,7 +375,7 @@ static int __init gru_init(void)
|
||||||
void *gru_start_vaddr;
|
void *gru_start_vaddr;
|
||||||
|
|
||||||
if (!is_uv_system())
|
if (!is_uv_system())
|
||||||
return -ENODEV;
|
return 0;
|
||||||
|
|
||||||
#if defined CONFIG_IA64
|
#if defined CONFIG_IA64
|
||||||
gru_start_paddr = 0xd000000000UL; /* ZZZZZZZZZZZZZZZZZZZ fixme */
|
gru_start_paddr = 0xd000000000UL; /* ZZZZZZZZZZZZZZZZZZZ fixme */
|
||||||
|
|
|
@ -248,19 +248,19 @@ xp_init(void)
|
||||||
enum xp_retval ret;
|
enum xp_retval ret;
|
||||||
int ch_number;
|
int ch_number;
|
||||||
|
|
||||||
|
/* initialize the connection registration mutex */
|
||||||
|
for (ch_number = 0; ch_number < XPC_MAX_NCHANNELS; ch_number++)
|
||||||
|
mutex_init(&xpc_registrations[ch_number].mutex);
|
||||||
|
|
||||||
if (is_shub())
|
if (is_shub())
|
||||||
ret = xp_init_sn2();
|
ret = xp_init_sn2();
|
||||||
else if (is_uv())
|
else if (is_uv())
|
||||||
ret = xp_init_uv();
|
ret = xp_init_uv();
|
||||||
else
|
else
|
||||||
ret = xpUnsupported;
|
ret = 0;
|
||||||
|
|
||||||
if (ret != xpSuccess)
|
if (ret != xpSuccess)
|
||||||
return -ENODEV;
|
return ret;
|
||||||
|
|
||||||
/* initialize the connection registration mutex */
|
|
||||||
for (ch_number = 0; ch_number < XPC_MAX_NCHANNELS; ch_number++)
|
|
||||||
mutex_init(&xpc_registrations[ch_number].mutex);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -797,14 +797,12 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq)
|
||||||
goto cleanup2;
|
goto cleanup2;
|
||||||
}
|
}
|
||||||
|
|
||||||
pr_info("%s: alarms up to one %s%s, %zd bytes nvram%s\n",
|
pr_info("%s: %s%s, %zd bytes nvram%s\n",
|
||||||
dev_name(&cmos_rtc.rtc->dev),
|
dev_name(&cmos_rtc.rtc->dev),
|
||||||
is_valid_irq(rtc_irq)
|
!is_valid_irq(rtc_irq) ? "no alarms" :
|
||||||
? (cmos_rtc.mon_alrm
|
cmos_rtc.mon_alrm ? "alarms up to one year" :
|
||||||
? "year"
|
cmos_rtc.day_alrm ? "alarms up to one month" :
|
||||||
: (cmos_rtc.day_alrm
|
"alarms up to one day",
|
||||||
? "month" : "day"))
|
|
||||||
: "no",
|
|
||||||
cmos_rtc.century ? ", y3k" : "",
|
cmos_rtc.century ? ", y3k" : "",
|
||||||
nvram.size,
|
nvram.size,
|
||||||
is_hpet_enabled() ? ", hpet irqs" : "");
|
is_hpet_enabled() ? ", hpet irqs" : "");
|
||||||
|
|
|
@ -166,7 +166,7 @@ static void bfin_serial_start_tx(struct uart_port *port)
|
||||||
struct tty_struct *tty = uart->port.info->port.tty;
|
struct tty_struct *tty = uart->port.info->port.tty;
|
||||||
|
|
||||||
#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
|
#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
|
||||||
if (uart->scts && (!bfin_serial_get_mctrl(&uart->port)&TIOCM_CTS)) {
|
if (uart->scts && !(bfin_serial_get_mctrl(&uart->port) & TIOCM_CTS)) {
|
||||||
uart->scts = 0;
|
uart->scts = 0;
|
||||||
uart_handle_cts_change(&uart->port, uart->scts);
|
uart_handle_cts_change(&uart->port, uart->scts);
|
||||||
}
|
}
|
||||||
|
@ -368,7 +368,7 @@ static irqreturn_t bfin_serial_tx_int(int irq, void *dev_id)
|
||||||
struct bfin_serial_port *uart = dev_id;
|
struct bfin_serial_port *uart = dev_id;
|
||||||
|
|
||||||
#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
|
#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
|
||||||
if (uart->scts && (!bfin_serial_get_mctrl(&uart->port)&TIOCM_CTS)) {
|
if (uart->scts && !(bfin_serial_get_mctrl(&uart->port) & TIOCM_CTS)) {
|
||||||
uart->scts = 0;
|
uart->scts = 0;
|
||||||
uart_handle_cts_change(&uart->port, uart->scts);
|
uart_handle_cts_change(&uart->port, uart->scts);
|
||||||
}
|
}
|
||||||
|
@ -504,7 +504,7 @@ static irqreturn_t bfin_serial_dma_tx_int(int irq, void *dev_id)
|
||||||
struct circ_buf *xmit = &uart->port.info->xmit;
|
struct circ_buf *xmit = &uart->port.info->xmit;
|
||||||
|
|
||||||
#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
|
#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
|
||||||
if (uart->scts && (!bfin_serial_get_mctrl(&uart->port)&TIOCM_CTS)) {
|
if (uart->scts && !(bfin_serial_get_mctrl(&uart->port)&TIOCM_CTS)) {
|
||||||
uart->scts = 0;
|
uart->scts = 0;
|
||||||
uart_handle_cts_change(&uart->port, uart->scts);
|
uart_handle_cts_change(&uart->port, uart->scts);
|
||||||
}
|
}
|
||||||
|
|
|
@ -213,7 +213,7 @@ static int flush(struct driver_data *drv_data)
|
||||||
while (read_SSSR(reg) & SSSR_RNE) {
|
while (read_SSSR(reg) & SSSR_RNE) {
|
||||||
read_SSDR(reg);
|
read_SSDR(reg);
|
||||||
}
|
}
|
||||||
} while ((read_SSSR(reg) & SSSR_BSY) && limit--);
|
} while ((read_SSSR(reg) & SSSR_BSY) && --limit);
|
||||||
write_SSSR(SSSR_ROR, reg);
|
write_SSSR(SSSR_ROR, reg);
|
||||||
|
|
||||||
return limit;
|
return limit;
|
||||||
|
@ -484,7 +484,7 @@ static int wait_ssp_rx_stall(void const __iomem *ioaddr)
|
||||||
{
|
{
|
||||||
unsigned long limit = loops_per_jiffy << 1;
|
unsigned long limit = loops_per_jiffy << 1;
|
||||||
|
|
||||||
while ((read_SSSR(ioaddr) & SSSR_BSY) && limit--)
|
while ((read_SSSR(ioaddr) & SSSR_BSY) && --limit)
|
||||||
cpu_relax();
|
cpu_relax();
|
||||||
|
|
||||||
return limit;
|
return limit;
|
||||||
|
@ -494,7 +494,7 @@ static int wait_dma_channel_stop(int channel)
|
||||||
{
|
{
|
||||||
unsigned long limit = loops_per_jiffy << 1;
|
unsigned long limit = loops_per_jiffy << 1;
|
||||||
|
|
||||||
while (!(DCSR(channel) & DCSR_STOPSTATE) && limit--)
|
while (!(DCSR(channel) & DCSR_STOPSTATE) && --limit)
|
||||||
cpu_relax();
|
cpu_relax();
|
||||||
|
|
||||||
return limit;
|
return limit;
|
||||||
|
@ -1700,6 +1700,13 @@ static int pxa2xx_spi_resume(struct platform_device *pdev)
|
||||||
struct ssp_device *ssp = drv_data->ssp;
|
struct ssp_device *ssp = drv_data->ssp;
|
||||||
int status = 0;
|
int status = 0;
|
||||||
|
|
||||||
|
if (drv_data->rx_channel != -1)
|
||||||
|
DRCMR(drv_data->ssp->drcmr_rx) =
|
||||||
|
DRCMR_MAPVLD | drv_data->rx_channel;
|
||||||
|
if (drv_data->tx_channel != -1)
|
||||||
|
DRCMR(drv_data->ssp->drcmr_tx) =
|
||||||
|
DRCMR_MAPVLD | drv_data->tx_channel;
|
||||||
|
|
||||||
/* Enable the SSP clock */
|
/* Enable the SSP clock */
|
||||||
clk_enable(ssp->clk);
|
clk_enable(ssp->clk);
|
||||||
|
|
||||||
|
|
|
@ -191,8 +191,10 @@ int go7007_reset_encoder(struct go7007 *go)
|
||||||
/*
|
/*
|
||||||
* Attempt to instantiate an I2C client by ID, probably loading a module.
|
* Attempt to instantiate an I2C client by ID, probably loading a module.
|
||||||
*/
|
*/
|
||||||
static int init_i2c_module(struct i2c_adapter *adapter, int id, int addr)
|
static int init_i2c_module(struct i2c_adapter *adapter, const char *type,
|
||||||
|
int id, int addr)
|
||||||
{
|
{
|
||||||
|
struct i2c_board_info info;
|
||||||
char *modname;
|
char *modname;
|
||||||
|
|
||||||
switch (id) {
|
switch (id) {
|
||||||
|
@ -226,7 +228,11 @@ static int init_i2c_module(struct i2c_adapter *adapter, int id, int addr)
|
||||||
}
|
}
|
||||||
if (modname != NULL)
|
if (modname != NULL)
|
||||||
request_module(modname);
|
request_module(modname);
|
||||||
if (wis_i2c_probe_device(adapter, id, addr) == 1)
|
|
||||||
|
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||||
|
info.addr = addr;
|
||||||
|
strlcpy(info.type, type, I2C_NAME_SIZE);
|
||||||
|
if (!i2c_new_device(adapter, &info))
|
||||||
return 0;
|
return 0;
|
||||||
if (modname != NULL)
|
if (modname != NULL)
|
||||||
printk(KERN_INFO
|
printk(KERN_INFO
|
||||||
|
@ -266,6 +272,7 @@ int go7007_register_encoder(struct go7007 *go)
|
||||||
if (go->i2c_adapter_online) {
|
if (go->i2c_adapter_online) {
|
||||||
for (i = 0; i < go->board_info->num_i2c_devs; ++i)
|
for (i = 0; i < go->board_info->num_i2c_devs; ++i)
|
||||||
init_i2c_module(&go->i2c_adapter,
|
init_i2c_module(&go->i2c_adapter,
|
||||||
|
go->board_info->i2c_devs[i].type,
|
||||||
go->board_info->i2c_devs[i].id,
|
go->board_info->i2c_devs[i].id,
|
||||||
go->board_info->i2c_devs[i].addr);
|
go->board_info->i2c_devs[i].addr);
|
||||||
if (go->board_id == GO7007_BOARDID_ADLINK_MPG24)
|
if (go->board_id == GO7007_BOARDID_ADLINK_MPG24)
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue