mirror of https://gitee.com/openkylin/linux.git
Merge remote branch 'linus' into drm-intel-fixes
This commit is contained in:
commit
4ab0fbd3a2
|
@ -16,7 +16,7 @@
|
|||
</orgname>
|
||||
|
||||
<address>
|
||||
<email>hjk@linutronix.de</email>
|
||||
<email>hjk@hansjkoch.de</email>
|
||||
</address>
|
||||
</affiliation>
|
||||
</author>
|
||||
|
@ -114,7 +114,7 @@ GPL version 2.
|
|||
|
||||
<para>If you know of any translations for this document, or you are
|
||||
interested in translating it, please email me
|
||||
<email>hjk@linutronix.de</email>.
|
||||
<email>hjk@hansjkoch.de</email>.
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
|
@ -171,7 +171,7 @@ interested in translating it, please email me
|
|||
<title>Feedback</title>
|
||||
<para>Find something wrong with this document? (Or perhaps something
|
||||
right?) I would love to hear from you. Please email me at
|
||||
<email>hjk@linutronix.de</email>.</para>
|
||||
<email>hjk@hansjkoch.de</email>.</para>
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
||||
|
|
|
@ -255,9 +255,10 @@ framebuffer parameters.
|
|||
Kernel boot arguments
|
||||
---------------------
|
||||
|
||||
vram=<size>
|
||||
- Amount of total VRAM to preallocate. For example, "10M". omapfb
|
||||
allocates memory for framebuffers from VRAM.
|
||||
vram=<size>[,<physaddr>]
|
||||
- Amount of total VRAM to preallocate and optionally a physical start
|
||||
memory address. For example, "10M". omapfb allocates memory for
|
||||
framebuffers from VRAM.
|
||||
|
||||
omapfb.mode=<display>:<mode>[,...]
|
||||
- Default video mode for specified displays. For example,
|
||||
|
|
|
@ -154,7 +154,7 @@ The stages that a patch goes through are, generally:
|
|||
inclusion, it should be accepted by a relevant subsystem maintainer -
|
||||
though this acceptance is not a guarantee that the patch will make it
|
||||
all the way to the mainline. The patch will show up in the maintainer's
|
||||
subsystem tree and into the staging trees (described below). When the
|
||||
subsystem tree and into the -next trees (described below). When the
|
||||
process works, this step leads to more extensive review of the patch and
|
||||
the discovery of any problems resulting from the integration of this
|
||||
patch with work being done by others.
|
||||
|
@ -236,7 +236,7 @@ finding the right maintainer. Sending patches directly to Linus is not
|
|||
normally the right way to go.
|
||||
|
||||
|
||||
2.4: STAGING TREES
|
||||
2.4: NEXT TREES
|
||||
|
||||
The chain of subsystem trees guides the flow of patches into the kernel,
|
||||
but it also raises an interesting question: what if somebody wants to look
|
||||
|
@ -250,7 +250,7 @@ changes land in the mainline kernel. One could pull changes from all of
|
|||
the interesting subsystem trees, but that would be a big and error-prone
|
||||
job.
|
||||
|
||||
The answer comes in the form of staging trees, where subsystem trees are
|
||||
The answer comes in the form of -next trees, where subsystem trees are
|
||||
collected for testing and review. The older of these trees, maintained by
|
||||
Andrew Morton, is called "-mm" (for memory management, which is how it got
|
||||
started). The -mm tree integrates patches from a long list of subsystem
|
||||
|
@ -275,7 +275,7 @@ directory at:
|
|||
Use of the MMOTM tree is likely to be a frustrating experience, though;
|
||||
there is a definite chance that it will not even compile.
|
||||
|
||||
The other staging tree, started more recently, is linux-next, maintained by
|
||||
The other -next tree, started more recently, is linux-next, maintained by
|
||||
Stephen Rothwell. The linux-next tree is, by design, a snapshot of what
|
||||
the mainline is expected to look like after the next merge window closes.
|
||||
Linux-next trees are announced on the linux-kernel and linux-next mailing
|
||||
|
@ -303,12 +303,25 @@ volatility of linux-next tends to make it a difficult development target.
|
|||
See http://lwn.net/Articles/289013/ for more information on this topic, and
|
||||
stay tuned; much is still in flux where linux-next is involved.
|
||||
|
||||
Besides the mmotm and linux-next trees, the kernel source tree now contains
|
||||
the drivers/staging/ directory and many sub-directories for drivers or
|
||||
filesystems that are on their way to being added to the kernel tree
|
||||
proper, but they remain in drivers/staging/ while they still need more
|
||||
work.
|
||||
2.4.1: STAGING TREES
|
||||
|
||||
The kernel source tree now contains the drivers/staging/ directory, where
|
||||
many sub-directories for drivers or filesystems that are on their way to
|
||||
being added to the kernel tree live. They remain in drivers/staging while
|
||||
they still need more work; once complete, they can be moved into the
|
||||
kernel proper. This is a way to keep track of drivers that aren't
|
||||
up to Linux kernel coding or quality standards, but people may want to use
|
||||
them and track development.
|
||||
|
||||
Greg Kroah-Hartman currently (as of 2.6.36) maintains the staging tree.
|
||||
Drivers that still need work are sent to him, with each driver having
|
||||
its own subdirectory in drivers/staging/. Along with the driver source
|
||||
files, a TODO file should be present in the directory as well. The TODO
|
||||
file lists the pending work that the driver needs for acceptance into
|
||||
the kernel proper, as well as a list of people that should be Cc'd for any
|
||||
patches to the driver. Staging drivers that don't currently build should
|
||||
have their config entries depend upon CONFIG_BROKEN. Once they can
|
||||
be successfully built without outside patches, CONFIG_BROKEN can be removed.
|
||||
|
||||
2.5: TOOLS
|
||||
|
||||
|
|
|
@ -554,3 +554,13 @@ Why: This is a legacy interface which have been replaced by a more
|
|||
Who: NeilBrown <neilb@suse.de>
|
||||
|
||||
----------------------------
|
||||
|
||||
What: i2c_adapter.id
|
||||
When: June 2011
|
||||
Why: This field is deprecated. I2C device drivers shouldn't change their
|
||||
behavior based on the underlying I2C adapter. Instead, the I2C
|
||||
adapter driver should instantiate the I2C devices and provide the
|
||||
needed platform-specific information.
|
||||
Who: Jean Delvare <khali@linux-fr.org>
|
||||
|
||||
----------------------------
|
||||
|
|
|
@ -89,7 +89,7 @@ static ssize_t childless_storeme_write(struct childless *childless,
|
|||
char *p = (char *) page;
|
||||
|
||||
tmp = simple_strtoul(p, &p, 10);
|
||||
if (!p || (*p && (*p != '\n')))
|
||||
if ((*p != '\0') && (*p != '\n'))
|
||||
return -EINVAL;
|
||||
|
||||
if (tmp > INT_MAX)
|
||||
|
|
|
@ -617,6 +617,16 @@ and have the following read/write attributes:
|
|||
is configured as an output, this value may be written;
|
||||
any nonzero value is treated as high.
|
||||
|
||||
If the pin can be configured as interrupt-generating interrupt
|
||||
and if it has been configured to generate interrupts (see the
|
||||
description of "edge"), you can poll(2) on that file and
|
||||
poll(2) will return whenever the interrupt was triggered. If
|
||||
you use poll(2), set the events POLLPRI and POLLERR. If you
|
||||
use select(2), set the file descriptor in exceptfds. After
|
||||
poll(2) returns, either lseek(2) to the beginning of the sysfs
|
||||
file and read the new value or close the file and re-open it
|
||||
to read the value.
|
||||
|
||||
"edge" ... reads as either "none", "rising", "falling", or
|
||||
"both". Write these strings to select the signal edge(s)
|
||||
that will make poll(2) on the "value" file return.
|
||||
|
|
|
@ -11,7 +11,7 @@ Authors:
|
|||
Mark M. Hoffman <mhoffman@lightlink.com>
|
||||
Ported to 2.6 by Eric J. Bowersox <ericb@aspsys.com>
|
||||
Adapted to 2.6.20 by Carsten Emde <ce@osadl.org>
|
||||
Modified for mainline integration by Hans J. Koch <hjk@linutronix.de>
|
||||
Modified for mainline integration by Hans J. Koch <hjk@hansjkoch.de>
|
||||
|
||||
Module Parameters
|
||||
-----------------
|
||||
|
|
|
@ -8,7 +8,7 @@ Supported chips:
|
|||
Datasheet: http://pdfserv.maxim-ic.com/en/ds/MAX6650-MAX6651.pdf
|
||||
|
||||
Authors:
|
||||
Hans J. Koch <hjk@linutronix.de>
|
||||
Hans J. Koch <hjk@hansjkoch.de>
|
||||
John Morris <john.morris@spirentcom.com>
|
||||
Claus Gindhart <claus.gindhart@kontron.com>
|
||||
|
||||
|
|
|
@ -37,6 +37,9 @@ Typical usage of the OPP library is as follows:
|
|||
SoC framework -> modifies on required cases certain OPPs -> OPP layer
|
||||
-> queries to search/retrieve information ->
|
||||
|
||||
Architectures that provide a SoC framework for OPP should select ARCH_HAS_OPP
|
||||
to make the OPP layer available.
|
||||
|
||||
OPP layer expects each domain to be represented by a unique device pointer. SoC
|
||||
framework registers a set of initial OPPs per device with the OPP layer. This
|
||||
list is expected to be an optimally small number typically around 5 per device.
|
||||
|
|
14
MAINTAINERS
14
MAINTAINERS
|
@ -945,7 +945,7 @@ M: Magnus Damm <magnus.damm@gmail.com>
|
|||
L: linux-sh@vger.kernel.org
|
||||
W: http://oss.renesas.com
|
||||
Q: http://patchwork.kernel.org/project/linux-sh/list/
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/lethal/genesis-2.6.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.git rmobile-latest
|
||||
S: Supported
|
||||
F: arch/arm/mach-shmobile/
|
||||
F: drivers/sh/
|
||||
|
@ -1829,6 +1829,13 @@ W: http://www.chelsio.com
|
|||
S: Supported
|
||||
F: drivers/net/cxgb4vf/
|
||||
|
||||
STMMAC ETHERNET DRIVER
|
||||
M: Giuseppe Cavallaro <peppe.cavallaro@st.com>
|
||||
L: netdev@vger.kernel.org
|
||||
W: http://www.stlinux.com
|
||||
S: Supported
|
||||
F: drivers/net/stmmac/
|
||||
|
||||
CYBERPRO FB DRIVER
|
||||
M: Russell King <linux@arm.linux.org.uk>
|
||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||
|
@ -2008,6 +2015,7 @@ F: drivers/hwmon/dme1737.c
|
|||
DOCBOOK FOR DOCUMENTATION
|
||||
M: Randy Dunlap <rdunlap@xenotime.net>
|
||||
S: Maintained
|
||||
F: scripts/kernel-doc
|
||||
|
||||
DOCKING STATION DRIVER
|
||||
M: Shaohua Li <shaohua.li@intel.com>
|
||||
|
@ -2018,6 +2026,7 @@ F: drivers/acpi/dock.c
|
|||
DOCUMENTATION
|
||||
M: Randy Dunlap <rdunlap@xenotime.net>
|
||||
L: linux-doc@vger.kernel.org
|
||||
T: quilt oss.oracle.com/~rdunlap/kernel-doc-patches/current/
|
||||
S: Maintained
|
||||
F: Documentation/
|
||||
|
||||
|
@ -2435,6 +2444,7 @@ F: drivers/net/wan/sdla.c
|
|||
FRAMEBUFFER LAYER
|
||||
L: linux-fbdev@vger.kernel.org
|
||||
W: http://linux-fbdev.sourceforge.net/
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6.git
|
||||
S: Orphan
|
||||
F: Documentation/fb/
|
||||
F: drivers/video/fb*
|
||||
|
@ -5705,7 +5715,7 @@ M: Paul Mundt <lethal@linux-sh.org>
|
|||
L: linux-sh@vger.kernel.org
|
||||
W: http://www.linux-sh.org
|
||||
Q: http://patchwork.kernel.org/project/linux-sh/list/
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.git sh-latest
|
||||
S: Supported
|
||||
F: Documentation/sh/
|
||||
F: arch/sh/
|
||||
|
|
2
Makefile
2
Makefile
|
@ -1,7 +1,7 @@
|
|||
VERSION = 2
|
||||
PATCHLEVEL = 6
|
||||
SUBLEVEL = 37
|
||||
EXTRAVERSION = -rc1
|
||||
EXTRAVERSION = -rc3
|
||||
NAME = Flesh-Eating Bats with Fangs
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
|
|
@ -646,7 +646,7 @@ config ARCH_S3C2410
|
|||
select ARCH_HAS_CPUFREQ
|
||||
select HAVE_CLK
|
||||
select ARCH_USES_GETTIMEOFFSET
|
||||
select HAVE_S3C2410_I2C
|
||||
select HAVE_S3C2410_I2C if I2C
|
||||
help
|
||||
Samsung S3C2410X CPU based systems, such as the Simtec Electronics
|
||||
BAST (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or
|
||||
|
@ -676,8 +676,8 @@ config ARCH_S3C64XX
|
|||
select S3C_DEV_NAND
|
||||
select USB_ARCH_HAS_OHCI
|
||||
select SAMSUNG_GPIOLIB_4BIT
|
||||
select HAVE_S3C2410_I2C
|
||||
select HAVE_S3C2410_WATCHDOG
|
||||
select HAVE_S3C2410_I2C if I2C
|
||||
select HAVE_S3C2410_WATCHDOG if WATCHDOG
|
||||
help
|
||||
Samsung S3C64XX series based systems
|
||||
|
||||
|
@ -686,10 +686,10 @@ config ARCH_S5P64X0
|
|||
select CPU_V6
|
||||
select GENERIC_GPIO
|
||||
select HAVE_CLK
|
||||
select HAVE_S3C2410_WATCHDOG
|
||||
select HAVE_S3C2410_WATCHDOG if WATCHDOG
|
||||
select ARCH_USES_GETTIMEOFFSET
|
||||
select HAVE_S3C2410_I2C
|
||||
select HAVE_S3C_RTC
|
||||
select HAVE_S3C2410_I2C if I2C
|
||||
select HAVE_S3C_RTC if RTC_CLASS
|
||||
help
|
||||
Samsung S5P64X0 CPU based systems, such as the Samsung SMDK6440,
|
||||
SMDK6450.
|
||||
|
@ -700,7 +700,7 @@ config ARCH_S5P6442
|
|||
select GENERIC_GPIO
|
||||
select HAVE_CLK
|
||||
select ARCH_USES_GETTIMEOFFSET
|
||||
select HAVE_S3C2410_WATCHDOG
|
||||
select HAVE_S3C2410_WATCHDOG if WATCHDOG
|
||||
help
|
||||
Samsung S5P6442 CPU based systems
|
||||
|
||||
|
@ -711,9 +711,9 @@ config ARCH_S5PC100
|
|||
select CPU_V7
|
||||
select ARM_L1_CACHE_SHIFT_6
|
||||
select ARCH_USES_GETTIMEOFFSET
|
||||
select HAVE_S3C2410_I2C
|
||||
select HAVE_S3C_RTC
|
||||
select HAVE_S3C2410_WATCHDOG
|
||||
select HAVE_S3C2410_I2C if I2C
|
||||
select HAVE_S3C_RTC if RTC_CLASS
|
||||
select HAVE_S3C2410_WATCHDOG if WATCHDOG
|
||||
help
|
||||
Samsung S5PC100 series based systems
|
||||
|
||||
|
@ -726,9 +726,9 @@ config ARCH_S5PV210
|
|||
select ARM_L1_CACHE_SHIFT_6
|
||||
select ARCH_HAS_CPUFREQ
|
||||
select ARCH_USES_GETTIMEOFFSET
|
||||
select HAVE_S3C2410_I2C
|
||||
select HAVE_S3C_RTC
|
||||
select HAVE_S3C2410_WATCHDOG
|
||||
select HAVE_S3C2410_I2C if I2C
|
||||
select HAVE_S3C_RTC if RTC_CLASS
|
||||
select HAVE_S3C2410_WATCHDOG if WATCHDOG
|
||||
help
|
||||
Samsung S5PV210/S5PC110 series based systems
|
||||
|
||||
|
@ -739,9 +739,9 @@ config ARCH_S5PV310
|
|||
select GENERIC_GPIO
|
||||
select HAVE_CLK
|
||||
select GENERIC_CLOCKEVENTS
|
||||
select HAVE_S3C_RTC
|
||||
select HAVE_S3C2410_I2C
|
||||
select HAVE_S3C2410_WATCHDOG
|
||||
select HAVE_S3C_RTC if RTC_CLASS
|
||||
select HAVE_S3C2410_I2C if I2C
|
||||
select HAVE_S3C2410_WATCHDOG if WATCHDOG
|
||||
help
|
||||
Samsung S5PV310 series based systems
|
||||
|
||||
|
|
|
@ -321,10 +321,9 @@ static struct platform_device omap_wdt_device = {
|
|||
static int __init omap_init_wdt(void)
|
||||
{
|
||||
if (!cpu_is_omap16xx())
|
||||
return;
|
||||
return -ENODEV;
|
||||
|
||||
platform_device_register(&omap_wdt_device);
|
||||
return 0;
|
||||
return platform_device_register(&omap_wdt_device);
|
||||
}
|
||||
subsys_initcall(omap_init_wdt);
|
||||
#endif
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef __ASM_ARCH_CAMERA_H_
|
||||
#define __ASM_ARCH_CAMERA_H_
|
||||
|
||||
#include <media/omap1_camera.h>
|
||||
|
||||
void omap1_camera_init(void *);
|
||||
|
||||
static inline void omap1_set_camera_info(struct omap1_cam_platform_data *info)
|
||||
|
|
|
@ -242,9 +242,6 @@ static int devkit8000_twl_gpio_setup(struct device *dev,
|
|||
mmc[0].gpio_cd = gpio + 0;
|
||||
omap2_hsmmc_init(mmc);
|
||||
|
||||
/* link regulators to MMC adapters */
|
||||
devkit8000_vmmc1_supply.dev = mmc[0].dev;
|
||||
|
||||
/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
|
||||
gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
|
||||
|
||||
|
|
|
@ -143,7 +143,7 @@ config MACH_SMDK6410
|
|||
select S3C_DEV_USB_HSOTG
|
||||
select S3C_DEV_WDT
|
||||
select SAMSUNG_DEV_KEYPAD
|
||||
select HAVE_S3C2410_WATCHDOG
|
||||
select HAVE_S3C2410_WATCHDOG if WATCHDOG
|
||||
select S3C64XX_SETUP_SDHCI
|
||||
select S3C64XX_SETUP_I2C1
|
||||
select S3C64XX_SETUP_IDE
|
||||
|
|
|
@ -163,11 +163,13 @@ static struct mtd_partition nor_flash_partitions[] = {
|
|||
.name = "loader",
|
||||
.offset = 0x00000000,
|
||||
.size = 512 * 1024,
|
||||
.mask_flags = MTD_WRITEABLE,
|
||||
},
|
||||
{
|
||||
.name = "bootenv",
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
.size = 512 * 1024,
|
||||
.mask_flags = MTD_WRITEABLE,
|
||||
},
|
||||
{
|
||||
.name = "kernel_ro",
|
||||
|
@ -581,6 +583,10 @@ static int fsi_set_rate(int is_porta, int rate)
|
|||
return -EINVAL;
|
||||
|
||||
switch (rate) {
|
||||
case 44100:
|
||||
clk_set_rate(fsib_clk, clk_round_rate(fsib_clk, 11283000));
|
||||
ret = SH_FSI_ACKMD_256 | SH_FSI_BPFMD_64;
|
||||
break;
|
||||
case 48000:
|
||||
clk_set_rate(fsib_clk, clk_round_rate(fsib_clk, 85428000));
|
||||
clk_set_rate(fdiv_clk, clk_round_rate(fdiv_clk, 12204000));
|
||||
|
|
|
@ -98,7 +98,7 @@ static struct intc_vect intca_vectors[] __initdata = {
|
|||
INTC_VECT(IRQ14A, 0x03c0), INTC_VECT(IRQ15A, 0x03e0),
|
||||
INTC_VECT(IRQ16A, 0x3200), INTC_VECT(IRQ17A, 0x3220),
|
||||
INTC_VECT(IRQ18A, 0x3240), INTC_VECT(IRQ19A, 0x3260),
|
||||
INTC_VECT(IRQ20A, 0x3280), INTC_VECT(IRQ31A, 0x32a0),
|
||||
INTC_VECT(IRQ20A, 0x3280), INTC_VECT(IRQ21A, 0x32a0),
|
||||
INTC_VECT(IRQ22A, 0x32c0), INTC_VECT(IRQ23A, 0x32e0),
|
||||
INTC_VECT(IRQ24A, 0x3300), INTC_VECT(IRQ25A, 0x3320),
|
||||
INTC_VECT(IRQ26A, 0x3340), INTC_VECT(IRQ27A, 0x3360),
|
||||
|
|
|
@ -1983,6 +1983,8 @@ static int omap2_dma_handle_ch(int ch)
|
|||
|
||||
dma_write(OMAP2_DMA_CSR_CLEAR_MASK, CSR(ch));
|
||||
dma_write(1 << ch, IRQSTATUS_L0);
|
||||
/* read back the register to flush the write */
|
||||
dma_read(IRQSTATUS_L0);
|
||||
|
||||
/* If the ch is not chained then chain_id will be -1 */
|
||||
if (dma_chan[ch].chain_id != -1) {
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/unistd.h>
|
||||
#include <linux/user.h>
|
||||
#include <linux/uaccess.h>
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/stddef.h>
|
||||
#include <linux/unistd.h>
|
||||
#include <linux/ptrace.h>
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/stddef.h>
|
||||
#include <linux/unistd.h>
|
||||
#include <linux/ptrace.h>
|
||||
|
|
|
@ -202,7 +202,7 @@ simscsi_readwrite10 (struct scsi_cmnd *sc, int mode)
|
|||
}
|
||||
|
||||
static int
|
||||
simscsi_queuecommand (struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
|
||||
simscsi_queuecommand_lck (struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
|
||||
{
|
||||
unsigned int target_id = sc->device->id;
|
||||
char fname[MAX_ROOT_LEN+16];
|
||||
|
@ -326,6 +326,8 @@ simscsi_queuecommand (struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
|
|||
return 0;
|
||||
}
|
||||
|
||||
static DEF_SCSI_QCMD(simscsi_queuecommand)
|
||||
|
||||
static int
|
||||
simscsi_host_reset (struct scsi_cmnd *sc)
|
||||
{
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
#include <linux/slab.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/stddef.h>
|
||||
#include <linux/unistd.h>
|
||||
#include <linux/ptrace.h>
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/stddef.h>
|
||||
#include <linux/unistd.h>
|
||||
#include <linux/ptrace.h>
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/stddef.h>
|
||||
#include <linux/unistd.h>
|
||||
#include <linux/ptrace.h>
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include <linux/namei.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/syscalls.h>
|
||||
#include <linux/utsname.h>
|
||||
#include <linux/vfs.h>
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#include <linux/times.h>
|
||||
#include <linux/time.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/sem.h>
|
||||
#include <linux/msg.h>
|
||||
#include <linux/shm.h>
|
||||
|
|
|
@ -4,6 +4,10 @@ config PPC32
|
|||
bool
|
||||
default y if !PPC64
|
||||
|
||||
config 32BIT
|
||||
bool
|
||||
default y if PPC32
|
||||
|
||||
config 64BIT
|
||||
bool
|
||||
default y if PPC64
|
||||
|
|
|
@ -33,9 +33,10 @@ __div64_32:
|
|||
cntlzw r0,r5 # we are shifting the dividend right
|
||||
li r10,-1 # to make it < 2^32, and shifting
|
||||
srw r10,r10,r0 # the divisor right the same amount,
|
||||
add r9,r4,r10 # rounding up (so the estimate cannot
|
||||
addc r9,r4,r10 # rounding up (so the estimate cannot
|
||||
andc r11,r6,r10 # ever be too large, only too small)
|
||||
andc r9,r9,r10
|
||||
addze r9,r9
|
||||
or r11,r5,r11
|
||||
rotlw r9,r9,r0
|
||||
rotlw r11,r11,r0
|
||||
|
|
|
@ -337,7 +337,7 @@ char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs)
|
|||
/* FP registers 32 -> 63 */
|
||||
#if defined(CONFIG_FSL_BOOKE) && defined(CONFIG_SPE)
|
||||
if (current)
|
||||
memcpy(mem, current->thread.evr[regno-32],
|
||||
memcpy(mem, ¤t->thread.evr[regno-32],
|
||||
dbg_reg_def[regno].size);
|
||||
#else
|
||||
/* fp registers not used by kernel, leave zero */
|
||||
|
@ -362,7 +362,7 @@ int dbg_set_reg(int regno, void *mem, struct pt_regs *regs)
|
|||
if (regno >= 32 && regno < 64) {
|
||||
/* FP registers 32 -> 63 */
|
||||
#if defined(CONFIG_FSL_BOOKE) && defined(CONFIG_SPE)
|
||||
memcpy(current->thread.evr[regno-32], mem,
|
||||
memcpy(¤t->thread.evr[regno-32], mem,
|
||||
dbg_reg_def[regno].size);
|
||||
#else
|
||||
/* fp registers not used by kernel, leave zero */
|
||||
|
|
|
@ -497,9 +497,8 @@ static void __init emergency_stack_init(void)
|
|||
}
|
||||
|
||||
/*
|
||||
* Called into from start_kernel, after lock_kernel has been called.
|
||||
* Initializes bootmem, which is unsed to manage page allocation until
|
||||
* mem_init is called.
|
||||
* Called into from start_kernel this initializes bootmem, which is used
|
||||
* to manage page allocation until mem_init is called.
|
||||
*/
|
||||
void __init setup_arch(char **cmdline_p)
|
||||
{
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include <linux/resource.h>
|
||||
#include <linux/times.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/sem.h>
|
||||
#include <linux/msg.h>
|
||||
#include <linux/shm.h>
|
||||
|
|
|
@ -1123,7 +1123,7 @@ void hash_preload(struct mm_struct *mm, unsigned long ea,
|
|||
else
|
||||
#endif /* CONFIG_PPC_HAS_HASH_64K */
|
||||
rc = __hash_page_4K(ea, access, vsid, ptep, trap, local, ssize,
|
||||
subpage_protection(pgdir, ea));
|
||||
subpage_protection(mm, ea));
|
||||
|
||||
/* Dump some info in case of hash insertion failure, they should
|
||||
* never happen so it is really useful to know if/when they do
|
||||
|
|
|
@ -138,8 +138,11 @@
|
|||
cmpldi cr0,r15,0 /* Check for user region */
|
||||
std r14,EX_TLB_ESR(r12) /* write crazy -1 to frame */
|
||||
beq normal_tlb_miss
|
||||
|
||||
li r11,_PAGE_PRESENT|_PAGE_BAP_SX /* Base perm */
|
||||
oris r11,r11,_PAGE_ACCESSED@h
|
||||
/* XXX replace the RMW cycles with immediate loads + writes */
|
||||
1: mfspr r10,SPRN_MAS1
|
||||
mfspr r10,SPRN_MAS1
|
||||
cmpldi cr0,r15,8 /* Check for vmalloc region */
|
||||
rlwinm r10,r10,0,16,1 /* Clear TID */
|
||||
mtspr SPRN_MAS1,r10
|
||||
|
|
|
@ -585,6 +585,6 @@ void setup_initial_memory_limit(phys_addr_t first_memblock_base,
|
|||
ppc64_rma_size = min_t(u64, first_memblock_size, 0x40000000);
|
||||
|
||||
/* Finally limit subsequent allocations */
|
||||
memblock_set_current_limit(ppc64_memblock_base + ppc64_rma_size);
|
||||
memblock_set_current_limit(first_memblock_base + ppc64_rma_size);
|
||||
}
|
||||
#endif /* CONFIG_PPC64 */
|
||||
|
|
|
@ -47,6 +47,12 @@ config LPARCFG
|
|||
config PPC_PSERIES_DEBUG
|
||||
depends on PPC_PSERIES && PPC_EARLY_DEBUG
|
||||
bool "Enable extra debug logging in platforms/pseries"
|
||||
help
|
||||
Say Y here if you want the pseries core to produce a bunch of
|
||||
debug messages to the system log. Select this if you are having a
|
||||
problem with the pseries core and want to see more of what is
|
||||
going on. This does not enable debugging in lpar.c, which must
|
||||
be manually done due to its verbosity.
|
||||
default y
|
||||
|
||||
config PPC_SMLPAR
|
||||
|
|
|
@ -21,8 +21,6 @@
|
|||
* Please address comments and feedback to Linas Vepstas <linas@austin.ibm.com>
|
||||
*/
|
||||
|
||||
#undef DEBUG
|
||||
|
||||
#include <linux/delay.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/list.h>
|
||||
|
|
|
@ -25,8 +25,6 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#undef DEBUG
|
||||
|
||||
#include <linux/pci.h>
|
||||
#include <asm/pci-bridge.h>
|
||||
#include <asm/ppc-pci.h>
|
||||
|
|
|
@ -6,6 +6,18 @@ config TRACE_IRQFLAGS_SUPPORT
|
|||
|
||||
source "lib/Kconfig.debug"
|
||||
|
||||
config STRICT_DEVMEM
|
||||
def_bool y
|
||||
prompt "Filter access to /dev/mem"
|
||||
---help---
|
||||
This option restricts access to /dev/mem. If this option is
|
||||
disabled, you allow userspace access to all memory, including
|
||||
kernel and userspace memory. Accidental memory access is likely
|
||||
to be disastrous.
|
||||
Memory access is required for experts who want to debug the kernel.
|
||||
|
||||
If you are unsure, say Y.
|
||||
|
||||
config DEBUG_STRICT_USER_COPY_CHECKS
|
||||
bool "Strict user copy size checks"
|
||||
---help---
|
||||
|
|
|
@ -130,6 +130,11 @@ struct page;
|
|||
void arch_free_page(struct page *page, int order);
|
||||
void arch_alloc_page(struct page *page, int order);
|
||||
|
||||
static inline int devmem_is_allowed(unsigned long pfn)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define HAVE_ARCH_FREE_PAGE
|
||||
#define HAVE_ARCH_ALLOC_PAGE
|
||||
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#include <linux/resource.h>
|
||||
#include <linux/times.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/sem.h>
|
||||
#include <linux/msg.h>
|
||||
#include <linux/shm.h>
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include <asm/sections.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/hardirq.h>
|
||||
|
||||
DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL;
|
||||
DEFINE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk);
|
||||
|
@ -212,7 +213,7 @@ static void __kprobes prepare_singlestep(struct kprobe *p, struct pt_regs *regs)
|
|||
/* Set the PER control regs, turns on single step for this address */
|
||||
__ctl_load(kprobe_per_regs, 9, 11);
|
||||
regs->psw.mask |= PSW_MASK_PER;
|
||||
regs->psw.mask &= ~(PSW_MASK_IO | PSW_MASK_EXT | PSW_MASK_MCHECK);
|
||||
regs->psw.mask &= ~(PSW_MASK_IO | PSW_MASK_EXT);
|
||||
}
|
||||
|
||||
static void __kprobes save_previous_kprobe(struct kprobe_ctlblk *kcb)
|
||||
|
@ -239,7 +240,7 @@ static void __kprobes set_current_kprobe(struct kprobe *p, struct pt_regs *regs,
|
|||
__get_cpu_var(current_kprobe) = p;
|
||||
/* Save the interrupt and per flags */
|
||||
kcb->kprobe_saved_imask = regs->psw.mask &
|
||||
(PSW_MASK_PER | PSW_MASK_IO | PSW_MASK_EXT | PSW_MASK_MCHECK);
|
||||
(PSW_MASK_PER | PSW_MASK_IO | PSW_MASK_EXT);
|
||||
/* Save the control regs that govern PER */
|
||||
__ctl_store(kcb->kprobe_saved_ctl, 9, 11);
|
||||
}
|
||||
|
@ -316,8 +317,6 @@ static int __kprobes kprobe_handler(struct pt_regs *regs)
|
|||
return 1;
|
||||
|
||||
ss_probe:
|
||||
if (regs->psw.mask & (PSW_MASK_PER | PSW_MASK_IO))
|
||||
local_irq_disable();
|
||||
prepare_singlestep(p, regs);
|
||||
kcb->kprobe_status = KPROBE_HIT_SS;
|
||||
return 1;
|
||||
|
@ -350,6 +349,7 @@ static int __kprobes trampoline_probe_handler(struct kprobe *p,
|
|||
struct hlist_node *node, *tmp;
|
||||
unsigned long flags, orig_ret_address = 0;
|
||||
unsigned long trampoline_address = (unsigned long)&kretprobe_trampoline;
|
||||
kprobe_opcode_t *correct_ret_addr = NULL;
|
||||
|
||||
INIT_HLIST_HEAD(&empty_rp);
|
||||
kretprobe_hash_lock(current, &head, &flags);
|
||||
|
@ -372,10 +372,32 @@ static int __kprobes trampoline_probe_handler(struct kprobe *p,
|
|||
/* another task is sharing our hash bucket */
|
||||
continue;
|
||||
|
||||
if (ri->rp && ri->rp->handler)
|
||||
ri->rp->handler(ri, regs);
|
||||
orig_ret_address = (unsigned long)ri->ret_addr;
|
||||
|
||||
if (orig_ret_address != trampoline_address)
|
||||
/*
|
||||
* This is the real return address. Any other
|
||||
* instances associated with this task are for
|
||||
* other calls deeper on the call stack
|
||||
*/
|
||||
break;
|
||||
}
|
||||
|
||||
kretprobe_assert(ri, orig_ret_address, trampoline_address);
|
||||
|
||||
correct_ret_addr = ri->ret_addr;
|
||||
hlist_for_each_entry_safe(ri, node, tmp, head, hlist) {
|
||||
if (ri->task != current)
|
||||
/* another task is sharing our hash bucket */
|
||||
continue;
|
||||
|
||||
orig_ret_address = (unsigned long)ri->ret_addr;
|
||||
|
||||
if (ri->rp && ri->rp->handler) {
|
||||
ri->ret_addr = correct_ret_addr;
|
||||
ri->rp->handler(ri, regs);
|
||||
}
|
||||
|
||||
recycle_rp_inst(ri, &empty_rp);
|
||||
|
||||
if (orig_ret_address != trampoline_address) {
|
||||
|
@ -387,7 +409,7 @@ static int __kprobes trampoline_probe_handler(struct kprobe *p,
|
|||
break;
|
||||
}
|
||||
}
|
||||
kretprobe_assert(ri, orig_ret_address, trampoline_address);
|
||||
|
||||
regs->psw.addr = orig_ret_address | PSW_ADDR_AMODE;
|
||||
|
||||
reset_current_kprobe();
|
||||
|
@ -465,8 +487,6 @@ static int __kprobes post_kprobe_handler(struct pt_regs *regs)
|
|||
goto out;
|
||||
}
|
||||
reset_current_kprobe();
|
||||
if (regs->psw.mask & (PSW_MASK_PER | PSW_MASK_IO))
|
||||
local_irq_enable();
|
||||
out:
|
||||
preempt_enable_no_resched();
|
||||
|
||||
|
@ -482,7 +502,7 @@ static int __kprobes post_kprobe_handler(struct pt_regs *regs)
|
|||
return 1;
|
||||
}
|
||||
|
||||
int __kprobes kprobe_fault_handler(struct pt_regs *regs, int trapnr)
|
||||
static int __kprobes kprobe_trap_handler(struct pt_regs *regs, int trapnr)
|
||||
{
|
||||
struct kprobe *cur = kprobe_running();
|
||||
struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
|
||||
|
@ -508,8 +528,6 @@ int __kprobes kprobe_fault_handler(struct pt_regs *regs, int trapnr)
|
|||
restore_previous_kprobe(kcb);
|
||||
else {
|
||||
reset_current_kprobe();
|
||||
if (regs->psw.mask & (PSW_MASK_PER | PSW_MASK_IO))
|
||||
local_irq_enable();
|
||||
}
|
||||
preempt_enable_no_resched();
|
||||
break;
|
||||
|
@ -553,6 +571,18 @@ int __kprobes kprobe_fault_handler(struct pt_regs *regs, int trapnr)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int __kprobes kprobe_fault_handler(struct pt_regs *regs, int trapnr)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (regs->psw.mask & (PSW_MASK_IO | PSW_MASK_EXT))
|
||||
local_irq_disable();
|
||||
ret = kprobe_trap_handler(regs, trapnr);
|
||||
if (regs->psw.mask & (PSW_MASK_IO | PSW_MASK_EXT))
|
||||
local_irq_restore(regs->psw.mask & ~PSW_MASK_PER);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Wrapper routine to for handling exceptions.
|
||||
*/
|
||||
|
@ -560,8 +590,12 @@ int __kprobes kprobe_exceptions_notify(struct notifier_block *self,
|
|||
unsigned long val, void *data)
|
||||
{
|
||||
struct die_args *args = (struct die_args *)data;
|
||||
struct pt_regs *regs = args->regs;
|
||||
int ret = NOTIFY_DONE;
|
||||
|
||||
if (regs->psw.mask & (PSW_MASK_IO | PSW_MASK_EXT))
|
||||
local_irq_disable();
|
||||
|
||||
switch (val) {
|
||||
case DIE_BPT:
|
||||
if (kprobe_handler(args->regs))
|
||||
|
@ -572,16 +606,17 @@ int __kprobes kprobe_exceptions_notify(struct notifier_block *self,
|
|||
ret = NOTIFY_STOP;
|
||||
break;
|
||||
case DIE_TRAP:
|
||||
/* kprobe_running() needs smp_processor_id() */
|
||||
preempt_disable();
|
||||
if (kprobe_running() &&
|
||||
kprobe_fault_handler(args->regs, args->trapnr))
|
||||
if (!preemptible() && kprobe_running() &&
|
||||
kprobe_trap_handler(args->regs, args->trapnr))
|
||||
ret = NOTIFY_STOP;
|
||||
preempt_enable();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (regs->psw.mask & (PSW_MASK_IO | PSW_MASK_EXT))
|
||||
local_irq_restore(regs->psw.mask & ~PSW_MASK_PER);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -595,6 +630,7 @@ int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs)
|
|||
|
||||
/* setup return addr to the jprobe handler routine */
|
||||
regs->psw.addr = (unsigned long)(jp->entry) | PSW_ADDR_AMODE;
|
||||
regs->psw.mask &= ~(PSW_MASK_IO | PSW_MASK_EXT);
|
||||
|
||||
/* r14 is the function return address */
|
||||
kcb->jprobe_saved_r14 = (unsigned long)regs->gprs[14];
|
||||
|
|
|
@ -20,18 +20,17 @@
|
|||
static inline int gup_pte_range(pmd_t *pmdp, pmd_t pmd, unsigned long addr,
|
||||
unsigned long end, int write, struct page **pages, int *nr)
|
||||
{
|
||||
unsigned long mask, result;
|
||||
unsigned long mask;
|
||||
pte_t *ptep, pte;
|
||||
struct page *page;
|
||||
|
||||
result = write ? 0 : _PAGE_RO;
|
||||
mask = result | _PAGE_INVALID | _PAGE_SPECIAL;
|
||||
mask = (write ? _PAGE_RO : 0) | _PAGE_INVALID | _PAGE_SPECIAL;
|
||||
|
||||
ptep = ((pte_t *) pmd_deref(pmd)) + pte_index(addr);
|
||||
do {
|
||||
pte = *ptep;
|
||||
barrier();
|
||||
if ((pte_val(pte) & mask) != result)
|
||||
if ((pte_val(pte) & mask) != 0)
|
||||
return 0;
|
||||
VM_BUG_ON(!pfn_valid(pte_pfn(pte)));
|
||||
page = pte_page(pte);
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
#include <linux/sched.h>
|
||||
#include <linux/threads.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/kernel_stat.h>
|
||||
#include <linux/init.h>
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
#include <linux/resource.h>
|
||||
#include <linux/times.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/sem.h>
|
||||
#include <linux/msg.h>
|
||||
#include <linux/shm.h>
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#include <linux/mman.h>
|
||||
#include <linux/utsname.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/ipc.h>
|
||||
|
||||
#include <asm/uaccess.h>
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
#include <asm/system.h>
|
||||
#include <asm/uaccess.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/perf_event.h>
|
||||
|
||||
enum direction {
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#include <linux/string.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/smp_lock.h>
|
||||
|
||||
#include <asm/uaccess.h>
|
||||
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#include <linux/kdev_t.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/fcntl.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/signal.h>
|
||||
#include <asm/syscalls.h>
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#include <linux/sched.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/signal.h>
|
||||
#include <linux/errno.h>
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
#include <linux/sched.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/signal.h>
|
||||
#include <linux/errno.h>
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
#include <linux/mm.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/kernel_stat.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/bootmem.h>
|
||||
#include <linux/notifier.h>
|
||||
#include <linux/cpu.h>
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#include <linux/sched.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/syscalls.h>
|
||||
#include <linux/mman.h>
|
||||
#include <linux/file.h>
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#include <linux/mman.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/tty.h>
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#include <linux/mm.h>
|
||||
#include <linux/hugetlb.h>
|
||||
#include <linux/pagemap.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/sysctl.h>
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
#include "linux/stddef.h"
|
||||
#include "linux/fs.h"
|
||||
#include "linux/smp_lock.h"
|
||||
#include "linux/ptrace.h"
|
||||
#include "linux/sched.h"
|
||||
#include "linux/slab.h"
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include <linux/syscalls.h>
|
||||
#include <linux/times.h>
|
||||
#include <linux/utsname.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/uio.h>
|
||||
#include <linux/poll.h>
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
#include <linux/init.h>
|
||||
#include <linux/poll.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/major.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/device.h>
|
||||
|
|
|
@ -315,14 +315,18 @@ static void kgdb_remove_all_hw_break(void)
|
|||
if (!breakinfo[i].enabled)
|
||||
continue;
|
||||
bp = *per_cpu_ptr(breakinfo[i].pev, cpu);
|
||||
if (bp->attr.disabled == 1)
|
||||
if (!bp->attr.disabled) {
|
||||
arch_uninstall_hw_breakpoint(bp);
|
||||
bp->attr.disabled = 1;
|
||||
continue;
|
||||
}
|
||||
if (dbg_is_early)
|
||||
early_dr7 &= ~encode_dr7(i, breakinfo[i].len,
|
||||
breakinfo[i].type);
|
||||
else
|
||||
arch_uninstall_hw_breakpoint(bp);
|
||||
bp->attr.disabled = 1;
|
||||
else if (hw_break_release_slot(i))
|
||||
printk(KERN_ERR "KGDB: hw bpt remove failed %lx\n",
|
||||
breakinfo[i].addr);
|
||||
breakinfo[i].enabled = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
#include <linux/init.h>
|
||||
#include <linux/poll.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/major.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/device.h>
|
||||
|
|
|
@ -3395,6 +3395,7 @@ static void svm_vcpu_run(struct kvm_vcpu *vcpu)
|
|||
vcpu->arch.regs[VCPU_REGS_RIP] = svm->vmcb->save.rip;
|
||||
|
||||
load_host_msrs(vcpu);
|
||||
kvm_load_ldt(ldt_selector);
|
||||
loadsegment(fs, fs_selector);
|
||||
#ifdef CONFIG_X86_64
|
||||
load_gs_index(gs_selector);
|
||||
|
@ -3402,7 +3403,6 @@ static void svm_vcpu_run(struct kvm_vcpu *vcpu)
|
|||
#else
|
||||
loadsegment(gs, gs_selector);
|
||||
#endif
|
||||
kvm_load_ldt(ldt_selector);
|
||||
|
||||
reload_tss(vcpu);
|
||||
|
||||
|
|
|
@ -821,10 +821,9 @@ static void vmx_save_host_state(struct kvm_vcpu *vcpu)
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
if (is_long_mode(&vmx->vcpu)) {
|
||||
rdmsrl(MSR_KERNEL_GS_BASE, vmx->msr_host_kernel_gs_base);
|
||||
if (is_long_mode(&vmx->vcpu))
|
||||
wrmsrl(MSR_KERNEL_GS_BASE, vmx->msr_guest_kernel_gs_base);
|
||||
}
|
||||
#endif
|
||||
for (i = 0; i < vmx->save_nmsrs; ++i)
|
||||
kvm_set_shared_msr(vmx->guest_msrs[i].index,
|
||||
|
@ -839,23 +838,23 @@ static void __vmx_load_host_state(struct vcpu_vmx *vmx)
|
|||
|
||||
++vmx->vcpu.stat.host_state_reload;
|
||||
vmx->host_state.loaded = 0;
|
||||
if (vmx->host_state.fs_reload_needed)
|
||||
loadsegment(fs, vmx->host_state.fs_sel);
|
||||
#ifdef CONFIG_X86_64
|
||||
if (is_long_mode(&vmx->vcpu))
|
||||
rdmsrl(MSR_KERNEL_GS_BASE, vmx->msr_guest_kernel_gs_base);
|
||||
#endif
|
||||
if (vmx->host_state.gs_ldt_reload_needed) {
|
||||
kvm_load_ldt(vmx->host_state.ldt_sel);
|
||||
#ifdef CONFIG_X86_64
|
||||
load_gs_index(vmx->host_state.gs_sel);
|
||||
wrmsrl(MSR_KERNEL_GS_BASE, current->thread.gs);
|
||||
#else
|
||||
loadsegment(gs, vmx->host_state.gs_sel);
|
||||
#endif
|
||||
}
|
||||
if (vmx->host_state.fs_reload_needed)
|
||||
loadsegment(fs, vmx->host_state.fs_sel);
|
||||
reload_tss();
|
||||
#ifdef CONFIG_X86_64
|
||||
if (is_long_mode(&vmx->vcpu)) {
|
||||
rdmsrl(MSR_KERNEL_GS_BASE, vmx->msr_guest_kernel_gs_base);
|
||||
wrmsrl(MSR_KERNEL_GS_BASE, vmx->msr_host_kernel_gs_base);
|
||||
}
|
||||
#endif
|
||||
if (current_thread_info()->status & TS_USEDFPU)
|
||||
clts();
|
||||
|
|
|
@ -138,7 +138,6 @@ setup_resource(struct acpi_resource *acpi_res, void *data)
|
|||
struct acpi_resource_address64 addr;
|
||||
acpi_status status;
|
||||
unsigned long flags;
|
||||
struct resource *root, *conflict;
|
||||
u64 start, end;
|
||||
|
||||
status = resource_to_addr(acpi_res, &addr);
|
||||
|
@ -146,12 +145,10 @@ setup_resource(struct acpi_resource *acpi_res, void *data)
|
|||
return AE_OK;
|
||||
|
||||
if (addr.resource_type == ACPI_MEMORY_RANGE) {
|
||||
root = &iomem_resource;
|
||||
flags = IORESOURCE_MEM;
|
||||
if (addr.info.mem.caching == ACPI_PREFETCHABLE_MEMORY)
|
||||
flags |= IORESOURCE_PREFETCH;
|
||||
} else if (addr.resource_type == ACPI_IO_RANGE) {
|
||||
root = &ioport_resource;
|
||||
flags = IORESOURCE_IO;
|
||||
} else
|
||||
return AE_OK;
|
||||
|
@ -172,14 +169,6 @@ setup_resource(struct acpi_resource *acpi_res, void *data)
|
|||
return AE_OK;
|
||||
}
|
||||
|
||||
conflict = insert_resource_conflict(root, res);
|
||||
if (conflict) {
|
||||
dev_err(&info->bridge->dev,
|
||||
"address space collision: host bridge window %pR "
|
||||
"conflicts with %s %pR\n",
|
||||
res, conflict->name, conflict);
|
||||
} else {
|
||||
pci_bus_add_resource(info->bus, res, 0);
|
||||
info->res_num++;
|
||||
if (addr.translation_offset)
|
||||
dev_info(&info->bridge->dev, "host bridge window %pR "
|
||||
|
@ -187,12 +176,85 @@ setup_resource(struct acpi_resource *acpi_res, void *data)
|
|||
res, res->start - addr.translation_offset,
|
||||
res->end - addr.translation_offset);
|
||||
else
|
||||
dev_info(&info->bridge->dev,
|
||||
"host bridge window %pR\n", res);
|
||||
}
|
||||
dev_info(&info->bridge->dev, "host bridge window %pR\n", res);
|
||||
|
||||
return AE_OK;
|
||||
}
|
||||
|
||||
static bool resource_contains(struct resource *res, resource_size_t point)
|
||||
{
|
||||
if (res->start <= point && point <= res->end)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
static void coalesce_windows(struct pci_root_info *info, int type)
|
||||
{
|
||||
int i, j;
|
||||
struct resource *res1, *res2;
|
||||
|
||||
for (i = 0; i < info->res_num; i++) {
|
||||
res1 = &info->res[i];
|
||||
if (!(res1->flags & type))
|
||||
continue;
|
||||
|
||||
for (j = i + 1; j < info->res_num; j++) {
|
||||
res2 = &info->res[j];
|
||||
if (!(res2->flags & type))
|
||||
continue;
|
||||
|
||||
/*
|
||||
* I don't like throwing away windows because then
|
||||
* our resources no longer match the ACPI _CRS, but
|
||||
* the kernel resource tree doesn't allow overlaps.
|
||||
*/
|
||||
if (resource_contains(res1, res2->start) ||
|
||||
resource_contains(res1, res2->end) ||
|
||||
resource_contains(res2, res1->start) ||
|
||||
resource_contains(res2, res1->end)) {
|
||||
res1->start = min(res1->start, res2->start);
|
||||
res1->end = max(res1->end, res2->end);
|
||||
dev_info(&info->bridge->dev,
|
||||
"host bridge window expanded to %pR; %pR ignored\n",
|
||||
res1, res2);
|
||||
res2->flags = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void add_resources(struct pci_root_info *info)
|
||||
{
|
||||
int i;
|
||||
struct resource *res, *root, *conflict;
|
||||
|
||||
if (!pci_use_crs)
|
||||
return;
|
||||
|
||||
coalesce_windows(info, IORESOURCE_MEM);
|
||||
coalesce_windows(info, IORESOURCE_IO);
|
||||
|
||||
for (i = 0; i < info->res_num; i++) {
|
||||
res = &info->res[i];
|
||||
|
||||
if (res->flags & IORESOURCE_MEM)
|
||||
root = &iomem_resource;
|
||||
else if (res->flags & IORESOURCE_IO)
|
||||
root = &ioport_resource;
|
||||
else
|
||||
continue;
|
||||
|
||||
conflict = insert_resource_conflict(root, res);
|
||||
if (conflict)
|
||||
dev_err(&info->bridge->dev,
|
||||
"address space collision: host bridge window %pR "
|
||||
"conflicts with %s %pR\n",
|
||||
res, conflict->name, conflict);
|
||||
else
|
||||
pci_bus_add_resource(info->bus, res, 0);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
get_current_resources(struct acpi_device *device, int busnum,
|
||||
int domain, struct pci_bus *bus)
|
||||
|
@ -224,6 +286,7 @@ get_current_resources(struct acpi_device *device, int busnum,
|
|||
acpi_walk_resources(device->handle, METHOD_NAME__CRS, setup_resource,
|
||||
&info);
|
||||
|
||||
add_resources(&info);
|
||||
return;
|
||||
|
||||
name_alloc_fail:
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include <linux/hdreg.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/syscalls.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/uaccess.h>
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#include <linux/hdreg.h>
|
||||
#include <linux/backing-dev.h>
|
||||
#include <linux/buffer_head.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/blktrace_api.h>
|
||||
#include <asm/uaccess.h>
|
||||
|
||||
|
|
|
@ -3166,8 +3166,8 @@ static inline int __ata_scsi_queuecmd(struct scsi_cmnd *scmd,
|
|||
|
||||
/**
|
||||
* ata_scsi_queuecmd - Issue SCSI cdb to libata-managed device
|
||||
* @shost: SCSI host of command to be sent
|
||||
* @cmd: SCSI command to be sent
|
||||
* @done: Completion function, called when command is complete
|
||||
*
|
||||
* In some cases, this function translates SCSI commands into
|
||||
* ATA taskfiles, and queues the taskfiles to be sent to
|
||||
|
@ -3177,37 +3177,36 @@ static inline int __ata_scsi_queuecmd(struct scsi_cmnd *scmd,
|
|||
* ATA and ATAPI devices appearing as SCSI devices.
|
||||
*
|
||||
* LOCKING:
|
||||
* Releases scsi-layer-held lock, and obtains host lock.
|
||||
* ATA host lock
|
||||
*
|
||||
* RETURNS:
|
||||
* Return value from __ata_scsi_queuecmd() if @cmd can be queued,
|
||||
* 0 otherwise.
|
||||
*/
|
||||
int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *))
|
||||
int ata_scsi_queuecmd(struct Scsi_Host *shost, struct scsi_cmnd *cmd)
|
||||
{
|
||||
struct ata_port *ap;
|
||||
struct ata_device *dev;
|
||||
struct scsi_device *scsidev = cmd->device;
|
||||
struct Scsi_Host *shost = scsidev->host;
|
||||
int rc = 0;
|
||||
unsigned long irq_flags;
|
||||
|
||||
ap = ata_shost_to_port(shost);
|
||||
|
||||
spin_unlock(shost->host_lock);
|
||||
spin_lock(ap->lock);
|
||||
spin_lock_irqsave(ap->lock, irq_flags);
|
||||
|
||||
ata_scsi_dump_cdb(ap, cmd);
|
||||
|
||||
dev = ata_scsi_find_dev(ap, scsidev);
|
||||
if (likely(dev))
|
||||
rc = __ata_scsi_queuecmd(cmd, done, dev);
|
||||
rc = __ata_scsi_queuecmd(cmd, cmd->scsi_done, dev);
|
||||
else {
|
||||
cmd->result = (DID_BAD_TARGET << 16);
|
||||
done(cmd);
|
||||
cmd->scsi_done(cmd);
|
||||
}
|
||||
|
||||
spin_unlock(ap->lock);
|
||||
spin_lock(shost->host_lock);
|
||||
spin_unlock_irqrestore(ap->lock, irq_flags);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
|
@ -538,7 +538,7 @@ static int vt8251_prepare_host(struct pci_dev *pdev, struct ata_host **r_host)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void svia_configure(struct pci_dev *pdev)
|
||||
static void svia_configure(struct pci_dev *pdev, int board_id)
|
||||
{
|
||||
u8 tmp8;
|
||||
|
||||
|
@ -577,7 +577,7 @@ static void svia_configure(struct pci_dev *pdev)
|
|||
}
|
||||
|
||||
/*
|
||||
* vt6421 has problems talking to some drives. The following
|
||||
* vt6420/1 has problems talking to some drives. The following
|
||||
* is the fix from Joseph Chan <JosephChan@via.com.tw>.
|
||||
*
|
||||
* When host issues HOLD, device may send up to 20DW of data
|
||||
|
@ -596,8 +596,9 @@ static void svia_configure(struct pci_dev *pdev)
|
|||
*
|
||||
* https://bugzilla.kernel.org/show_bug.cgi?id=15173
|
||||
* http://article.gmane.org/gmane.linux.ide/46352
|
||||
* http://thread.gmane.org/gmane.linux.kernel/1062139
|
||||
*/
|
||||
if (pdev->device == 0x3249) {
|
||||
if (board_id == vt6420 || board_id == vt6421) {
|
||||
pci_read_config_byte(pdev, 0x52, &tmp8);
|
||||
tmp8 |= 1 << 2;
|
||||
pci_write_config_byte(pdev, 0x52, tmp8);
|
||||
|
@ -652,7 +653,7 @@ static int svia_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
if (rc)
|
||||
return rc;
|
||||
|
||||
svia_configure(pdev);
|
||||
svia_configure(pdev, board_id);
|
||||
|
||||
pci_set_master(pdev);
|
||||
return ata_host_activate(host, pdev->irq, ata_bmdma_interrupt,
|
||||
|
|
|
@ -475,20 +475,33 @@ static int device_resume_noirq(struct device *dev, pm_message_t state)
|
|||
*/
|
||||
void dpm_resume_noirq(pm_message_t state)
|
||||
{
|
||||
struct device *dev;
|
||||
struct list_head list;
|
||||
ktime_t starttime = ktime_get();
|
||||
|
||||
INIT_LIST_HEAD(&list);
|
||||
mutex_lock(&dpm_list_mtx);
|
||||
transition_started = false;
|
||||
list_for_each_entry(dev, &dpm_list, power.entry)
|
||||
while (!list_empty(&dpm_list)) {
|
||||
struct device *dev = to_device(dpm_list.next);
|
||||
|
||||
get_device(dev);
|
||||
if (dev->power.status > DPM_OFF) {
|
||||
int error;
|
||||
|
||||
dev->power.status = DPM_OFF;
|
||||
mutex_unlock(&dpm_list_mtx);
|
||||
|
||||
error = device_resume_noirq(dev, state);
|
||||
|
||||
mutex_lock(&dpm_list_mtx);
|
||||
if (error)
|
||||
pm_dev_err(dev, state, " early", error);
|
||||
}
|
||||
if (!list_empty(&dev->power.entry))
|
||||
list_move_tail(&dev->power.entry, &list);
|
||||
put_device(dev);
|
||||
}
|
||||
list_splice(&list, &dpm_list);
|
||||
mutex_unlock(&dpm_list_mtx);
|
||||
dpm_show_time(starttime, state, "early");
|
||||
resume_device_irqs();
|
||||
|
@ -789,20 +802,33 @@ static int device_suspend_noirq(struct device *dev, pm_message_t state)
|
|||
*/
|
||||
int dpm_suspend_noirq(pm_message_t state)
|
||||
{
|
||||
struct device *dev;
|
||||
struct list_head list;
|
||||
ktime_t starttime = ktime_get();
|
||||
int error = 0;
|
||||
|
||||
INIT_LIST_HEAD(&list);
|
||||
suspend_device_irqs();
|
||||
mutex_lock(&dpm_list_mtx);
|
||||
list_for_each_entry_reverse(dev, &dpm_list, power.entry) {
|
||||
while (!list_empty(&dpm_list)) {
|
||||
struct device *dev = to_device(dpm_list.prev);
|
||||
|
||||
get_device(dev);
|
||||
mutex_unlock(&dpm_list_mtx);
|
||||
|
||||
error = device_suspend_noirq(dev, state);
|
||||
|
||||
mutex_lock(&dpm_list_mtx);
|
||||
if (error) {
|
||||
pm_dev_err(dev, state, " late", error);
|
||||
put_device(dev);
|
||||
break;
|
||||
}
|
||||
dev->power.status = DPM_OFF_IRQ;
|
||||
if (!list_empty(&dev->power.entry))
|
||||
list_move(&dev->power.entry, &list);
|
||||
put_device(dev);
|
||||
}
|
||||
list_splice_tail(&list, &dpm_list);
|
||||
mutex_unlock(&dpm_list_mtx);
|
||||
if (error)
|
||||
dpm_resume_noirq(resume_event(state));
|
||||
|
|
|
@ -62,8 +62,8 @@ static int cciss_scsi_proc_info(
|
|||
int length, /* length of data in buffer */
|
||||
int func); /* 0 == read, 1 == write */
|
||||
|
||||
static int cciss_scsi_queue_command (struct scsi_cmnd *cmd,
|
||||
void (* done)(struct scsi_cmnd *));
|
||||
static int cciss_scsi_queue_command (struct Scsi_Host *h,
|
||||
struct scsi_cmnd *cmd);
|
||||
static int cciss_eh_device_reset_handler(struct scsi_cmnd *);
|
||||
static int cciss_eh_abort_handler(struct scsi_cmnd *);
|
||||
|
||||
|
@ -1406,7 +1406,7 @@ static void cciss_scatter_gather(ctlr_info_t *h, CommandList_struct *c,
|
|||
|
||||
|
||||
static int
|
||||
cciss_scsi_queue_command (struct scsi_cmnd *cmd, void (* done)(struct scsi_cmnd *))
|
||||
cciss_scsi_queue_command_lck(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *))
|
||||
{
|
||||
ctlr_info_t *h;
|
||||
int rc;
|
||||
|
@ -1504,6 +1504,8 @@ cciss_scsi_queue_command (struct scsi_cmnd *cmd, void (* done)(struct scsi_cmnd
|
|||
return 0;
|
||||
}
|
||||
|
||||
static DEF_SCSI_QCMD(cciss_scsi_queue_command)
|
||||
|
||||
static void cciss_unregister_scsi(ctlr_info_t *h)
|
||||
{
|
||||
struct cciss_scsi_adapter_data_t *sa;
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
#include <linux/memcontrol.h>
|
||||
#include <linux/mm_inline.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/pkt_sched.h>
|
||||
#define __KERNEL_SYSCALLS__
|
||||
#include <linux/unistd.h>
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include <linux/module.h>
|
||||
#include <linux/drbd.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/wait.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/memcontrol.h>
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
#include <linux/mm.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <asm/uaccess.h>
|
||||
#include <asm/pgtable.h>
|
||||
#include "agp.h"
|
||||
|
|
|
@ -81,7 +81,6 @@ static char *serial_version = "4.30";
|
|||
#include <linux/mm.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
#include <linux/module.h>
|
||||
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/tty.h>
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#include <linux/interrupt.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/miscdevice.h>
|
||||
#include <linux/major.h>
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/miscdevice.h>
|
||||
#include <linux/delay.h>
|
||||
|
|
|
@ -120,7 +120,7 @@ static int i8k_smm(struct smm_regs *regs)
|
|||
int eax = regs->eax;
|
||||
|
||||
#if defined(CONFIG_X86_64)
|
||||
asm("pushq %%rax\n\t"
|
||||
asm volatile("pushq %%rax\n\t"
|
||||
"movl 0(%%rax),%%edx\n\t"
|
||||
"pushq %%rdx\n\t"
|
||||
"movl 4(%%rax),%%ebx\n\t"
|
||||
|
@ -142,11 +142,11 @@ static int i8k_smm(struct smm_regs *regs)
|
|||
"lahf\n\t"
|
||||
"shrl $8,%%eax\n\t"
|
||||
"andl $1,%%eax\n"
|
||||
:"=a"(rc), "+m" (*regs)
|
||||
:"=a"(rc)
|
||||
: "a"(regs)
|
||||
: "%ebx", "%ecx", "%edx", "%esi", "%edi", "memory");
|
||||
#else
|
||||
asm("pushl %%eax\n\t"
|
||||
asm volatile("pushl %%eax\n\t"
|
||||
"movl 0(%%eax),%%edx\n\t"
|
||||
"push %%edx\n\t"
|
||||
"movl 4(%%eax),%%ebx\n\t"
|
||||
|
@ -168,7 +168,7 @@ static int i8k_smm(struct smm_regs *regs)
|
|||
"lahf\n\t"
|
||||
"shrl $8,%%eax\n\t"
|
||||
"andl $1,%%eax\n"
|
||||
:"=a"(rc), "+m" (*regs)
|
||||
:"=a"(rc)
|
||||
: "a"(regs)
|
||||
: "%ebx", "%ecx", "%edx", "%esi", "%edi", "memory");
|
||||
#endif
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#include <linux/module.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/tty.h>
|
||||
#include <linux/tty_flip.h>
|
||||
|
|
|
@ -52,7 +52,6 @@
|
|||
#include <linux/interrupt.h>
|
||||
#include <linux/serial.h>
|
||||
#include <linux/serialP.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/fcntl.h>
|
||||
#include <linux/ptrace.h>
|
||||
|
|
|
@ -87,7 +87,6 @@
|
|||
#include <linux/tty_flip.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/serial.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/fcntl.h>
|
||||
#include <linux/major.h>
|
||||
#include <linux/delay.h>
|
||||
|
|
|
@ -40,7 +40,6 @@
|
|||
#include <linux/stallion.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/ctype.h>
|
||||
|
|
|
@ -216,7 +216,6 @@
|
|||
#include <linux/eisa.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/miscdevice.h>
|
||||
#include <linux/bitops.h>
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include <linux/interrupt.h>
|
||||
#include <linux/time.h>
|
||||
#include <linux/math64.h>
|
||||
#include <linux/smp_lock.h>
|
||||
|
||||
#include <asm/genapic.h>
|
||||
#include <asm/uv/uv_hub.h>
|
||||
|
|
|
@ -1468,7 +1468,7 @@ static int sbp2_map_scatterlist(struct sbp2_command_orb *orb,
|
|||
|
||||
/* SCSI stack integration */
|
||||
|
||||
static int sbp2_scsi_queuecommand(struct scsi_cmnd *cmd, scsi_done_fn_t done)
|
||||
static int sbp2_scsi_queuecommand_lck(struct scsi_cmnd *cmd, scsi_done_fn_t done)
|
||||
{
|
||||
struct sbp2_logical_unit *lu = cmd->device->hostdata;
|
||||
struct fw_device *device = target_device(lu->tgt);
|
||||
|
@ -1534,6 +1534,8 @@ static int sbp2_scsi_queuecommand(struct scsi_cmnd *cmd, scsi_done_fn_t done)
|
|||
return retval;
|
||||
}
|
||||
|
||||
static DEF_SCSI_QCMD(sbp2_scsi_queuecommand)
|
||||
|
||||
static int sbp2_scsi_slave_alloc(struct scsi_device *sdev)
|
||||
{
|
||||
struct sbp2_logical_unit *lu = sdev->hostdata;
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
#include "drmP.h"
|
||||
#include <linux/poll.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/smp_lock.h>
|
||||
|
||||
/* from BKL pushdown: note that nothing else serializes idr_find() */
|
||||
DEFINE_MUTEX(drm_global_mutex);
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/backlight.h>
|
||||
#include <linux/acpi.h>
|
||||
|
||||
#include "drmP.h"
|
||||
#include "nouveau_drv.h"
|
||||
|
@ -136,6 +137,14 @@ int nouveau_backlight_init(struct drm_device *dev)
|
|||
{
|
||||
struct drm_nouveau_private *dev_priv = dev->dev_private;
|
||||
|
||||
#ifdef CONFIG_ACPI
|
||||
if (acpi_video_backlight_support()) {
|
||||
NV_INFO(dev, "ACPI backlight interface available, "
|
||||
"not registering our own\n");
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
switch (dev_priv->card_type) {
|
||||
case NV_40:
|
||||
return nouveau_nv40_backlight_init(dev);
|
||||
|
|
|
@ -6829,7 +6829,7 @@ nouveau_bios_posted(struct drm_device *dev)
|
|||
struct drm_nouveau_private *dev_priv = dev->dev_private;
|
||||
unsigned htotal;
|
||||
|
||||
if (dev_priv->chipset >= NV_50) {
|
||||
if (dev_priv->card_type >= NV_50) {
|
||||
if (NVReadVgaCrtc(dev, 0, 0x00) == 0 &&
|
||||
NVReadVgaCrtc(dev, 0, 0x1a) == 0)
|
||||
return false;
|
||||
|
|
|
@ -143,8 +143,10 @@ nouveau_bo_new(struct drm_device *dev, struct nouveau_channel *chan,
|
|||
nvbo->no_vm = no_vm;
|
||||
nvbo->tile_mode = tile_mode;
|
||||
nvbo->tile_flags = tile_flags;
|
||||
nvbo->bo.bdev = &dev_priv->ttm.bdev;
|
||||
|
||||
nouveau_bo_fixup_align(dev, tile_mode, tile_flags, &align, &size);
|
||||
nouveau_bo_fixup_align(dev, tile_mode, nouveau_bo_tile_layout(nvbo),
|
||||
&align, &size);
|
||||
align >>= PAGE_SHIFT;
|
||||
|
||||
nouveau_bo_placement_set(nvbo, flags, 0);
|
||||
|
@ -176,6 +178,31 @@ set_placement_list(uint32_t *pl, unsigned *n, uint32_t type, uint32_t flags)
|
|||
pl[(*n)++] = TTM_PL_FLAG_SYSTEM | flags;
|
||||
}
|
||||
|
||||
static void
|
||||
set_placement_range(struct nouveau_bo *nvbo, uint32_t type)
|
||||
{
|
||||
struct drm_nouveau_private *dev_priv = nouveau_bdev(nvbo->bo.bdev);
|
||||
|
||||
if (dev_priv->card_type == NV_10 &&
|
||||
nvbo->tile_mode && (type & TTM_PL_FLAG_VRAM)) {
|
||||
/*
|
||||
* Make sure that the color and depth buffers are handled
|
||||
* by independent memory controller units. Up to a 9x
|
||||
* speed up when alpha-blending and depth-test are enabled
|
||||
* at the same time.
|
||||
*/
|
||||
int vram_pages = dev_priv->vram_size >> PAGE_SHIFT;
|
||||
|
||||
if (nvbo->tile_flags & NOUVEAU_GEM_TILE_ZETA) {
|
||||
nvbo->placement.fpfn = vram_pages / 2;
|
||||
nvbo->placement.lpfn = ~0;
|
||||
} else {
|
||||
nvbo->placement.fpfn = 0;
|
||||
nvbo->placement.lpfn = vram_pages / 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nouveau_bo_placement_set(struct nouveau_bo *nvbo, uint32_t type, uint32_t busy)
|
||||
{
|
||||
|
@ -190,6 +217,8 @@ nouveau_bo_placement_set(struct nouveau_bo *nvbo, uint32_t type, uint32_t busy)
|
|||
pl->busy_placement = nvbo->busy_placements;
|
||||
set_placement_list(nvbo->busy_placements, &pl->num_busy_placement,
|
||||
type | busy, flags);
|
||||
|
||||
set_placement_range(nvbo, type);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -525,7 +554,8 @@ nv50_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
|
|||
stride = 16 * 4;
|
||||
height = amount / stride;
|
||||
|
||||
if (new_mem->mem_type == TTM_PL_VRAM && nvbo->tile_flags) {
|
||||
if (new_mem->mem_type == TTM_PL_VRAM &&
|
||||
nouveau_bo_tile_layout(nvbo)) {
|
||||
ret = RING_SPACE(chan, 8);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
@ -546,7 +576,8 @@ nv50_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
|
|||
BEGIN_RING(chan, NvSubM2MF, 0x0200, 1);
|
||||
OUT_RING (chan, 1);
|
||||
}
|
||||
if (old_mem->mem_type == TTM_PL_VRAM && nvbo->tile_flags) {
|
||||
if (old_mem->mem_type == TTM_PL_VRAM &&
|
||||
nouveau_bo_tile_layout(nvbo)) {
|
||||
ret = RING_SPACE(chan, 8);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
@ -753,7 +784,8 @@ nouveau_bo_vm_bind(struct ttm_buffer_object *bo, struct ttm_mem_reg *new_mem,
|
|||
if (dev_priv->card_type == NV_50) {
|
||||
ret = nv50_mem_vm_bind_linear(dev,
|
||||
offset + dev_priv->vm_vram_base,
|
||||
new_mem->size, nvbo->tile_flags,
|
||||
new_mem->size,
|
||||
nouveau_bo_tile_layout(nvbo),
|
||||
offset);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
@ -894,7 +926,8 @@ nouveau_ttm_fault_reserve_notify(struct ttm_buffer_object *bo)
|
|||
* nothing to do here.
|
||||
*/
|
||||
if (bo->mem.mem_type != TTM_PL_VRAM) {
|
||||
if (dev_priv->card_type < NV_50 || !nvbo->tile_flags)
|
||||
if (dev_priv->card_type < NV_50 ||
|
||||
!nouveau_bo_tile_layout(nvbo))
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -281,7 +281,7 @@ nouveau_connector_detect(struct drm_connector *connector, bool force)
|
|||
nv_encoder = find_encoder_by_type(connector, OUTPUT_ANALOG);
|
||||
if (!nv_encoder && !nouveau_tv_disable)
|
||||
nv_encoder = find_encoder_by_type(connector, OUTPUT_TV);
|
||||
if (nv_encoder) {
|
||||
if (nv_encoder && force) {
|
||||
struct drm_encoder *encoder = to_drm_encoder(nv_encoder);
|
||||
struct drm_encoder_helper_funcs *helper =
|
||||
encoder->helper_private;
|
||||
|
@ -641,11 +641,28 @@ nouveau_connector_get_modes(struct drm_connector *connector)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static unsigned
|
||||
get_tmds_link_bandwidth(struct drm_connector *connector)
|
||||
{
|
||||
struct nouveau_connector *nv_connector = nouveau_connector(connector);
|
||||
struct drm_nouveau_private *dev_priv = connector->dev->dev_private;
|
||||
struct dcb_entry *dcb = nv_connector->detected_encoder->dcb;
|
||||
|
||||
if (dcb->location != DCB_LOC_ON_CHIP ||
|
||||
dev_priv->chipset >= 0x46)
|
||||
return 165000;
|
||||
else if (dev_priv->chipset >= 0x40)
|
||||
return 155000;
|
||||
else if (dev_priv->chipset >= 0x18)
|
||||
return 135000;
|
||||
else
|
||||
return 112000;
|
||||
}
|
||||
|
||||
static int
|
||||
nouveau_connector_mode_valid(struct drm_connector *connector,
|
||||
struct drm_display_mode *mode)
|
||||
{
|
||||
struct drm_nouveau_private *dev_priv = connector->dev->dev_private;
|
||||
struct nouveau_connector *nv_connector = nouveau_connector(connector);
|
||||
struct nouveau_encoder *nv_encoder = nv_connector->detected_encoder;
|
||||
struct drm_encoder *encoder = to_drm_encoder(nv_encoder);
|
||||
|
@ -663,11 +680,9 @@ nouveau_connector_mode_valid(struct drm_connector *connector,
|
|||
max_clock = 400000;
|
||||
break;
|
||||
case OUTPUT_TMDS:
|
||||
if ((dev_priv->card_type >= NV_50 && !nouveau_duallink) ||
|
||||
!nv_encoder->dcb->duallink_possible)
|
||||
max_clock = 165000;
|
||||
else
|
||||
max_clock = 330000;
|
||||
max_clock = get_tmds_link_bandwidth(connector);
|
||||
if (nouveau_duallink && nv_encoder->dcb->duallink_possible)
|
||||
max_clock *= 2;
|
||||
break;
|
||||
case OUTPUT_ANALOG:
|
||||
max_clock = nv_encoder->dcb->crtconf.maxfreq;
|
||||
|
@ -709,44 +724,6 @@ nouveau_connector_best_encoder(struct drm_connector *connector)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
nouveau_connector_set_polling(struct drm_connector *connector)
|
||||
{
|
||||
struct drm_device *dev = connector->dev;
|
||||
struct drm_nouveau_private *dev_priv = dev->dev_private;
|
||||
struct drm_crtc *crtc;
|
||||
bool spare_crtc = false;
|
||||
|
||||
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head)
|
||||
spare_crtc |= !crtc->enabled;
|
||||
|
||||
connector->polled = 0;
|
||||
|
||||
switch (connector->connector_type) {
|
||||
case DRM_MODE_CONNECTOR_VGA:
|
||||
case DRM_MODE_CONNECTOR_TV:
|
||||
if (dev_priv->card_type >= NV_50 ||
|
||||
(nv_gf4_disp_arch(dev) && spare_crtc))
|
||||
connector->polled = DRM_CONNECTOR_POLL_CONNECT;
|
||||
break;
|
||||
|
||||
case DRM_MODE_CONNECTOR_DVII:
|
||||
case DRM_MODE_CONNECTOR_DVID:
|
||||
case DRM_MODE_CONNECTOR_HDMIA:
|
||||
case DRM_MODE_CONNECTOR_DisplayPort:
|
||||
case DRM_MODE_CONNECTOR_eDP:
|
||||
if (dev_priv->card_type >= NV_50)
|
||||
connector->polled = DRM_CONNECTOR_POLL_HPD;
|
||||
else if (connector->connector_type == DRM_MODE_CONNECTOR_DVID ||
|
||||
spare_crtc)
|
||||
connector->polled = DRM_CONNECTOR_POLL_CONNECT;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static const struct drm_connector_helper_funcs
|
||||
nouveau_connector_helper_funcs = {
|
||||
.get_modes = nouveau_connector_get_modes,
|
||||
|
@ -872,6 +849,7 @@ nouveau_connector_create(struct drm_device *dev, int index)
|
|||
dev->mode_config.scaling_mode_property,
|
||||
nv_connector->scaling_mode);
|
||||
}
|
||||
connector->polled = DRM_CONNECTOR_POLL_CONNECT;
|
||||
/* fall-through */
|
||||
case DCB_CONNECTOR_TV_0:
|
||||
case DCB_CONNECTOR_TV_1:
|
||||
|
@ -888,11 +866,16 @@ nouveau_connector_create(struct drm_device *dev, int index)
|
|||
dev->mode_config.dithering_mode_property,
|
||||
nv_connector->use_dithering ?
|
||||
DRM_MODE_DITHERING_ON : DRM_MODE_DITHERING_OFF);
|
||||
|
||||
if (dcb->type != DCB_CONNECTOR_LVDS) {
|
||||
if (dev_priv->card_type >= NV_50)
|
||||
connector->polled = DRM_CONNECTOR_POLL_HPD;
|
||||
else
|
||||
connector->polled = DRM_CONNECTOR_POLL_CONNECT;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
nouveau_connector_set_polling(connector);
|
||||
|
||||
drm_sysfs_connector_add(connector);
|
||||
dcb->drm = connector;
|
||||
return dcb->drm;
|
||||
|
|
|
@ -52,9 +52,6 @@ static inline struct nouveau_connector *nouveau_connector(
|
|||
struct drm_connector *
|
||||
nouveau_connector_create(struct drm_device *, int index);
|
||||
|
||||
void
|
||||
nouveau_connector_set_polling(struct drm_connector *);
|
||||
|
||||
int
|
||||
nouveau_connector_bpp(struct drm_connector *);
|
||||
|
||||
|
|
|
@ -100,6 +100,9 @@ struct nouveau_bo {
|
|||
int pin_refcnt;
|
||||
};
|
||||
|
||||
#define nouveau_bo_tile_layout(nvbo) \
|
||||
((nvbo)->tile_flags & NOUVEAU_GEM_TILE_LAYOUT_MASK)
|
||||
|
||||
static inline struct nouveau_bo *
|
||||
nouveau_bo(struct ttm_buffer_object *bo)
|
||||
{
|
||||
|
@ -304,6 +307,7 @@ struct nouveau_fifo_engine {
|
|||
void (*destroy_context)(struct nouveau_channel *);
|
||||
int (*load_context)(struct nouveau_channel *);
|
||||
int (*unload_context)(struct drm_device *);
|
||||
void (*tlb_flush)(struct drm_device *dev);
|
||||
};
|
||||
|
||||
struct nouveau_pgraph_object_method {
|
||||
|
@ -336,6 +340,7 @@ struct nouveau_pgraph_engine {
|
|||
void (*destroy_context)(struct nouveau_channel *);
|
||||
int (*load_context)(struct nouveau_channel *);
|
||||
int (*unload_context)(struct drm_device *);
|
||||
void (*tlb_flush)(struct drm_device *dev);
|
||||
|
||||
void (*set_region_tiling)(struct drm_device *dev, int i, uint32_t addr,
|
||||
uint32_t size, uint32_t pitch);
|
||||
|
@ -485,13 +490,13 @@ enum nv04_fp_display_regs {
|
|||
};
|
||||
|
||||
struct nv04_crtc_reg {
|
||||
unsigned char MiscOutReg; /* */
|
||||
unsigned char MiscOutReg;
|
||||
uint8_t CRTC[0xa0];
|
||||
uint8_t CR58[0x10];
|
||||
uint8_t Sequencer[5];
|
||||
uint8_t Graphics[9];
|
||||
uint8_t Attribute[21];
|
||||
unsigned char DAC[768]; /* Internal Colorlookuptable */
|
||||
unsigned char DAC[768];
|
||||
|
||||
/* PCRTC regs */
|
||||
uint32_t fb_start;
|
||||
|
@ -539,43 +544,9 @@ struct nv04_output_reg {
|
|||
};
|
||||
|
||||
struct nv04_mode_state {
|
||||
uint32_t bpp;
|
||||
uint32_t width;
|
||||
uint32_t height;
|
||||
uint32_t interlace;
|
||||
uint32_t repaint0;
|
||||
uint32_t repaint1;
|
||||
uint32_t screen;
|
||||
uint32_t scale;
|
||||
uint32_t dither;
|
||||
uint32_t extra;
|
||||
uint32_t fifo;
|
||||
uint32_t pixel;
|
||||
uint32_t horiz;
|
||||
int arbitration0;
|
||||
int arbitration1;
|
||||
uint32_t pll;
|
||||
uint32_t pllB;
|
||||
uint32_t vpll;
|
||||
uint32_t vpll2;
|
||||
uint32_t vpllB;
|
||||
uint32_t vpll2B;
|
||||
struct nv04_crtc_reg crtc_reg[2];
|
||||
uint32_t pllsel;
|
||||
uint32_t sel_clk;
|
||||
uint32_t general;
|
||||
uint32_t crtcOwner;
|
||||
uint32_t head;
|
||||
uint32_t head2;
|
||||
uint32_t cursorConfig;
|
||||
uint32_t cursor0;
|
||||
uint32_t cursor1;
|
||||
uint32_t cursor2;
|
||||
uint32_t timingH;
|
||||
uint32_t timingV;
|
||||
uint32_t displayV;
|
||||
uint32_t crtcSync;
|
||||
|
||||
struct nv04_crtc_reg crtc_reg[2];
|
||||
};
|
||||
|
||||
enum nouveau_card_type {
|
||||
|
@ -613,6 +584,12 @@ struct drm_nouveau_private {
|
|||
struct work_struct irq_work;
|
||||
struct work_struct hpd_work;
|
||||
|
||||
struct {
|
||||
spinlock_t lock;
|
||||
uint32_t hpd0_bits;
|
||||
uint32_t hpd1_bits;
|
||||
} hpd_state;
|
||||
|
||||
struct list_head vbl_waiting;
|
||||
|
||||
struct {
|
||||
|
@ -1045,6 +1022,7 @@ extern int nv50_fifo_create_context(struct nouveau_channel *);
|
|||
extern void nv50_fifo_destroy_context(struct nouveau_channel *);
|
||||
extern int nv50_fifo_load_context(struct nouveau_channel *);
|
||||
extern int nv50_fifo_unload_context(struct drm_device *);
|
||||
extern void nv50_fifo_tlb_flush(struct drm_device *dev);
|
||||
|
||||
/* nvc0_fifo.c */
|
||||
extern int nvc0_fifo_init(struct drm_device *);
|
||||
|
@ -1122,6 +1100,8 @@ extern int nv50_graph_load_context(struct nouveau_channel *);
|
|||
extern int nv50_graph_unload_context(struct drm_device *);
|
||||
extern void nv50_graph_context_switch(struct drm_device *);
|
||||
extern int nv50_grctx_init(struct nouveau_grctx *);
|
||||
extern void nv50_graph_tlb_flush(struct drm_device *dev);
|
||||
extern void nv86_graph_tlb_flush(struct drm_device *dev);
|
||||
|
||||
/* nvc0_graph.c */
|
||||
extern int nvc0_graph_init(struct drm_device *);
|
||||
|
@ -1239,7 +1219,6 @@ extern u16 nouveau_bo_rd16(struct nouveau_bo *nvbo, unsigned index);
|
|||
extern void nouveau_bo_wr16(struct nouveau_bo *nvbo, unsigned index, u16 val);
|
||||
extern u32 nouveau_bo_rd32(struct nouveau_bo *nvbo, unsigned index);
|
||||
extern void nouveau_bo_wr32(struct nouveau_bo *nvbo, unsigned index, u32 val);
|
||||
extern int nouveau_bo_sync_gpu(struct nouveau_bo *, struct nouveau_channel *);
|
||||
|
||||
/* nouveau_fence.c */
|
||||
struct nouveau_fence;
|
||||
|
|
|
@ -249,6 +249,7 @@ alloc_semaphore(struct drm_device *dev)
|
|||
{
|
||||
struct drm_nouveau_private *dev_priv = dev->dev_private;
|
||||
struct nouveau_semaphore *sema;
|
||||
int ret;
|
||||
|
||||
if (!USE_SEMA(dev))
|
||||
return NULL;
|
||||
|
@ -257,10 +258,14 @@ alloc_semaphore(struct drm_device *dev)
|
|||
if (!sema)
|
||||
goto fail;
|
||||
|
||||
ret = drm_mm_pre_get(&dev_priv->fence.heap);
|
||||
if (ret)
|
||||
goto fail;
|
||||
|
||||
spin_lock(&dev_priv->fence.lock);
|
||||
sema->mem = drm_mm_search_free(&dev_priv->fence.heap, 4, 0, 0);
|
||||
if (sema->mem)
|
||||
sema->mem = drm_mm_get_block(sema->mem, 4, 0);
|
||||
sema->mem = drm_mm_get_block_atomic(sema->mem, 4, 0);
|
||||
spin_unlock(&dev_priv->fence.lock);
|
||||
|
||||
if (!sema->mem)
|
||||
|
|
|
@ -107,8 +107,12 @@ nouveau_gem_info(struct drm_gem_object *gem, struct drm_nouveau_gem_info *rep)
|
|||
}
|
||||
|
||||
static bool
|
||||
nouveau_gem_tile_flags_valid(struct drm_device *dev, uint32_t tile_flags) {
|
||||
switch (tile_flags) {
|
||||
nouveau_gem_tile_flags_valid(struct drm_device *dev, uint32_t tile_flags)
|
||||
{
|
||||
struct drm_nouveau_private *dev_priv = dev->dev_private;
|
||||
|
||||
if (dev_priv->card_type >= NV_50) {
|
||||
switch (tile_flags & NOUVEAU_GEM_TILE_LAYOUT_MASK) {
|
||||
case 0x0000:
|
||||
case 0x1800:
|
||||
case 0x2800:
|
||||
|
@ -117,13 +121,15 @@ nouveau_gem_tile_flags_valid(struct drm_device *dev, uint32_t tile_flags) {
|
|||
case 0x7400:
|
||||
case 0x7a00:
|
||||
case 0xe000:
|
||||
break;
|
||||
default:
|
||||
NV_ERROR(dev, "bad page flags: 0x%08x\n", tile_flags);
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
if (!(tile_flags & NOUVEAU_GEM_TILE_LAYOUT_MASK))
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
NV_ERROR(dev, "bad page flags: 0x%08x\n", tile_flags);
|
||||
return false;
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -519,11 +519,11 @@ nouveau_hw_fix_bad_vpll(struct drm_device *dev, int head)
|
|||
|
||||
struct pll_lims pll_lim;
|
||||
struct nouveau_pll_vals pv;
|
||||
uint32_t pllreg = head ? NV_RAMDAC_VPLL2 : NV_PRAMDAC_VPLL_COEFF;
|
||||
enum pll_types pll = head ? PLL_VPLL1 : PLL_VPLL0;
|
||||
|
||||
if (get_pll_limits(dev, pllreg, &pll_lim))
|
||||
if (get_pll_limits(dev, pll, &pll_lim))
|
||||
return;
|
||||
nouveau_hw_get_pllvals(dev, pllreg, &pv);
|
||||
nouveau_hw_get_pllvals(dev, pll, &pv);
|
||||
|
||||
if (pv.M1 >= pll_lim.vco1.min_m && pv.M1 <= pll_lim.vco1.max_m &&
|
||||
pv.N1 >= pll_lim.vco1.min_n && pv.N1 <= pll_lim.vco1.max_n &&
|
||||
|
@ -536,7 +536,7 @@ nouveau_hw_fix_bad_vpll(struct drm_device *dev, int head)
|
|||
pv.M1 = pll_lim.vco1.max_m;
|
||||
pv.N1 = pll_lim.vco1.min_n;
|
||||
pv.log2P = pll_lim.max_usable_log2p;
|
||||
nouveau_hw_setpll(dev, pllreg, &pv);
|
||||
nouveau_hw_setpll(dev, pll_lim.reg, &pv);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -415,6 +415,25 @@ nv_fix_nv40_hw_cursor(struct drm_device *dev, int head)
|
|||
NVWriteRAMDAC(dev, head, NV_PRAMDAC_CU_START_POS, curpos);
|
||||
}
|
||||
|
||||
static inline void
|
||||
nv_set_crtc_base(struct drm_device *dev, int head, uint32_t offset)
|
||||
{
|
||||
struct drm_nouveau_private *dev_priv = dev->dev_private;
|
||||
|
||||
NVWriteCRTC(dev, head, NV_PCRTC_START, offset);
|
||||
|
||||
if (dev_priv->card_type == NV_04) {
|
||||
/*
|
||||
* Hilarious, the 24th bit doesn't want to stick to
|
||||
* PCRTC_START...
|
||||
*/
|
||||
int cre_heb = NVReadVgaCrtc(dev, head, NV_CIO_CRE_HEB__INDEX);
|
||||
|
||||
NVWriteVgaCrtc(dev, head, NV_CIO_CRE_HEB__INDEX,
|
||||
(cre_heb & ~0x40) | ((offset >> 18) & 0x40));
|
||||
}
|
||||
}
|
||||
|
||||
static inline void
|
||||
nv_show_cursor(struct drm_device *dev, int head, bool show)
|
||||
{
|
||||
|
|
|
@ -256,7 +256,7 @@ nouveau_i2c_find(struct drm_device *dev, int index)
|
|||
if (index >= DCB_MAX_NUM_I2C_ENTRIES)
|
||||
return NULL;
|
||||
|
||||
if (dev_priv->chipset >= NV_50 && (i2c->entry & 0x00000100)) {
|
||||
if (dev_priv->card_type >= NV_50 && (i2c->entry & 0x00000100)) {
|
||||
uint32_t reg = 0xe500, val;
|
||||
|
||||
if (i2c->port_type == 6) {
|
||||
|
|
|
@ -42,6 +42,13 @@
|
|||
#include "nouveau_connector.h"
|
||||
#include "nv50_display.h"
|
||||
|
||||
static DEFINE_RATELIMIT_STATE(nouveau_ratelimit_state, 3 * HZ, 20);
|
||||
|
||||
static int nouveau_ratelimit(void)
|
||||
{
|
||||
return __ratelimit(&nouveau_ratelimit_state);
|
||||
}
|
||||
|
||||
void
|
||||
nouveau_irq_preinstall(struct drm_device *dev)
|
||||
{
|
||||
|
@ -53,6 +60,7 @@ nouveau_irq_preinstall(struct drm_device *dev)
|
|||
if (dev_priv->card_type >= NV_50) {
|
||||
INIT_WORK(&dev_priv->irq_work, nv50_display_irq_handler_bh);
|
||||
INIT_WORK(&dev_priv->hpd_work, nv50_display_irq_hotplug_bh);
|
||||
spin_lock_init(&dev_priv->hpd_state.lock);
|
||||
INIT_LIST_HEAD(&dev_priv->vbl_waiting);
|
||||
}
|
||||
}
|
||||
|
@ -202,8 +210,8 @@ nouveau_fifo_irq_handler(struct drm_device *dev)
|
|||
}
|
||||
|
||||
if (status & NV_PFIFO_INTR_DMA_PUSHER) {
|
||||
u32 get = nv_rd32(dev, 0x003244);
|
||||
u32 put = nv_rd32(dev, 0x003240);
|
||||
u32 dma_get = nv_rd32(dev, 0x003244);
|
||||
u32 dma_put = nv_rd32(dev, 0x003240);
|
||||
u32 push = nv_rd32(dev, 0x003220);
|
||||
u32 state = nv_rd32(dev, 0x003228);
|
||||
|
||||
|
@ -213,16 +221,18 @@ nouveau_fifo_irq_handler(struct drm_device *dev)
|
|||
u32 ib_get = nv_rd32(dev, 0x003334);
|
||||
u32 ib_put = nv_rd32(dev, 0x003330);
|
||||
|
||||
if (nouveau_ratelimit())
|
||||
NV_INFO(dev, "PFIFO_DMA_PUSHER - Ch %d Get 0x%02x%08x "
|
||||
"Put 0x%02x%08x IbGet 0x%08x IbPut 0x%08x "
|
||||
"State 0x%08x Push 0x%08x\n",
|
||||
chid, ho_get, get, ho_put, put, ib_get, ib_put,
|
||||
state, push);
|
||||
chid, ho_get, dma_get, ho_put,
|
||||
dma_put, ib_get, ib_put, state,
|
||||
push);
|
||||
|
||||
/* METHOD_COUNT, in DMA_STATE on earlier chipsets */
|
||||
nv_wr32(dev, 0x003364, 0x00000000);
|
||||
if (get != put || ho_get != ho_put) {
|
||||
nv_wr32(dev, 0x003244, put);
|
||||
if (dma_get != dma_put || ho_get != ho_put) {
|
||||
nv_wr32(dev, 0x003244, dma_put);
|
||||
nv_wr32(dev, 0x003328, ho_put);
|
||||
} else
|
||||
if (ib_get != ib_put) {
|
||||
|
@ -231,10 +241,10 @@ nouveau_fifo_irq_handler(struct drm_device *dev)
|
|||
} else {
|
||||
NV_INFO(dev, "PFIFO_DMA_PUSHER - Ch %d Get 0x%08x "
|
||||
"Put 0x%08x State 0x%08x Push 0x%08x\n",
|
||||
chid, get, put, state, push);
|
||||
chid, dma_get, dma_put, state, push);
|
||||
|
||||
if (get != put)
|
||||
nv_wr32(dev, 0x003244, put);
|
||||
if (dma_get != dma_put)
|
||||
nv_wr32(dev, 0x003244, dma_put);
|
||||
}
|
||||
|
||||
nv_wr32(dev, 0x003228, 0x00000000);
|
||||
|
@ -266,6 +276,7 @@ nouveau_fifo_irq_handler(struct drm_device *dev)
|
|||
}
|
||||
|
||||
if (status) {
|
||||
if (nouveau_ratelimit())
|
||||
NV_INFO(dev, "PFIFO_INTR 0x%08x - Ch %d\n",
|
||||
status, chid);
|
||||
nv_wr32(dev, NV03_PFIFO_INTR_0, status);
|
||||
|
@ -544,13 +555,6 @@ nouveau_pgraph_intr_notify(struct drm_device *dev, uint32_t nsource)
|
|||
nouveau_graph_dump_trap_info(dev, "PGRAPH_NOTIFY", &trap);
|
||||
}
|
||||
|
||||
static DEFINE_RATELIMIT_STATE(nouveau_ratelimit_state, 3 * HZ, 20);
|
||||
|
||||
static int nouveau_ratelimit(void)
|
||||
{
|
||||
return __ratelimit(&nouveau_ratelimit_state);
|
||||
}
|
||||
|
||||
|
||||
static inline void
|
||||
nouveau_pgraph_intr_error(struct drm_device *dev, uint32_t nsource)
|
||||
|
|
|
@ -33,9 +33,9 @@
|
|||
#include "drmP.h"
|
||||
#include "drm.h"
|
||||
#include "drm_sarea.h"
|
||||
#include "nouveau_drv.h"
|
||||
|
||||
#define MIN(a,b) a < b ? a : b
|
||||
#include "nouveau_drv.h"
|
||||
#include "nouveau_pm.h"
|
||||
|
||||
/*
|
||||
* NV10-NV40 tiling helpers
|
||||
|
@ -175,11 +175,10 @@ nv50_mem_vm_bind_linear(struct drm_device *dev, uint64_t virt, uint32_t size,
|
|||
}
|
||||
}
|
||||
}
|
||||
dev_priv->engine.instmem.flush(dev);
|
||||
|
||||
nv50_vm_flush(dev, 5);
|
||||
nv50_vm_flush(dev, 0);
|
||||
nv50_vm_flush(dev, 4);
|
||||
dev_priv->engine.instmem.flush(dev);
|
||||
dev_priv->engine.fifo.tlb_flush(dev);
|
||||
dev_priv->engine.graph.tlb_flush(dev);
|
||||
nv50_vm_flush(dev, 6);
|
||||
return 0;
|
||||
}
|
||||
|
@ -209,11 +208,10 @@ nv50_mem_vm_unbind(struct drm_device *dev, uint64_t virt, uint32_t size)
|
|||
pte++;
|
||||
}
|
||||
}
|
||||
dev_priv->engine.instmem.flush(dev);
|
||||
|
||||
nv50_vm_flush(dev, 5);
|
||||
nv50_vm_flush(dev, 0);
|
||||
nv50_vm_flush(dev, 4);
|
||||
dev_priv->engine.instmem.flush(dev);
|
||||
dev_priv->engine.fifo.tlb_flush(dev);
|
||||
dev_priv->engine.graph.tlb_flush(dev);
|
||||
nv50_vm_flush(dev, 6);
|
||||
}
|
||||
|
||||
|
@ -653,6 +651,7 @@ nouveau_mem_gart_init(struct drm_device *dev)
|
|||
void
|
||||
nouveau_mem_timing_init(struct drm_device *dev)
|
||||
{
|
||||
/* cards < NVC0 only */
|
||||
struct drm_nouveau_private *dev_priv = dev->dev_private;
|
||||
struct nouveau_pm_engine *pm = &dev_priv->engine.pm;
|
||||
struct nouveau_pm_memtimings *memtimings = &pm->memtimings;
|
||||
|
@ -719,14 +718,14 @@ nouveau_mem_timing_init(struct drm_device *dev)
|
|||
tUNK_19 = 1;
|
||||
tUNK_20 = 0;
|
||||
tUNK_21 = 0;
|
||||
switch (MIN(recordlen,21)) {
|
||||
case 21:
|
||||
switch (min(recordlen, 22)) {
|
||||
case 22:
|
||||
tUNK_21 = entry[21];
|
||||
case 20:
|
||||
case 21:
|
||||
tUNK_20 = entry[20];
|
||||
case 19:
|
||||
case 20:
|
||||
tUNK_19 = entry[19];
|
||||
case 18:
|
||||
case 19:
|
||||
tUNK_18 = entry[18];
|
||||
default:
|
||||
tUNK_0 = entry[0];
|
||||
|
@ -756,24 +755,30 @@ nouveau_mem_timing_init(struct drm_device *dev)
|
|||
timing->reg_100228 = (tUNK_12 << 16 | tUNK_11 << 8 | tUNK_10);
|
||||
if(recordlen > 19) {
|
||||
timing->reg_100228 += (tUNK_19 - 1) << 24;
|
||||
} else {
|
||||
}/* I cannot back-up this else-statement right now
|
||||
else {
|
||||
timing->reg_100228 += tUNK_12 << 24;
|
||||
}
|
||||
}*/
|
||||
|
||||
/* XXX: reg_10022c */
|
||||
timing->reg_10022c = tUNK_2 - 1;
|
||||
|
||||
timing->reg_100230 = (tUNK_20 << 24 | tUNK_21 << 16 |
|
||||
tUNK_13 << 8 | tUNK_13);
|
||||
|
||||
/* XXX: +6? */
|
||||
timing->reg_100234 = (tRAS << 24 | (tUNK_19 + 6) << 8 | tRC);
|
||||
if(tUNK_10 > tUNK_11) {
|
||||
timing->reg_100234 += tUNK_10 << 16;
|
||||
} else {
|
||||
timing->reg_100234 += tUNK_11 << 16;
|
||||
timing->reg_100234 += max(tUNK_10,tUNK_11) << 16;
|
||||
|
||||
/* XXX; reg_100238, reg_10023c
|
||||
* reg: 0x00??????
|
||||
* reg_10023c:
|
||||
* 0 for pre-NV50 cards
|
||||
* 0x????0202 for NV50+ cards (empirical evidence) */
|
||||
if(dev_priv->card_type >= NV_50) {
|
||||
timing->reg_10023c = 0x202;
|
||||
}
|
||||
|
||||
/* XXX; reg_100238, reg_10023c */
|
||||
NV_DEBUG(dev, "Entry %d: 220: %08x %08x %08x %08x\n", i,
|
||||
timing->reg_100220, timing->reg_100224,
|
||||
timing->reg_100228, timing->reg_10022c);
|
||||
|
|
|
@ -129,7 +129,7 @@ nouveau_gpuobj_new(struct drm_device *dev, struct nouveau_channel *chan,
|
|||
if (ramin == NULL) {
|
||||
spin_unlock(&dev_priv->ramin_lock);
|
||||
nouveau_gpuobj_ref(NULL, &gpuobj);
|
||||
return ret;
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
ramin = drm_mm_get_block_atomic(ramin, size, align);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue