Merge branch 'linux-2.6'
This commit is contained in:
commit
9156ad4833
|
@ -527,29 +527,30 @@ and is between 256 and 4096 characters. It is defined in the file
|
|||
Format: <area>[,<node>]
|
||||
See also Documentation/networking/decnet.txt.
|
||||
|
||||
default_blu= [VT]
|
||||
vt.default_blu= [VT]
|
||||
Format: <blue0>,<blue1>,<blue2>,...,<blue15>
|
||||
Change the default blue palette of the console.
|
||||
This is a 16-member array composed of values
|
||||
ranging from 0-255.
|
||||
|
||||
default_grn= [VT]
|
||||
vt.default_grn= [VT]
|
||||
Format: <green0>,<green1>,<green2>,...,<green15>
|
||||
Change the default green palette of the console.
|
||||
This is a 16-member array composed of values
|
||||
ranging from 0-255.
|
||||
|
||||
default_red= [VT]
|
||||
vt.default_red= [VT]
|
||||
Format: <red0>,<red1>,<red2>,...,<red15>
|
||||
Change the default red palette of the console.
|
||||
This is a 16-member array composed of values
|
||||
ranging from 0-255.
|
||||
|
||||
default_utf8= [VT]
|
||||
vt.default_utf8=
|
||||
[VT]
|
||||
Format=<0|1>
|
||||
Set system-wide default UTF-8 mode for all tty's.
|
||||
Default is 0 and by setting to 1, it enables UTF-8
|
||||
mode for all newly opened or allocated terminals.
|
||||
Default is 1, i.e. UTF-8 mode is enabled for all
|
||||
newly opened terminals.
|
||||
|
||||
dhash_entries= [KNL]
|
||||
Set number of hash buckets for dentry cache.
|
||||
|
@ -883,6 +884,14 @@ and is between 256 and 4096 characters. It is defined in the file
|
|||
lapic_timer_c2_ok [X86-32,x86-64,APIC] trust the local apic timer in
|
||||
C2 power state.
|
||||
|
||||
libata.dma= [LIBATA] DMA control
|
||||
libata.dma=0 Disable all PATA and SATA DMA
|
||||
libata.dma=1 PATA and SATA Disk DMA only
|
||||
libata.dma=2 ATAPI (CDROM) DMA only
|
||||
libata.dma=4 Compact Flash DMA only
|
||||
Combinations also work, so libata.dma=3 enables DMA
|
||||
for disks and CDROMs, but not CFs.
|
||||
|
||||
libata.noacpi [LIBATA] Disables use of ACPI in libata suspend/resume
|
||||
when set.
|
||||
Format: <int>
|
||||
|
|
|
@ -45,29 +45,6 @@ long fails. The definition looks like :
|
|||
typedef struct { atomic_long_t a; } local_t;
|
||||
|
||||
|
||||
* Rules to follow when using local atomic operations
|
||||
|
||||
- Variables touched by local ops must be per cpu variables.
|
||||
- _Only_ the CPU owner of these variables must write to them.
|
||||
- This CPU can use local ops from any context (process, irq, softirq, nmi, ...)
|
||||
to update its local_t variables.
|
||||
- Preemption (or interrupts) must be disabled when using local ops in
|
||||
process context to make sure the process won't be migrated to a
|
||||
different CPU between getting the per-cpu variable and doing the
|
||||
actual local op.
|
||||
- When using local ops in interrupt context, no special care must be
|
||||
taken on a mainline kernel, since they will run on the local CPU with
|
||||
preemption already disabled. I suggest, however, to explicitly
|
||||
disable preemption anyway to make sure it will still work correctly on
|
||||
-rt kernels.
|
||||
- Reading the local cpu variable will provide the current copy of the
|
||||
variable.
|
||||
- Reads of these variables can be done from any CPU, because updates to
|
||||
"long", aligned, variables are always atomic. Since no memory
|
||||
synchronization is done by the writer CPU, an outdated copy of the
|
||||
variable can be read when reading some _other_ cpu's variables.
|
||||
|
||||
|
||||
* Rules to follow when using local atomic operations
|
||||
|
||||
- Variables touched by local ops must be per cpu variables.
|
||||
|
|
|
@ -61,7 +61,10 @@ Transmit path guidelines:
|
|||
2) Do not forget to update netdev->trans_start to jiffies after
|
||||
each new tx packet is given to the hardware.
|
||||
|
||||
3) Do not forget that once you return 0 from your hard_start_xmit
|
||||
3) A hard_start_xmit method must not modify the shared parts of a
|
||||
cloned SKB.
|
||||
|
||||
4) Do not forget that once you return 0 from your hard_start_xmit
|
||||
method, it is your driver's responsibility to free up the SKB
|
||||
and in some finite amount of time.
|
||||
|
||||
|
|
|
@ -12,8 +12,8 @@ and many Linux driver to support it.
|
|||
"wavelan" driver (old ISA Wavelan)
|
||||
----------------
|
||||
o Config : Network device -> Wireless LAN -> AT&T WaveLAN
|
||||
o Location : .../drivers/net/wavelan*
|
||||
o in-line doc : .../drivers/net/wavelan.p.h
|
||||
o Location : .../drivers/net/wireless/wavelan*
|
||||
o in-line doc : .../drivers/net/wireless/wavelan.p.h
|
||||
o on-line doc :
|
||||
http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Wavelan.html
|
||||
|
||||
|
|
|
@ -97,10 +97,6 @@ ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>
|
|||
autoconfiguration will take place. The most common way to use this
|
||||
is "ip=dhcp".
|
||||
|
||||
Note that "ip=off" is not the same thing as "ip=::::::off", because in
|
||||
the latter autoconfiguration will take place if any of DHCP, BOOTP or RARP
|
||||
are compiled in the kernel.
|
||||
|
||||
<client-ip> IP address of the client.
|
||||
|
||||
Default: Determined using autoconfiguration.
|
||||
|
@ -149,7 +145,9 @@ ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>
|
|||
this option.
|
||||
|
||||
off or none: don't use autoconfiguration
|
||||
(do static IP assignment instead)
|
||||
on or any: use any protocol available in the kernel
|
||||
(default)
|
||||
dhcp: use DHCP
|
||||
bootp: use BOOTP
|
||||
rarp: use RARP
|
||||
|
|
|
@ -42,23 +42,27 @@ like this source file: see Documentation/watchdog/src/watchdog-simple.c
|
|||
A more advanced driver could for example check that a HTTP server is
|
||||
still responding before doing the write call to ping the watchdog.
|
||||
|
||||
When the device is closed, the watchdog is disabled. This is not
|
||||
always such a good idea, since if there is a bug in the watchdog
|
||||
daemon and it crashes the system will not reboot. Because of this,
|
||||
some of the drivers support the configuration option "Disable watchdog
|
||||
shutdown on close", CONFIG_WATCHDOG_NOWAYOUT. If it is set to Y when
|
||||
compiling the kernel, there is no way of disabling the watchdog once
|
||||
it has been started. So, if the watchdog daemon crashes, the system
|
||||
will reboot after the timeout has passed. Watchdog devices also usually
|
||||
support the nowayout module parameter so that this option can be controlled
|
||||
at runtime.
|
||||
When the device is closed, the watchdog is disabled, unless the "Magic
|
||||
Close" feature is supported (see below). This is not always such a
|
||||
good idea, since if there is a bug in the watchdog daemon and it
|
||||
crashes the system will not reboot. Because of this, some of the
|
||||
drivers support the configuration option "Disable watchdog shutdown on
|
||||
close", CONFIG_WATCHDOG_NOWAYOUT. If it is set to Y when compiling
|
||||
the kernel, there is no way of disabling the watchdog once it has been
|
||||
started. So, if the watchdog daemon crashes, the system will reboot
|
||||
after the timeout has passed. Watchdog devices also usually support
|
||||
the nowayout module parameter so that this option can be controlled at
|
||||
runtime.
|
||||
|
||||
Drivers will not disable the watchdog, unless a specific magic character 'V'
|
||||
has been sent /dev/watchdog just before closing the file. If the userspace
|
||||
daemon closes the file without sending this special character, the driver
|
||||
will assume that the daemon (and userspace in general) died, and will stop
|
||||
pinging the watchdog without disabling it first. This will then cause a
|
||||
reboot if the watchdog is not re-opened in sufficient time.
|
||||
Magic Close feature:
|
||||
|
||||
If a driver supports "Magic Close", the driver will not disable the
|
||||
watchdog unless a specific magic character 'V' has been sent to
|
||||
/dev/watchdog just before closing the file. If the userspace daemon
|
||||
closes the file without sending this special character, the driver
|
||||
will assume that the daemon (and userspace in general) died, and will
|
||||
stop pinging the watchdog without disabling it first. This will then
|
||||
cause a reboot if the watchdog is not re-opened in sufficient time.
|
||||
|
||||
The ioctl API:
|
||||
|
||||
|
|
56
MAINTAINERS
56
MAINTAINERS
|
@ -665,12 +665,18 @@ S: Maintained
|
|||
|
||||
ATMEL AT91 MCI DRIVER
|
||||
P: Nicolas Ferre
|
||||
M: nicolas.ferre@rfo.atmel.com
|
||||
M: nicolas.ferre@atmel.com
|
||||
L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
|
||||
W: http://www.atmel.com/products/AT91/
|
||||
W: http://www.at91.com/
|
||||
S: Maintained
|
||||
|
||||
ATMEL LCDFB DRIVER
|
||||
P: Nicolas Ferre
|
||||
M: nicolas.ferre@atmel.com
|
||||
L: linux-fbdev-devel@lists.sourceforge.net (subscribers-only)
|
||||
S: Maintained
|
||||
|
||||
ATMEL MACB ETHERNET DRIVER
|
||||
P: Haavard Skinnemoen
|
||||
M: hskinnemoen@atmel.com
|
||||
|
@ -1870,8 +1876,10 @@ T: quilt kernel.org/pub/linux/kernel/people/bart/pata-2.6/
|
|||
S: Maintained
|
||||
|
||||
IDE/ATAPI CDROM DRIVER
|
||||
P: Borislav Petkov
|
||||
M: bbpetkov@yahoo.de
|
||||
L: linux-ide@vger.kernel.org
|
||||
S: Unmaintained
|
||||
S: Maintained
|
||||
|
||||
IDE/ATAPI FLOPPY DRIVERS
|
||||
P: Paul Bristow
|
||||
|
@ -1917,7 +1925,7 @@ INFINIBAND SUBSYSTEM
|
|||
P: Roland Dreier
|
||||
M: rolandd@cisco.com
|
||||
P: Sean Hefty
|
||||
M: mshefty@ichips.intel.com
|
||||
M: sean.hefty@intel.com
|
||||
P: Hal Rosenstock
|
||||
M: hal.rosenstock@gmail.com
|
||||
L: general@lists.openfabrics.org
|
||||
|
@ -1982,29 +1990,27 @@ L: netdev@vger.kernel.org
|
|||
S: Maintained
|
||||
|
||||
INTEL PRO/100 ETHERNET SUPPORT
|
||||
P: John Ronciak
|
||||
M: john.ronciak@intel.com
|
||||
P: Auke Kok
|
||||
M: auke-jan.h.kok@intel.com
|
||||
P: Jesse Brandeburg
|
||||
M: jesse.brandeburg@intel.com
|
||||
P: Jeff Kirsher
|
||||
M: jeffrey.t.kirsher@intel.com
|
||||
P: Auke Kok
|
||||
M: auke-jan.h.kok@intel.com
|
||||
P: John Ronciak
|
||||
M: john.ronciak@intel.com
|
||||
L: e1000-devel@lists.sourceforge.net
|
||||
W: http://sourceforge.net/projects/e1000/
|
||||
S: Supported
|
||||
|
||||
INTEL PRO/1000 GIGABIT ETHERNET SUPPORT
|
||||
P: Jeb Cramer
|
||||
M: cramerj@intel.com
|
||||
P: John Ronciak
|
||||
M: john.ronciak@intel.com
|
||||
P: Auke Kok
|
||||
M: auke-jan.h.kok@intel.com
|
||||
P: Jesse Brandeburg
|
||||
M: jesse.brandeburg@intel.com
|
||||
P: Jeff Kirsher
|
||||
M: jeffrey.t.kirsher@intel.com
|
||||
P: Auke Kok
|
||||
M: auke-jan.h.kok@intel.com
|
||||
P: John Ronciak
|
||||
M: john.ronciak@intel.com
|
||||
L: e1000-devel@lists.sourceforge.net
|
||||
W: http://sourceforge.net/projects/e1000/
|
||||
S: Supported
|
||||
|
@ -2029,7 +2035,7 @@ P: James Ketrenos
|
|||
M: jketreno@linux.intel.com
|
||||
L: linux-wireless@vger.kernel.org
|
||||
L: ipw2100-devel@lists.sourceforge.net
|
||||
L: http://lists.sourceforge.net/mailman/listinfo/ipw2100-devel
|
||||
W: http://lists.sourceforge.net/mailman/listinfo/ipw2100-devel
|
||||
W: http://ipw2100.sourceforge.net
|
||||
S: Supported
|
||||
|
||||
|
@ -2040,7 +2046,7 @@ P: James Ketrenos
|
|||
M: jketreno@linux.intel.com
|
||||
L: linux-wireless@vger.kernel.org
|
||||
L: ipw2100-devel@lists.sourceforge.net
|
||||
L: http://lists.sourceforge.net/mailman/listinfo/ipw2100-devel
|
||||
W: http://lists.sourceforge.net/mailman/listinfo/ipw2100-devel
|
||||
W: http://ipw2200.sourceforge.net
|
||||
S: Supported
|
||||
|
||||
|
@ -2597,7 +2603,7 @@ S: Maintained
|
|||
MSI LAPTOP SUPPORT
|
||||
P: Lennart Poettering
|
||||
M: mzxreary@0pointer.de
|
||||
L: https://tango.0pointer.de/mailman/listinfo/s270-linux
|
||||
W: https://tango.0pointer.de/mailman/listinfo/s270-linux
|
||||
W: http://0pointer.de/lennart/tchibo.html
|
||||
S: Maintained
|
||||
|
||||
|
@ -2739,8 +2745,8 @@ T: git kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6.git
|
|||
S: Maintained
|
||||
|
||||
NETXEN (1/10) GbE SUPPORT
|
||||
P: Amit S. Kale
|
||||
M: amitkale@netxen.com
|
||||
P: Dhananjay Phadke
|
||||
M: dhananjay@netxen.com
|
||||
L: netdev@vger.kernel.org
|
||||
W: http://www.netxen.com
|
||||
S: Supported
|
||||
|
@ -3611,8 +3617,10 @@ L: linux-kernel@vger.kernel.org ?
|
|||
S: Supported
|
||||
|
||||
SPIDERNET NETWORK DRIVER for CELL
|
||||
P: Linas Vepstas
|
||||
M: linas@austin.ibm.com
|
||||
P: Ishizaki Kou
|
||||
M: kou.ishizaki@toshiba.co.jp
|
||||
P: Jens Osterkamp
|
||||
M: jens@de.ibm.com
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
|
||||
|
@ -4054,6 +4062,14 @@ L: user-mode-linux-user@lists.sourceforge.net
|
|||
W: http://user-mode-linux.sourceforge.net
|
||||
S: Maintained
|
||||
|
||||
USERSPACE I/O (UIO)
|
||||
P: Hans J. Koch
|
||||
M: hjk@linutronix.de
|
||||
P: Greg Kroah-Hartman
|
||||
M: gregkh@suse.de
|
||||
L: linux-kernel@vger.kernel.org
|
||||
S: Maintained
|
||||
|
||||
FAT/VFAT/MSDOS FILESYSTEM:
|
||||
P: OGAWA Hirofumi
|
||||
M: hirofumi@mail.parknet.co.jp
|
||||
|
|
6
Makefile
6
Makefile
|
@ -1,7 +1,7 @@
|
|||
VERSION = 2
|
||||
PATCHLEVEL = 6
|
||||
SUBLEVEL = 24
|
||||
EXTRAVERSION = -rc6
|
||||
EXTRAVERSION = -rc8
|
||||
NAME = Arr Matey! A Hairy Bilge Rat!
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
@ -12,7 +12,7 @@ NAME = Arr Matey! A Hairy Bilge Rat!
|
|||
|
||||
# Do not:
|
||||
# o use make's built-in rules and variables
|
||||
# (this increases performance and avoid hard-to-debug behavour);
|
||||
# (this increases performance and avoids hard-to-debug behaviour);
|
||||
# o print "Entering directory ...";
|
||||
MAKEFLAGS += -rR --no-print-directory
|
||||
|
||||
|
@ -1329,7 +1329,7 @@ else
|
|||
ALLINCLUDE_ARCHS := $(SRCARCH)
|
||||
endif
|
||||
else
|
||||
#Allow user to specify only ALLSOURCE_PATHS on the command line, keeping existing behavour.
|
||||
#Allow user to specify only ALLSOURCE_PATHS on the command line, keeping existing behaviour.
|
||||
ALLINCLUDE_ARCHS := $(ALLSOURCE_ARCHS)
|
||||
endif
|
||||
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
i386
|
||||
x86_64
|
|
@ -225,7 +225,7 @@ alpha_fp_emul (unsigned long pc)
|
|||
FP_UNPACK_SP(SB, &vb);
|
||||
DR_c = DB_c;
|
||||
DR_s = DB_s;
|
||||
DR_e = DB_e;
|
||||
DR_e = DB_e + (1024 - 128);
|
||||
DR_f = SB_f << (52 - 23);
|
||||
goto pack_d;
|
||||
}
|
||||
|
|
|
@ -1072,11 +1072,13 @@ source "drivers/rtc/Kconfig"
|
|||
|
||||
source "drivers/dma/Kconfig"
|
||||
|
||||
source "drivers/dca/Kconfig"
|
||||
|
||||
endmenu
|
||||
|
||||
source "fs/Kconfig"
|
||||
|
||||
source "kernel/Kconfig.instrumentation"
|
||||
source "arch/arm/Kconfig.instrumentation"
|
||||
|
||||
source "arch/arm/Kconfig.debug"
|
||||
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
menuconfig INSTRUMENTATION
|
||||
bool "Instrumentation Support"
|
||||
default y
|
||||
---help---
|
||||
Say Y here to get to see options related to performance measurement,
|
||||
system-wide debugging, and testing. This option alone does not add any
|
||||
kernel code.
|
||||
|
||||
If you say N, all options in this submenu will be skipped and
|
||||
disabled. If you're trying to debug the kernel itself, go see the
|
||||
Kernel Hacking menu.
|
||||
|
||||
if INSTRUMENTATION
|
||||
|
||||
config PROFILING
|
||||
bool "Profiling support (EXPERIMENTAL)"
|
||||
help
|
||||
Say Y here to enable the extended profiling support mechanisms used
|
||||
by profilers such as OProfile.
|
||||
|
||||
config OPROFILE
|
||||
tristate "OProfile system profiling (EXPERIMENTAL)"
|
||||
depends on PROFILING && !UML
|
||||
help
|
||||
OProfile is a profiling system capable of profiling the
|
||||
whole system, include the kernel, kernel modules, libraries,
|
||||
and applications.
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
config OPROFILE_ARMV6
|
||||
bool
|
||||
depends on OPROFILE && CPU_V6 && !SMP
|
||||
default y
|
||||
select OPROFILE_ARM11_CORE
|
||||
|
||||
config OPROFILE_MPCORE
|
||||
bool
|
||||
depends on OPROFILE && CPU_V6 && SMP
|
||||
default y
|
||||
select OPROFILE_ARM11_CORE
|
||||
|
||||
config OPROFILE_ARM11_CORE
|
||||
bool
|
||||
|
||||
config MARKERS
|
||||
bool "Activate markers"
|
||||
help
|
||||
Place an empty function call at each marker site. Can be
|
||||
dynamically changed for a probe function.
|
||||
|
||||
endif # INSTRUMENTATION
|
|
@ -109,6 +109,15 @@ static struct spi_board_info ek_spi_devices[] = {
|
|||
#endif
|
||||
};
|
||||
|
||||
static struct i2c_board_info __initdata ek_i2c_devices[] = {
|
||||
{
|
||||
I2C_BOARD_INFO("ics1523", 0x26),
|
||||
},
|
||||
{
|
||||
I2C_BOARD_INFO("dac3550", 0x4d),
|
||||
}
|
||||
};
|
||||
|
||||
#define EK_FLASH_BASE AT91_CHIPSELECT_0
|
||||
#define EK_FLASH_SIZE 0x200000
|
||||
|
||||
|
|
|
@ -40,31 +40,29 @@ static int fsample_keymap[] = {
|
|||
KEY(0,1,KEY_RIGHT),
|
||||
KEY(0,2,KEY_LEFT),
|
||||
KEY(0,3,KEY_DOWN),
|
||||
KEY(0,4,KEY_CENTER),
|
||||
KEY(0,5,KEY_0_5),
|
||||
KEY(1,0,KEY_SOFT2),
|
||||
KEY(0,4,KEY_ENTER),
|
||||
KEY(1,0,KEY_F10),
|
||||
KEY(1,1,KEY_SEND),
|
||||
KEY(1,2,KEY_END),
|
||||
KEY(1,3,KEY_VOLUMEDOWN),
|
||||
KEY(1,4,KEY_VOLUMEUP),
|
||||
KEY(1,5,KEY_RECORD),
|
||||
KEY(2,0,KEY_SOFT1),
|
||||
KEY(2,0,KEY_F9),
|
||||
KEY(2,1,KEY_3),
|
||||
KEY(2,2,KEY_6),
|
||||
KEY(2,3,KEY_9),
|
||||
KEY(2,4,KEY_SHARP),
|
||||
KEY(2,5,KEY_2_5),
|
||||
KEY(2,4,KEY_KPDOT),
|
||||
KEY(3,0,KEY_BACK),
|
||||
KEY(3,1,KEY_2),
|
||||
KEY(3,2,KEY_5),
|
||||
KEY(3,3,KEY_8),
|
||||
KEY(3,4,KEY_0),
|
||||
KEY(3,5,KEY_HEADSETHOOK),
|
||||
KEY(3,5,KEY_KPSLASH),
|
||||
KEY(4,0,KEY_HOME),
|
||||
KEY(4,1,KEY_1),
|
||||
KEY(4,2,KEY_4),
|
||||
KEY(4,3,KEY_7),
|
||||
KEY(4,4,KEY_STAR),
|
||||
KEY(4,4,KEY_KPASTERISK),
|
||||
KEY(4,5,KEY_POWER),
|
||||
0
|
||||
};
|
||||
|
|
|
@ -36,8 +36,6 @@
|
|||
#include <asm/arch/omapfb.h>
|
||||
#include <asm/arch/lcd_mipid.h>
|
||||
|
||||
#include "../plat-omap/dsp/dsp_common.h"
|
||||
|
||||
#define ADS7846_PENDOWN_GPIO 15
|
||||
|
||||
static void __init omap_nokia770_init_irq(void)
|
||||
|
@ -318,6 +316,8 @@ static __init int omap_dsp_init(void)
|
|||
out:
|
||||
return ret;
|
||||
}
|
||||
#else
|
||||
#define omap_dsp_init() do {} while (0)
|
||||
#endif /* CONFIG_OMAP_DSP */
|
||||
|
||||
static void __init omap_nokia770_init(void)
|
||||
|
|
|
@ -39,31 +39,29 @@ static int p2_keymap[] = {
|
|||
KEY(0,1,KEY_RIGHT),
|
||||
KEY(0,2,KEY_LEFT),
|
||||
KEY(0,3,KEY_DOWN),
|
||||
KEY(0,4,KEY_CENTER),
|
||||
KEY(0,5,KEY_0_5),
|
||||
KEY(1,0,KEY_SOFT2),
|
||||
KEY(0,4,KEY_ENTER),
|
||||
KEY(1,0,KEY_F10),
|
||||
KEY(1,1,KEY_SEND),
|
||||
KEY(1,2,KEY_END),
|
||||
KEY(1,3,KEY_VOLUMEDOWN),
|
||||
KEY(1,4,KEY_VOLUMEUP),
|
||||
KEY(1,5,KEY_RECORD),
|
||||
KEY(2,0,KEY_SOFT1),
|
||||
KEY(2,0,KEY_F9),
|
||||
KEY(2,1,KEY_3),
|
||||
KEY(2,2,KEY_6),
|
||||
KEY(2,3,KEY_9),
|
||||
KEY(2,4,KEY_SHARP),
|
||||
KEY(2,5,KEY_2_5),
|
||||
KEY(2,4,KEY_KPDOT),
|
||||
KEY(3,0,KEY_BACK),
|
||||
KEY(3,1,KEY_2),
|
||||
KEY(3,2,KEY_5),
|
||||
KEY(3,3,KEY_8),
|
||||
KEY(3,4,KEY_0),
|
||||
KEY(3,5,KEY_HEADSETHOOK),
|
||||
KEY(3,5,KEY_KPSLASH),
|
||||
KEY(4,0,KEY_HOME),
|
||||
KEY(4,1,KEY_1),
|
||||
KEY(4,2,KEY_4),
|
||||
KEY(4,3,KEY_7),
|
||||
KEY(4,4,KEY_STAR),
|
||||
KEY(4,4,KEY_KPASTERISK),
|
||||
KEY(4,5,KEY_POWER),
|
||||
0
|
||||
};
|
||||
|
|
|
@ -178,13 +178,19 @@ static void pxa25x_cpu_pm_save(unsigned long *sleep_save)
|
|||
SAVE(GAFR1_L); SAVE(GAFR1_U);
|
||||
SAVE(GAFR2_L); SAVE(GAFR2_U);
|
||||
|
||||
SAVE(ICMR);
|
||||
SAVE(ICMR); ICMR = 0;
|
||||
SAVE(CKEN);
|
||||
SAVE(PSTR);
|
||||
|
||||
/* Clear GPIO transition detect bits */
|
||||
GEDR0 = GEDR0; GEDR1 = GEDR1; GEDR2 = GEDR2;
|
||||
}
|
||||
|
||||
static void pxa25x_cpu_pm_restore(unsigned long *sleep_save)
|
||||
{
|
||||
/* ensure not to come back here if it wasn't intended */
|
||||
PSPR = 0;
|
||||
|
||||
/* restore registers */
|
||||
RESTORE_GPLEVEL(0); RESTORE_GPLEVEL(1); RESTORE_GPLEVEL(2);
|
||||
RESTORE(GPDR0); RESTORE(GPDR1); RESTORE(GPDR2);
|
||||
|
@ -195,7 +201,12 @@ static void pxa25x_cpu_pm_restore(unsigned long *sleep_save)
|
|||
RESTORE(GFER0); RESTORE(GFER1); RESTORE(GFER2);
|
||||
RESTORE(PGSR0); RESTORE(PGSR1); RESTORE(PGSR2);
|
||||
|
||||
PSSR = PSSR_RDH | PSSR_PH;
|
||||
|
||||
RESTORE(CKEN);
|
||||
|
||||
ICLR = 0;
|
||||
ICCR = 1;
|
||||
RESTORE(ICMR);
|
||||
RESTORE(PSTR);
|
||||
}
|
||||
|
|
|
@ -43,11 +43,11 @@ pxa_cpu_save_cp:
|
|||
pxa_cpu_save_sp:
|
||||
@ preserve phys address of stack
|
||||
mov r0, sp
|
||||
mov r2, lr
|
||||
str lr, [sp, #-4]!
|
||||
bl sleep_phys_sp
|
||||
ldr r1, =sleep_save_sp
|
||||
str r0, [r1]
|
||||
mov pc, r2
|
||||
ldr pc, [sp], #4
|
||||
|
||||
/*
|
||||
* pxa27x_cpu_suspend()
|
||||
|
@ -270,5 +270,3 @@ resume_after_mmu:
|
|||
mar acc0, r2, r3
|
||||
#endif
|
||||
ldmfd sp!, {r4 - r12, pc} @ return to caller
|
||||
|
||||
|
||||
|
|
|
@ -361,10 +361,12 @@ u32 vfp_estimate_sqrt_significand(u32 exponent, u32 significand);
|
|||
* OP_SCALAR - this operation always operates in scalar mode
|
||||
* OP_SD - the instruction exceptionally writes to a single precision result.
|
||||
* OP_DD - the instruction exceptionally writes to a double precision result.
|
||||
* OP_SM - the instruction exceptionally reads from a single precision operand.
|
||||
*/
|
||||
#define OP_SCALAR (1 << 0)
|
||||
#define OP_SD (1 << 1)
|
||||
#define OP_DD (1 << 1)
|
||||
#define OP_SM (1 << 2)
|
||||
|
||||
struct op {
|
||||
u32 (* const fn)(int dd, int dn, int dm, u32 fpscr);
|
||||
|
|
|
@ -668,8 +668,8 @@ static struct op fops_ext[32] = {
|
|||
[FEXT_TO_IDX(FEXT_FCMPZ)] = { vfp_double_fcmpz, OP_SCALAR },
|
||||
[FEXT_TO_IDX(FEXT_FCMPEZ)] = { vfp_double_fcmpez, OP_SCALAR },
|
||||
[FEXT_TO_IDX(FEXT_FCVT)] = { vfp_double_fcvts, OP_SCALAR|OP_SD },
|
||||
[FEXT_TO_IDX(FEXT_FUITO)] = { vfp_double_fuito, OP_SCALAR },
|
||||
[FEXT_TO_IDX(FEXT_FSITO)] = { vfp_double_fsito, OP_SCALAR },
|
||||
[FEXT_TO_IDX(FEXT_FUITO)] = { vfp_double_fuito, OP_SCALAR|OP_SM },
|
||||
[FEXT_TO_IDX(FEXT_FSITO)] = { vfp_double_fsito, OP_SCALAR|OP_SM },
|
||||
[FEXT_TO_IDX(FEXT_FTOUI)] = { vfp_double_ftoui, OP_SCALAR|OP_SD },
|
||||
[FEXT_TO_IDX(FEXT_FTOUIZ)] = { vfp_double_ftouiz, OP_SCALAR|OP_SD },
|
||||
[FEXT_TO_IDX(FEXT_FTOSI)] = { vfp_double_ftosi, OP_SCALAR|OP_SD },
|
||||
|
@ -1128,7 +1128,7 @@ u32 vfp_double_cpdo(u32 inst, u32 fpscr)
|
|||
u32 exceptions = 0;
|
||||
unsigned int dest;
|
||||
unsigned int dn = vfp_get_dn(inst);
|
||||
unsigned int dm = vfp_get_dm(inst);
|
||||
unsigned int dm;
|
||||
unsigned int vecitr, veclen, vecstride;
|
||||
struct op *fop;
|
||||
|
||||
|
@ -1145,6 +1145,14 @@ u32 vfp_double_cpdo(u32 inst, u32 fpscr)
|
|||
else
|
||||
dest = vfp_get_dd(inst);
|
||||
|
||||
/*
|
||||
* f[us]ito takes a sN operand, not a dN operand.
|
||||
*/
|
||||
if (fop->flags & OP_SM)
|
||||
dm = vfp_get_sm(inst);
|
||||
else
|
||||
dm = vfp_get_dm(inst);
|
||||
|
||||
/*
|
||||
* If destination bank is zero, vector length is always '1'.
|
||||
* ARM DDI0100F C5.1.3, C5.3.2.
|
||||
|
|
|
@ -65,6 +65,10 @@ config GENERIC_CALIBRATE_DELAY
|
|||
bool
|
||||
default y
|
||||
|
||||
config HARDWARE_PM
|
||||
def_bool y
|
||||
depends on OPROFILE
|
||||
|
||||
source "init/Kconfig"
|
||||
source "kernel/Kconfig.preempt"
|
||||
|
||||
|
|
|
@ -6,136 +6,9 @@
|
|||
*!
|
||||
*! Functions exported: ds1302_readreg, ds1302_writereg, ds1302_init
|
||||
*!
|
||||
*! $Log: ds1302.c,v $
|
||||
*! Revision 1.18 2005/01/24 09:11:26 mikaelam
|
||||
*! Minor changes to get DS1302 RTC chip driver to work
|
||||
*!
|
||||
*! Revision 1.17 2005/01/05 06:11:22 starvik
|
||||
*! No need to do local_irq_disable after local_irq_save.
|
||||
*!
|
||||
*! Revision 1.16 2004/12/13 12:21:52 starvik
|
||||
*! Added I/O and DMA allocators from Linux 2.4
|
||||
*!
|
||||
*! Revision 1.14 2004/08/24 06:48:43 starvik
|
||||
*! Whitespace cleanup
|
||||
*!
|
||||
*! Revision 1.13 2004/05/28 09:26:59 starvik
|
||||
*! Modified I2C initialization to work in 2.6.
|
||||
*!
|
||||
*! Revision 1.12 2004/05/14 07:58:03 starvik
|
||||
*! Merge of changes from 2.4
|
||||
*!
|
||||
*! Revision 1.10 2004/02/04 09:25:12 starvik
|
||||
*! Merge of Linux 2.6.2
|
||||
*!
|
||||
*! Revision 1.9 2003/07/04 08:27:37 starvik
|
||||
*! Merge of Linux 2.5.74
|
||||
*!
|
||||
*! Revision 1.8 2003/04/09 05:20:47 starvik
|
||||
*! Merge of Linux 2.5.67
|
||||
*!
|
||||
*! Revision 1.6 2003/01/09 14:42:51 starvik
|
||||
*! Merge of Linux 2.5.55
|
||||
*!
|
||||
*! Revision 1.4 2002/12/11 13:13:57 starvik
|
||||
*! Added arch/ to v10 specific includes
|
||||
*! Added fix from Linux 2.4 in serial.c (flush_to_flip_buffer)
|
||||
*!
|
||||
*! Revision 1.3 2002/11/20 11:56:10 starvik
|
||||
*! Merge of Linux 2.5.48
|
||||
*!
|
||||
*! Revision 1.2 2002/11/18 13:16:06 starvik
|
||||
*! Linux 2.5 port of latest 2.4 drivers
|
||||
*!
|
||||
*! Revision 1.15 2002/10/11 16:14:33 johana
|
||||
*! Added CONFIG_ETRAX_DS1302_TRICKLE_CHARGE and initial setting of the
|
||||
*! trcklecharge register.
|
||||
*!
|
||||
*! Revision 1.14 2002/10/10 12:15:38 magnusmn
|
||||
*! Added support for having the RST signal on bit g0
|
||||
*!
|
||||
*! Revision 1.13 2002/05/29 15:16:08 johana
|
||||
*! Removed unused variables.
|
||||
*!
|
||||
*! Revision 1.12 2002/04/10 15:35:25 johana
|
||||
*! Moved probe function closer to init function and marked it __init.
|
||||
*!
|
||||
*! Revision 1.11 2001/06/14 12:35:52 jonashg
|
||||
*! The ATA hack is back. It is unfortunately the only way to set g27 to output.
|
||||
*!
|
||||
*! Revision 1.9 2001/06/14 10:00:14 jonashg
|
||||
*! No need for tempudelay to be inline anymore (had to adjust the usec to
|
||||
*! loops conversion because of this to make it slow enough to be a udelay).
|
||||
*!
|
||||
*! Revision 1.8 2001/06/14 08:06:32 jonashg
|
||||
*! Made tempudelay delay usecs (well, just a tad more).
|
||||
*!
|
||||
*! Revision 1.7 2001/06/13 14:18:11 jonashg
|
||||
*! Only allow processes with SYS_TIME capability to set time and charge.
|
||||
*!
|
||||
*! Revision 1.6 2001/06/12 15:22:07 jonashg
|
||||
*! * Made init function __init.
|
||||
*! * Parameter to out_byte() is unsigned char.
|
||||
*! * The magic number 42 has got a name.
|
||||
*! * Removed comment about /proc (nothing is exported there).
|
||||
*!
|
||||
*! Revision 1.5 2001/06/12 14:35:13 jonashg
|
||||
*! Gave the module a name and added it to printk's.
|
||||
*!
|
||||
*! Revision 1.4 2001/05/31 14:53:40 jonashg
|
||||
*! Made tempudelay() inline so that the watchdog doesn't reset (see
|
||||
*! function comment).
|
||||
*!
|
||||
*! Revision 1.3 2001/03/26 16:03:06 bjornw
|
||||
*! Needs linux/config.h
|
||||
*!
|
||||
*! Revision 1.2 2001/03/20 19:42:00 bjornw
|
||||
*! Use the ETRAX prefix on the DS1302 options
|
||||
*!
|
||||
*! Revision 1.1 2001/03/20 09:13:50 magnusmn
|
||||
*! Linux 2.4 port
|
||||
*!
|
||||
*! Revision 1.10 2000/07/05 15:38:23 bjornw
|
||||
*! Dont update kernel time when a RTC_SET_TIME is done
|
||||
*!
|
||||
*! Revision 1.9 2000/03/02 15:42:59 macce
|
||||
*! * Hack to make RTC work on all 2100/2400
|
||||
*!
|
||||
*! Revision 1.8 2000/02/23 16:59:18 torbjore
|
||||
*! added setup of R_GEN_CONFIG when RTC is connected to the generic port.
|
||||
*!
|
||||
*! Revision 1.7 2000/01/17 15:51:43 johana
|
||||
*! Added RTC_SET_CHARGE ioctl to enable trickle charger.
|
||||
*!
|
||||
*! Revision 1.6 1999/10/27 13:19:47 bjornw
|
||||
*! Added update_xtime_from_cmos which reads back the updated RTC into the kernel.
|
||||
*! /dev/rtc calls it now.
|
||||
*!
|
||||
*! Revision 1.5 1999/10/27 12:39:37 bjornw
|
||||
*! Disabled superuser check. Anyone can now set the time.
|
||||
*!
|
||||
*! Revision 1.4 1999/09/02 13:27:46 pkj
|
||||
*! Added shadow for R_PORT_PB_CONFIG.
|
||||
*! Renamed port_g_shadow to port_g_data_shadow.
|
||||
*!
|
||||
*! Revision 1.3 1999/09/02 08:28:06 pkj
|
||||
*! Made it possible to select either port PB or the generic port for the RST
|
||||
*! signal line to the DS1302 RTC.
|
||||
*! Also make sure the RST bit is configured as output on Port PB (if used).
|
||||
*!
|
||||
*! Revision 1.2 1999/09/01 14:47:20 bjornw
|
||||
*! Added support for /dev/rtc operations with ioctl RD_TIME and SET_TIME to read
|
||||
*! and set the date. Register as major 121.
|
||||
*!
|
||||
*! Revision 1.1 1999/09/01 09:45:29 bjornw
|
||||
*! Implemented a DS1302 RTC driver.
|
||||
*!
|
||||
*!
|
||||
*! ---------------------------------------------------------------------------
|
||||
*!
|
||||
*! (C) Copyright 1999, 2000, 2001, 2002, 2003, 2004 Axis Communications AB, LUND, SWEDEN
|
||||
*!
|
||||
*! $Id: ds1302.c,v 1.18 2005/01/24 09:11:26 mikaelam Exp $
|
||||
*! (C) Copyright 1999-2007 Axis Communications AB, LUND, SWEDEN
|
||||
*!
|
||||
*!***************************************************************************/
|
||||
|
||||
|
@ -156,6 +29,8 @@
|
|||
#include <asm/rtc.h>
|
||||
#include <asm/arch/io_interface_mux.h>
|
||||
|
||||
#include "i2c.h"
|
||||
|
||||
#define RTC_MAJOR_NR 121 /* local major, change later */
|
||||
|
||||
static const char ds1302_name[] = "ds1302";
|
||||
|
|
|
@ -392,6 +392,7 @@ int cris_request_io_interface(enum cris_io_interface ioif, const char *device_id
|
|||
if (((interfaces[ioif].gpio_g_in & gpio_in_pins) != interfaces[ioif].gpio_g_in) ||
|
||||
((interfaces[ioif].gpio_g_out & gpio_out_pins) != interfaces[ioif].gpio_g_out) ||
|
||||
((interfaces[ioif].gpio_b & gpio_pb_pins) != interfaces[ioif].gpio_b)) {
|
||||
local_irq_restore(flags);
|
||||
printk(KERN_CRIT "cris_request_io_interface: Could not get required pins for interface %u\n",
|
||||
ioif);
|
||||
return -EBUSY;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*
|
||||
* Ideas also taken from arch/arm.
|
||||
*
|
||||
* Copyright (C) 2000, 2001 Axis Communications AB
|
||||
* Copyright (C) 2000-2007 Axis Communications AB
|
||||
*
|
||||
* Authors: Bjorn Wesen (bjornw@axis.com)
|
||||
*
|
||||
|
@ -40,84 +40,30 @@
|
|||
*/
|
||||
#define RESTART_CRIS_SYS(regs) regs->r10 = regs->orig_r10; regs->irp -= 2;
|
||||
|
||||
int do_signal(int canrestart, sigset_t *oldset, struct pt_regs *regs);
|
||||
void do_signal(int canrestart, struct pt_regs *regs);
|
||||
|
||||
/*
|
||||
* Atomically swap in the new signal mask, and wait for a signal. Define
|
||||
* Atomically swap in the new signal mask, and wait for a signal. Define
|
||||
* dummy arguments to be able to reach the regs argument. (Note that this
|
||||
* arrangement relies on old_sigset_t occupying one register.)
|
||||
*/
|
||||
int
|
||||
sys_sigsuspend(old_sigset_t mask, long r11, long r12, long r13, long mof,
|
||||
long srp, struct pt_regs *regs)
|
||||
int sys_sigsuspend(old_sigset_t mask, long r11, long r12, long r13, long mof,
|
||||
long srp, struct pt_regs *regs)
|
||||
{
|
||||
sigset_t saveset;
|
||||
|
||||
mask &= _BLOCKABLE;
|
||||
spin_lock_irq(¤t->sighand->siglock);
|
||||
saveset = current->blocked;
|
||||
current->saved_sigmask = current->blocked;
|
||||
siginitset(¤t->blocked, mask);
|
||||
recalc_sigpending();
|
||||
spin_unlock_irq(¤t->sighand->siglock);
|
||||
|
||||
regs->r10 = -EINTR;
|
||||
while (1) {
|
||||
current->state = TASK_INTERRUPTIBLE;
|
||||
schedule();
|
||||
if (do_signal(0, &saveset, regs))
|
||||
/* We will get here twice: once to call the signal
|
||||
handler, then again to return from the
|
||||
sigsuspend system call. When calling the
|
||||
signal handler, R10 holds the signal number as
|
||||
set through do_signal. The sigsuspend call
|
||||
will return with the restored value set above;
|
||||
always -EINTR. */
|
||||
return regs->r10;
|
||||
}
|
||||
current->state = TASK_INTERRUPTIBLE;
|
||||
schedule();
|
||||
set_thread_flag(TIF_RESTORE_SIGMASK);
|
||||
return -ERESTARTNOHAND;
|
||||
}
|
||||
|
||||
/* Define dummy arguments to be able to reach the regs argument. (Note that
|
||||
* this arrangement relies on size_t occupying one register.)
|
||||
*/
|
||||
int
|
||||
sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize, long r12, long r13,
|
||||
long mof, long srp, struct pt_regs *regs)
|
||||
{
|
||||
sigset_t saveset, newset;
|
||||
|
||||
/* XXX: Don't preclude handling different sized sigset_t's. */
|
||||
if (sigsetsize != sizeof(sigset_t))
|
||||
return -EINVAL;
|
||||
|
||||
if (copy_from_user(&newset, unewset, sizeof(newset)))
|
||||
return -EFAULT;
|
||||
sigdelsetmask(&newset, ~_BLOCKABLE);
|
||||
|
||||
spin_lock_irq(¤t->sighand->siglock);
|
||||
saveset = current->blocked;
|
||||
current->blocked = newset;
|
||||
recalc_sigpending();
|
||||
spin_unlock_irq(¤t->sighand->siglock);
|
||||
|
||||
regs->r10 = -EINTR;
|
||||
while (1) {
|
||||
current->state = TASK_INTERRUPTIBLE;
|
||||
schedule();
|
||||
if (do_signal(0, &saveset, regs))
|
||||
/* We will get here twice: once to call the signal
|
||||
handler, then again to return from the
|
||||
sigsuspend system call. When calling the
|
||||
signal handler, R10 holds the signal number as
|
||||
set through do_signal. The sigsuspend call
|
||||
will return with the restored value set above;
|
||||
always -EINTR. */
|
||||
return regs->r10;
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
sys_sigaction(int sig, const struct old_sigaction __user *act,
|
||||
struct old_sigaction *oact)
|
||||
int sys_sigaction(int sig, const struct old_sigaction __user *act,
|
||||
struct old_sigaction *oact)
|
||||
{
|
||||
struct k_sigaction new_ka, old_ka;
|
||||
int ret;
|
||||
|
@ -147,8 +93,7 @@ sys_sigaction(int sig, const struct old_sigaction __user *act,
|
|||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
sys_sigaltstack(const stack_t *uss, stack_t __user *uoss)
|
||||
int sys_sigaltstack(const stack_t *uss, stack_t __user *uoss)
|
||||
{
|
||||
return do_sigaltstack(uss, uoss, rdusp());
|
||||
}
|
||||
|
@ -205,7 +150,7 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc)
|
|||
|
||||
/* TODO: the other ports use regs->orig_XX to disable syscall checks
|
||||
* after this completes, but we don't use that mechanism. maybe we can
|
||||
* use it now ?
|
||||
* use it now ?
|
||||
*/
|
||||
|
||||
return err;
|
||||
|
@ -216,7 +161,7 @@ badframe:
|
|||
|
||||
/* Define dummy arguments to be able to reach the regs argument. */
|
||||
|
||||
asmlinkage int sys_sigreturn(long r10, long r11, long r12, long r13, long mof,
|
||||
asmlinkage int sys_sigreturn(long r10, long r11, long r12, long r13, long mof,
|
||||
long srp, struct pt_regs *regs)
|
||||
{
|
||||
struct sigframe __user *frame = (struct sigframe *)rdusp();
|
||||
|
@ -243,7 +188,7 @@ asmlinkage int sys_sigreturn(long r10, long r11, long r12, long r13, long mof,
|
|||
current->blocked = set;
|
||||
recalc_sigpending();
|
||||
spin_unlock_irq(¤t->sighand->siglock);
|
||||
|
||||
|
||||
if (restore_sigcontext(regs, &frame->sc))
|
||||
goto badframe;
|
||||
|
||||
|
@ -254,11 +199,11 @@ asmlinkage int sys_sigreturn(long r10, long r11, long r12, long r13, long mof,
|
|||
badframe:
|
||||
force_sig(SIGSEGV, current);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Define dummy arguments to be able to reach the regs argument. */
|
||||
|
||||
asmlinkage int sys_rt_sigreturn(long r10, long r11, long r12, long r13,
|
||||
asmlinkage int sys_rt_sigreturn(long r10, long r11, long r12, long r13,
|
||||
long mof, long srp, struct pt_regs *regs)
|
||||
{
|
||||
struct rt_sigframe __user *frame = (struct rt_sigframe *)rdusp();
|
||||
|
@ -282,7 +227,7 @@ asmlinkage int sys_rt_sigreturn(long r10, long r11, long r12, long r13,
|
|||
current->blocked = set;
|
||||
recalc_sigpending();
|
||||
spin_unlock_irq(¤t->sighand->siglock);
|
||||
|
||||
|
||||
if (restore_sigcontext(regs, &frame->uc.uc_mcontext))
|
||||
goto badframe;
|
||||
|
||||
|
@ -294,14 +239,14 @@ asmlinkage int sys_rt_sigreturn(long r10, long r11, long r12, long r13,
|
|||
badframe:
|
||||
force_sig(SIGSEGV, current);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Set up a signal frame.
|
||||
*/
|
||||
|
||||
static int
|
||||
setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, unsigned long mask)
|
||||
static int setup_sigcontext(struct sigcontext __user *sc,
|
||||
struct pt_regs *regs, unsigned long mask)
|
||||
{
|
||||
int err = 0;
|
||||
unsigned long usp = rdusp();
|
||||
|
@ -324,10 +269,11 @@ setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, unsigned lo
|
|||
return err;
|
||||
}
|
||||
|
||||
/* figure out where we want to put the new signal frame - usually on the stack */
|
||||
/* Figure out where we want to put the new signal frame
|
||||
* - usually on the stack. */
|
||||
|
||||
static inline void __user *
|
||||
get_sigframe(struct k_sigaction *ka, struct pt_regs * regs, size_t frame_size)
|
||||
get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size)
|
||||
{
|
||||
unsigned long sp = rdusp();
|
||||
|
||||
|
@ -345,15 +291,15 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs * regs, size_t frame_size)
|
|||
}
|
||||
|
||||
/* grab and setup a signal frame.
|
||||
*
|
||||
*
|
||||
* basically we stack a lot of state info, and arrange for the
|
||||
* user-mode program to return to the kernel using either a
|
||||
* trampoline which performs the syscall sigreturn, or a provided
|
||||
* user-mode trampoline.
|
||||
*/
|
||||
|
||||
static void setup_frame(int sig, struct k_sigaction *ka,
|
||||
sigset_t *set, struct pt_regs * regs)
|
||||
static int setup_frame(int sig, struct k_sigaction *ka,
|
||||
sigset_t *set, struct pt_regs *regs)
|
||||
{
|
||||
struct sigframe __user *frame;
|
||||
unsigned long return_ip;
|
||||
|
@ -401,14 +347,15 @@ static void setup_frame(int sig, struct k_sigaction *ka,
|
|||
|
||||
wrusp((unsigned long)frame);
|
||||
|
||||
return;
|
||||
return 0;
|
||||
|
||||
give_sigsegv:
|
||||
force_sigsegv(sig, current);
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
|
||||
sigset_t *set, struct pt_regs * regs)
|
||||
static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
|
||||
sigset_t *set, struct pt_regs *regs)
|
||||
{
|
||||
struct rt_sigframe __user *frame;
|
||||
unsigned long return_ip;
|
||||
|
@ -443,9 +390,10 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
|
|||
/* trampoline - the desired return ip is the retcode itself */
|
||||
return_ip = (unsigned long)&frame->retcode;
|
||||
/* This is movu.w __NR_rt_sigreturn, r9; break 13; */
|
||||
err |= __put_user(0x9c5f, (short __user*)(frame->retcode+0));
|
||||
err |= __put_user(__NR_rt_sigreturn, (short __user*)(frame->retcode+2));
|
||||
err |= __put_user(0xe93d, (short __user*)(frame->retcode+4));
|
||||
err |= __put_user(0x9c5f, (short __user *)(frame->retcode+0));
|
||||
err |= __put_user(__NR_rt_sigreturn,
|
||||
(short __user *)(frame->retcode+2));
|
||||
err |= __put_user(0xe93d, (short __user *)(frame->retcode+4));
|
||||
}
|
||||
|
||||
if (err)
|
||||
|
@ -455,73 +403,81 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
|
|||
|
||||
/* Set up registers for signal handler */
|
||||
|
||||
regs->irp = (unsigned long) ka->sa.sa_handler; /* what we enter NOW */
|
||||
regs->srp = return_ip; /* what we enter LATER */
|
||||
regs->r10 = sig; /* first argument is signo */
|
||||
regs->r11 = (unsigned long) &frame->info; /* second argument is (siginfo_t *) */
|
||||
regs->r12 = 0; /* third argument is unused */
|
||||
|
||||
/* actually move the usp to reflect the stacked frame */
|
||||
/* What we enter NOW */
|
||||
regs->irp = (unsigned long) ka->sa.sa_handler;
|
||||
/* What we enter LATER */
|
||||
regs->srp = return_ip;
|
||||
/* First argument is signo */
|
||||
regs->r10 = sig;
|
||||
/* Second argument is (siginfo_t *) */
|
||||
regs->r11 = (unsigned long)&frame->info;
|
||||
/* Third argument is unused */
|
||||
regs->r12 = 0;
|
||||
|
||||
/* Actually move the usp to reflect the stacked frame */
|
||||
wrusp((unsigned long)frame);
|
||||
|
||||
return;
|
||||
return 0;
|
||||
|
||||
give_sigsegv:
|
||||
force_sigsegv(sig, current);
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
/*
|
||||
* OK, we're invoking a handler
|
||||
*/
|
||||
*/
|
||||
|
||||
static inline void
|
||||
handle_signal(int canrestart, unsigned long sig,
|
||||
siginfo_t *info, struct k_sigaction *ka,
|
||||
sigset_t *oldset, struct pt_regs * regs)
|
||||
static inline int handle_signal(int canrestart, unsigned long sig,
|
||||
siginfo_t *info, struct k_sigaction *ka,
|
||||
sigset_t *oldset, struct pt_regs *regs)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* Are we from a system call? */
|
||||
if (canrestart) {
|
||||
/* If so, check system call restarting.. */
|
||||
switch (regs->r10) {
|
||||
case -ERESTART_RESTARTBLOCK:
|
||||
case -ERESTARTNOHAND:
|
||||
/* ERESTARTNOHAND means that the syscall should only be
|
||||
restarted if there was no handler for the signal, and since
|
||||
we only get here if there is a handler, we don't restart */
|
||||
case -ERESTART_RESTARTBLOCK:
|
||||
case -ERESTARTNOHAND:
|
||||
/* ERESTARTNOHAND means that the syscall should
|
||||
* only be restarted if there was no handler for
|
||||
* the signal, and since we only get here if there
|
||||
* is a handler, we don't restart */
|
||||
regs->r10 = -EINTR;
|
||||
break;
|
||||
case -ERESTARTSYS:
|
||||
/* ERESTARTSYS means to restart the syscall if
|
||||
* there is no handler or the handler was
|
||||
* registered with SA_RESTART */
|
||||
if (!(ka->sa.sa_flags & SA_RESTART)) {
|
||||
regs->r10 = -EINTR;
|
||||
break;
|
||||
|
||||
case -ERESTARTSYS:
|
||||
/* ERESTARTSYS means to restart the syscall if there is no
|
||||
handler or the handler was registered with SA_RESTART */
|
||||
if (!(ka->sa.sa_flags & SA_RESTART)) {
|
||||
regs->r10 = -EINTR;
|
||||
break;
|
||||
}
|
||||
/* fallthrough */
|
||||
case -ERESTARTNOINTR:
|
||||
/* ERESTARTNOINTR means that the syscall should be called again
|
||||
after the signal handler returns. */
|
||||
RESTART_CRIS_SYS(regs);
|
||||
}
|
||||
/* fallthrough */
|
||||
case -ERESTARTNOINTR:
|
||||
/* ERESTARTNOINTR means that the syscall should
|
||||
* be called again after the signal handler returns. */
|
||||
RESTART_CRIS_SYS(regs);
|
||||
}
|
||||
}
|
||||
|
||||
/* Set up the stack frame */
|
||||
if (ka->sa.sa_flags & SA_SIGINFO)
|
||||
setup_rt_frame(sig, ka, info, oldset, regs);
|
||||
ret = setup_rt_frame(sig, ka, info, oldset, regs);
|
||||
else
|
||||
setup_frame(sig, ka, oldset, regs);
|
||||
ret = setup_frame(sig, ka, oldset, regs);
|
||||
|
||||
if (ka->sa.sa_flags & SA_ONESHOT)
|
||||
ka->sa.sa_handler = SIG_DFL;
|
||||
|
||||
spin_lock_irq(¤t->sighand->siglock);
|
||||
sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask);
|
||||
if (!(ka->sa.sa_flags & SA_NODEFER))
|
||||
sigaddset(¤t->blocked,sig);
|
||||
recalc_sigpending();
|
||||
spin_unlock_irq(¤t->sighand->siglock);
|
||||
if (ret == 0) {
|
||||
spin_lock_irq(¤t->sighand->siglock);
|
||||
sigorsets(¤t->blocked, ¤t->blocked,
|
||||
&ka->sa.sa_mask);
|
||||
if (!(ka->sa.sa_flags & SA_NODEFER))
|
||||
sigaddset(¤t->blocked, sig);
|
||||
recalc_sigpending();
|
||||
spin_unlock_irq(¤t->sighand->siglock);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -536,11 +492,12 @@ handle_signal(int canrestart, unsigned long sig,
|
|||
* mode below.
|
||||
*/
|
||||
|
||||
int do_signal(int canrestart, sigset_t *oldset, struct pt_regs *regs)
|
||||
void do_signal(int canrestart, struct pt_regs *regs)
|
||||
{
|
||||
siginfo_t info;
|
||||
int signr;
|
||||
struct k_sigaction ka;
|
||||
sigset_t *oldset;
|
||||
|
||||
/*
|
||||
* We want the common case to go fast, which
|
||||
|
@ -549,16 +506,26 @@ int do_signal(int canrestart, sigset_t *oldset, struct pt_regs *regs)
|
|||
* if so.
|
||||
*/
|
||||
if (!user_mode(regs))
|
||||
return 1;
|
||||
return;
|
||||
|
||||
if (!oldset)
|
||||
if (test_thread_flag(TIF_RESTORE_SIGMASK))
|
||||
oldset = ¤t->saved_sigmask;
|
||||
else
|
||||
oldset = ¤t->blocked;
|
||||
|
||||
signr = get_signal_to_deliver(&info, &ka, regs, NULL);
|
||||
if (signr > 0) {
|
||||
/* Whee! Actually deliver the signal. */
|
||||
handle_signal(canrestart, signr, &info, &ka, oldset, regs);
|
||||
return 1;
|
||||
if (handle_signal(canrestart, signr, &info, &ka,
|
||||
oldset, regs)) {
|
||||
/* a signal was successfully delivered; the saved
|
||||
* sigmask will have been stored in the signal frame,
|
||||
* and will be restored by sigreturn, so we can simply
|
||||
* clear the TIF_RESTORE_SIGMASK flag */
|
||||
if (test_thread_flag(TIF_RESTORE_SIGMASK))
|
||||
clear_thread_flag(TIF_RESTORE_SIGMASK);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/* Did we come from a system call? */
|
||||
|
@ -569,10 +536,16 @@ int do_signal(int canrestart, sigset_t *oldset, struct pt_regs *regs)
|
|||
regs->r10 == -ERESTARTNOINTR) {
|
||||
RESTART_CRIS_SYS(regs);
|
||||
}
|
||||
if (regs->r10 == -ERESTART_RESTARTBLOCK){
|
||||
if (regs->r10 == -ERESTART_RESTARTBLOCK) {
|
||||
regs->r10 = __NR_restart_syscall;
|
||||
regs->irp -= 2;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
/* if there's no signal to deliver, we just put the saved sigmask
|
||||
* back */
|
||||
if (test_thread_flag(TIF_RESTORE_SIGMASK)) {
|
||||
clear_thread_flag(TIF_RESTORE_SIGMASK);
|
||||
sigprocmask(SIG_SETMASK, ¤t->saved_sigmask, NULL);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include <linux/swap.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/vmstat.h>
|
||||
#include <asm/arch/svinto.h>
|
||||
#include <asm/types.h>
|
||||
#include <asm/signal.h>
|
||||
|
|
|
@ -9,7 +9,8 @@
|
|||
*/
|
||||
|
||||
#include <asm-generic/vmlinux.lds.h>
|
||||
|
||||
#include <asm/page.h>
|
||||
|
||||
jiffies = jiffies_64;
|
||||
SECTIONS
|
||||
{
|
||||
|
@ -23,7 +24,7 @@ SECTIONS
|
|||
_stext = .;
|
||||
__stext = .;
|
||||
.text : {
|
||||
*(.text)
|
||||
TEXT_TEXT
|
||||
SCHED_TEXT
|
||||
LOCK_TEXT
|
||||
*(.fixup)
|
||||
|
@ -49,10 +50,10 @@ SECTIONS
|
|||
__edata = . ; /* End of data section */
|
||||
_edata = . ;
|
||||
|
||||
. = ALIGN(8192); /* init_task and stack, must be aligned */
|
||||
. = ALIGN(PAGE_SIZE); /* init_task and stack, must be aligned */
|
||||
.data.init_task : { *(.data.init_task) }
|
||||
|
||||
. = ALIGN(8192); /* Init code and data */
|
||||
. = ALIGN(PAGE_SIZE); /* Init code and data */
|
||||
__init_begin = .;
|
||||
.init.text : {
|
||||
_sinittext = .;
|
||||
|
@ -66,13 +67,7 @@ SECTIONS
|
|||
__setup_end = .;
|
||||
.initcall.init : {
|
||||
__initcall_start = .;
|
||||
*(.initcall1.init);
|
||||
*(.initcall2.init);
|
||||
*(.initcall3.init);
|
||||
*(.initcall4.init);
|
||||
*(.initcall5.init);
|
||||
*(.initcall6.init);
|
||||
*(.initcall7.init);
|
||||
INITCALLS
|
||||
__initcall_end = .;
|
||||
}
|
||||
|
||||
|
@ -88,16 +83,18 @@ SECTIONS
|
|||
__initramfs_start = .;
|
||||
*(.init.ramfs)
|
||||
__initramfs_end = .;
|
||||
/* We fill to the next page, so we can discard all init
|
||||
pages without needing to consider what payload might be
|
||||
appended to the kernel image. */
|
||||
FILL (0);
|
||||
. = ALIGN (8192);
|
||||
}
|
||||
#endif
|
||||
|
||||
__vmlinux_end = .; /* last address of the physical file */
|
||||
__init_end = .;
|
||||
|
||||
/*
|
||||
* We fill to the next page, so we can discard all init
|
||||
* pages without needing to consider what payload might be
|
||||
* appended to the kernel image.
|
||||
*/
|
||||
. = ALIGN(PAGE_SIZE);
|
||||
|
||||
__init_end = .;
|
||||
|
||||
__data_end = . ; /* Move to _edata ? */
|
||||
__bss_start = .; /* BSS */
|
||||
|
|
|
@ -1488,16 +1488,19 @@ ia64_handle_unaligned (unsigned long ifa, struct pt_regs *regs)
|
|||
case LDFA_OP:
|
||||
case LDFCCLR_OP:
|
||||
case LDFCNC_OP:
|
||||
case LDF_IMM_OP:
|
||||
case LDFA_IMM_OP:
|
||||
case LDFCCLR_IMM_OP:
|
||||
case LDFCNC_IMM_OP:
|
||||
if (u.insn.x)
|
||||
ret = emulate_load_floatpair(ifa, u.insn, regs);
|
||||
else
|
||||
ret = emulate_load_float(ifa, u.insn, regs);
|
||||
break;
|
||||
|
||||
case LDF_IMM_OP:
|
||||
case LDFA_IMM_OP:
|
||||
case LDFCCLR_IMM_OP:
|
||||
case LDFCNC_IMM_OP:
|
||||
ret = emulate_load_float(ifa, u.insn, regs);
|
||||
break;
|
||||
|
||||
case STF_OP:
|
||||
case STF_IMM_OP:
|
||||
ret = emulate_store_float(ifa, u.insn, regs);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* Copyright (c) 2004-2005 Silicon Graphics, Inc. All Rights Reserved.
|
||||
* Copyright (c) 2004-2007 Silicon Graphics, Inc. All Rights Reserved.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -14,6 +14,11 @@
|
|||
* PIO read fails, the MCA handler will force the error to look
|
||||
* corrected and vector to the xp_error_PIOR which will return an error.
|
||||
*
|
||||
* The definition of "consumption" and the time it takes for an MCA
|
||||
* to surface is processor implementation specific. This code
|
||||
* is sufficient on Itanium through the Montvale processor family.
|
||||
* It may need to be adjusted for future processor implementations.
|
||||
*
|
||||
* extern int xp_nofault_PIOR(void *remote_register);
|
||||
*/
|
||||
|
||||
|
@ -22,11 +27,10 @@ xp_nofault_PIOR:
|
|||
mov r8=r0 // Stage a success return value
|
||||
ld8.acq r9=[r32];; // PIO Read the specified register
|
||||
adds r9=1,r9;; // Add to force consumption
|
||||
or r9=r9,r9;; // Or to force consumption
|
||||
srlz.i;; // Allow time for MCA to surface
|
||||
br.ret.sptk.many b0;; // Return success
|
||||
|
||||
.global xp_error_PIOR
|
||||
xp_error_PIOR:
|
||||
mov r8=1 // Return value of 1
|
||||
br.ret.sptk.many b0;; // Return failure
|
||||
|
||||
|
|
|
@ -59,6 +59,8 @@ config BCM47XX
|
|||
select SYS_SUPPORTS_LITTLE_ENDIAN
|
||||
select SSB
|
||||
select SSB_DRIVER_MIPS
|
||||
select SSB_DRIVER_EXTIF
|
||||
select SSB_PCICORE_HOSTMODE if PCI
|
||||
select GENERIC_GPIO
|
||||
select SYS_HAS_EARLY_PRINTK
|
||||
select CFE
|
||||
|
@ -992,8 +994,6 @@ config BOOT_ELF64
|
|||
|
||||
menu "CPU selection"
|
||||
|
||||
source "kernel/time/Kconfig"
|
||||
|
||||
choice
|
||||
prompt "CPU type"
|
||||
default CPU_R4X00
|
||||
|
@ -1768,6 +1768,8 @@ config NR_CPUS
|
|||
performance should round up your number of processors to the next
|
||||
power of two.
|
||||
|
||||
source "kernel/time/Kconfig"
|
||||
|
||||
#
|
||||
# Timer Interrupt Frequency Configuration
|
||||
#
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* BRIEF MODULE DESCRIPTION
|
||||
* Alchemy/AMD Au1x00 pci support.
|
||||
* Alchemy/AMD Au1x00 PCI support.
|
||||
*
|
||||
* Copyright 2001,2002,2003 MontaVista Software Inc.
|
||||
* Copyright 2001-2003, 2007 MontaVista Software Inc.
|
||||
* Author: MontaVista Software, Inc.
|
||||
* ppopov@mvista.com or source@mvista.com
|
||||
*
|
||||
|
@ -66,6 +66,8 @@ static unsigned long virt_io_addr;
|
|||
|
||||
static int __init au1x_pci_setup(void)
|
||||
{
|
||||
extern void au1x_pci_cfg_init(void);
|
||||
|
||||
#if defined(CONFIG_SOC_AU1500) || defined(CONFIG_SOC_AU1550)
|
||||
virt_io_addr = (unsigned long)ioremap(Au1500_PCI_IO_START,
|
||||
Au1500_PCI_IO_END - Au1500_PCI_IO_START + 1);
|
||||
|
@ -94,6 +96,8 @@ static int __init au1x_pci_setup(void)
|
|||
set_io_port_base(virt_io_addr);
|
||||
#endif
|
||||
|
||||
au1x_pci_cfg_init();
|
||||
|
||||
register_pci_controller(&au1x_controller);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -4,10 +4,15 @@
|
|||
#include <linux/io.h>
|
||||
#include <linux/serial_reg.h>
|
||||
|
||||
#include <cobalt.h>
|
||||
|
||||
#define UART_BASE ((void __iomem *)CKSEG1ADDR(0x1c800000))
|
||||
|
||||
void prom_putchar(char c)
|
||||
{
|
||||
if (cobalt_board_id <= COBALT_BRD_ID_QUBE1)
|
||||
return;
|
||||
|
||||
while (!(readb(UART_BASE + UART_LSR) & UART_LSR_THRE))
|
||||
;
|
||||
|
||||
|
|
|
@ -136,7 +136,8 @@ EXPORT(_stext)
|
|||
* kernel load address. This is needed because this platform does
|
||||
* not have a ELF loader yet.
|
||||
*/
|
||||
__INIT
|
||||
FEXPORT(__kernel_entry)
|
||||
j kernel_entry
|
||||
#endif
|
||||
|
||||
__INIT_REFOK
|
||||
|
|
|
@ -269,7 +269,7 @@ static void __init bootmem_init(void)
|
|||
|
||||
static void __init bootmem_init(void)
|
||||
{
|
||||
unsigned long init_begin, reserved_end;
|
||||
unsigned long reserved_end;
|
||||
unsigned long mapstart = ~0UL;
|
||||
unsigned long bootmap_size;
|
||||
int i;
|
||||
|
@ -344,7 +344,6 @@ static void __init bootmem_init(void)
|
|||
min_low_pfn, max_low_pfn);
|
||||
|
||||
|
||||
init_begin = PFN_UP(__pa_symbol(&__init_begin));
|
||||
for (i = 0; i < boot_mem_map.nr_map; i++) {
|
||||
unsigned long start, end;
|
||||
|
||||
|
@ -352,8 +351,8 @@ static void __init bootmem_init(void)
|
|||
end = PFN_DOWN(boot_mem_map.map[i].addr
|
||||
+ boot_mem_map.map[i].size);
|
||||
|
||||
if (start <= init_begin)
|
||||
start = init_begin;
|
||||
if (start <= min_low_pfn)
|
||||
start = min_low_pfn;
|
||||
if (start >= end)
|
||||
continue;
|
||||
|
||||
|
|
|
@ -147,9 +147,9 @@ static __init int cpu_has_mfc0_count_bug(void)
|
|||
return 1;
|
||||
|
||||
/*
|
||||
* I don't have erratas for newer R4400 so be paranoid.
|
||||
* we assume newer revisions are ok
|
||||
*/
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -12,11 +12,11 @@ endif
|
|||
|
||||
MKLASATIMG = mklasatimg
|
||||
MKLASATIMG_ARCH = mq2,mqpro,sp100,sp200
|
||||
KERNEL_IMAGE = $(TOPDIR)/vmlinux
|
||||
KERNEL_IMAGE = vmlinux
|
||||
KERNEL_START = $(shell $(NM) $(KERNEL_IMAGE) | grep " _text" | cut -f1 -d\ )
|
||||
KERNEL_ENTRY = $(shell $(NM) $(KERNEL_IMAGE) | grep kernel_entry | cut -f1 -d\ )
|
||||
|
||||
LDSCRIPT= -L$(obj) -Tromscript.normal
|
||||
LDSCRIPT= -L$(srctree)/$(src) -Tromscript.normal
|
||||
|
||||
HEAD_DEFINES := -D_kernel_start=0x$(KERNEL_START) \
|
||||
-D_kernel_entry=0x$(KERNEL_ENTRY) \
|
||||
|
@ -24,7 +24,7 @@ HEAD_DEFINES := -D_kernel_start=0x$(KERNEL_START) \
|
|||
-D TIMESTAMP=$(shell date +%s)
|
||||
|
||||
$(obj)/head.o: $(obj)/head.S $(KERNEL_IMAGE)
|
||||
$(CC) -fno-pic $(HEAD_DEFINES) -I$(TOPDIR)/include -c -o $@ $<
|
||||
$(CC) -fno-pic $(HEAD_DEFINES) $(LINUXINCLUDE) -c -o $@ $<
|
||||
|
||||
OBJECTS = head.o kImage.o
|
||||
|
||||
|
|
|
@ -169,7 +169,6 @@ void __init prom_meminit(void)
|
|||
|
||||
void __init prom_free_prom_memory(void)
|
||||
{
|
||||
#if 0 /* for now ... */
|
||||
unsigned long addr;
|
||||
int i;
|
||||
|
||||
|
@ -181,5 +180,4 @@ void __init prom_free_prom_memory(void)
|
|||
free_init_pages("prom memory",
|
||||
addr, addr + boot_mem_map.map[i].size);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -39,16 +39,18 @@ static void atlas_machine_power_off(void);
|
|||
|
||||
static void mips_machine_restart(char *command)
|
||||
{
|
||||
unsigned int __iomem *softres_reg = ioremap(SOFTRES_REG, sizeof(unsigned int));
|
||||
unsigned int __iomem *softres_reg =
|
||||
ioremap(SOFTRES_REG, sizeof(unsigned int));
|
||||
|
||||
writew(GORESET, softres_reg);
|
||||
__raw_writel(GORESET, softres_reg);
|
||||
}
|
||||
|
||||
static void mips_machine_halt(void)
|
||||
{
|
||||
unsigned int __iomem *softres_reg = ioremap(SOFTRES_REG, sizeof(unsigned int));
|
||||
unsigned int __iomem *softres_reg =
|
||||
ioremap(SOFTRES_REG, sizeof(unsigned int));
|
||||
|
||||
writew(GORESET, softres_reg);
|
||||
__raw_writel(GORESET, softres_reg);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_MIPS_ATLAS)
|
||||
|
|
|
@ -149,7 +149,7 @@ void __init plat_mem_setup(void)
|
|||
/* Check PCI clock */
|
||||
{
|
||||
unsigned int __iomem *jmpr_p = (unsigned int *) ioremap(MALTA_JMPRS_REG, sizeof(unsigned int));
|
||||
int jmpr = (readw(jmpr_p) >> 2) & 0x07;
|
||||
int jmpr = (__raw_readl(jmpr_p) >> 2) & 0x07;
|
||||
static const int pciclocks[] __initdata = {
|
||||
33, 20, 25, 30, 12, 16, 37, 10
|
||||
};
|
||||
|
|
|
@ -45,7 +45,7 @@ static gfp_t massage_gfp_flags(const struct device *dev, gfp_t gfp)
|
|||
/* ignore region specifiers */
|
||||
gfp &= ~(__GFP_DMA | __GFP_DMA32 | __GFP_HIGHMEM);
|
||||
|
||||
#ifdef CONFIG_ZONE_DMA32
|
||||
#ifdef CONFIG_ZONE_DMA
|
||||
if (dev == NULL)
|
||||
gfp |= __GFP_DMA;
|
||||
else if (dev->coherent_dma_mask < DMA_BIT_MASK(24))
|
||||
|
|
|
@ -177,7 +177,7 @@ static char irq_tab_raq2[] __initdata = {
|
|||
|
||||
int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
|
||||
{
|
||||
if (cobalt_board_id < COBALT_BRD_ID_QUBE2)
|
||||
if (cobalt_board_id <= COBALT_BRD_ID_QUBE1)
|
||||
return irq_tab_qube1[slot];
|
||||
|
||||
if (cobalt_board_id == COBALT_BRD_ID_RAQ2)
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* BRIEF MODULE DESCRIPTION
|
||||
* Alchemy/AMD Au1x00 pci support.
|
||||
* Alchemy/AMD Au1x00 PCI support.
|
||||
*
|
||||
* Copyright 2001,2002,2003 MontaVista Software Inc.
|
||||
* Copyright 2001-2003, 2007 MontaVista Software Inc.
|
||||
* Author: MontaVista Software, Inc.
|
||||
* ppopov@mvista.com or source@mvista.com
|
||||
*
|
||||
|
@ -69,10 +69,27 @@ void mod_wired_entry(int entry, unsigned long entrylo0,
|
|||
write_c0_pagemask(old_pagemask);
|
||||
}
|
||||
|
||||
struct vm_struct *pci_cfg_vm;
|
||||
static struct vm_struct *pci_cfg_vm;
|
||||
static int pci_cfg_wired_entry;
|
||||
static int first_cfg = 1;
|
||||
unsigned long last_entryLo0, last_entryLo1;
|
||||
static unsigned long last_entryLo0, last_entryLo1;
|
||||
|
||||
/*
|
||||
* We can't ioremap the entire pci config space because it's too large.
|
||||
* Nor can we call ioremap dynamically because some device drivers use
|
||||
* the PCI config routines from within interrupt handlers and that
|
||||
* becomes a problem in get_vm_area(). We use one wired TLB to handle
|
||||
* all config accesses for all busses.
|
||||
*/
|
||||
void __init au1x_pci_cfg_init(void)
|
||||
{
|
||||
/* Reserve a wired entry for PCI config accesses */
|
||||
pci_cfg_vm = get_vm_area(0x2000, VM_IOREMAP);
|
||||
if (!pci_cfg_vm)
|
||||
panic(KERN_ERR "PCI unable to get vm area\n");
|
||||
pci_cfg_wired_entry = read_c0_wired();
|
||||
add_wired_entry(0, 0, (unsigned long)pci_cfg_vm->addr, PM_4K);
|
||||
last_entryLo0 = last_entryLo1 = 0xffffffff;
|
||||
}
|
||||
|
||||
static int config_access(unsigned char access_type, struct pci_bus *bus,
|
||||
unsigned int dev_fn, unsigned char where,
|
||||
|
@ -97,27 +114,6 @@ static int config_access(unsigned char access_type, struct pci_bus *bus,
|
|||
Au1500_PCI_STATCMD);
|
||||
au_sync_udelay(1);
|
||||
|
||||
/*
|
||||
* We can't ioremap the entire pci config space because it's
|
||||
* too large. Nor can we call ioremap dynamically because some
|
||||
* device drivers use the pci config routines from within
|
||||
* interrupt handlers and that becomes a problem in get_vm_area().
|
||||
* We use one wired tlb to handle all config accesses for all
|
||||
* busses. To improve performance, if the current device
|
||||
* is the same as the last device accessed, we don't touch the
|
||||
* tlb.
|
||||
*/
|
||||
if (first_cfg) {
|
||||
/* reserve a wired entry for pci config accesses */
|
||||
first_cfg = 0;
|
||||
pci_cfg_vm = get_vm_area(0x2000, VM_IOREMAP);
|
||||
if (!pci_cfg_vm)
|
||||
panic(KERN_ERR "PCI unable to get vm area\n");
|
||||
pci_cfg_wired_entry = read_c0_wired();
|
||||
add_wired_entry(0, 0, (unsigned long)pci_cfg_vm->addr, PM_4K);
|
||||
last_entryLo0 = last_entryLo1 = 0xffffffff;
|
||||
}
|
||||
|
||||
/* Allow board vendors to implement their own off-chip idsel.
|
||||
* If it doesn't succeed, may as well bail out at this point.
|
||||
*/
|
||||
|
@ -144,9 +140,12 @@ static int config_access(unsigned char access_type, struct pci_bus *bus,
|
|||
/* page boundary */
|
||||
cfg_base = cfg_base & PAGE_MASK;
|
||||
|
||||
/*
|
||||
* To improve performance, if the current device is the same as
|
||||
* the last device accessed, we don't touch the TLB.
|
||||
*/
|
||||
entryLo0 = (6 << 26) | (cfg_base >> 6) | (2 << 3) | 7;
|
||||
entryLo1 = (6 << 26) | (cfg_base >> 6) | (0x1000 >> 6) | (2 << 3) | 7;
|
||||
|
||||
if ((entryLo0 != last_entryLo0) || (entryLo1 != last_entryLo1)) {
|
||||
mod_wired_entry(pci_cfg_wired_entry, entryLo0, entryLo1,
|
||||
(unsigned long)pci_cfg_vm->addr, PM_4K);
|
||||
|
|
|
@ -42,6 +42,10 @@ static int
|
|||
mace_pci_read_config(struct pci_bus *bus, unsigned int devfn,
|
||||
int reg, int size, u32 *val)
|
||||
{
|
||||
u32 control = mace->pci.control;
|
||||
|
||||
/* disable master aborts interrupts during config read */
|
||||
mace->pci.control = control & ~MACEPCI_CONTROL_MAR_INT;
|
||||
mace->pci.config_addr = mkaddr(bus, devfn, reg);
|
||||
switch (size) {
|
||||
case 1:
|
||||
|
@ -54,6 +58,9 @@ mace_pci_read_config(struct pci_bus *bus, unsigned int devfn,
|
|||
*val = mace->pci.config_data.l;
|
||||
break;
|
||||
}
|
||||
/* ack possible master abort */
|
||||
mace->pci.error &= ~MACEPCI_ERROR_MASTER_ABORT;
|
||||
mace->pci.control = control;
|
||||
|
||||
DPRINTK("read%d: reg=%08x,val=%02x\n", size * 8, reg, *val);
|
||||
|
||||
|
|
|
@ -119,6 +119,7 @@ static struct pci_controller mace_pci_controller = {
|
|||
.iommu = 0,
|
||||
.mem_offset = MACE_PCI_MEM_OFFSET,
|
||||
.io_offset = 0,
|
||||
.io_map_base = CKSEG1ADDR(MACEPCI_LOW_IO),
|
||||
};
|
||||
|
||||
static int __init mace_init(void)
|
||||
|
@ -135,7 +136,8 @@ static int __init mace_init(void)
|
|||
BUG_ON(request_irq(MACE_PCI_BRIDGE_IRQ, macepci_error, 0,
|
||||
"MACE PCI error", NULL));
|
||||
|
||||
iomem_resource = mace_pci_mem_resource;
|
||||
/* extend memory resources */
|
||||
iomem_resource.end = mace_pci_mem_resource.end;
|
||||
ioport_resource = mace_pci_io_resource;
|
||||
|
||||
register_pci_controller(&mace_pci_controller);
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
#include <linux/kernel_stat.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
#include <asm/bootinfo.h>
|
||||
#include <asm/cpu.h>
|
||||
|
@ -41,11 +40,60 @@ static cycle_t hpt_read(void)
|
|||
return read_c0_count2();
|
||||
}
|
||||
|
||||
static struct clocksource pnx_clocksource = {
|
||||
.name = "pnx8xxx",
|
||||
.rating = 200,
|
||||
.read = hpt_read,
|
||||
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
|
||||
};
|
||||
|
||||
static void timer_ack(void)
|
||||
{
|
||||
write_c0_compare(cpj);
|
||||
}
|
||||
|
||||
static irqreturn_t pnx8xxx_timer_interrupt(int irq, void *dev_id)
|
||||
{
|
||||
struct clock_event_device *c = dev_id;
|
||||
|
||||
/* clear MATCH, signal the event */
|
||||
c->event_handler(c);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static struct irqaction pnx8xxx_timer_irq = {
|
||||
.handler = pnx8xxx_timer_interrupt,
|
||||
.flags = IRQF_DISABLED | IRQF_PERCPU,
|
||||
.name = "pnx8xxx_timer",
|
||||
};
|
||||
|
||||
static irqreturn_t monotonic_interrupt(int irq, void *dev_id)
|
||||
{
|
||||
/* Timer 2 clear interrupt */
|
||||
write_c0_compare2(-1);
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static struct irqaction monotonic_irqaction = {
|
||||
.handler = monotonic_interrupt,
|
||||
.flags = IRQF_DISABLED,
|
||||
.name = "Monotonic timer",
|
||||
};
|
||||
|
||||
static int pnx8xxx_set_next_event(unsigned long delta,
|
||||
struct clock_event_device *evt)
|
||||
{
|
||||
write_c0_compare(delta);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct clock_event_device pnx8xxx_clockevent = {
|
||||
.name = "pnx8xxx_clockevent",
|
||||
.features = CLOCK_EVT_FEAT_ONESHOT,
|
||||
.set_next_event = pnx8xxx_set_next_event,
|
||||
};
|
||||
|
||||
/*
|
||||
* plat_time_init() - it does the following things:
|
||||
*
|
||||
|
@ -58,11 +106,34 @@ static void timer_ack(void)
|
|||
|
||||
__init void plat_time_init(void)
|
||||
{
|
||||
unsigned int configPR;
|
||||
unsigned int n;
|
||||
unsigned int m;
|
||||
unsigned int p;
|
||||
unsigned int pow2p;
|
||||
|
||||
clockevents_register_device(&pnx8xxx_clockevent);
|
||||
clocksource_register(&pnx_clocksource);
|
||||
|
||||
setup_irq(PNX8550_INT_TIMER1, &pnx8xxx_timer_irq);
|
||||
setup_irq(PNX8550_INT_TIMER2, &monotonic_irqaction);
|
||||
|
||||
/* Timer 1 start */
|
||||
configPR = read_c0_config7();
|
||||
configPR &= ~0x00000008;
|
||||
write_c0_config7(configPR);
|
||||
|
||||
/* Timer 2 start */
|
||||
configPR = read_c0_config7();
|
||||
configPR &= ~0x00000010;
|
||||
write_c0_config7(configPR);
|
||||
|
||||
/* Timer 3 stop */
|
||||
configPR = read_c0_config7();
|
||||
configPR |= 0x00000020;
|
||||
write_c0_config7(configPR);
|
||||
|
||||
|
||||
/* PLL0 sets MIPS clock (PLL1 <=> TM1, PLL6 <=> TM2, PLL5 <=> mem) */
|
||||
/* (but only if CLK_MIPS_CTL select value [bits 3:1] is 1: FIXME) */
|
||||
|
||||
|
@ -87,42 +158,6 @@ __init void plat_time_init(void)
|
|||
write_c0_count2(0);
|
||||
write_c0_compare2(0xffffffff);
|
||||
|
||||
clocksource_mips.read = hpt_read;
|
||||
mips_timer_ack = timer_ack;
|
||||
}
|
||||
|
||||
static irqreturn_t monotonic_interrupt(int irq, void *dev_id)
|
||||
{
|
||||
/* Timer 2 clear interrupt */
|
||||
write_c0_compare2(-1);
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static struct irqaction monotonic_irqaction = {
|
||||
.handler = monotonic_interrupt,
|
||||
.flags = IRQF_DISABLED,
|
||||
.name = "Monotonic timer",
|
||||
};
|
||||
|
||||
void __init plat_timer_setup(struct irqaction *irq)
|
||||
{
|
||||
int configPR;
|
||||
|
||||
setup_irq(PNX8550_INT_TIMER1, irq);
|
||||
setup_irq(PNX8550_INT_TIMER2, &monotonic_irqaction);
|
||||
|
||||
/* Timer 1 start */
|
||||
configPR = read_c0_config7();
|
||||
configPR &= ~0x00000008;
|
||||
write_c0_config7(configPR);
|
||||
|
||||
/* Timer 2 start */
|
||||
configPR = read_c0_config7();
|
||||
configPR &= ~0x00000010;
|
||||
write_c0_config7(configPR);
|
||||
|
||||
/* Timer 3 stop */
|
||||
configPR = read_c0_config7();
|
||||
configPR |= 0x00000020;
|
||||
write_c0_config7(configPR);
|
||||
}
|
||||
|
|
|
@ -426,7 +426,6 @@ static void ip32_irq0(void)
|
|||
|
||||
crime_int = crime->istat & crime_mask;
|
||||
irq = MACE_VID_IN1_IRQ + __ffs(crime_int);
|
||||
crime_int = 1 << irq;
|
||||
|
||||
if (crime_int & CRIME_MACEISA_INT_MASK) {
|
||||
unsigned long mace_int = mace->perif.ctrl.istat;
|
||||
|
|
|
@ -13,21 +13,22 @@
|
|||
#include <asm/ip32/mace.h>
|
||||
#include <asm/ip32/ip32_ints.h>
|
||||
|
||||
/*
|
||||
* .iobase isn't a constant (in the sense of C) so we fill it in at runtime.
|
||||
*/
|
||||
#define MACE_PORT(int) \
|
||||
#define MACEISA_SERIAL1_OFFS offsetof(struct sgi_mace, isa.serial1)
|
||||
#define MACEISA_SERIAL2_OFFS offsetof(struct sgi_mace, isa.serial2)
|
||||
|
||||
#define MACE_PORT(offset,_irq) \
|
||||
{ \
|
||||
.irq = int, \
|
||||
.mapbase = MACE_BASE + offset, \
|
||||
.irq = _irq, \
|
||||
.uartclk = 1843200, \
|
||||
.iotype = UPIO_MEM, \
|
||||
.flags = UPF_SKIP_TEST, \
|
||||
.flags = UPF_SKIP_TEST|UPF_IOREMAP, \
|
||||
.regshift = 8, \
|
||||
}
|
||||
|
||||
static struct plat_serial8250_port uart8250_data[] = {
|
||||
MACE_PORT(MACEISA_SERIAL1_IRQ),
|
||||
MACE_PORT(MACEISA_SERIAL2_IRQ),
|
||||
MACE_PORT(MACEISA_SERIAL1_OFFS, MACEISA_SERIAL1_IRQ),
|
||||
MACE_PORT(MACEISA_SERIAL2_OFFS, MACEISA_SERIAL2_IRQ),
|
||||
{ },
|
||||
};
|
||||
|
||||
|
@ -41,9 +42,6 @@ static struct platform_device uart8250_device = {
|
|||
|
||||
static int __init uart8250_init(void)
|
||||
{
|
||||
uart8250_data[0].membase = (void __iomem *) &mace->isa.serial1;
|
||||
uart8250_data[1].membase = (void __iomem *) &mace->isa.serial2;
|
||||
|
||||
return platform_device_register(&uart8250_device);
|
||||
}
|
||||
|
||||
|
|
|
@ -598,8 +598,8 @@ static int __init rbtx4938_ethaddr_init(void)
|
|||
printk(KERN_WARNING "seeprom: bad checksum.\n");
|
||||
}
|
||||
for (i = 0; i < 2; i++) {
|
||||
unsigned int slot = TX4938_PCIC_IDSEL_AD_TO_SLOT(31 - i);
|
||||
unsigned int id = (1 << 8) | PCI_DEVFN(slot, 0); /* bus 1 */
|
||||
unsigned int id =
|
||||
TXX9_IRQ_BASE + (i ? TX4938_IR_ETH1 : TX4938_IR_ETH0);
|
||||
struct platform_device *pdev;
|
||||
if (!(tx4938_ccfgptr->pcfg &
|
||||
(i ? TX4938_PCFG_ETH1_SEL : TX4938_PCFG_ETH0_SEL)))
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This file adds the header file glue so that the shared files
|
||||
* flatdevicetree.[ch] can compile and work in the powerpc bootwrapper.
|
||||
*
|
||||
* strncmp & strchr copied from <file:lib/strings.c>
|
||||
* strncmp & strchr copied from <file:lib/string.c>
|
||||
* Copyright (C) 1991, 1992 Linus Torvalds
|
||||
*
|
||||
* Maintained by: Mark A. Greer <mgreer@mvista.com>
|
||||
|
|
|
@ -278,6 +278,7 @@ int iommu_map_sg(struct iommu_table *tbl, struct scatterlist *sglist,
|
|||
unsigned long flags;
|
||||
struct scatterlist *s, *outs, *segstart;
|
||||
int outcount, incount, i;
|
||||
unsigned int align;
|
||||
unsigned long handle;
|
||||
|
||||
BUG_ON(direction == DMA_NONE);
|
||||
|
@ -309,7 +310,12 @@ int iommu_map_sg(struct iommu_table *tbl, struct scatterlist *sglist,
|
|||
/* Allocate iommu entries for that segment */
|
||||
vaddr = (unsigned long) sg_virt(s);
|
||||
npages = iommu_num_pages(vaddr, slen);
|
||||
entry = iommu_range_alloc(tbl, npages, &handle, mask >> IOMMU_PAGE_SHIFT, 0);
|
||||
align = 0;
|
||||
if (IOMMU_PAGE_SHIFT < PAGE_SHIFT && slen >= PAGE_SIZE &&
|
||||
(vaddr & ~PAGE_MASK) == 0)
|
||||
align = PAGE_SHIFT - IOMMU_PAGE_SHIFT;
|
||||
entry = iommu_range_alloc(tbl, npages, &handle,
|
||||
mask >> IOMMU_PAGE_SHIFT, align);
|
||||
|
||||
DBG(" - vaddr: %lx, size: %lx\n", vaddr, slen);
|
||||
|
||||
|
@ -570,7 +576,7 @@ dma_addr_t iommu_map_single(struct iommu_table *tbl, void *vaddr,
|
|||
{
|
||||
dma_addr_t dma_handle = DMA_ERROR_CODE;
|
||||
unsigned long uaddr;
|
||||
unsigned int npages;
|
||||
unsigned int npages, align;
|
||||
|
||||
BUG_ON(direction == DMA_NONE);
|
||||
|
||||
|
@ -578,8 +584,13 @@ dma_addr_t iommu_map_single(struct iommu_table *tbl, void *vaddr,
|
|||
npages = iommu_num_pages(uaddr, size);
|
||||
|
||||
if (tbl) {
|
||||
align = 0;
|
||||
if (IOMMU_PAGE_SHIFT < PAGE_SHIFT && size >= PAGE_SIZE &&
|
||||
((unsigned long)vaddr & ~PAGE_MASK) == 0)
|
||||
align = PAGE_SHIFT - IOMMU_PAGE_SHIFT;
|
||||
|
||||
dma_handle = iommu_alloc(tbl, vaddr, npages, direction,
|
||||
mask >> IOMMU_PAGE_SHIFT, 0);
|
||||
mask >> IOMMU_PAGE_SHIFT, align);
|
||||
if (dma_handle == DMA_ERROR_CODE) {
|
||||
if (printk_ratelimit()) {
|
||||
printk(KERN_INFO "iommu_alloc failed, "
|
||||
|
|
|
@ -2216,6 +2216,45 @@ static void __init fixup_device_tree_efika(void)
|
|||
prom_printf("fixup_device_tree_efika: ",
|
||||
"skipped entry %x - setprop error\n", i);
|
||||
}
|
||||
|
||||
/* Make sure ethernet mdio bus node exists */
|
||||
node = call_prom("finddevice", 1, 1, ADDR("/builtin/mdio"));
|
||||
if (!PHANDLE_VALID(node)) {
|
||||
prom_printf("Adding Ethernet MDIO node\n");
|
||||
call_prom("interpret", 1, 1,
|
||||
" s\" /builtin\" find-device"
|
||||
" new-device"
|
||||
" 1 encode-int s\" #address-cells\" property"
|
||||
" 0 encode-int s\" #size-cells\" property"
|
||||
" s\" mdio\" 2dup device-name device-type"
|
||||
" s\" mpc5200b-fec-phy\" encode-string"
|
||||
" s\" compatible\" property"
|
||||
" 0xf0003000 0x400 reg"
|
||||
" 0x2 encode-int"
|
||||
" 0x5 encode-int encode+"
|
||||
" 0x3 encode-int encode+"
|
||||
" s\" interrupts\" property"
|
||||
" finish-device");
|
||||
};
|
||||
|
||||
/* Make sure ethernet phy device node exist */
|
||||
node = call_prom("finddevice", 1, 1, ADDR("/builtin/mdio/ethernet-phy"));
|
||||
if (!PHANDLE_VALID(node)) {
|
||||
prom_printf("Adding Ethernet PHY node\n");
|
||||
call_prom("interpret", 1, 1,
|
||||
" s\" /builtin/mdio\" find-device"
|
||||
" new-device"
|
||||
" s\" ethernet-phy\" device-name"
|
||||
" 0x10 encode-int s\" reg\" property"
|
||||
" my-self"
|
||||
" ihandle>phandle"
|
||||
" finish-device"
|
||||
" s\" /builtin/ethernet\" find-device"
|
||||
" encode-int"
|
||||
" s\" phy-handle\" property"
|
||||
" device-end");
|
||||
}
|
||||
|
||||
}
|
||||
#else
|
||||
#define fixup_device_tree_efika()
|
||||
|
|
|
@ -295,6 +295,8 @@ void slb_initialize(void)
|
|||
|
||||
create_shadowed_slbe(VMALLOC_START, mmu_kernel_ssize, vflags, 1);
|
||||
|
||||
slb_shadow_clear(2);
|
||||
|
||||
/* We don't bolt the stack for the time being - we're in boot,
|
||||
* so the stack is in the bolted segment. By the time it goes
|
||||
* elsewhere, we'll call _switch() which will bolt in the new
|
||||
|
|
|
@ -88,3 +88,8 @@ config CBE_CPUFREQ_PMI
|
|||
but also at lower core voltage.
|
||||
|
||||
endmenu
|
||||
|
||||
config OPROFILE_CELL
|
||||
def_bool y
|
||||
depends on PPC_CELL_NATIVE && (OPROFILE = m || OPROFILE = y)
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ spu-manage-$(CONFIG_PPC_CELLEB) += spu_manage.o
|
|||
spu-manage-$(CONFIG_PPC_CELL_NATIVE) += spu_manage.o
|
||||
|
||||
obj-$(CONFIG_SPU_BASE) += spu_callbacks.o spu_base.o \
|
||||
spu_notify.o \
|
||||
spu_syscalls.o spu_fault.o \
|
||||
$(spu-priv1-y) \
|
||||
$(spu-manage-y) \
|
||||
|
|
|
@ -0,0 +1,67 @@
|
|||
/*
|
||||
* Move OProfile dependencies from spufs module to the kernel so it
|
||||
* can run on non-cell PPC.
|
||||
*
|
||||
* Copyright (C) IBM 2005
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#undef DEBUG
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <asm/spu.h>
|
||||
#include "spufs/spufs.h"
|
||||
|
||||
static BLOCKING_NOTIFIER_HEAD(spu_switch_notifier);
|
||||
|
||||
void spu_switch_notify(struct spu *spu, struct spu_context *ctx)
|
||||
{
|
||||
blocking_notifier_call_chain(&spu_switch_notifier,
|
||||
ctx ? ctx->object_id : 0, spu);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(spu_switch_notify);
|
||||
|
||||
int spu_switch_event_register(struct notifier_block *n)
|
||||
{
|
||||
int ret;
|
||||
ret = blocking_notifier_chain_register(&spu_switch_notifier, n);
|
||||
if (!ret)
|
||||
notify_spus_active();
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(spu_switch_event_register);
|
||||
|
||||
int spu_switch_event_unregister(struct notifier_block *n)
|
||||
{
|
||||
return blocking_notifier_chain_unregister(&spu_switch_notifier, n);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(spu_switch_event_unregister);
|
||||
|
||||
void spu_set_profile_private_kref(struct spu_context *ctx,
|
||||
struct kref *prof_info_kref,
|
||||
void (* prof_info_release) (struct kref *kref))
|
||||
{
|
||||
ctx->prof_priv_kref = prof_info_kref;
|
||||
ctx->prof_priv_release = prof_info_release;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(spu_set_profile_private_kref);
|
||||
|
||||
void *spu_get_profile_private_kref(struct spu_context *ctx)
|
||||
{
|
||||
return ctx->prof_priv_kref;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(spu_get_profile_private_kref);
|
||||
|
|
@ -145,6 +145,20 @@ int elf_coredump_extra_notes_write(struct file *file, loff_t *foffset)
|
|||
return ret;
|
||||
}
|
||||
|
||||
void notify_spus_active(void)
|
||||
{
|
||||
struct spufs_calls *calls;
|
||||
|
||||
calls = spufs_calls_get();
|
||||
if (!calls)
|
||||
return;
|
||||
|
||||
calls->notify_spus_active();
|
||||
spufs_calls_put(calls);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
int register_spu_syscalls(struct spufs_calls *calls)
|
||||
{
|
||||
if (spufs_calls)
|
||||
|
|
|
@ -177,19 +177,3 @@ void spu_release_saved(struct spu_context *ctx)
|
|||
spu_release(ctx);
|
||||
}
|
||||
|
||||
void spu_set_profile_private_kref(struct spu_context *ctx,
|
||||
struct kref *prof_info_kref,
|
||||
void ( * prof_info_release) (struct kref *kref))
|
||||
{
|
||||
ctx->prof_priv_kref = prof_info_kref;
|
||||
ctx->prof_priv_release = prof_info_release;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(spu_set_profile_private_kref);
|
||||
|
||||
void *spu_get_profile_private_kref(struct spu_context *ctx)
|
||||
{
|
||||
return ctx->prof_priv_kref;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(spu_get_profile_private_kref);
|
||||
|
||||
|
||||
|
|
|
@ -182,15 +182,7 @@ static int node_allowed(struct spu_context *ctx, int node)
|
|||
return rval;
|
||||
}
|
||||
|
||||
static BLOCKING_NOTIFIER_HEAD(spu_switch_notifier);
|
||||
|
||||
void spu_switch_notify(struct spu *spu, struct spu_context *ctx)
|
||||
{
|
||||
blocking_notifier_call_chain(&spu_switch_notifier,
|
||||
ctx ? ctx->object_id : 0, spu);
|
||||
}
|
||||
|
||||
static void notify_spus_active(void)
|
||||
void do_notify_spus_active(void)
|
||||
{
|
||||
int node;
|
||||
|
||||
|
@ -217,22 +209,6 @@ static void notify_spus_active(void)
|
|||
}
|
||||
}
|
||||
|
||||
int spu_switch_event_register(struct notifier_block * n)
|
||||
{
|
||||
int ret;
|
||||
ret = blocking_notifier_chain_register(&spu_switch_notifier, n);
|
||||
if (!ret)
|
||||
notify_spus_active();
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(spu_switch_event_register);
|
||||
|
||||
int spu_switch_event_unregister(struct notifier_block * n)
|
||||
{
|
||||
return blocking_notifier_chain_unregister(&spu_switch_notifier, n);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(spu_switch_event_unregister);
|
||||
|
||||
/**
|
||||
* spu_bind_context - bind spu context to physical spu
|
||||
* @spu: physical spu to bind to
|
||||
|
|
|
@ -86,5 +86,6 @@ struct spufs_calls spufs_calls = {
|
|||
.spu_run = do_spu_run,
|
||||
.coredump_extra_notes_size = spufs_coredump_extra_notes_size,
|
||||
.coredump_extra_notes_write = spufs_coredump_extra_notes_write,
|
||||
.notify_spus_active = do_notify_spus_active,
|
||||
.owner = THIS_MODULE,
|
||||
};
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include <linux/workqueue.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/syscalls.h>
|
||||
#include <linux/ctype.h>
|
||||
|
||||
#include <asm/lmb.h>
|
||||
|
||||
|
@ -37,6 +38,8 @@ enum os_area_ldr_format {
|
|||
HEADER_LDR_FORMAT_GZIP = 1,
|
||||
};
|
||||
|
||||
#define OS_AREA_HEADER_MAGIC_NUM "cell_ext_os_area"
|
||||
|
||||
/**
|
||||
* struct os_area_header - os area header segment.
|
||||
* @magic_num: Always 'cell_ext_os_area'.
|
||||
|
@ -114,13 +117,11 @@ struct os_area_params {
|
|||
u8 _reserved_5[8];
|
||||
};
|
||||
|
||||
enum {
|
||||
OS_AREA_DB_MAGIC_NUM = 0x2d64622dU,
|
||||
};
|
||||
#define OS_AREA_DB_MAGIC_NUM "-db-"
|
||||
|
||||
/**
|
||||
* struct os_area_db - Shared flash memory database.
|
||||
* @magic_num: Always '-db-' = 0x2d64622d.
|
||||
* @magic_num: Always '-db-'.
|
||||
* @version: os_area_db format version number.
|
||||
* @index_64: byte offset of the database id index for 64 bit variables.
|
||||
* @count_64: number of usable 64 bit index entries
|
||||
|
@ -135,7 +136,7 @@ enum {
|
|||
*/
|
||||
|
||||
struct os_area_db {
|
||||
u32 magic_num;
|
||||
u8 magic_num[4];
|
||||
u16 version;
|
||||
u16 _reserved_1;
|
||||
u16 index_64;
|
||||
|
@ -265,12 +266,26 @@ static void __init os_area_get_property(struct device_node *node,
|
|||
prop->name);
|
||||
}
|
||||
|
||||
static void dump_field(char *s, const u8 *field, int size_of_field)
|
||||
{
|
||||
#if defined(DEBUG)
|
||||
int i;
|
||||
|
||||
for (i = 0; i < size_of_field; i++)
|
||||
s[i] = isprint(field[i]) ? field[i] : '.';
|
||||
s[i] = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
#define dump_header(_a) _dump_header(_a, __func__, __LINE__)
|
||||
static void _dump_header(const struct os_area_header *h, const char *func,
|
||||
int line)
|
||||
{
|
||||
char str[sizeof(h->magic_num) + 1];
|
||||
|
||||
dump_field(str, h->magic_num, sizeof(h->magic_num));
|
||||
pr_debug("%s:%d: h.magic_num: '%s'\n", func, line,
|
||||
h->magic_num);
|
||||
str);
|
||||
pr_debug("%s:%d: h.hdr_version: %u\n", func, line,
|
||||
h->hdr_version);
|
||||
pr_debug("%s:%d: h.db_area_offset: %u\n", func, line,
|
||||
|
@ -311,7 +326,8 @@ static void _dump_params(const struct os_area_params *p, const char *func,
|
|||
|
||||
static int verify_header(const struct os_area_header *header)
|
||||
{
|
||||
if (memcmp(header->magic_num, "cell_ext_os_area", 16)) {
|
||||
if (memcmp(header->magic_num, OS_AREA_HEADER_MAGIC_NUM,
|
||||
sizeof(header->magic_num))) {
|
||||
pr_debug("%s:%d magic_num failed\n", __func__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
|
@ -331,7 +347,8 @@ static int verify_header(const struct os_area_header *header)
|
|||
|
||||
static int db_verify(const struct os_area_db *db)
|
||||
{
|
||||
if (db->magic_num != OS_AREA_DB_MAGIC_NUM) {
|
||||
if (memcmp(db->magic_num, OS_AREA_DB_MAGIC_NUM,
|
||||
sizeof(db->magic_num))) {
|
||||
pr_debug("%s:%d magic_num failed\n", __func__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
|
@ -484,8 +501,11 @@ static int db_get_rtc_diff(const struct os_area_db *db, int64_t *rtc_diff)
|
|||
static void _dump_db(const struct os_area_db *db, const char *func,
|
||||
int line)
|
||||
{
|
||||
char str[sizeof(db->magic_num) + 1];
|
||||
|
||||
dump_field(str, db->magic_num, sizeof(db->magic_num));
|
||||
pr_debug("%s:%d: db.magic_num: '%s'\n", func, line,
|
||||
(const char*)&db->magic_num);
|
||||
str);
|
||||
pr_debug("%s:%d: db.version: %u\n", func, line,
|
||||
db->version);
|
||||
pr_debug("%s:%d: db.index_64: %u\n", func, line,
|
||||
|
@ -516,7 +536,7 @@ static void os_area_db_init(struct os_area_db *db)
|
|||
|
||||
memset(db, 0, sizeof(struct os_area_db));
|
||||
|
||||
db->magic_num = OS_AREA_DB_MAGIC_NUM;
|
||||
memcpy(db->magic_num, OS_AREA_DB_MAGIC_NUM, sizeof(db->magic_num));
|
||||
db->version = 1;
|
||||
db->index_64 = HEADER_SIZE;
|
||||
db->count_64 = VALUES_64_COUNT;
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <asm/vdso_datapage.h>
|
||||
#include <asm/pSeries_reconfig.h>
|
||||
#include "xics.h"
|
||||
#include "plpar_wrappers.h"
|
||||
|
||||
/* This version can't take the spinlock, because it never returns */
|
||||
static struct rtas_args rtas_stop_self_args = {
|
||||
|
@ -58,6 +59,7 @@ static void pseries_mach_cpu_die(void)
|
|||
local_irq_disable();
|
||||
idle_task_exit();
|
||||
xics_teardown_cpu(0);
|
||||
unregister_slb_shadow(hard_smp_processor_id(), __pa(get_slb_shadow()));
|
||||
rtas_stop_self();
|
||||
/* Should never get here... */
|
||||
BUG();
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Based upon code written by Ross Biro, Linus Torvalds, Bob Manson,
|
||||
* and David Mosberger.
|
||||
*
|
||||
* Added Linux support -miguel (weird, eh?, the orignal code was meant
|
||||
* Added Linux support -miguel (weird, eh?, the original code was meant
|
||||
* to emulate SunOS).
|
||||
*/
|
||||
|
||||
|
|
|
@ -436,7 +436,14 @@ void __init time_init(void)
|
|||
|
||||
static inline unsigned long do_gettimeoffset(void)
|
||||
{
|
||||
return (*master_l10_counter >> 10) & 0x1fffff;
|
||||
unsigned long val = *master_l10_counter;
|
||||
unsigned long usec = (val >> 10) & 0x1fffff;
|
||||
|
||||
/* Limit hit? */
|
||||
if (val & 0x80000000)
|
||||
usec += 1000000 / HZ;
|
||||
|
||||
return usec;
|
||||
}
|
||||
|
||||
/* Ok, my cute asm atomicity trick doesn't work anymore.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* arch/sparc64/kernel/ktlb.S: Kernel mapping TLB miss handling.
|
||||
*
|
||||
* Copyright (C) 1995, 1997, 2005 David S. Miller <davem@davemloft.net>
|
||||
* Copyright (C) 1995, 1997, 2005, 2008 David S. Miller <davem@davemloft.net>
|
||||
* Copyright (C) 1996 Eddie C. Dost (ecd@brainaid.de)
|
||||
* Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx)
|
||||
* Copyright (C) 1996,98,99 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
|
||||
|
@ -226,6 +226,7 @@ kvmap_dtlb_load:
|
|||
ba,pt %xcc, sun4v_dtlb_load
|
||||
mov %g5, %g3
|
||||
|
||||
#ifdef CONFIG_SPARSEMEM_VMEMMAP
|
||||
kvmap_vmemmap:
|
||||
sub %g4, %g5, %g5
|
||||
srlx %g5, 22, %g5
|
||||
|
@ -234,6 +235,7 @@ kvmap_vmemmap:
|
|||
or %g1, %lo(vmemmap_table), %g1
|
||||
ba,pt %xcc, kvmap_dtlb_load
|
||||
ldx [%g1 + %g5], %g5
|
||||
#endif
|
||||
|
||||
kvmap_dtlb_nonlinear:
|
||||
/* Catch kernel NULL pointer derefs. */
|
||||
|
@ -242,12 +244,14 @@ kvmap_dtlb_nonlinear:
|
|||
bleu,pn %xcc, kvmap_dtlb_longpath
|
||||
nop
|
||||
|
||||
#ifdef CONFIG_SPARSEMEM_VMEMMAP
|
||||
/* Do not use the TSB for vmemmap. */
|
||||
mov (VMEMMAP_BASE >> 24), %g5
|
||||
sllx %g5, 24, %g5
|
||||
cmp %g4,%g5
|
||||
bgeu,pn %xcc, kvmap_vmemmap
|
||||
nop
|
||||
#endif
|
||||
|
||||
KERN_TSB_LOOKUP_TL1(%g4, %g6, %g5, %g1, %g2, %g3, kvmap_dtlb_load)
|
||||
|
||||
|
|
|
@ -1275,4 +1275,20 @@ int pci_dma_supported(struct pci_dev *pdev, u64 device_mask)
|
|||
return (device_mask & dma_addr_mask) == dma_addr_mask;
|
||||
}
|
||||
|
||||
void pci_resource_to_user(const struct pci_dev *pdev, int bar,
|
||||
const struct resource *rp, resource_size_t *start,
|
||||
resource_size_t *end)
|
||||
{
|
||||
struct pci_pbm_info *pbm = pdev->dev.archdata.host_controller;
|
||||
unsigned long offset;
|
||||
|
||||
if (rp->flags & IORESOURCE_IO)
|
||||
offset = pbm->io_space.start;
|
||||
else
|
||||
offset = pbm->mem_space.start;
|
||||
|
||||
*start = rp->start - offset;
|
||||
*end = rp->end - offset;
|
||||
}
|
||||
|
||||
#endif /* !(CONFIG_PCI) */
|
||||
|
|
|
@ -850,7 +850,7 @@ static int pbm_routes_this_ino(struct pci_pbm_info *pbm, u32 ino)
|
|||
/* How the Tomatillo IRQs are routed around is pure guesswork here.
|
||||
*
|
||||
* All the Tomatillo devices I see in prtconf dumps seem to have only
|
||||
* a single PCI bus unit attached to it. It would seem they are seperate
|
||||
* a single PCI bus unit attached to it. It would seem they are separate
|
||||
* devices because their PortID (ie. JBUS ID) values are all different
|
||||
* and thus the registers are mapped to totally different locations.
|
||||
*
|
||||
|
|
|
@ -215,6 +215,7 @@ sun4v_itlb_error:
|
|||
|
||||
1: ba,pt %xcc, etrap
|
||||
2: or %g7, %lo(2b), %g7
|
||||
mov %l4, %o1
|
||||
call sun4v_itlb_error_report
|
||||
add %sp, PTREGS_OFF, %o0
|
||||
|
||||
|
@ -241,6 +242,7 @@ sun4v_dtlb_error:
|
|||
|
||||
1: ba,pt %xcc, etrap
|
||||
2: or %g7, %lo(2b), %g7
|
||||
mov %l4, %o1
|
||||
call sun4v_dtlb_error_report
|
||||
add %sp, PTREGS_OFF, %o0
|
||||
|
||||
|
|
|
@ -1950,6 +1950,8 @@ void sun4v_itlb_error_report(struct pt_regs *regs, int tl)
|
|||
printk(KERN_EMERG "SUN4V-ITLB: Error at TPC[%lx], tl %d\n",
|
||||
regs->tpc, tl);
|
||||
print_symbol(KERN_EMERG "SUN4V-ITLB: TPC<%s>\n", regs->tpc);
|
||||
printk(KERN_EMERG "SUN4V-ITLB: O7[%lx]\n", regs->u_regs[UREG_I7]);
|
||||
print_symbol(KERN_EMERG "SUN4V-ITLB: O7<%s>\n", regs->u_regs[UREG_I7]);
|
||||
printk(KERN_EMERG "SUN4V-ITLB: vaddr[%lx] ctx[%lx] "
|
||||
"pte[%lx] error[%lx]\n",
|
||||
sun4v_err_itlb_vaddr, sun4v_err_itlb_ctx,
|
||||
|
@ -1971,6 +1973,8 @@ void sun4v_dtlb_error_report(struct pt_regs *regs, int tl)
|
|||
printk(KERN_EMERG "SUN4V-DTLB: Error at TPC[%lx], tl %d\n",
|
||||
regs->tpc, tl);
|
||||
print_symbol(KERN_EMERG "SUN4V-DTLB: TPC<%s>\n", regs->tpc);
|
||||
printk(KERN_EMERG "SUN4V-DTLB: O7[%lx]\n", regs->u_regs[UREG_I7]);
|
||||
print_symbol(KERN_EMERG "SUN4V-DTLB: O7<%s>\n", regs->u_regs[UREG_I7]);
|
||||
printk(KERN_EMERG "SUN4V-DTLB: vaddr[%lx] ctx[%lx] "
|
||||
"pte[%lx] error[%lx]\n",
|
||||
sun4v_err_dtlb_vaddr, sun4v_err_dtlb_ctx,
|
||||
|
|
|
@ -79,14 +79,14 @@ int start_watchdog(int *in_fd_ret, int *out_fd_ret, char *sock)
|
|||
n = read(in_fds[0], &c, sizeof(c));
|
||||
if (n == 0) {
|
||||
printk("harddog_open - EOF on watchdog pipe\n");
|
||||
helper_wait(pid);
|
||||
helper_wait(pid, 1, NULL);
|
||||
err = -EIO;
|
||||
goto out_close_out;
|
||||
}
|
||||
else if (n < 0) {
|
||||
printk("harddog_open - read of watchdog pipe failed, "
|
||||
"err = %d\n", errno);
|
||||
helper_wait(pid);
|
||||
helper_wait(pid, 1, NULL);
|
||||
err = n;
|
||||
goto out_close_out;
|
||||
}
|
||||
|
|
|
@ -2256,14 +2256,12 @@ static int __init apm_init(void)
|
|||
apm_info.disabled = 1;
|
||||
return -ENODEV;
|
||||
}
|
||||
if (PM_IS_ACTIVE()) {
|
||||
if (pm_flags & PM_ACPI) {
|
||||
printk(KERN_NOTICE "apm: overridden by ACPI.\n");
|
||||
apm_info.disabled = 1;
|
||||
return -ENODEV;
|
||||
}
|
||||
#ifdef CONFIG_PM_LEGACY
|
||||
pm_active = 1;
|
||||
#endif
|
||||
pm_flags |= PM_APM;
|
||||
|
||||
/*
|
||||
* Set up a segment that references the real mode segment 0x40
|
||||
|
@ -2366,9 +2364,7 @@ static void __exit apm_exit(void)
|
|||
kthread_stop(kapmd_task);
|
||||
kapmd_task = NULL;
|
||||
}
|
||||
#ifdef CONFIG_PM_LEGACY
|
||||
pm_active = 0;
|
||||
#endif
|
||||
pm_flags &= ~PM_APM;
|
||||
}
|
||||
|
||||
module_init(apm_init);
|
||||
|
|
|
@ -196,7 +196,7 @@ default_entry:
|
|||
/* Do an early initialization of the fixmap area */
|
||||
movl $(swapper_pg_dir - __PAGE_OFFSET), %edx
|
||||
movl $(swapper_pg_pmd - __PAGE_OFFSET), %eax
|
||||
addl $0x007, %eax /* 0x007 = PRESENT+RW+USER */
|
||||
addl $0x67, %eax /* 0x67 == _PAGE_TABLE */
|
||||
movl %eax, 4092(%edx)
|
||||
|
||||
xorl %ebx,%ebx /* This is the boot CPU (BSP) */
|
||||
|
|
|
@ -657,7 +657,7 @@ irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id)
|
|||
hpet_pie_count = 0;
|
||||
}
|
||||
|
||||
if (hpet_rtc_flags & RTC_PIE &&
|
||||
if (hpet_rtc_flags & RTC_AIE &&
|
||||
(curr_time.tm_sec == hpet_alarm_time.tm_sec) &&
|
||||
(curr_time.tm_min == hpet_alarm_time.tm_min) &&
|
||||
(curr_time.tm_hour == hpet_alarm_time.tm_hour))
|
||||
|
|
|
@ -2169,14 +2169,10 @@ static inline void __init check_timer(void)
|
|||
{
|
||||
int apic1, pin1, apic2, pin2;
|
||||
int vector;
|
||||
unsigned int ver;
|
||||
unsigned long flags;
|
||||
|
||||
local_irq_save(flags);
|
||||
|
||||
ver = apic_read(APIC_LVR);
|
||||
ver = GET_APIC_VERSION(ver);
|
||||
|
||||
/*
|
||||
* get/set the timer IRQ vector:
|
||||
*/
|
||||
|
@ -2189,15 +2185,11 @@ static inline void __init check_timer(void)
|
|||
* mode for the 8259A whenever interrupts are routed
|
||||
* through I/O APICs. Also IRQ0 has to be enabled in
|
||||
* the 8259A which implies the virtual wire has to be
|
||||
* disabled in the local APIC. Finally timer interrupts
|
||||
* need to be acknowledged manually in the 8259A for
|
||||
* timer_interrupt() and for the i82489DX when using
|
||||
* the NMI watchdog.
|
||||
* disabled in the local APIC.
|
||||
*/
|
||||
apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT);
|
||||
init_8259A(1);
|
||||
timer_ack = !cpu_has_tsc;
|
||||
timer_ack |= (nmi_watchdog == NMI_IO_APIC && !APIC_INTEGRATED(ver));
|
||||
timer_ack = 1;
|
||||
if (timer_over_8254 > 0)
|
||||
enable_8259A_irq(0);
|
||||
|
||||
|
|
|
@ -278,12 +278,12 @@ static int mfgpt_next_event(unsigned long delta, struct clock_event_device *evt)
|
|||
|
||||
static irqreturn_t mfgpt_tick(int irq, void *dev_id)
|
||||
{
|
||||
/* Turn off the clock (and clear the event) */
|
||||
mfgpt_disable_timer(mfgpt_event_clock);
|
||||
|
||||
if (mfgpt_tick_mode == CLOCK_EVT_MODE_SHUTDOWN)
|
||||
return IRQ_HANDLED;
|
||||
|
||||
/* Turn off the clock */
|
||||
mfgpt_disable_timer(mfgpt_event_clock);
|
||||
|
||||
/* Clear the counter */
|
||||
geode_mfgpt_write(mfgpt_event_clock, MFGPT_REG_COUNTER, 0);
|
||||
|
||||
|
@ -319,10 +319,6 @@ static int __init mfgpt_timer_setup(void)
|
|||
}
|
||||
|
||||
mfgpt_event_clock = timer;
|
||||
/* Set the clock scale and enable the event mode for CMP2 */
|
||||
val = MFGPT_SCALE | (3 << 8);
|
||||
|
||||
geode_mfgpt_write(mfgpt_event_clock, MFGPT_REG_SETUP, val);
|
||||
|
||||
/* Set up the IRQ on the MFGPT side */
|
||||
if (geode_mfgpt_setup_irq(mfgpt_event_clock, MFGPT_CMP2, irq)) {
|
||||
|
@ -339,6 +335,11 @@ static int __init mfgpt_timer_setup(void)
|
|||
goto err;
|
||||
}
|
||||
|
||||
/* Set the clock scale and enable the event mode for CMP2 */
|
||||
val = MFGPT_SCALE | (3 << 8);
|
||||
|
||||
geode_mfgpt_write(mfgpt_event_clock, MFGPT_REG_SETUP, val);
|
||||
|
||||
/* Set up the clock event */
|
||||
mfgpt_clockevent.mult = div_sc(MFGPT_HZ, NSEC_PER_SEC, 32);
|
||||
mfgpt_clockevent.min_delta_ns = clockevent_delta2ns(0xF,
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
|
||||
#include <asm/smp.h>
|
||||
#include <asm/nmi.h>
|
||||
#include <asm/timer.h>
|
||||
|
||||
#include "mach_traps.h"
|
||||
|
||||
|
@ -84,7 +83,7 @@ static int __init check_nmi_watchdog(void)
|
|||
|
||||
prev_nmi_count = kmalloc(NR_CPUS * sizeof(int), GFP_KERNEL);
|
||||
if (!prev_nmi_count)
|
||||
goto error;
|
||||
return -1;
|
||||
|
||||
printk(KERN_INFO "Testing NMI watchdog ... ");
|
||||
|
||||
|
@ -119,7 +118,7 @@ static int __init check_nmi_watchdog(void)
|
|||
if (!atomic_read(&nmi_active)) {
|
||||
kfree(prev_nmi_count);
|
||||
atomic_set(&nmi_active, -1);
|
||||
goto error;
|
||||
return -1;
|
||||
}
|
||||
printk("OK.\n");
|
||||
|
||||
|
@ -130,10 +129,6 @@ static int __init check_nmi_watchdog(void)
|
|||
|
||||
kfree(prev_nmi_count);
|
||||
return 0;
|
||||
error:
|
||||
timer_ack = !cpu_has_tsc;
|
||||
|
||||
return -1;
|
||||
}
|
||||
/* This needs to happen later in boot so counters are working */
|
||||
late_initcall(check_nmi_watchdog);
|
||||
|
|
|
@ -204,6 +204,10 @@ void cpu_idle(void)
|
|||
}
|
||||
}
|
||||
|
||||
static void do_nothing(void *unused)
|
||||
{
|
||||
}
|
||||
|
||||
void cpu_idle_wait(void)
|
||||
{
|
||||
unsigned int cpu, this_cpu = get_cpu();
|
||||
|
@ -228,6 +232,13 @@ void cpu_idle_wait(void)
|
|||
cpu_clear(cpu, map);
|
||||
}
|
||||
cpus_and(map, map, cpu_online_map);
|
||||
/*
|
||||
* We waited 1 sec, if a CPU still did not call idle
|
||||
* it may be because it is in idle and not waking up
|
||||
* because it has nothing to do.
|
||||
* Give all the remaining CPUS a kick.
|
||||
*/
|
||||
smp_call_function_mask(map, do_nothing, 0, 0);
|
||||
} while (!cpus_empty(map));
|
||||
|
||||
set_cpus_allowed(current, tmp);
|
||||
|
|
|
@ -135,6 +135,10 @@ static void poll_idle (void)
|
|||
cpu_relax();
|
||||
}
|
||||
|
||||
static void do_nothing(void *unused)
|
||||
{
|
||||
}
|
||||
|
||||
void cpu_idle_wait(void)
|
||||
{
|
||||
unsigned int cpu, this_cpu = get_cpu();
|
||||
|
@ -160,6 +164,13 @@ void cpu_idle_wait(void)
|
|||
cpu_clear(cpu, map);
|
||||
}
|
||||
cpus_and(map, map, cpu_online_map);
|
||||
/*
|
||||
* We waited 1 sec, if a CPU still did not call idle
|
||||
* it may be because it is in idle and not waking up
|
||||
* because it has nothing to do.
|
||||
* Give all the remaining CPUS a kick.
|
||||
*/
|
||||
smp_call_function_mask(map, do_nothing, 0, 0);
|
||||
} while (!cpus_empty(map));
|
||||
|
||||
set_cpus_allowed(current, tmp);
|
||||
|
|
|
@ -141,8 +141,8 @@ static void __cpuinit smp_store_cpu_info(int id)
|
|||
struct cpuinfo_x86 *c = &cpu_data(id);
|
||||
|
||||
*c = boot_cpu_data;
|
||||
identify_cpu(c);
|
||||
c->cpu_index = id;
|
||||
identify_cpu(c);
|
||||
print_cpu_info(c);
|
||||
}
|
||||
|
||||
|
@ -526,7 +526,7 @@ struct create_idle {
|
|||
int cpu;
|
||||
};
|
||||
|
||||
void do_fork_idle(struct work_struct *work)
|
||||
static void __cpuinit do_fork_idle(struct work_struct *work)
|
||||
{
|
||||
struct create_idle *c_idle =
|
||||
container_of(work, struct create_idle, work);
|
||||
|
|
|
@ -541,6 +541,7 @@ fastcall void do_##name(struct pt_regs * regs, long error_code) \
|
|||
info.si_errno = 0; \
|
||||
info.si_code = sicode; \
|
||||
info.si_addr = (void __user *)siaddr; \
|
||||
trace_hardirqs_fixup(); \
|
||||
if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) \
|
||||
== NOTIFY_STOP) \
|
||||
return; \
|
||||
|
|
|
@ -635,6 +635,7 @@ asmlinkage void do_##name(struct pt_regs * regs, long error_code) \
|
|||
info.si_errno = 0; \
|
||||
info.si_code = sicode; \
|
||||
info.si_addr = (void __user *)siaddr; \
|
||||
trace_hardirqs_fixup(); \
|
||||
if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) \
|
||||
== NOTIFY_STOP) \
|
||||
return; \
|
||||
|
|
|
@ -321,8 +321,13 @@ extern void set_highmem_pages_init(int);
|
|||
static void __init set_highmem_pages_init(int bad_ppro)
|
||||
{
|
||||
int pfn;
|
||||
for (pfn = highstart_pfn; pfn < highend_pfn; pfn++)
|
||||
add_one_highpage_init(pfn_to_page(pfn), pfn, bad_ppro);
|
||||
for (pfn = highstart_pfn; pfn < highend_pfn; pfn++) {
|
||||
/*
|
||||
* Holes under sparsemem might not have no mem_map[]:
|
||||
*/
|
||||
if (pfn_valid(pfn))
|
||||
add_one_highpage_init(pfn_to_page(pfn), pfn, bad_ppro);
|
||||
}
|
||||
totalram_pages += totalhigh_pages;
|
||||
}
|
||||
#endif /* CONFIG_FLATMEM */
|
||||
|
|
|
@ -380,7 +380,7 @@ static int __init ppro_init(char ** cpu_type)
|
|||
|
||||
if (cpu_model == 14)
|
||||
*cpu_type = "i386/core";
|
||||
else if (cpu_model == 15)
|
||||
else if (cpu_model == 15 || cpu_model == 23)
|
||||
*cpu_type = "i386/core_2";
|
||||
else if (cpu_model > 0xd)
|
||||
return 0;
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#include <linux/time.h>
|
||||
#include <asm/uaccess.h>
|
||||
|
||||
static DEFINE_PER_CPU(unsigned long long, blk_trace_cpu_offset) = { 0, };
|
||||
static unsigned int blktrace_seq __read_mostly = 1;
|
||||
|
||||
/*
|
||||
|
@ -41,7 +40,7 @@ static void trace_note(struct blk_trace *bt, pid_t pid, int action,
|
|||
const int cpu = smp_processor_id();
|
||||
|
||||
t->magic = BLK_IO_TRACE_MAGIC | BLK_IO_TRACE_VERSION;
|
||||
t->time = cpu_clock(cpu) - per_cpu(blk_trace_cpu_offset, cpu);
|
||||
t->time = ktime_to_ns(ktime_get());
|
||||
t->device = bt->dev;
|
||||
t->action = action;
|
||||
t->pid = pid;
|
||||
|
@ -159,7 +158,7 @@ void __blk_add_trace(struct blk_trace *bt, sector_t sector, int bytes,
|
|||
|
||||
t->magic = BLK_IO_TRACE_MAGIC | BLK_IO_TRACE_VERSION;
|
||||
t->sequence = ++(*sequence);
|
||||
t->time = cpu_clock(cpu) - per_cpu(blk_trace_cpu_offset, cpu);
|
||||
t->time = ktime_to_ns(ktime_get());
|
||||
t->sector = sector;
|
||||
t->bytes = bytes;
|
||||
t->action = what;
|
||||
|
@ -179,7 +178,7 @@ void __blk_add_trace(struct blk_trace *bt, sector_t sector, int bytes,
|
|||
EXPORT_SYMBOL_GPL(__blk_add_trace);
|
||||
|
||||
static struct dentry *blk_tree_root;
|
||||
static struct mutex blk_tree_mutex;
|
||||
static DEFINE_MUTEX(blk_tree_mutex);
|
||||
static unsigned int root_users;
|
||||
|
||||
static inline void blk_remove_root(void)
|
||||
|
@ -505,77 +504,3 @@ void blk_trace_shutdown(struct request_queue *q)
|
|||
blk_trace_remove(q);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Average offset over two calls to cpu_clock() with a gettimeofday()
|
||||
* in the middle
|
||||
*/
|
||||
static void blk_check_time(unsigned long long *t, int this_cpu)
|
||||
{
|
||||
unsigned long long a, b;
|
||||
struct timeval tv;
|
||||
|
||||
a = cpu_clock(this_cpu);
|
||||
do_gettimeofday(&tv);
|
||||
b = cpu_clock(this_cpu);
|
||||
|
||||
*t = tv.tv_sec * 1000000000 + tv.tv_usec * 1000;
|
||||
*t -= (a + b) / 2;
|
||||
}
|
||||
|
||||
/*
|
||||
* calibrate our inter-CPU timings
|
||||
*/
|
||||
static void blk_trace_check_cpu_time(void *data)
|
||||
{
|
||||
unsigned long long *t;
|
||||
int this_cpu = get_cpu();
|
||||
|
||||
t = &per_cpu(blk_trace_cpu_offset, this_cpu);
|
||||
|
||||
/*
|
||||
* Just call it twice, hopefully the second call will be cache hot
|
||||
* and a little more precise
|
||||
*/
|
||||
blk_check_time(t, this_cpu);
|
||||
blk_check_time(t, this_cpu);
|
||||
|
||||
put_cpu();
|
||||
}
|
||||
|
||||
static void blk_trace_set_ht_offsets(void)
|
||||
{
|
||||
#if defined(CONFIG_SCHED_SMT)
|
||||
int cpu, i;
|
||||
|
||||
/*
|
||||
* now make sure HT siblings have the same time offset
|
||||
*/
|
||||
preempt_disable();
|
||||
for_each_online_cpu(cpu) {
|
||||
unsigned long long *cpu_off, *sibling_off;
|
||||
|
||||
for_each_cpu_mask(i, per_cpu(cpu_sibling_map, cpu)) {
|
||||
if (i == cpu)
|
||||
continue;
|
||||
|
||||
cpu_off = &per_cpu(blk_trace_cpu_offset, cpu);
|
||||
sibling_off = &per_cpu(blk_trace_cpu_offset, i);
|
||||
*sibling_off = *cpu_off;
|
||||
}
|
||||
}
|
||||
preempt_enable();
|
||||
#endif
|
||||
}
|
||||
|
||||
static __init int blk_trace_init(void)
|
||||
{
|
||||
mutex_init(&blk_tree_mutex);
|
||||
on_each_cpu(blk_trace_check_cpu_time, NULL, 1, 1);
|
||||
blk_trace_set_ht_offsets();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
module_init(blk_trace_init);
|
||||
|
||||
|
|
|
@ -82,6 +82,12 @@ config ACPI_PROCFS_POWER
|
|||
and functions, which do not yet exist in /sys
|
||||
|
||||
Say N to delete power /proc/acpi/ folders that have moved to /sys/
|
||||
config ACPI_SYSFS_POWER
|
||||
bool "Future power /sys interface"
|
||||
select POWER_SUPPLY
|
||||
default y
|
||||
---help---
|
||||
Say N to disable power /sys interface
|
||||
config ACPI_PROC_EVENT
|
||||
bool "Deprecated /proc/acpi/event support"
|
||||
depends on PROC_FS
|
||||
|
@ -103,7 +109,6 @@ config ACPI_PROC_EVENT
|
|||
config ACPI_AC
|
||||
tristate "AC Adapter"
|
||||
depends on X86
|
||||
select POWER_SUPPLY
|
||||
default y
|
||||
help
|
||||
This driver adds support for the AC Adapter object, which indicates
|
||||
|
@ -113,7 +118,6 @@ config ACPI_AC
|
|||
config ACPI_BATTERY
|
||||
tristate "Battery"
|
||||
depends on X86
|
||||
select POWER_SUPPLY
|
||||
default y
|
||||
help
|
||||
This driver adds support for battery information through
|
||||
|
@ -368,7 +372,6 @@ config ACPI_HOTPLUG_MEMORY
|
|||
config ACPI_SBS
|
||||
tristate "Smart Battery System"
|
||||
depends on X86
|
||||
select POWER_SUPPLY
|
||||
help
|
||||
This driver adds support for the Smart Battery System, another
|
||||
type of access to battery information, found on some laptops.
|
||||
|
|
|
@ -31,7 +31,9 @@
|
|||
#include <linux/proc_fs.h>
|
||||
#include <linux/seq_file.h>
|
||||
#endif
|
||||
#ifdef CONFIG_ACPI_SYSFS_POWER
|
||||
#include <linux/power_supply.h>
|
||||
#endif
|
||||
#include <acpi/acpi_bus.h>
|
||||
#include <acpi/acpi_drivers.h>
|
||||
|
||||
|
@ -79,7 +81,9 @@ static struct acpi_driver acpi_ac_driver = {
|
|||
};
|
||||
|
||||
struct acpi_ac {
|
||||
#ifdef CONFIG_ACPI_SYSFS_POWER
|
||||
struct power_supply charger;
|
||||
#endif
|
||||
struct acpi_device * device;
|
||||
unsigned long state;
|
||||
};
|
||||
|
@ -94,7 +98,7 @@ static const struct file_operations acpi_ac_fops = {
|
|||
.release = single_release,
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ACPI_SYSFS_POWER
|
||||
static int get_ac_property(struct power_supply *psy,
|
||||
enum power_supply_property psp,
|
||||
union power_supply_propval *val)
|
||||
|
@ -113,7 +117,7 @@ static int get_ac_property(struct power_supply *psy,
|
|||
static enum power_supply_property ac_props[] = {
|
||||
POWER_SUPPLY_PROP_ONLINE,
|
||||
};
|
||||
|
||||
#endif
|
||||
/* --------------------------------------------------------------------------
|
||||
AC Adapter Management
|
||||
-------------------------------------------------------------------------- */
|
||||
|
@ -241,7 +245,9 @@ static void acpi_ac_notify(acpi_handle handle, u32 event, void *data)
|
|||
acpi_bus_generate_netlink_event(device->pnp.device_class,
|
||||
device->dev.bus_id, event,
|
||||
(u32) ac->state);
|
||||
#ifdef CONFIG_ACPI_SYSFS_POWER
|
||||
kobject_uevent(&ac->charger.dev->kobj, KOBJ_CHANGE);
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
|
||||
|
@ -280,12 +286,14 @@ static int acpi_ac_add(struct acpi_device *device)
|
|||
#endif
|
||||
if (result)
|
||||
goto end;
|
||||
#ifdef CONFIG_ACPI_SYSFS_POWER
|
||||
ac->charger.name = acpi_device_bid(device);
|
||||
ac->charger.type = POWER_SUPPLY_TYPE_MAINS;
|
||||
ac->charger.properties = ac_props;
|
||||
ac->charger.num_properties = ARRAY_SIZE(ac_props);
|
||||
ac->charger.get_property = get_ac_property;
|
||||
power_supply_register(&ac->device->dev, &ac->charger);
|
||||
#endif
|
||||
status = acpi_install_notify_handler(device->handle,
|
||||
ACPI_ALL_NOTIFY, acpi_ac_notify,
|
||||
ac);
|
||||
|
@ -319,8 +327,10 @@ static int acpi_ac_resume(struct acpi_device *device)
|
|||
old_state = ac->state;
|
||||
if (acpi_ac_get_state(ac))
|
||||
return 0;
|
||||
#ifdef CONFIG_ACPI_SYSFS_POWER
|
||||
if (old_state != ac->state)
|
||||
kobject_uevent(&ac->charger.dev->kobj, KOBJ_CHANGE);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -337,8 +347,10 @@ static int acpi_ac_remove(struct acpi_device *device, int type)
|
|||
|
||||
status = acpi_remove_notify_handler(device->handle,
|
||||
ACPI_ALL_NOTIFY, acpi_ac_notify);
|
||||
#ifdef CONFIG_ACPI_SYSFS_POWER
|
||||
if (ac->charger.dev)
|
||||
power_supply_unregister(&ac->charger);
|
||||
#endif
|
||||
#ifdef CONFIG_ACPI_PROCFS_POWER
|
||||
acpi_ac_remove_fs(device);
|
||||
#endif
|
||||
|
|
|
@ -40,7 +40,9 @@
|
|||
#include <acpi/acpi_bus.h>
|
||||
#include <acpi/acpi_drivers.h>
|
||||
|
||||
#ifdef CONFIG_ACPI_SYSFS_POWER
|
||||
#include <linux/power_supply.h>
|
||||
#endif
|
||||
|
||||
#define ACPI_BATTERY_VALUE_UNKNOWN 0xFFFFFFFF
|
||||
|
||||
|
@ -86,7 +88,9 @@ MODULE_DEVICE_TABLE(acpi, battery_device_ids);
|
|||
|
||||
struct acpi_battery {
|
||||
struct mutex lock;
|
||||
#ifdef CONFIG_ACPI_SYSFS_POWER
|
||||
struct power_supply bat;
|
||||
#endif
|
||||
struct acpi_device *device;
|
||||
unsigned long update_time;
|
||||
int current_now;
|
||||
|
@ -117,6 +121,7 @@ inline int acpi_battery_present(struct acpi_battery *battery)
|
|||
return battery->device->status.battery_present;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ACPI_SYSFS_POWER
|
||||
static int acpi_battery_technology(struct acpi_battery *battery)
|
||||
{
|
||||
if (!strcasecmp("NiCd", battery->type))
|
||||
|
@ -222,6 +227,7 @@ static enum power_supply_property energy_battery_props[] = {
|
|||
POWER_SUPPLY_PROP_MODEL_NAME,
|
||||
POWER_SUPPLY_PROP_MANUFACTURER,
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ACPI_PROCFS_POWER
|
||||
inline char *acpi_battery_units(struct acpi_battery *battery)
|
||||
|
@ -398,6 +404,7 @@ static int acpi_battery_init_alarm(struct acpi_battery *battery)
|
|||
return acpi_battery_set_alarm(battery);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ACPI_SYSFS_POWER
|
||||
static ssize_t acpi_battery_alarm_show(struct device *dev,
|
||||
struct device_attribute *attr,
|
||||
char *buf)
|
||||
|
@ -429,11 +436,6 @@ static int sysfs_add_battery(struct acpi_battery *battery)
|
|||
{
|
||||
int result;
|
||||
|
||||
battery->update_time = 0;
|
||||
result = acpi_battery_get_info(battery);
|
||||
acpi_battery_init_alarm(battery);
|
||||
if (result)
|
||||
return result;
|
||||
if (battery->power_unit) {
|
||||
battery->bat.properties = charge_battery_props;
|
||||
battery->bat.num_properties =
|
||||
|
@ -462,18 +464,31 @@ static void sysfs_remove_battery(struct acpi_battery *battery)
|
|||
power_supply_unregister(&battery->bat);
|
||||
battery->bat.dev = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int acpi_battery_update(struct acpi_battery *battery)
|
||||
{
|
||||
int result = acpi_battery_get_status(battery);
|
||||
int result;
|
||||
result = acpi_battery_get_status(battery);
|
||||
if (result)
|
||||
return result;
|
||||
#ifdef CONFIG_ACPI_SYSFS_POWER
|
||||
if (!acpi_battery_present(battery)) {
|
||||
sysfs_remove_battery(battery);
|
||||
battery->update_time = 0;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
if (!battery->update_time) {
|
||||
result = acpi_battery_get_info(battery);
|
||||
if (result)
|
||||
return result;
|
||||
acpi_battery_init_alarm(battery);
|
||||
}
|
||||
#ifdef CONFIG_ACPI_SYSFS_POWER
|
||||
if (!battery->bat.dev)
|
||||
sysfs_add_battery(battery);
|
||||
#endif
|
||||
return acpi_battery_get_state(battery);
|
||||
}
|
||||
|
||||
|
@ -767,9 +782,11 @@ static void acpi_battery_notify(acpi_handle handle, u32 event, void *data)
|
|||
acpi_bus_generate_netlink_event(device->pnp.device_class,
|
||||
device->dev.bus_id, event,
|
||||
acpi_battery_present(battery));
|
||||
#ifdef CONFIG_ACPI_SYSFS_POWER
|
||||
/* acpi_batter_update could remove power_supply object */
|
||||
if (battery->bat.dev)
|
||||
kobject_uevent(&battery->bat.dev->kobj, KOBJ_CHANGE);
|
||||
#endif
|
||||
}
|
||||
|
||||
static int acpi_battery_add(struct acpi_device *device)
|
||||
|
@ -828,7 +845,9 @@ static int acpi_battery_remove(struct acpi_device *device, int type)
|
|||
#ifdef CONFIG_ACPI_PROCFS_POWER
|
||||
acpi_battery_remove_fs(device);
|
||||
#endif
|
||||
#ifdef CONFIG_ACPI_SYSFS_POWER
|
||||
sysfs_remove_battery(battery);
|
||||
#endif
|
||||
mutex_destroy(&battery->lock);
|
||||
kfree(battery);
|
||||
return 0;
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
#include <linux/list.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/pm.h>
|
||||
#include <linux/pm_legacy.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/proc_fs.h>
|
||||
#ifdef CONFIG_X86
|
||||
|
@ -764,16 +763,14 @@ static int __init acpi_init(void)
|
|||
result = acpi_bus_init();
|
||||
|
||||
if (!result) {
|
||||
#ifdef CONFIG_PM_LEGACY
|
||||
if (!PM_IS_ACTIVE())
|
||||
pm_active = 1;
|
||||
if (!(pm_flags & PM_APM))
|
||||
pm_flags |= PM_ACPI;
|
||||
else {
|
||||
printk(KERN_INFO PREFIX
|
||||
"APM is already active, exiting\n");
|
||||
disable_acpi();
|
||||
result = -ENODEV;
|
||||
}
|
||||
#endif
|
||||
} else
|
||||
disable_acpi();
|
||||
|
||||
|
|
|
@ -892,6 +892,17 @@ static int acpi_ec_stop(struct acpi_device *device, int type)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int __init acpi_boot_ec_enable(void)
|
||||
{
|
||||
if (!boot_ec || boot_ec->handlers_installed)
|
||||
return 0;
|
||||
if (!ec_install_handlers(boot_ec)) {
|
||||
first_ec = boot_ec;
|
||||
return 0;
|
||||
}
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
int __init acpi_ec_ecdt_probe(void)
|
||||
{
|
||||
int ret;
|
||||
|
@ -924,9 +935,10 @@ int __init acpi_ec_ecdt_probe(void)
|
|||
goto error;
|
||||
/* We really need to limit this workaround, the only ASUS,
|
||||
* which needs it, has fake EC._INI method, so use it as flag.
|
||||
* Keep boot_ec struct as it will be needed soon.
|
||||
*/
|
||||
if (ACPI_FAILURE(acpi_get_handle(boot_ec->handle, "_INI", &x)))
|
||||
goto error;
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
ret = ec_install_handlers(boot_ec);
|
||||
|
|
|
@ -344,7 +344,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
|
|||
* setup will potentially execute control methods
|
||||
* (e.g., _REG method for this region)
|
||||
*/
|
||||
acpi_ex_relinquish_interpreter();
|
||||
acpi_ex_exit_interpreter();
|
||||
|
||||
status = region_setup(region_obj, ACPI_REGION_ACTIVATE,
|
||||
handler_desc->address_space.context,
|
||||
|
@ -352,7 +352,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
|
|||
|
||||
/* Re-enter the interpreter */
|
||||
|
||||
acpi_ex_reacquire_interpreter();
|
||||
acpi_ex_enter_interpreter();
|
||||
|
||||
/* Check for failure of the Region Setup */
|
||||
|
||||
|
@ -405,7 +405,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
|
|||
* exit the interpreter because the handler *might* block -- we don't
|
||||
* know what it will do, so we can't hold the lock on the intepreter.
|
||||
*/
|
||||
acpi_ex_relinquish_interpreter();
|
||||
acpi_ex_exit_interpreter();
|
||||
}
|
||||
|
||||
/* Call the handler */
|
||||
|
@ -426,7 +426,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
|
|||
* We just returned from a non-default handler, we must re-enter the
|
||||
* interpreter
|
||||
*/
|
||||
acpi_ex_reacquire_interpreter();
|
||||
acpi_ex_enter_interpreter();
|
||||
}
|
||||
|
||||
return_ACPI_STATUS(status);
|
||||
|
|
|
@ -429,6 +429,15 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
|
|||
&polarity, &link,
|
||||
acpi_pci_allocate_irq);
|
||||
|
||||
if (irq < 0) {
|
||||
/*
|
||||
* IDE legacy mode controller IRQs are magic. Why do compat
|
||||
* extensions always make such a nasty mess.
|
||||
*/
|
||||
if (dev->class >> 8 == PCI_CLASS_STORAGE_IDE &&
|
||||
(dev->class & 0x05) == 0)
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
* No IRQ known to the ACPI subsystem - maybe the BIOS /
|
||||
* driver reported one, then use it. Exit in any case.
|
||||
|
|
|
@ -76,7 +76,11 @@ static void (*pm_idle_save) (void) __read_mostly;
|
|||
#define PM_TIMER_TICKS_TO_US(p) (((p) * 1000)/(PM_TIMER_FREQUENCY/1000))
|
||||
|
||||
static unsigned int max_cstate __read_mostly = ACPI_PROCESSOR_MAX_POWER;
|
||||
#ifdef CONFIG_CPU_IDLE
|
||||
module_param(max_cstate, uint, 0000);
|
||||
#else
|
||||
module_param(max_cstate, uint, 0644);
|
||||
#endif
|
||||
static unsigned int nocst __read_mostly;
|
||||
module_param(nocst, uint, 0000);
|
||||
|
||||
|
|
|
@ -40,7 +40,9 @@
|
|||
#include <linux/jiffies.h>
|
||||
#include <linux/delay.h>
|
||||
|
||||
#ifdef CONFIG_ACPI_SYSFS_POWER
|
||||
#include <linux/power_supply.h>
|
||||
#endif
|
||||
|
||||
#include "sbshc.h"
|
||||
|
||||
|
@ -80,7 +82,9 @@ static const struct acpi_device_id sbs_device_ids[] = {
|
|||
MODULE_DEVICE_TABLE(acpi, sbs_device_ids);
|
||||
|
||||
struct acpi_battery {
|
||||
#ifdef CONFIG_ACPI_SYSFS_POWER
|
||||
struct power_supply bat;
|
||||
#endif
|
||||
struct acpi_sbs *sbs;
|
||||
#ifdef CONFIG_ACPI_PROCFS_POWER
|
||||
struct proc_dir_entry *proc_entry;
|
||||
|
@ -113,7 +117,9 @@ struct acpi_battery {
|
|||
#define to_acpi_battery(x) container_of(x, struct acpi_battery, bat);
|
||||
|
||||
struct acpi_sbs {
|
||||
#ifdef CONFIG_ACPI_SYSFS_POWER
|
||||
struct power_supply charger;
|
||||
#endif
|
||||
struct acpi_device *device;
|
||||
struct acpi_smb_hc *hc;
|
||||
struct mutex lock;
|
||||
|
@ -157,6 +163,7 @@ static inline int acpi_battery_scale(struct acpi_battery *battery)
|
|||
acpi_battery_ipscale(battery);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ACPI_SYSFS_POWER
|
||||
static int sbs_get_ac_property(struct power_supply *psy,
|
||||
enum power_supply_property psp,
|
||||
union power_supply_propval *val)
|
||||
|
@ -294,6 +301,7 @@ static enum power_supply_property sbs_energy_battery_props[] = {
|
|||
POWER_SUPPLY_PROP_MODEL_NAME,
|
||||
POWER_SUPPLY_PROP_MANUFACTURER,
|
||||
};
|
||||
#endif
|
||||
|
||||
/* --------------------------------------------------------------------------
|
||||
Smart Battery System Management
|
||||
|
@ -429,6 +437,7 @@ static int acpi_ac_get_present(struct acpi_sbs *sbs)
|
|||
return result;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ACPI_SYSFS_POWER
|
||||
static ssize_t acpi_battery_alarm_show(struct device *dev,
|
||||
struct device_attribute *attr,
|
||||
char *buf)
|
||||
|
@ -458,6 +467,7 @@ static struct device_attribute alarm_attr = {
|
|||
.show = acpi_battery_alarm_show,
|
||||
.store = acpi_battery_alarm_store,
|
||||
};
|
||||
#endif
|
||||
|
||||
/* --------------------------------------------------------------------------
|
||||
FS Interface (/proc/acpi)
|
||||
|
@ -793,6 +803,7 @@ static int acpi_battery_add(struct acpi_sbs *sbs, int id)
|
|||
&acpi_battery_state_fops, &acpi_battery_alarm_fops,
|
||||
battery);
|
||||
#endif
|
||||
#ifdef CONFIG_ACPI_SYSFS_POWER
|
||||
battery->bat.name = battery->name;
|
||||
battery->bat.type = POWER_SUPPLY_TYPE_BATTERY;
|
||||
if (!acpi_battery_mode(battery)) {
|
||||
|
@ -813,6 +824,7 @@ static int acpi_battery_add(struct acpi_sbs *sbs, int id)
|
|||
goto end;
|
||||
battery->have_sysfs_alarm = 1;
|
||||
end:
|
||||
#endif
|
||||
printk(KERN_INFO PREFIX "%s [%s]: Battery Slot [%s] (battery %s)\n",
|
||||
ACPI_SBS_DEVICE_NAME, acpi_device_bid(sbs->device),
|
||||
battery->name, sbs->battery->present ? "present" : "absent");
|
||||
|
@ -822,12 +834,13 @@ static int acpi_battery_add(struct acpi_sbs *sbs, int id)
|
|||
static void acpi_battery_remove(struct acpi_sbs *sbs, int id)
|
||||
{
|
||||
struct acpi_battery *battery = &sbs->battery[id];
|
||||
|
||||
#ifdef CONFIG_ACPI_SYSFS_POWER
|
||||
if (battery->bat.dev) {
|
||||
if (battery->have_sysfs_alarm)
|
||||
device_remove_file(battery->bat.dev, &alarm_attr);
|
||||
power_supply_unregister(&battery->bat);
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_ACPI_PROCFS_POWER
|
||||
if (battery->proc_entry)
|
||||
acpi_sbs_remove_fs(&battery->proc_entry, acpi_battery_dir);
|
||||
|
@ -848,12 +861,14 @@ static int acpi_charger_add(struct acpi_sbs *sbs)
|
|||
if (result)
|
||||
goto end;
|
||||
#endif
|
||||
#ifdef CONFIG_ACPI_SYSFS_POWER
|
||||
sbs->charger.name = "sbs-charger";
|
||||
sbs->charger.type = POWER_SUPPLY_TYPE_MAINS;
|
||||
sbs->charger.properties = sbs_ac_props;
|
||||
sbs->charger.num_properties = ARRAY_SIZE(sbs_ac_props);
|
||||
sbs->charger.get_property = sbs_get_ac_property;
|
||||
power_supply_register(&sbs->device->dev, &sbs->charger);
|
||||
#endif
|
||||
printk(KERN_INFO PREFIX "%s [%s]: AC Adapter [%s] (%s)\n",
|
||||
ACPI_SBS_DEVICE_NAME, acpi_device_bid(sbs->device),
|
||||
ACPI_AC_DIR_NAME, sbs->charger_present ? "on-line" : "off-line");
|
||||
|
@ -863,8 +878,10 @@ static int acpi_charger_add(struct acpi_sbs *sbs)
|
|||
|
||||
static void acpi_charger_remove(struct acpi_sbs *sbs)
|
||||
{
|
||||
#ifdef CONFIG_ACPI_SYSFS_POWER
|
||||
if (sbs->charger.dev)
|
||||
power_supply_unregister(&sbs->charger);
|
||||
#endif
|
||||
#ifdef CONFIG_ACPI_PROCFS_POWER
|
||||
if (sbs->charger_entry)
|
||||
acpi_sbs_remove_fs(&sbs->charger_entry, acpi_ac_dir);
|
||||
|
@ -885,7 +902,9 @@ void acpi_sbs_callback(void *context)
|
|||
ACPI_SBS_NOTIFY_STATUS,
|
||||
sbs->charger_present);
|
||||
#endif
|
||||
#ifdef CONFIG_ACPI_SYSFS_POWER
|
||||
kobject_uevent(&sbs->charger.dev->kobj, KOBJ_CHANGE);
|
||||
#endif
|
||||
}
|
||||
if (sbs->manager_present) {
|
||||
for (id = 0; id < MAX_SBS_BAT; ++id) {
|
||||
|
@ -902,7 +921,9 @@ void acpi_sbs_callback(void *context)
|
|||
ACPI_SBS_NOTIFY_STATUS,
|
||||
bat->present);
|
||||
#endif
|
||||
#ifdef CONFIG_ACPI_SYSFS_POWER
|
||||
kobject_uevent(&bat->bat.dev->kobj, KOBJ_CHANGE);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1449,6 +1449,8 @@ static int acpi_bus_scan_fixed(struct acpi_device *root)
|
|||
return result;
|
||||
}
|
||||
|
||||
int __init acpi_boot_ec_enable(void);
|
||||
|
||||
static int __init acpi_scan_init(void)
|
||||
{
|
||||
int result;
|
||||
|
@ -1480,6 +1482,10 @@ static int __init acpi_scan_init(void)
|
|||
* Enumerate devices in the ACPI namespace.
|
||||
*/
|
||||
result = acpi_bus_scan_fixed(acpi_root);
|
||||
|
||||
/* EC region might be needed at bus_scan, so enable it now */
|
||||
acpi_boot_ec_enable();
|
||||
|
||||
if (!result)
|
||||
result = acpi_bus_scan(acpi_root, &ops);
|
||||
|
||||
|
|
|
@ -132,6 +132,7 @@ enum {
|
|||
ich8_2port_sata,
|
||||
ich8m_apple_sata_ahci, /* locks up on second port enable */
|
||||
tolapai_sata_ahci,
|
||||
piix_pata_vmw, /* PIIX4 for VMware, spurious DMA_ERR */
|
||||
|
||||
/* constants for mapping table */
|
||||
P0 = 0, /* port 0 */
|
||||
|
@ -165,6 +166,7 @@ static void piix_set_piomode(struct ata_port *ap, struct ata_device *adev);
|
|||
static void piix_set_dmamode(struct ata_port *ap, struct ata_device *adev);
|
||||
static void ich_set_dmamode(struct ata_port *ap, struct ata_device *adev);
|
||||
static int ich_pata_cable_detect(struct ata_port *ap);
|
||||
static u8 piix_vmw_bmdma_status(struct ata_port *ap);
|
||||
#ifdef CONFIG_PM
|
||||
static int piix_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg);
|
||||
static int piix_pci_device_resume(struct pci_dev *pdev);
|
||||
|
@ -175,6 +177,8 @@ static unsigned int in_module_init = 1;
|
|||
static const struct pci_device_id piix_pci_tbl[] = {
|
||||
/* Intel PIIX3 for the 430HX etc */
|
||||
{ 0x8086, 0x7010, PCI_ANY_ID, PCI_ANY_ID, 0, 0, piix_pata_mwdma },
|
||||
/* VMware ICH4 */
|
||||
{ 0x8086, 0x7111, 0x15ad, 0x1976, 0, 0, piix_pata_vmw },
|
||||
/* Intel PIIX4 for the 430TX/440BX/MX chipset: UDMA 33 */
|
||||
/* Also PIIX4E (fn3 rev 2) and PIIX4M (fn3 rev 3) */
|
||||
{ 0x8086, 0x7111, PCI_ANY_ID, PCI_ANY_ID, 0, 0, piix_pata_33 },
|
||||
|
@ -383,6 +387,38 @@ static const struct ata_port_operations piix_sata_ops = {
|
|||
.port_start = ata_port_start,
|
||||
};
|
||||
|
||||
static const struct ata_port_operations piix_vmw_ops = {
|
||||
.set_piomode = piix_set_piomode,
|
||||
.set_dmamode = piix_set_dmamode,
|
||||
.mode_filter = ata_pci_default_filter,
|
||||
|
||||
.tf_load = ata_tf_load,
|
||||
.tf_read = ata_tf_read,
|
||||
.check_status = ata_check_status,
|
||||
.exec_command = ata_exec_command,
|
||||
.dev_select = ata_std_dev_select,
|
||||
|
||||
.bmdma_setup = ata_bmdma_setup,
|
||||
.bmdma_start = ata_bmdma_start,
|
||||
.bmdma_stop = ata_bmdma_stop,
|
||||
.bmdma_status = piix_vmw_bmdma_status,
|
||||
.qc_prep = ata_qc_prep,
|
||||
.qc_issue = ata_qc_issue_prot,
|
||||
.data_xfer = ata_data_xfer,
|
||||
|
||||
.freeze = ata_bmdma_freeze,
|
||||
.thaw = ata_bmdma_thaw,
|
||||
.error_handler = piix_pata_error_handler,
|
||||
.post_internal_cmd = ata_bmdma_post_internal_cmd,
|
||||
.cable_detect = ata_cable_40wire,
|
||||
|
||||
.irq_handler = ata_interrupt,
|
||||
.irq_clear = ata_bmdma_irq_clear,
|
||||
.irq_on = ata_irq_on,
|
||||
|
||||
.port_start = ata_port_start,
|
||||
};
|
||||
|
||||
static const struct piix_map_db ich5_map_db = {
|
||||
.mask = 0x7,
|
||||
.port_enable = 0x3,
|
||||
|
@ -623,6 +659,16 @@ static struct ata_port_info piix_port_info[] = {
|
|||
.port_ops = &piix_sata_ops,
|
||||
},
|
||||
|
||||
[piix_pata_vmw] =
|
||||
{
|
||||
.sht = &piix_sht,
|
||||
.flags = PIIX_PATA_FLAGS,
|
||||
.pio_mask = 0x1f, /* pio0-4 */
|
||||
.mwdma_mask = 0x06, /* mwdma1-2 ?? CHECK 0 should be ok but slow */
|
||||
.udma_mask = ATA_UDMA_MASK_40C,
|
||||
.port_ops = &piix_vmw_ops,
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
static struct pci_bits piix_enable_bits[] = {
|
||||
|
@ -1135,6 +1181,11 @@ static int piix_pci_device_resume(struct pci_dev *pdev)
|
|||
}
|
||||
#endif
|
||||
|
||||
static u8 piix_vmw_bmdma_status(struct ata_port *ap)
|
||||
{
|
||||
return ata_bmdma_status(ap) & ~ATA_DMA_ERR;
|
||||
}
|
||||
|
||||
#define AHCI_PCI_BAR 5
|
||||
#define AHCI_GLOBAL_CTL 0x04
|
||||
#define AHCI_ENABLE (1 << 31)
|
||||
|
|
|
@ -6998,7 +6998,9 @@ int ata_host_start(struct ata_host *host)
|
|||
rc = ap->ops->port_start(ap);
|
||||
if (rc) {
|
||||
if (rc != -ENODEV)
|
||||
dev_printk(KERN_ERR, host->dev, "failed to start port %d (errno=%d)\n", i, rc);
|
||||
dev_printk(KERN_ERR, host->dev,
|
||||
"failed to start port %d "
|
||||
"(errno=%d)\n", i, rc);
|
||||
goto err_out;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1733,11 +1733,15 @@ static void ata_eh_link_autopsy(struct ata_link *link)
|
|||
ehc->i.action &= ~ATA_EH_PERDEV_MASK;
|
||||
}
|
||||
|
||||
/* consider speeding down */
|
||||
/* propagate timeout to host link */
|
||||
if ((all_err_mask & AC_ERR_TIMEOUT) && !ata_is_host_link(link))
|
||||
ap->link.eh_context.i.err_mask |= AC_ERR_TIMEOUT;
|
||||
|
||||
/* record error and consider speeding down */
|
||||
dev = ehc->i.dev;
|
||||
if (!dev && ata_link_max_devices(link) == 1 &&
|
||||
ata_dev_enabled(link->device))
|
||||
dev = link->device;
|
||||
if (!dev && ((ata_link_max_devices(link) == 1 &&
|
||||
ata_dev_enabled(link->device))))
|
||||
dev = link->device;
|
||||
|
||||
if (dev)
|
||||
ehc->i.action |= ata_eh_speed_down(dev, is_io, all_err_mask);
|
||||
|
@ -1759,8 +1763,14 @@ void ata_eh_autopsy(struct ata_port *ap)
|
|||
{
|
||||
struct ata_link *link;
|
||||
|
||||
__ata_port_for_each_link(link, ap)
|
||||
ata_port_for_each_link(link, ap)
|
||||
ata_eh_link_autopsy(link);
|
||||
|
||||
/* Autopsy of fanout ports can affect host link autopsy.
|
||||
* Perform host link autopsy last.
|
||||
*/
|
||||
if (ap->nr_pmp_links)
|
||||
ata_eh_link_autopsy(&ap->link);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2157,13 +2167,11 @@ int ata_eh_reset(struct ata_link *link, int classify,
|
|||
if (ata_link_offline(link))
|
||||
continue;
|
||||
|
||||
/* apply class override and convert UNKNOWN to NONE */
|
||||
/* apply class override */
|
||||
if (lflags & ATA_LFLAG_ASSUME_ATA)
|
||||
classes[dev->devno] = ATA_DEV_ATA;
|
||||
else if (lflags & ATA_LFLAG_ASSUME_SEMB)
|
||||
classes[dev->devno] = ATA_DEV_SEMB_UNSUP; /* not yet */
|
||||
else if (classes[dev->devno] == ATA_DEV_UNKNOWN)
|
||||
classes[dev->devno] = ATA_DEV_NONE;
|
||||
}
|
||||
|
||||
/* record current link speed */
|
||||
|
|
|
@ -495,14 +495,12 @@ static void sata_pmp_quirks(struct ata_port *ap)
|
|||
/* SError.N need a kick in the ass to get working */
|
||||
link->flags |= ATA_LFLAG_HRST_TO_RESUME;
|
||||
|
||||
/* class code report is unreliable */
|
||||
if (link->pmp < 5)
|
||||
link->flags |= ATA_LFLAG_ASSUME_ATA;
|
||||
|
||||
/* The config device, which can be either at
|
||||
* port 0 or 5, locks up on SRST.
|
||||
/* Class code report is unreliable and SRST
|
||||
* times out under certain configurations.
|
||||
* Config device can be at port 0 or 5 and
|
||||
* locks up on SRST.
|
||||
*/
|
||||
if (link->pmp == 0 || link->pmp == 5)
|
||||
if (link->pmp <= 5)
|
||||
link->flags |= ATA_LFLAG_NO_SRST |
|
||||
ATA_LFLAG_ASSUME_ATA;
|
||||
|
||||
|
|
|
@ -841,6 +841,9 @@ static void ata_scsi_dev_config(struct scsi_device *sdev,
|
|||
blk_queue_max_hw_segments(q, q->max_hw_segments - 1);
|
||||
}
|
||||
|
||||
if (dev->class == ATA_DEV_ATA)
|
||||
sdev->manage_start_stop = 1;
|
||||
|
||||
if (dev->flags & ATA_DFLAG_AN)
|
||||
set_bit(SDEV_EVT_MEDIA_CHANGE, sdev->supported_events);
|
||||
|
||||
|
@ -872,8 +875,6 @@ int ata_scsi_slave_config(struct scsi_device *sdev)
|
|||
|
||||
ata_scsi_sdev_config(sdev);
|
||||
|
||||
sdev->manage_start_stop = 1;
|
||||
|
||||
if (dev)
|
||||
ata_scsi_dev_config(sdev, dev);
|
||||
|
||||
|
|
|
@ -806,7 +806,10 @@ int ata_pci_init_one(struct pci_dev *pdev,
|
|||
if (rc)
|
||||
goto err_out;
|
||||
|
||||
if (!legacy_mode) {
|
||||
if (!legacy_mode && pdev->irq) {
|
||||
/* We may have no IRQ assigned in which case we can poll. This
|
||||
shouldn't happen on a sane system but robustness is cheap
|
||||
in this case */
|
||||
rc = devm_request_irq(dev, pdev->irq, pi->port_ops->irq_handler,
|
||||
IRQF_SHARED, DRV_NAME, host);
|
||||
if (rc)
|
||||
|
@ -814,7 +817,7 @@ int ata_pci_init_one(struct pci_dev *pdev,
|
|||
|
||||
ata_port_desc(host->ports[0], "irq %d", pdev->irq);
|
||||
ata_port_desc(host->ports[1], "irq %d", pdev->irq);
|
||||
} else {
|
||||
} else if (legacy_mode) {
|
||||
if (!ata_port_is_dummy(host->ports[0])) {
|
||||
rc = devm_request_irq(dev, ATA_PRIMARY_IRQ(pdev),
|
||||
pi->port_ops->irq_handler,
|
||||
|
|
|
@ -1509,7 +1509,8 @@ static int __devinit bfin_atapi_probe(struct platform_device *pdev)
|
|||
if (res == NULL)
|
||||
return -EINVAL;
|
||||
|
||||
while (bfin_port_info[board_idx].udma_mask>0 && udma_fsclk[udma_mode] > fsclk) {
|
||||
while (bfin_port_info[board_idx].udma_mask > 0 &&
|
||||
udma_fsclk[udma_mode] > fsclk) {
|
||||
udma_mode--;
|
||||
bfin_port_info[board_idx].udma_mask >>= 1;
|
||||
}
|
||||
|
|
|
@ -130,10 +130,11 @@ static struct ata_port_operations ixp4xx_port_ops = {
|
|||
.port_start = ata_port_start,
|
||||
};
|
||||
|
||||
static void ixp4xx_setup_port(struct ata_ioports *ioaddr,
|
||||
static void ixp4xx_setup_port(struct ata_port *ap,
|
||||
struct ixp4xx_pata_data *data,
|
||||
unsigned long raw_cs0, unsigned long raw_cs1)
|
||||
{
|
||||
struct ata_ioports *ioaddr = &ap->ioaddr;
|
||||
unsigned long raw_cmd = raw_cs0;
|
||||
unsigned long raw_ctl = raw_cs1 + 0x06;
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue