forked from Minki/linux
Merge remote-tracking branch 'origin/master' into next
(Merge in order to get the PCIe mps/mrss code fixes)
This commit is contained in:
commit
1cce058b29
13
Documentation/ABI/testing/sysfs-class-scsi_host
Normal file
13
Documentation/ABI/testing/sysfs-class-scsi_host
Normal file
@ -0,0 +1,13 @@
|
||||
What: /sys/class/scsi_host/hostX/isci_id
|
||||
Date: June 2011
|
||||
Contact: Dave Jiang <dave.jiang@intel.com>
|
||||
Description:
|
||||
This file contains the enumerated host ID for the Intel
|
||||
SCU controller. The Intel(R) C600 Series Chipset SATA/SAS
|
||||
Storage Control Unit embeds up to two 4-port controllers in
|
||||
a single PCI device. The controllers are enumerated in order
|
||||
which usually means the lowest number scsi_host corresponds
|
||||
with the first controller, but this association is not
|
||||
guaranteed. The 'isci_id' attribute unambiguously identifies
|
||||
the controller index: '0' for the first controller,
|
||||
'1' for the second.
|
@ -1455,7 +1455,7 @@ Applicable to the H264 encoder.</entry>
|
||||
</row>
|
||||
|
||||
<row><entry></entry></row>
|
||||
<row>
|
||||
<row id="v4l2-mpeg-video-h264-vui-sar-idc">
|
||||
<entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC</constant> </entry>
|
||||
<entry>enum v4l2_mpeg_video_h264_vui_sar_idc</entry>
|
||||
</row>
|
||||
@ -1561,7 +1561,7 @@ Applicable to the H264 encoder.</entry>
|
||||
</row>
|
||||
|
||||
<row><entry></entry></row>
|
||||
<row>
|
||||
<row id="v4l2-mpeg-video-h264-level">
|
||||
<entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_LEVEL</constant> </entry>
|
||||
<entry>enum v4l2_mpeg_video_h264_level</entry>
|
||||
</row>
|
||||
@ -1641,7 +1641,7 @@ Possible values are:</entry>
|
||||
</row>
|
||||
|
||||
<row><entry></entry></row>
|
||||
<row>
|
||||
<row id="v4l2-mpeg-video-mpeg4-level">
|
||||
<entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL</constant> </entry>
|
||||
<entry>enum v4l2_mpeg_video_mpeg4_level</entry>
|
||||
</row>
|
||||
@ -1689,9 +1689,9 @@ Possible values are:</entry>
|
||||
</row>
|
||||
|
||||
<row><entry></entry></row>
|
||||
<row>
|
||||
<row id="v4l2-mpeg-video-h264-profile">
|
||||
<entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_PROFILE</constant> </entry>
|
||||
<entry>enum v4l2_mpeg_h264_profile</entry>
|
||||
<entry>enum v4l2_mpeg_video_h264_profile</entry>
|
||||
</row>
|
||||
<row><entry spanname="descr">The profile information for H264.
|
||||
Applicable to the H264 encoder.
|
||||
@ -1774,9 +1774,9 @@ Possible values are:</entry>
|
||||
</row>
|
||||
|
||||
<row><entry></entry></row>
|
||||
<row>
|
||||
<row id="v4l2-mpeg-video-mpeg4-profile">
|
||||
<entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE</constant> </entry>
|
||||
<entry>enum v4l2_mpeg_mpeg4_profile</entry>
|
||||
<entry>enum v4l2_mpeg_video_mpeg4_profile</entry>
|
||||
</row>
|
||||
<row><entry spanname="descr">The profile information for MPEG4.
|
||||
Applicable to the MPEG4 encoder.
|
||||
@ -1820,9 +1820,9 @@ Applicable to the encoder.
|
||||
</row>
|
||||
|
||||
<row><entry></entry></row>
|
||||
<row>
|
||||
<row id="v4l2-mpeg-video-multi-slice-mode">
|
||||
<entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE</constant> </entry>
|
||||
<entry>enum v4l2_mpeg_multi_slice_mode</entry>
|
||||
<entry>enum v4l2_mpeg_video_multi_slice_mode</entry>
|
||||
</row>
|
||||
<row><entry spanname="descr">Determines how the encoder should handle division of frame into slices.
|
||||
Applicable to the encoder.
|
||||
@ -1868,9 +1868,9 @@ Applicable to the encoder.</entry>
|
||||
</row>
|
||||
|
||||
<row><entry></entry></row>
|
||||
<row>
|
||||
<row id="v4l2-mpeg-video-h264-loop-filter-mode">
|
||||
<entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE</constant> </entry>
|
||||
<entry>enum v4l2_mpeg_h264_loop_filter_mode</entry>
|
||||
<entry>enum v4l2_mpeg_video_h264_loop_filter_mode</entry>
|
||||
</row>
|
||||
<row><entry spanname="descr">Loop filter mode for H264 encoder.
|
||||
Possible values are:</entry>
|
||||
@ -1913,9 +1913,9 @@ Applicable to the H264 encoder.</entry>
|
||||
</row>
|
||||
|
||||
<row><entry></entry></row>
|
||||
<row>
|
||||
<row id="v4l2-mpeg-video-h264-entropy-mode">
|
||||
<entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE</constant> </entry>
|
||||
<entry>enum v4l2_mpeg_h264_symbol_mode</entry>
|
||||
<entry>enum v4l2_mpeg_video_h264_entropy_mode</entry>
|
||||
</row>
|
||||
<row><entry spanname="descr">Entropy coding mode for H264 - CABAC/CAVALC.
|
||||
Applicable to the H264 encoder.
|
||||
@ -2140,9 +2140,9 @@ previous frames. Applicable to the H264 encoder.</entry>
|
||||
</row>
|
||||
|
||||
<row><entry></entry></row>
|
||||
<row>
|
||||
<row id="v4l2-mpeg-video-header-mode">
|
||||
<entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_HEADER_MODE</constant> </entry>
|
||||
<entry>enum v4l2_mpeg_header_mode</entry>
|
||||
<entry>enum v4l2_mpeg_video_header_mode</entry>
|
||||
</row>
|
||||
<row><entry spanname="descr">Determines whether the header is returned as the first buffer or is
|
||||
it returned together with the first frame. Applicable to encoders.
|
||||
@ -2320,9 +2320,9 @@ Valid only when H.264 and macroblock level RC is enabled (<constant>V4L2_CID_MPE
|
||||
Applicable to the H264 encoder.</entry>
|
||||
</row>
|
||||
<row><entry></entry></row>
|
||||
<row>
|
||||
<row id="v4l2-mpeg-mfc51-video-frame-skip-mode">
|
||||
<entry spanname="id"><constant>V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE</constant> </entry>
|
||||
<entry>enum v4l2_mpeg_mfc51_frame_skip_mode</entry>
|
||||
<entry>enum v4l2_mpeg_mfc51_video_frame_skip_mode</entry>
|
||||
</row>
|
||||
<row><entry spanname="descr">
|
||||
Indicates in what conditions the encoder should skip frames. If encoding a frame would cause the encoded stream to be larger then
|
||||
@ -2361,9 +2361,9 @@ the stream will meet tight bandwidth contraints. Applicable to encoders.
|
||||
</entry>
|
||||
</row>
|
||||
<row><entry></entry></row>
|
||||
<row>
|
||||
<row id="v4l2-mpeg-mfc51-video-force-frame-type">
|
||||
<entry spanname="id"><constant>V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE</constant> </entry>
|
||||
<entry>enum v4l2_mpeg_mfc51_force_frame_type</entry>
|
||||
<entry>enum v4l2_mpeg_mfc51_video_force_frame_type</entry>
|
||||
</row>
|
||||
<row><entry spanname="descr">Force a frame type for the next queued buffer. Applicable to encoders.
|
||||
Possible values are:</entry>
|
||||
|
@ -380,7 +380,7 @@ will be charged as a new owner of it.
|
||||
|
||||
5.2 stat file
|
||||
|
||||
5.2.1 memory.stat file includes following statistics
|
||||
memory.stat file includes following statistics
|
||||
|
||||
# per-memory cgroup local status
|
||||
cache - # of bytes of page cache memory.
|
||||
@ -438,89 +438,6 @@ Note:
|
||||
file_mapped is accounted only when the memory cgroup is owner of page
|
||||
cache.)
|
||||
|
||||
5.2.2 memory.vmscan_stat
|
||||
|
||||
memory.vmscan_stat includes statistics information for memory scanning and
|
||||
freeing, reclaiming. The statistics shows memory scanning information since
|
||||
memory cgroup creation and can be reset to 0 by writing 0 as
|
||||
|
||||
#echo 0 > ../memory.vmscan_stat
|
||||
|
||||
This file contains following statistics.
|
||||
|
||||
[param]_[file_or_anon]_pages_by_[reason]_[under_heararchy]
|
||||
[param]_elapsed_ns_by_[reason]_[under_hierarchy]
|
||||
|
||||
For example,
|
||||
|
||||
scanned_file_pages_by_limit indicates the number of scanned
|
||||
file pages at vmscan.
|
||||
|
||||
Now, 3 parameters are supported
|
||||
|
||||
scanned - the number of pages scanned by vmscan
|
||||
rotated - the number of pages activated at vmscan
|
||||
freed - the number of pages freed by vmscan
|
||||
|
||||
If "rotated" is high against scanned/freed, the memcg seems busy.
|
||||
|
||||
Now, 2 reason are supported
|
||||
|
||||
limit - the memory cgroup's limit
|
||||
system - global memory pressure + softlimit
|
||||
(global memory pressure not under softlimit is not handled now)
|
||||
|
||||
When under_hierarchy is added in the tail, the number indicates the
|
||||
total memcg scan of its children and itself.
|
||||
|
||||
elapsed_ns is a elapsed time in nanosecond. This may include sleep time
|
||||
and not indicates CPU usage. So, please take this as just showing
|
||||
latency.
|
||||
|
||||
Here is an example.
|
||||
|
||||
# cat /cgroup/memory/A/memory.vmscan_stat
|
||||
scanned_pages_by_limit 9471864
|
||||
scanned_anon_pages_by_limit 6640629
|
||||
scanned_file_pages_by_limit 2831235
|
||||
rotated_pages_by_limit 4243974
|
||||
rotated_anon_pages_by_limit 3971968
|
||||
rotated_file_pages_by_limit 272006
|
||||
freed_pages_by_limit 2318492
|
||||
freed_anon_pages_by_limit 962052
|
||||
freed_file_pages_by_limit 1356440
|
||||
elapsed_ns_by_limit 351386416101
|
||||
scanned_pages_by_system 0
|
||||
scanned_anon_pages_by_system 0
|
||||
scanned_file_pages_by_system 0
|
||||
rotated_pages_by_system 0
|
||||
rotated_anon_pages_by_system 0
|
||||
rotated_file_pages_by_system 0
|
||||
freed_pages_by_system 0
|
||||
freed_anon_pages_by_system 0
|
||||
freed_file_pages_by_system 0
|
||||
elapsed_ns_by_system 0
|
||||
scanned_pages_by_limit_under_hierarchy 9471864
|
||||
scanned_anon_pages_by_limit_under_hierarchy 6640629
|
||||
scanned_file_pages_by_limit_under_hierarchy 2831235
|
||||
rotated_pages_by_limit_under_hierarchy 4243974
|
||||
rotated_anon_pages_by_limit_under_hierarchy 3971968
|
||||
rotated_file_pages_by_limit_under_hierarchy 272006
|
||||
freed_pages_by_limit_under_hierarchy 2318492
|
||||
freed_anon_pages_by_limit_under_hierarchy 962052
|
||||
freed_file_pages_by_limit_under_hierarchy 1356440
|
||||
elapsed_ns_by_limit_under_hierarchy 351386416101
|
||||
scanned_pages_by_system_under_hierarchy 0
|
||||
scanned_anon_pages_by_system_under_hierarchy 0
|
||||
scanned_file_pages_by_system_under_hierarchy 0
|
||||
rotated_pages_by_system_under_hierarchy 0
|
||||
rotated_anon_pages_by_system_under_hierarchy 0
|
||||
rotated_file_pages_by_system_under_hierarchy 0
|
||||
freed_pages_by_system_under_hierarchy 0
|
||||
freed_anon_pages_by_system_under_hierarchy 0
|
||||
freed_file_pages_by_system_under_hierarchy 0
|
||||
elapsed_ns_by_system_under_hierarchy 0
|
||||
|
||||
5.3 swappiness
|
||||
|
||||
Similar to /proc/sys/vm/swappiness, but affecting a hierarchy of groups only.
|
||||
|
@ -592,3 +592,11 @@ Why: In 3.0, we can now autodetect internal 3G device and already have
|
||||
interface that was used by acer-wmi driver. It will replaced by
|
||||
information log when acer-wmi initial.
|
||||
Who: Lee, Chun-Yi <jlee@novell.com>
|
||||
|
||||
----------------------------
|
||||
What: The XFS nodelaylog mount option
|
||||
When: 3.3
|
||||
Why: The delaylog mode that has been the default since 2.6.39 has proven
|
||||
stable, and the old code is in the way of additional improvements in
|
||||
the log code.
|
||||
Who: Christoph Hellwig <hch@lst.de>
|
||||
|
@ -62,6 +62,13 @@ can be safely used to identify the chip. You will have to instantiate
|
||||
the devices explicitly. Please see Documentation/i2c/instantiating-devices for
|
||||
details.
|
||||
|
||||
WARNING: Do not access chip registers using the i2cdump command, and do not use
|
||||
any of the i2ctools commands on a command register (0xa5 to 0xac). The chips
|
||||
supported by this driver interpret any access to a command register (including
|
||||
read commands) as request to execute the command in question. This may result in
|
||||
power loss, board resets, and/or Flash corruption. Worst case, your board may
|
||||
turn into a brick.
|
||||
|
||||
|
||||
Sysfs entries
|
||||
-------------
|
||||
|
@ -319,4 +319,6 @@ Code Seq#(hex) Include File Comments
|
||||
<mailto:thomas@winischhofer.net>
|
||||
0xF4 00-1F video/mbxfb.h mbxfb
|
||||
<mailto:raph@8d.com>
|
||||
0xF6 all LTTng Linux Trace Toolkit Next Generation
|
||||
<mailto:mathieu.desnoyers@efficios.com>
|
||||
0xFD all linux/dm-ioctl.h
|
||||
|
@ -2086,9 +2086,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
|
||||
Override pmtimer IOPort with a hex value.
|
||||
e.g. pmtmr=0x508
|
||||
|
||||
pnp.debug [PNP]
|
||||
Enable PNP debug messages. This depends on the
|
||||
CONFIG_PNP_DEBUG_MESSAGES option.
|
||||
pnp.debug=1 [PNP]
|
||||
Enable PNP debug messages (depends on the
|
||||
CONFIG_PNP_DEBUG_MESSAGES option). Change at run-time
|
||||
via /sys/module/pnp/parameters/debug. We always show
|
||||
current resource usage; turning this on also shows
|
||||
possible settings and some assignment information.
|
||||
|
||||
pnpacpi= [ACPI]
|
||||
{ off }
|
||||
|
@ -1,3 +1,5 @@
|
||||
Note: This driver doesn't have a maintainer.
|
||||
|
||||
Davicom DM9102(A)/DM9132/DM9801 fast ethernet driver for Linux.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
@ -55,7 +57,6 @@ Test and make sure PCI latency is now correct for all cases.
|
||||
Authors:
|
||||
|
||||
Sten Wang <sten_wang@davicom.com.tw > : Original Author
|
||||
Tobias Ringstrom <tori@unhappy.mine.nu> : Current Maintainer
|
||||
|
||||
Contributors:
|
||||
|
||||
|
23
MAINTAINERS
23
MAINTAINERS
@ -1278,7 +1278,6 @@ F: drivers/input/misc/ati_remote2.c
|
||||
ATLX ETHERNET DRIVERS
|
||||
M: Jay Cliburn <jcliburn@gmail.com>
|
||||
M: Chris Snook <chris.snook@gmail.com>
|
||||
M: Jie Yang <jie.yang@atheros.com>
|
||||
L: netdev@vger.kernel.org
|
||||
W: http://sourceforge.net/projects/atl1
|
||||
W: http://atl1.sourceforge.net
|
||||
@ -1574,7 +1573,6 @@ F: drivers/scsi/bfa/
|
||||
|
||||
BROCADE BNA 10 GIGABIT ETHERNET DRIVER
|
||||
M: Rasesh Mody <rmody@brocade.com>
|
||||
M: Debashis Dutt <ddutt@brocade.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
F: drivers/net/bna/
|
||||
@ -1758,7 +1756,6 @@ F: Documentation/zh_CN/
|
||||
|
||||
CISCO VIC ETHERNET NIC DRIVER
|
||||
M: Christian Benvenuti <benve@cisco.com>
|
||||
M: Vasanthy Kolluri <vkolluri@cisco.com>
|
||||
M: Roopa Prabhu <roprabhu@cisco.com>
|
||||
M: David Wang <dwang2@cisco.com>
|
||||
S: Supported
|
||||
@ -3262,6 +3259,17 @@ F: Documentation/input/multi-touch-protocol.txt
|
||||
F: drivers/input/input-mt.c
|
||||
K: \b(ABS|SYN)_MT_
|
||||
|
||||
INTEL C600 SERIES SAS CONTROLLER DRIVER
|
||||
M: Intel SCU Linux support <intel-linux-scu@intel.com>
|
||||
M: Dan Williams <dan.j.williams@intel.com>
|
||||
M: Dave Jiang <dave.jiang@intel.com>
|
||||
M: Ed Nadolski <edmund.nadolski@intel.com>
|
||||
L: linux-scsi@vger.kernel.org
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/djbw/isci.git
|
||||
S: Maintained
|
||||
F: drivers/scsi/isci/
|
||||
F: firmware/isci/
|
||||
|
||||
INTEL IDLE DRIVER
|
||||
M: Len Brown <lenb@kernel.org>
|
||||
L: linux-pm@lists.linux-foundation.org
|
||||
@ -4404,7 +4412,8 @@ L: netfilter@vger.kernel.org
|
||||
L: coreteam@netfilter.org
|
||||
W: http://www.netfilter.org/
|
||||
W: http://www.iptables.org/
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-2.6.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next-2.6.git
|
||||
S: Supported
|
||||
F: include/linux/netfilter*
|
||||
F: include/linux/netfilter/
|
||||
@ -4774,7 +4783,7 @@ F: drivers/net/wireless/orinoco/
|
||||
|
||||
OSD LIBRARY and FILESYSTEM
|
||||
M: Boaz Harrosh <bharrosh@panasas.com>
|
||||
M: Benny Halevy <bhalevy@panasas.com>
|
||||
M: Benny Halevy <bhalevy@tonian.com>
|
||||
L: osd-dev@open-osd.org
|
||||
W: http://open-osd.org
|
||||
T: git git://git.open-osd.org/open-osd.git
|
||||
@ -7200,6 +7209,9 @@ W: http://opensource.wolfsonmicro.com/content/linux-drivers-wolfson-devices
|
||||
S: Supported
|
||||
F: Documentation/hwmon/wm83??
|
||||
F: drivers/leds/leds-wm83*.c
|
||||
F: drivers/input/misc/wm831x-on.c
|
||||
F: drivers/input/touchscreen/wm831x-ts.c
|
||||
F: drivers/input/touchscreen/wm97*.c
|
||||
F: drivers/mfd/wm8*.c
|
||||
F: drivers/power/wm83*.c
|
||||
F: drivers/rtc/rtc-wm83*.c
|
||||
@ -7209,6 +7221,7 @@ F: drivers/watchdog/wm83*_wdt.c
|
||||
F: include/linux/mfd/wm831x/
|
||||
F: include/linux/mfd/wm8350/
|
||||
F: include/linux/mfd/wm8400*
|
||||
F: include/linux/wm97xx.h
|
||||
F: include/sound/wm????.h
|
||||
F: sound/soc/codecs/wm*
|
||||
|
||||
|
2
Makefile
2
Makefile
@ -1,7 +1,7 @@
|
||||
VERSION = 3
|
||||
PATCHLEVEL = 1
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc4
|
||||
EXTRAVERSION = -rc6
|
||||
NAME = "Divemaster Edition"
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
@ -51,7 +51,7 @@ config GENERIC_CMOS_UPDATE
|
||||
def_bool y
|
||||
|
||||
config GENERIC_GPIO
|
||||
def_bool y
|
||||
bool
|
||||
|
||||
config ZONE_DMA
|
||||
bool
|
||||
|
@ -45,8 +45,13 @@
|
||||
#define L2X0_CLEAN_INV_LINE_PA 0x7F0
|
||||
#define L2X0_CLEAN_INV_LINE_IDX 0x7F8
|
||||
#define L2X0_CLEAN_INV_WAY 0x7FC
|
||||
#define L2X0_LOCKDOWN_WAY_D 0x900
|
||||
#define L2X0_LOCKDOWN_WAY_I 0x904
|
||||
/*
|
||||
* The lockdown registers repeat 8 times for L310, the L210 has only one
|
||||
* D and one I lockdown register at 0x0900 and 0x0904.
|
||||
*/
|
||||
#define L2X0_LOCKDOWN_WAY_D_BASE 0x900
|
||||
#define L2X0_LOCKDOWN_WAY_I_BASE 0x904
|
||||
#define L2X0_LOCKDOWN_STRIDE 0x08
|
||||
#define L2X0_TEST_OPERATION 0xF00
|
||||
#define L2X0_LINE_DATA 0xF10
|
||||
#define L2X0_LINE_TAG 0xF30
|
||||
|
@ -8,7 +8,6 @@
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <asm/hardware/entry-macro-gic.S>
|
||||
|
||||
.macro disable_fiq
|
||||
|
@ -13,7 +13,6 @@
|
||||
|
||||
#include <linux/io.h>
|
||||
#include <asm/proc-fns.h>
|
||||
#include <mach/hardware.h>
|
||||
|
||||
static inline void arch_idle(void)
|
||||
{
|
||||
|
@ -8,7 +8,6 @@
|
||||
*/
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/cns3xxx.h>
|
||||
|
||||
#define AMBA_UART_DR(base) (*(volatile unsigned char *)((base) + 0x00))
|
||||
|
@ -49,7 +49,7 @@ static struct cns3xxx_pcie *sysdata_to_cnspci(void *sysdata)
|
||||
return &cns3xxx_pcie[root->domain];
|
||||
}
|
||||
|
||||
static struct cns3xxx_pcie *pdev_to_cnspci(struct pci_dev *dev)
|
||||
static struct cns3xxx_pcie *pdev_to_cnspci(const struct pci_dev *dev)
|
||||
{
|
||||
return sysdata_to_cnspci(dev->sysdata);
|
||||
}
|
||||
|
@ -115,6 +115,32 @@ static struct spi_board_info da850evm_spi_info[] = {
|
||||
},
|
||||
};
|
||||
|
||||
#ifdef CONFIG_MTD
|
||||
static void da850_evm_m25p80_notify_add(struct mtd_info *mtd)
|
||||
{
|
||||
char *mac_addr = davinci_soc_info.emac_pdata->mac_addr;
|
||||
size_t retlen;
|
||||
|
||||
if (!strcmp(mtd->name, "MAC-Address")) {
|
||||
mtd->read(mtd, 0, ETH_ALEN, &retlen, mac_addr);
|
||||
if (retlen == ETH_ALEN)
|
||||
pr_info("Read MAC addr from SPI Flash: %pM\n",
|
||||
mac_addr);
|
||||
}
|
||||
}
|
||||
|
||||
static struct mtd_notifier da850evm_spi_notifier = {
|
||||
.add = da850_evm_m25p80_notify_add,
|
||||
};
|
||||
|
||||
static void da850_evm_setup_mac_addr(void)
|
||||
{
|
||||
register_mtd_user(&da850evm_spi_notifier);
|
||||
}
|
||||
#else
|
||||
static void da850_evm_setup_mac_addr(void) { }
|
||||
#endif
|
||||
|
||||
static struct mtd_partition da850_evm_norflash_partition[] = {
|
||||
{
|
||||
.name = "bootloaders + env",
|
||||
@ -1244,6 +1270,8 @@ static __init void da850_evm_init(void)
|
||||
if (ret)
|
||||
pr_warning("da850_evm_init: sata registration failed: %d\n",
|
||||
ret);
|
||||
|
||||
da850_evm_setup_mac_addr();
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SERIAL_8250_CONSOLE
|
||||
|
@ -243,7 +243,7 @@
|
||||
#define PSC_STATE_DISABLE 2
|
||||
#define PSC_STATE_ENABLE 3
|
||||
|
||||
#define MDSTAT_STATE_MASK 0x1f
|
||||
#define MDSTAT_STATE_MASK 0x3f
|
||||
#define MDCTL_FORCE BIT(31)
|
||||
|
||||
#ifndef __ASSEMBLER__
|
||||
|
@ -217,7 +217,11 @@ ddr2clk_stop_done:
|
||||
ENDPROC(davinci_ddr_psc_config)
|
||||
|
||||
CACHE_FLUSH:
|
||||
.word arm926_flush_kern_cache_all
|
||||
#ifdef CONFIG_CPU_V6
|
||||
.word v6_flush_kern_cache_all
|
||||
#else
|
||||
.word arm926_flush_kern_cache_all
|
||||
#endif
|
||||
|
||||
ENTRY(davinci_cpu_suspend_sz)
|
||||
.word . - davinci_cpu_suspend
|
||||
|
@ -337,15 +337,15 @@ static unsigned long timer_reload;
|
||||
static void integrator_clocksource_init(u32 khz)
|
||||
{
|
||||
void __iomem *base = (void __iomem *)TIMER2_VA_BASE;
|
||||
u32 ctrl = TIMER_CTRL_ENABLE;
|
||||
u32 ctrl = TIMER_CTRL_ENABLE | TIMER_CTRL_PERIODIC;
|
||||
|
||||
if (khz >= 1500) {
|
||||
khz /= 16;
|
||||
ctrl = TIMER_CTRL_DIV16;
|
||||
ctrl |= TIMER_CTRL_DIV16;
|
||||
}
|
||||
|
||||
writel(ctrl, base + TIMER_CTRL);
|
||||
writel(0xffff, base + TIMER_LOAD);
|
||||
writel(ctrl, base + TIMER_CTRL);
|
||||
|
||||
clocksource_mmio_init(base + TIMER_VALUE, "timer2",
|
||||
khz * 1000, 200, 16, clocksource_mmio_readl_down);
|
||||
|
@ -3078,6 +3078,7 @@ static struct clk gpt12_fck = {
|
||||
.name = "gpt12_fck",
|
||||
.ops = &clkops_null,
|
||||
.parent = &secure_32k_fck,
|
||||
.clkdm_name = "wkup_clkdm",
|
||||
.recalc = &followparent_recalc,
|
||||
};
|
||||
|
||||
@ -3085,6 +3086,7 @@ static struct clk wdt1_fck = {
|
||||
.name = "wdt1_fck",
|
||||
.ops = &clkops_null,
|
||||
.parent = &secure_32k_fck,
|
||||
.clkdm_name = "wkup_clkdm",
|
||||
.recalc = &followparent_recalc,
|
||||
};
|
||||
|
||||
|
@ -3376,10 +3376,18 @@ int __init omap4xxx_clk_init(void)
|
||||
} else if (cpu_is_omap446x()) {
|
||||
cpu_mask = RATE_IN_4460;
|
||||
cpu_clkflg = CK_446X;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
clk_init(&omap2_clk_functions);
|
||||
omap2_clk_disable_clkdm_control();
|
||||
|
||||
/*
|
||||
* Must stay commented until all OMAP SoC drivers are
|
||||
* converted to runtime PM, or drivers may start crashing
|
||||
*
|
||||
* omap2_clk_disable_clkdm_control();
|
||||
*/
|
||||
|
||||
for (c = omap44xx_clks; c < omap44xx_clks + ARRAY_SIZE(omap44xx_clks);
|
||||
c++)
|
||||
|
@ -747,6 +747,7 @@ int clkdm_wakeup(struct clockdomain *clkdm)
|
||||
spin_lock_irqsave(&clkdm->lock, flags);
|
||||
clkdm->_flags &= ~_CLKDM_FLAG_HWSUP_ENABLED;
|
||||
ret = arch_clkdm->clkdm_wakeup(clkdm);
|
||||
ret |= pwrdm_state_switch(clkdm->pwrdm.ptr);
|
||||
spin_unlock_irqrestore(&clkdm->lock, flags);
|
||||
return ret;
|
||||
}
|
||||
@ -818,6 +819,7 @@ void clkdm_deny_idle(struct clockdomain *clkdm)
|
||||
spin_lock_irqsave(&clkdm->lock, flags);
|
||||
clkdm->_flags &= ~_CLKDM_FLAG_HWSUP_ENABLED;
|
||||
arch_clkdm->clkdm_deny_idle(clkdm);
|
||||
pwrdm_state_switch(clkdm->pwrdm.ptr);
|
||||
spin_unlock_irqrestore(&clkdm->lock, flags);
|
||||
}
|
||||
|
||||
|
@ -192,6 +192,7 @@ static struct omap_hwmod_addr_space omap2430_usbhsotg_addrs[] = {
|
||||
.pa_end = OMAP243X_HS_BASE + SZ_4K - 1,
|
||||
.flags = ADDR_TYPE_RT
|
||||
},
|
||||
{ }
|
||||
};
|
||||
|
||||
/* l4_core ->usbhsotg interface */
|
||||
|
@ -130,7 +130,6 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state)
|
||||
} else {
|
||||
hwsup = clkdm_in_hwsup(pwrdm->pwrdm_clkdms[0]);
|
||||
clkdm_wakeup(pwrdm->pwrdm_clkdms[0]);
|
||||
pwrdm_wait_transition(pwrdm);
|
||||
sleep_switch = FORCEWAKEUP_SWITCH;
|
||||
}
|
||||
}
|
||||
@ -156,7 +155,6 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state)
|
||||
return ret;
|
||||
}
|
||||
|
||||
pwrdm_wait_transition(pwrdm);
|
||||
pwrdm_state_switch(pwrdm);
|
||||
err:
|
||||
return ret;
|
||||
|
@ -195,28 +195,35 @@ static int _pwrdm_post_transition_cb(struct powerdomain *pwrdm, void *unused)
|
||||
|
||||
/**
|
||||
* pwrdm_init - set up the powerdomain layer
|
||||
* @pwrdm_list: array of struct powerdomain pointers to register
|
||||
* @pwrdms: array of struct powerdomain pointers to register
|
||||
* @custom_funcs: func pointers for arch specific implementations
|
||||
*
|
||||
* Loop through the array of powerdomains @pwrdm_list, registering all
|
||||
* that are available on the current CPU. If pwrdm_list is supplied
|
||||
* and not null, all of the referenced powerdomains will be
|
||||
* registered. No return value. XXX pwrdm_list is not really a
|
||||
* "list"; it is an array. Rename appropriately.
|
||||
* Loop through the array of powerdomains @pwrdms, registering all
|
||||
* that are available on the current CPU. Also, program all
|
||||
* powerdomain target state as ON; this is to prevent domains from
|
||||
* hitting low power states (if bootloader has target states set to
|
||||
* something other than ON) and potentially even losing context while
|
||||
* PM is not fully initialized. The PM late init code can then program
|
||||
* the desired target state for all the power domains. No return
|
||||
* value.
|
||||
*/
|
||||
void pwrdm_init(struct powerdomain **pwrdm_list, struct pwrdm_ops *custom_funcs)
|
||||
void pwrdm_init(struct powerdomain **pwrdms, struct pwrdm_ops *custom_funcs)
|
||||
{
|
||||
struct powerdomain **p = NULL;
|
||||
struct powerdomain *temp_p;
|
||||
|
||||
if (!custom_funcs)
|
||||
WARN(1, "powerdomain: No custom pwrdm functions registered\n");
|
||||
else
|
||||
arch_pwrdm = custom_funcs;
|
||||
|
||||
if (pwrdm_list) {
|
||||
for (p = pwrdm_list; *p; p++)
|
||||
if (pwrdms) {
|
||||
for (p = pwrdms; *p; p++)
|
||||
_pwrdm_register(*p);
|
||||
}
|
||||
|
||||
list_for_each_entry(temp_p, &pwrdm_list, node)
|
||||
pwrdm_set_next_pwrst(temp_p, PWRDM_POWER_ON);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -481,6 +481,7 @@ static void __init sirfsoc_clk_init(void)
|
||||
|
||||
static struct of_device_id clkc_ids[] = {
|
||||
{ .compatible = "sirf,prima2-clkc" },
|
||||
{},
|
||||
};
|
||||
|
||||
void __init sirfsoc_of_clk_init(void)
|
||||
|
@ -51,6 +51,7 @@ static __init void sirfsoc_irq_init(void)
|
||||
|
||||
static struct of_device_id intc_ids[] = {
|
||||
{ .compatible = "sirf,prima2-intc" },
|
||||
{},
|
||||
};
|
||||
|
||||
void __init sirfsoc_of_irq_init(void)
|
||||
|
@ -19,6 +19,7 @@ static DEFINE_MUTEX(rstc_lock);
|
||||
|
||||
static struct of_device_id rstc_ids[] = {
|
||||
{ .compatible = "sirf,prima2-rstc" },
|
||||
{},
|
||||
};
|
||||
|
||||
static int __init sirfsoc_of_rstc_init(void)
|
||||
|
@ -190,6 +190,7 @@ static void __init sirfsoc_timer_init(void)
|
||||
|
||||
static struct of_device_id timer_ids[] = {
|
||||
{ .compatible = "sirf,prima2-tick" },
|
||||
{},
|
||||
};
|
||||
|
||||
static void __init sirfsoc_of_timer_map(void)
|
||||
|
@ -17,7 +17,7 @@
|
||||
cmp \tmp, # 0x5600 @ Is it ldrsb?
|
||||
orreq \tmp, \tmp, #1 << 11 @ Set L-bit if yes
|
||||
tst \tmp, #1 << 11 @ L = 0 -> write
|
||||
orreq \psr, \psr, #1 << 11 @ yes.
|
||||
orreq \fsr, \fsr, #1 << 11 @ yes.
|
||||
b do_DataAbort
|
||||
not_thumb:
|
||||
.endm
|
||||
|
@ -277,6 +277,25 @@ static void l2x0_disable(void)
|
||||
spin_unlock_irqrestore(&l2x0_lock, flags);
|
||||
}
|
||||
|
||||
static void __init l2x0_unlock(__u32 cache_id)
|
||||
{
|
||||
int lockregs;
|
||||
int i;
|
||||
|
||||
if (cache_id == L2X0_CACHE_ID_PART_L310)
|
||||
lockregs = 8;
|
||||
else
|
||||
/* L210 and unknown types */
|
||||
lockregs = 1;
|
||||
|
||||
for (i = 0; i < lockregs; i++) {
|
||||
writel_relaxed(0x0, l2x0_base + L2X0_LOCKDOWN_WAY_D_BASE +
|
||||
i * L2X0_LOCKDOWN_STRIDE);
|
||||
writel_relaxed(0x0, l2x0_base + L2X0_LOCKDOWN_WAY_I_BASE +
|
||||
i * L2X0_LOCKDOWN_STRIDE);
|
||||
}
|
||||
}
|
||||
|
||||
void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask)
|
||||
{
|
||||
__u32 aux;
|
||||
@ -328,6 +347,8 @@ void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask)
|
||||
* accessing the below registers will fault.
|
||||
*/
|
||||
if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & 1)) {
|
||||
/* Make sure that I&D is not locked down when starting */
|
||||
l2x0_unlock(cache_id);
|
||||
|
||||
/* l2x0 controller is disabled */
|
||||
writel_relaxed(aux, l2x0_base + L2X0_AUX_CTRL);
|
||||
|
@ -298,7 +298,7 @@ static void __init arm_bootmem_free(unsigned long min, unsigned long max_low,
|
||||
#ifdef CONFIG_HAVE_ARCH_PFN_VALID
|
||||
int pfn_valid(unsigned long pfn)
|
||||
{
|
||||
return memblock_is_memory(pfn << PAGE_SHIFT);
|
||||
return memblock_is_memory(__pfn_to_phys(pfn));
|
||||
}
|
||||
EXPORT_SYMBOL(pfn_valid);
|
||||
#endif
|
||||
|
@ -615,6 +615,9 @@ static int _od_resume_noirq(struct device *dev)
|
||||
|
||||
return pm_generic_resume_noirq(dev);
|
||||
}
|
||||
#else
|
||||
#define _od_suspend_noirq NULL
|
||||
#define _od_resume_noirq NULL
|
||||
#endif
|
||||
|
||||
static struct dev_pm_domain omap_device_pm_domain = {
|
||||
|
@ -31,7 +31,6 @@
|
||||
|
||||
#define DMA_ERROR_CODE (~(dma_addr_t)0x0)
|
||||
|
||||
int dma_mapping_error(struct device *dev, dma_addr_t dma_addr);
|
||||
|
||||
#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
|
||||
#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
|
||||
@ -47,6 +46,12 @@ dma_addr_t or1k_map_page(struct device *dev, struct page *page,
|
||||
void or1k_unmap_page(struct device *dev, dma_addr_t dma_handle,
|
||||
size_t size, enum dma_data_direction dir,
|
||||
struct dma_attrs *attrs);
|
||||
int or1k_map_sg(struct device *dev, struct scatterlist *sg,
|
||||
int nents, enum dma_data_direction dir,
|
||||
struct dma_attrs *attrs);
|
||||
void or1k_unmap_sg(struct device *dev, struct scatterlist *sg,
|
||||
int nents, enum dma_data_direction dir,
|
||||
struct dma_attrs *attrs);
|
||||
void or1k_sync_single_for_cpu(struct device *dev,
|
||||
dma_addr_t dma_handle, size_t size,
|
||||
enum dma_data_direction dir);
|
||||
@ -98,6 +103,51 @@ static inline void dma_unmap_single(struct device *dev, dma_addr_t addr,
|
||||
debug_dma_unmap_page(dev, addr, size, dir, true);
|
||||
}
|
||||
|
||||
static inline int dma_map_sg(struct device *dev, struct scatterlist *sg,
|
||||
int nents, enum dma_data_direction dir)
|
||||
{
|
||||
int i, ents;
|
||||
struct scatterlist *s;
|
||||
|
||||
for_each_sg(sg, s, nents, i)
|
||||
kmemcheck_mark_initialized(sg_virt(s), s->length);
|
||||
BUG_ON(!valid_dma_direction(dir));
|
||||
ents = or1k_map_sg(dev, sg, nents, dir, NULL);
|
||||
debug_dma_map_sg(dev, sg, nents, ents, dir);
|
||||
|
||||
return ents;
|
||||
}
|
||||
|
||||
static inline void dma_unmap_sg(struct device *dev, struct scatterlist *sg,
|
||||
int nents, enum dma_data_direction dir)
|
||||
{
|
||||
BUG_ON(!valid_dma_direction(dir));
|
||||
debug_dma_unmap_sg(dev, sg, nents, dir);
|
||||
or1k_unmap_sg(dev, sg, nents, dir, NULL);
|
||||
}
|
||||
|
||||
static inline dma_addr_t dma_map_page(struct device *dev, struct page *page,
|
||||
size_t offset, size_t size,
|
||||
enum dma_data_direction dir)
|
||||
{
|
||||
dma_addr_t addr;
|
||||
|
||||
kmemcheck_mark_initialized(page_address(page) + offset, size);
|
||||
BUG_ON(!valid_dma_direction(dir));
|
||||
addr = or1k_map_page(dev, page, offset, size, dir, NULL);
|
||||
debug_dma_map_page(dev, page, offset, size, dir, addr, false);
|
||||
|
||||
return addr;
|
||||
}
|
||||
|
||||
static inline void dma_unmap_page(struct device *dev, dma_addr_t addr,
|
||||
size_t size, enum dma_data_direction dir)
|
||||
{
|
||||
BUG_ON(!valid_dma_direction(dir));
|
||||
or1k_unmap_page(dev, addr, size, dir, NULL);
|
||||
debug_dma_unmap_page(dev, addr, size, dir, true);
|
||||
}
|
||||
|
||||
static inline void dma_sync_single_for_cpu(struct device *dev, dma_addr_t addr,
|
||||
size_t size,
|
||||
enum dma_data_direction dir)
|
||||
@ -119,7 +169,12 @@ static inline void dma_sync_single_for_device(struct device *dev,
|
||||
static inline int dma_supported(struct device *dev, u64 dma_mask)
|
||||
{
|
||||
/* Support 32 bit DMA mask exclusively */
|
||||
return dma_mask == 0xffffffffULL;
|
||||
return dma_mask == DMA_BIT_MASK(32);
|
||||
}
|
||||
|
||||
static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int dma_set_mask(struct device *dev, u64 dma_mask)
|
||||
|
@ -23,16 +23,11 @@
|
||||
|
||||
/* This struct is saved by setup_frame in signal.c, to keep the current
|
||||
context while a signal handler is executed. It's restored by sys_sigreturn.
|
||||
|
||||
To keep things simple, we use pt_regs here even though normally you just
|
||||
specify the list of regs to save. Then we can use copy_from_user on the
|
||||
entire regs instead of a bunch of get_user's as well...
|
||||
*/
|
||||
|
||||
struct sigcontext {
|
||||
struct pt_regs regs; /* needs to be first */
|
||||
struct user_regs_struct regs; /* needs to be first */
|
||||
unsigned long oldmask;
|
||||
unsigned long usp; /* usp before stacking this gunk on it */
|
||||
};
|
||||
|
||||
#endif /* __ASM_OPENRISC_SIGCONTEXT_H */
|
||||
|
@ -154,6 +154,33 @@ void or1k_unmap_page(struct device *dev, dma_addr_t dma_handle,
|
||||
/* Nothing special to do here... */
|
||||
}
|
||||
|
||||
int or1k_map_sg(struct device *dev, struct scatterlist *sg,
|
||||
int nents, enum dma_data_direction dir,
|
||||
struct dma_attrs *attrs)
|
||||
{
|
||||
struct scatterlist *s;
|
||||
int i;
|
||||
|
||||
for_each_sg(sg, s, nents, i) {
|
||||
s->dma_address = or1k_map_page(dev, sg_page(s), s->offset,
|
||||
s->length, dir, NULL);
|
||||
}
|
||||
|
||||
return nents;
|
||||
}
|
||||
|
||||
void or1k_unmap_sg(struct device *dev, struct scatterlist *sg,
|
||||
int nents, enum dma_data_direction dir,
|
||||
struct dma_attrs *attrs)
|
||||
{
|
||||
struct scatterlist *s;
|
||||
int i;
|
||||
|
||||
for_each_sg(sg, s, nents, i) {
|
||||
or1k_unmap_page(dev, sg_dma_address(s), sg_dma_len(s), dir, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void or1k_sync_single_for_cpu(struct device *dev,
|
||||
dma_addr_t dma_handle, size_t size,
|
||||
enum dma_data_direction dir)
|
||||
@ -187,5 +214,4 @@ static int __init dma_init(void)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
fs_initcall(dma_init);
|
||||
|
@ -52,31 +52,25 @@ struct rt_sigframe {
|
||||
static int restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc)
|
||||
{
|
||||
unsigned int err = 0;
|
||||
unsigned long old_usp;
|
||||
|
||||
/* Alwys make any pending restarted system call return -EINTR */
|
||||
current_thread_info()->restart_block.fn = do_no_restart_syscall;
|
||||
|
||||
/* restore the regs from &sc->regs (same as sc, since regs is first)
|
||||
/*
|
||||
* Restore the regs from &sc->regs.
|
||||
* (sc is already checked for VERIFY_READ since the sigframe was
|
||||
* checked in sys_sigreturn previously)
|
||||
*/
|
||||
|
||||
if (__copy_from_user(regs, sc, sizeof(struct pt_regs)))
|
||||
if (__copy_from_user(regs, sc->regs.gpr, 32 * sizeof(unsigned long)))
|
||||
goto badframe;
|
||||
if (__copy_from_user(®s->pc, &sc->regs.pc, sizeof(unsigned long)))
|
||||
goto badframe;
|
||||
if (__copy_from_user(®s->sr, &sc->regs.sr, sizeof(unsigned long)))
|
||||
goto badframe;
|
||||
|
||||
/* make sure the SM-bit is cleared so user-mode cannot fool us */
|
||||
regs->sr &= ~SPR_SR_SM;
|
||||
|
||||
/* restore the old USP as it was before we stacked the sc etc.
|
||||
* (we cannot just pop the sigcontext since we aligned the sp and
|
||||
* stuff after pushing it)
|
||||
*/
|
||||
|
||||
err |= __get_user(old_usp, &sc->usp);
|
||||
|
||||
regs->sp = old_usp;
|
||||
|
||||
/* 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 ?
|
||||
@ -137,18 +131,17 @@ static int setup_sigcontext(struct sigcontext *sc, struct pt_regs *regs,
|
||||
unsigned long mask)
|
||||
{
|
||||
int err = 0;
|
||||
unsigned long usp = regs->sp;
|
||||
|
||||
/* copy the regs. they are first in sc so we can use sc directly */
|
||||
/* copy the regs */
|
||||
|
||||
err |= __copy_to_user(sc, regs, sizeof(struct pt_regs));
|
||||
err |= __copy_to_user(sc->regs.gpr, regs, 32 * sizeof(unsigned long));
|
||||
err |= __copy_to_user(&sc->regs.pc, ®s->pc, sizeof(unsigned long));
|
||||
err |= __copy_to_user(&sc->regs.sr, ®s->sr, sizeof(unsigned long));
|
||||
|
||||
/* then some other stuff */
|
||||
|
||||
err |= __put_user(mask, &sc->oldmask);
|
||||
|
||||
err |= __put_user(usp, &sc->usp);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -387,7 +387,7 @@
|
||||
#size-cells = <1>;
|
||||
compatible = "cfi-flash";
|
||||
reg = <0x0 0x0 0x02000000>;
|
||||
bank-width = <1>;
|
||||
bank-width = <2>;
|
||||
device-width = <1>;
|
||||
partition@0 {
|
||||
label = "ramdisk";
|
||||
|
@ -171,3 +171,4 @@ CONFIG_CRYPTO_SHA256=y
|
||||
CONFIG_CRYPTO_SHA512=y
|
||||
CONFIG_CRYPTO_AES=y
|
||||
# CONFIG_CRYPTO_ANSI_CPRNG is not set
|
||||
CONFIG_CRYPTO_DEV_FSL_CAAM=y
|
||||
|
@ -185,3 +185,4 @@ CONFIG_CRYPTO_SHA256=y
|
||||
CONFIG_CRYPTO_SHA512=y
|
||||
CONFIG_CRYPTO_AES=y
|
||||
# CONFIG_CRYPTO_ANSI_CPRNG is not set
|
||||
CONFIG_CRYPTO_DEV_FSL_CAAM=y
|
||||
|
@ -100,5 +100,8 @@ CONFIG_DEBUG_INFO=y
|
||||
CONFIG_SYSCTL_SYSCALL_CHECK=y
|
||||
CONFIG_VIRQ_DEBUG=y
|
||||
CONFIG_CRYPTO_PCBC=m
|
||||
CONFIG_CRYPTO_SHA256=y
|
||||
CONFIG_CRYPTO_SHA512=y
|
||||
CONFIG_CRYPTO_AES=y
|
||||
# CONFIG_CRYPTO_ANSI_CPRNG is not set
|
||||
CONFIG_CRYPTO_DEV_TALITOS=y
|
||||
CONFIG_CRYPTO_DEV_FSL_CAAM=y
|
||||
|
@ -139,6 +139,7 @@ CONFIG_SND=y
|
||||
CONFIG_SND_INTEL8X0=y
|
||||
# CONFIG_SND_PPC is not set
|
||||
# CONFIG_SND_USB is not set
|
||||
CONFIG_SND_SOC=y
|
||||
CONFIG_HID_A4TECH=y
|
||||
CONFIG_HID_APPLE=y
|
||||
CONFIG_HID_BELKIN=y
|
||||
|
@ -140,6 +140,7 @@ CONFIG_SND=y
|
||||
CONFIG_SND_INTEL8X0=y
|
||||
# CONFIG_SND_PPC is not set
|
||||
# CONFIG_SND_USB is not set
|
||||
CONFIG_SND_SOC=y
|
||||
CONFIG_HID_A4TECH=y
|
||||
CONFIG_HID_APPLE=y
|
||||
CONFIG_HID_BELKIN=y
|
||||
|
@ -10,6 +10,10 @@ config CMPXCHG_LOCAL
|
||||
bool
|
||||
default n
|
||||
|
||||
config CMPXCHG_DOUBLE
|
||||
bool
|
||||
default n
|
||||
|
||||
source "arch/x86/Kconfig.cpu"
|
||||
|
||||
endmenu
|
||||
|
@ -41,7 +41,7 @@ KBUILD_CPPFLAGS += -I$(srctree)/$(ARCH_DIR)/sys-$(SUBARCH)
|
||||
KBUILD_CFLAGS += $(CFLAGS) $(CFLAGS-y) -D__arch_um__ -DSUBARCH=\"$(SUBARCH)\" \
|
||||
$(ARCH_INCLUDE) $(MODE_INCLUDE) -Dvmap=kernel_vmap \
|
||||
-Din6addr_loopback=kernel_in6addr_loopback \
|
||||
-Din6addr_any=kernel_in6addr_any
|
||||
-Din6addr_any=kernel_in6addr_any -Dstrrchr=kernel_strrchr
|
||||
|
||||
KBUILD_AFLAGS += $(ARCH_INCLUDE)
|
||||
|
||||
|
@ -399,8 +399,8 @@ int line_setup_irq(int fd, int input, int output, struct line *line, void *data)
|
||||
* is done under a spinlock. Checking whether the device is in use is
|
||||
* line->tty->count > 1, also under the spinlock.
|
||||
*
|
||||
* tty->count serves to decide whether the device should be enabled or
|
||||
* disabled on the host. If it's equal to 1, then we are doing the
|
||||
* line->count serves to decide whether the device should be enabled or
|
||||
* disabled on the host. If it's equal to 0, then we are doing the
|
||||
* first open or last close. Otherwise, open and close just return.
|
||||
*/
|
||||
|
||||
@ -414,16 +414,16 @@ int line_open(struct line *lines, struct tty_struct *tty)
|
||||
goto out_unlock;
|
||||
|
||||
err = 0;
|
||||
if (tty->count > 1)
|
||||
if (line->count++)
|
||||
goto out_unlock;
|
||||
|
||||
spin_unlock(&line->count_lock);
|
||||
|
||||
BUG_ON(tty->driver_data);
|
||||
tty->driver_data = line;
|
||||
line->tty = tty;
|
||||
|
||||
spin_unlock(&line->count_lock);
|
||||
err = enable_chan(line);
|
||||
if (err)
|
||||
if (err) /* line_close() will be called by our caller */
|
||||
return err;
|
||||
|
||||
INIT_DELAYED_WORK(&line->task, line_timer_cb);
|
||||
@ -436,7 +436,7 @@ int line_open(struct line *lines, struct tty_struct *tty)
|
||||
chan_window_size(&line->chan_list, &tty->winsize.ws_row,
|
||||
&tty->winsize.ws_col);
|
||||
|
||||
return err;
|
||||
return 0;
|
||||
|
||||
out_unlock:
|
||||
spin_unlock(&line->count_lock);
|
||||
@ -460,17 +460,16 @@ void line_close(struct tty_struct *tty, struct file * filp)
|
||||
flush_buffer(line);
|
||||
|
||||
spin_lock(&line->count_lock);
|
||||
if (!line->valid)
|
||||
goto out_unlock;
|
||||
BUG_ON(!line->valid);
|
||||
|
||||
if (tty->count > 1)
|
||||
if (--line->count)
|
||||
goto out_unlock;
|
||||
|
||||
spin_unlock(&line->count_lock);
|
||||
|
||||
line->tty = NULL;
|
||||
tty->driver_data = NULL;
|
||||
|
||||
spin_unlock(&line->count_lock);
|
||||
|
||||
if (line->sigio) {
|
||||
unregister_winch(tty);
|
||||
line->sigio = 0;
|
||||
@ -498,7 +497,7 @@ static int setup_one_line(struct line *lines, int n, char *init, int init_prio,
|
||||
|
||||
spin_lock(&line->count_lock);
|
||||
|
||||
if (line->tty != NULL) {
|
||||
if (line->count) {
|
||||
*error_out = "Device is already open";
|
||||
goto out;
|
||||
}
|
||||
@ -722,41 +721,53 @@ struct winch {
|
||||
int pid;
|
||||
struct tty_struct *tty;
|
||||
unsigned long stack;
|
||||
struct work_struct work;
|
||||
};
|
||||
|
||||
static void free_winch(struct winch *winch, int free_irq_ok)
|
||||
static void __free_winch(struct work_struct *work)
|
||||
{
|
||||
if (free_irq_ok)
|
||||
free_irq(WINCH_IRQ, winch);
|
||||
|
||||
list_del(&winch->list);
|
||||
struct winch *winch = container_of(work, struct winch, work);
|
||||
free_irq(WINCH_IRQ, winch);
|
||||
|
||||
if (winch->pid != -1)
|
||||
os_kill_process(winch->pid, 1);
|
||||
if (winch->fd != -1)
|
||||
os_close_file(winch->fd);
|
||||
if (winch->stack != 0)
|
||||
free_stack(winch->stack, 0);
|
||||
kfree(winch);
|
||||
}
|
||||
|
||||
static void free_winch(struct winch *winch)
|
||||
{
|
||||
int fd = winch->fd;
|
||||
winch->fd = -1;
|
||||
if (fd != -1)
|
||||
os_close_file(fd);
|
||||
list_del(&winch->list);
|
||||
__free_winch(&winch->work);
|
||||
}
|
||||
|
||||
static irqreturn_t winch_interrupt(int irq, void *data)
|
||||
{
|
||||
struct winch *winch = data;
|
||||
struct tty_struct *tty;
|
||||
struct line *line;
|
||||
int fd = winch->fd;
|
||||
int err;
|
||||
char c;
|
||||
|
||||
if (winch->fd != -1) {
|
||||
err = generic_read(winch->fd, &c, NULL);
|
||||
if (fd != -1) {
|
||||
err = generic_read(fd, &c, NULL);
|
||||
if (err < 0) {
|
||||
if (err != -EAGAIN) {
|
||||
winch->fd = -1;
|
||||
list_del(&winch->list);
|
||||
os_close_file(fd);
|
||||
printk(KERN_ERR "winch_interrupt : "
|
||||
"read failed, errno = %d\n", -err);
|
||||
printk(KERN_ERR "fd %d is losing SIGWINCH "
|
||||
"support\n", winch->tty_fd);
|
||||
free_winch(winch, 0);
|
||||
INIT_WORK(&winch->work, __free_winch);
|
||||
schedule_work(&winch->work);
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
goto out;
|
||||
@ -828,7 +839,7 @@ static void unregister_winch(struct tty_struct *tty)
|
||||
list_for_each_safe(ele, next, &winch_handlers) {
|
||||
winch = list_entry(ele, struct winch, list);
|
||||
if (winch->tty == tty) {
|
||||
free_winch(winch, 1);
|
||||
free_winch(winch);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -844,7 +855,7 @@ static void winch_cleanup(void)
|
||||
|
||||
list_for_each_safe(ele, next, &winch_handlers) {
|
||||
winch = list_entry(ele, struct winch, list);
|
||||
free_winch(winch, 1);
|
||||
free_winch(winch);
|
||||
}
|
||||
|
||||
spin_unlock(&winch_handler_lock);
|
||||
|
@ -123,6 +123,7 @@ static int xterm_open(int input, int output, int primary, void *d,
|
||||
err = -errno;
|
||||
printk(UM_KERN_ERR "xterm_open : unlink failed, errno = %d\n",
|
||||
errno);
|
||||
close(fd);
|
||||
return err;
|
||||
}
|
||||
close(fd);
|
||||
|
@ -42,10 +42,6 @@ extern long subarch_ptrace(struct task_struct *child, long request,
|
||||
unsigned long addr, unsigned long data);
|
||||
extern unsigned long getreg(struct task_struct *child, int regno);
|
||||
extern int putreg(struct task_struct *child, int regno, unsigned long value);
|
||||
extern int get_fpregs(struct user_i387_struct __user *buf,
|
||||
struct task_struct *child);
|
||||
extern int set_fpregs(struct user_i387_struct __user *buf,
|
||||
struct task_struct *child);
|
||||
|
||||
extern int arch_copy_tls(struct task_struct *new);
|
||||
extern void clear_flushed_tls(struct task_struct *task);
|
||||
|
@ -33,6 +33,7 @@ struct line_driver {
|
||||
struct line {
|
||||
struct tty_struct *tty;
|
||||
spinlock_t count_lock;
|
||||
unsigned long count;
|
||||
int valid;
|
||||
|
||||
char *init_str;
|
||||
|
@ -16,7 +16,7 @@ extern int restore_fpx_registers(int pid, unsigned long *fp_regs);
|
||||
extern int save_registers(int pid, struct uml_pt_regs *regs);
|
||||
extern int restore_registers(int pid, struct uml_pt_regs *regs);
|
||||
extern int init_registers(int pid);
|
||||
extern void get_safe_registers(unsigned long *regs);
|
||||
extern void get_safe_registers(unsigned long *regs, unsigned long *fp_regs);
|
||||
extern unsigned long get_thread_reg(int reg, jmp_buf *buf);
|
||||
extern int get_fp_registers(int pid, unsigned long *regs);
|
||||
extern int put_fp_registers(int pid, unsigned long *regs);
|
||||
|
@ -202,7 +202,7 @@ int copy_thread(unsigned long clone_flags, unsigned long sp,
|
||||
arch_copy_thread(¤t->thread.arch, &p->thread.arch);
|
||||
}
|
||||
else {
|
||||
get_safe_registers(p->thread.regs.regs.gp);
|
||||
get_safe_registers(p->thread.regs.regs.gp, p->thread.regs.regs.fp);
|
||||
p->thread.request.u.thread = current->thread.request.u.thread;
|
||||
handler = new_thread_handler;
|
||||
}
|
||||
|
@ -50,23 +50,11 @@ long arch_ptrace(struct task_struct *child, long request,
|
||||
void __user *vp = p;
|
||||
|
||||
switch (request) {
|
||||
/* read word at location addr. */
|
||||
case PTRACE_PEEKTEXT:
|
||||
case PTRACE_PEEKDATA:
|
||||
ret = generic_ptrace_peekdata(child, addr, data);
|
||||
break;
|
||||
|
||||
/* read the word at location addr in the USER area. */
|
||||
case PTRACE_PEEKUSR:
|
||||
ret = peek_user(child, addr, data);
|
||||
break;
|
||||
|
||||
/* write the word at location addr. */
|
||||
case PTRACE_POKETEXT:
|
||||
case PTRACE_POKEDATA:
|
||||
ret = generic_ptrace_pokedata(child, addr, data);
|
||||
break;
|
||||
|
||||
/* write the word at location addr in the USER area */
|
||||
case PTRACE_POKEUSR:
|
||||
ret = poke_user(child, addr, data);
|
||||
@ -106,16 +94,6 @@ long arch_ptrace(struct task_struct *child, long request,
|
||||
ret = 0;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
#ifdef PTRACE_GETFPREGS
|
||||
case PTRACE_GETFPREGS: /* Get the child FPU state. */
|
||||
ret = get_fpregs(vp, child);
|
||||
break;
|
||||
#endif
|
||||
#ifdef PTRACE_SETFPREGS
|
||||
case PTRACE_SETFPREGS: /* Set the child FPU state. */
|
||||
ret = set_fpregs(vp, child);
|
||||
break;
|
||||
#endif
|
||||
case PTRACE_GET_THREAD_AREA:
|
||||
ret = ptrace_get_thread_area(child, addr, vp);
|
||||
@ -153,12 +131,6 @@ long arch_ptrace(struct task_struct *child, long request,
|
||||
ret = -EIO;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
#ifdef PTRACE_ARCH_PRCTL
|
||||
case PTRACE_ARCH_PRCTL:
|
||||
/* XXX Calls ptrace on the host - needs some SMP thinking */
|
||||
ret = arch_prctl(child, data, (void __user *) addr);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
ret = ptrace_request(child, request, addr, data);
|
||||
|
@ -8,6 +8,8 @@
|
||||
#include <string.h>
|
||||
#include <sys/ptrace.h>
|
||||
#include "sysdep/ptrace.h"
|
||||
#include "sysdep/ptrace_user.h"
|
||||
#include "registers.h"
|
||||
|
||||
int save_registers(int pid, struct uml_pt_regs *regs)
|
||||
{
|
||||
@ -32,6 +34,7 @@ int restore_registers(int pid, struct uml_pt_regs *regs)
|
||||
/* This is set once at boot time and not changed thereafter */
|
||||
|
||||
static unsigned long exec_regs[MAX_REG_NR];
|
||||
static unsigned long exec_fp_regs[FP_SIZE];
|
||||
|
||||
int init_registers(int pid)
|
||||
{
|
||||
@ -42,10 +45,14 @@ int init_registers(int pid)
|
||||
return -errno;
|
||||
|
||||
arch_init_registers(pid);
|
||||
get_fp_registers(pid, exec_fp_regs);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void get_safe_registers(unsigned long *regs)
|
||||
void get_safe_registers(unsigned long *regs, unsigned long *fp_regs)
|
||||
{
|
||||
memcpy(regs, exec_regs, sizeof(exec_regs));
|
||||
|
||||
if (fp_regs)
|
||||
memcpy(fp_regs, exec_fp_regs, sizeof(exec_fp_regs));
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ static unsigned long syscall_regs[MAX_REG_NR];
|
||||
|
||||
static int __init init_syscall_regs(void)
|
||||
{
|
||||
get_safe_registers(syscall_regs);
|
||||
get_safe_registers(syscall_regs, NULL);
|
||||
syscall_regs[REGS_IP_INDEX] = STUB_CODE +
|
||||
((unsigned long) &batch_syscall_stub -
|
||||
(unsigned long) &__syscall_stub_start);
|
||||
|
@ -373,6 +373,9 @@ void userspace(struct uml_pt_regs *regs)
|
||||
if (ptrace(PTRACE_SETREGS, pid, 0, regs->gp))
|
||||
fatal_sigsegv();
|
||||
|
||||
if (put_fp_registers(pid, regs->fp))
|
||||
fatal_sigsegv();
|
||||
|
||||
/* Now we set local_using_sysemu to be used for one loop */
|
||||
local_using_sysemu = get_using_sysemu();
|
||||
|
||||
@ -399,6 +402,12 @@ void userspace(struct uml_pt_regs *regs)
|
||||
fatal_sigsegv();
|
||||
}
|
||||
|
||||
if (get_fp_registers(pid, regs->fp)) {
|
||||
printk(UM_KERN_ERR "userspace - get_fp_registers failed, "
|
||||
"errno = %d\n", errno);
|
||||
fatal_sigsegv();
|
||||
}
|
||||
|
||||
UPT_SYSCALL_NR(regs) = -1; /* Assume: It's not a syscall */
|
||||
|
||||
if (WIFSTOPPED(status)) {
|
||||
@ -457,10 +466,11 @@ void userspace(struct uml_pt_regs *regs)
|
||||
}
|
||||
|
||||
static unsigned long thread_regs[MAX_REG_NR];
|
||||
static unsigned long thread_fp_regs[FP_SIZE];
|
||||
|
||||
static int __init init_thread_regs(void)
|
||||
{
|
||||
get_safe_registers(thread_regs);
|
||||
get_safe_registers(thread_regs, thread_fp_regs);
|
||||
/* Set parent's instruction pointer to start of clone-stub */
|
||||
thread_regs[REGS_IP_INDEX] = STUB_CODE +
|
||||
(unsigned long) stub_clone_handler -
|
||||
@ -503,6 +513,13 @@ int copy_context_skas0(unsigned long new_stack, int pid)
|
||||
return err;
|
||||
}
|
||||
|
||||
err = put_fp_registers(pid, thread_fp_regs);
|
||||
if (err < 0) {
|
||||
printk(UM_KERN_ERR "copy_context_skas0 : put_fp_registers "
|
||||
"failed, pid = %d, err = %d\n", pid, err);
|
||||
return err;
|
||||
}
|
||||
|
||||
/* set a well known return code for detection of child write failure */
|
||||
child_data->err = 12345678;
|
||||
|
||||
|
@ -42,11 +42,6 @@
|
||||
*/
|
||||
struct user_desc;
|
||||
|
||||
extern int get_fpxregs(struct user_fxsr_struct __user *buf,
|
||||
struct task_struct *child);
|
||||
extern int set_fpxregs(struct user_fxsr_struct __user *buf,
|
||||
struct task_struct *tsk);
|
||||
|
||||
extern int ptrace_get_thread_area(struct task_struct *child, int idx,
|
||||
struct user_desc __user *user_desc);
|
||||
|
||||
|
@ -145,7 +145,7 @@ int peek_user(struct task_struct *child, long addr, long data)
|
||||
return put_user(tmp, (unsigned long __user *) data);
|
||||
}
|
||||
|
||||
int get_fpregs(struct user_i387_struct __user *buf, struct task_struct *child)
|
||||
static int get_fpregs(struct user_i387_struct __user *buf, struct task_struct *child)
|
||||
{
|
||||
int err, n, cpu = ((struct thread_info *) child->stack)->cpu;
|
||||
struct user_i387_struct fpregs;
|
||||
@ -161,7 +161,7 @@ int get_fpregs(struct user_i387_struct __user *buf, struct task_struct *child)
|
||||
return n;
|
||||
}
|
||||
|
||||
int set_fpregs(struct user_i387_struct __user *buf, struct task_struct *child)
|
||||
static int set_fpregs(struct user_i387_struct __user *buf, struct task_struct *child)
|
||||
{
|
||||
int n, cpu = ((struct thread_info *) child->stack)->cpu;
|
||||
struct user_i387_struct fpregs;
|
||||
@ -174,7 +174,7 @@ int set_fpregs(struct user_i387_struct __user *buf, struct task_struct *child)
|
||||
(unsigned long *) &fpregs);
|
||||
}
|
||||
|
||||
int get_fpxregs(struct user_fxsr_struct __user *buf, struct task_struct *child)
|
||||
static int get_fpxregs(struct user_fxsr_struct __user *buf, struct task_struct *child)
|
||||
{
|
||||
int err, n, cpu = ((struct thread_info *) child->stack)->cpu;
|
||||
struct user_fxsr_struct fpregs;
|
||||
@ -190,7 +190,7 @@ int get_fpxregs(struct user_fxsr_struct __user *buf, struct task_struct *child)
|
||||
return n;
|
||||
}
|
||||
|
||||
int set_fpxregs(struct user_fxsr_struct __user *buf, struct task_struct *child)
|
||||
static int set_fpxregs(struct user_fxsr_struct __user *buf, struct task_struct *child)
|
||||
{
|
||||
int n, cpu = ((struct thread_info *) child->stack)->cpu;
|
||||
struct user_fxsr_struct fpregs;
|
||||
@ -206,5 +206,23 @@ int set_fpxregs(struct user_fxsr_struct __user *buf, struct task_struct *child)
|
||||
long subarch_ptrace(struct task_struct *child, long request,
|
||||
unsigned long addr, unsigned long data)
|
||||
{
|
||||
return -EIO;
|
||||
int ret = -EIO;
|
||||
void __user *datap = (void __user *) data;
|
||||
switch (request) {
|
||||
case PTRACE_GETFPREGS: /* Get the child FPU state. */
|
||||
ret = get_fpregs(datap, child);
|
||||
break;
|
||||
case PTRACE_SETFPREGS: /* Set the child FPU state. */
|
||||
ret = set_fpregs(datap, child);
|
||||
break;
|
||||
case PTRACE_GETFPXREGS: /* Get the child FPU state. */
|
||||
ret = get_fpxregs(datap, child);
|
||||
break;
|
||||
case PTRACE_SETFPXREGS: /* Set the child FPU state. */
|
||||
ret = set_fpxregs(datap, child);
|
||||
break;
|
||||
default:
|
||||
ret = -EIO;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
@ -53,6 +53,7 @@ extern int sysemu_supported;
|
||||
|
||||
struct uml_pt_regs {
|
||||
unsigned long gp[MAX_REG_NR];
|
||||
unsigned long fp[HOST_FPX_SIZE];
|
||||
struct faultinfo faultinfo;
|
||||
long syscall;
|
||||
int is_user;
|
||||
|
@ -145,7 +145,7 @@ int is_syscall(unsigned long addr)
|
||||
return instr == 0x050f;
|
||||
}
|
||||
|
||||
int get_fpregs(struct user_i387_struct __user *buf, struct task_struct *child)
|
||||
static int get_fpregs(struct user_i387_struct __user *buf, struct task_struct *child)
|
||||
{
|
||||
int err, n, cpu = ((struct thread_info *) child->stack)->cpu;
|
||||
long fpregs[HOST_FP_SIZE];
|
||||
@ -162,7 +162,7 @@ int get_fpregs(struct user_i387_struct __user *buf, struct task_struct *child)
|
||||
return n;
|
||||
}
|
||||
|
||||
int set_fpregs(struct user_i387_struct __user *buf, struct task_struct *child)
|
||||
static int set_fpregs(struct user_i387_struct __user *buf, struct task_struct *child)
|
||||
{
|
||||
int n, cpu = ((struct thread_info *) child->stack)->cpu;
|
||||
long fpregs[HOST_FP_SIZE];
|
||||
@ -182,12 +182,16 @@ long subarch_ptrace(struct task_struct *child, long request,
|
||||
void __user *datap = (void __user *) data;
|
||||
|
||||
switch (request) {
|
||||
case PTRACE_GETFPXREGS: /* Get the child FPU state. */
|
||||
case PTRACE_GETFPREGS: /* Get the child FPU state. */
|
||||
ret = get_fpregs(datap, child);
|
||||
break;
|
||||
case PTRACE_SETFPXREGS: /* Set the child FPU state. */
|
||||
case PTRACE_SETFPREGS: /* Set the child FPU state. */
|
||||
ret = set_fpregs(datap, child);
|
||||
break;
|
||||
case PTRACE_ARCH_PRCTL:
|
||||
/* XXX Calls ptrace on the host - needs some SMP thinking */
|
||||
ret = arch_prctl(child, data, (void __user *) addr);
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@ -85,6 +85,7 @@
|
||||
|
||||
struct uml_pt_regs {
|
||||
unsigned long gp[MAX_REG_NR];
|
||||
unsigned long fp[HOST_FP_SIZE];
|
||||
struct faultinfo faultinfo;
|
||||
long syscall;
|
||||
int is_user;
|
||||
|
@ -16,7 +16,6 @@
|
||||
#endif
|
||||
|
||||
.macro altinstruction_entry orig alt feature orig_len alt_len
|
||||
.align 8
|
||||
.long \orig - .
|
||||
.long \alt - .
|
||||
.word \feature
|
||||
|
@ -48,9 +48,6 @@ struct alt_instr {
|
||||
u16 cpuid; /* cpuid bit set for replacement */
|
||||
u8 instrlen; /* length of original instruction */
|
||||
u8 replacementlen; /* length of new instruction, <= instrlen */
|
||||
#ifdef CONFIG_X86_64
|
||||
u32 pad2;
|
||||
#endif
|
||||
};
|
||||
|
||||
extern void alternative_instructions(void);
|
||||
@ -83,7 +80,6 @@ static inline int alternatives_text_reserved(void *start, void *end)
|
||||
\
|
||||
"661:\n\t" oldinstr "\n662:\n" \
|
||||
".section .altinstructions,\"a\"\n" \
|
||||
_ASM_ALIGN "\n" \
|
||||
" .long 661b - .\n" /* label */ \
|
||||
" .long 663f - .\n" /* new instruction */ \
|
||||
" .word " __stringify(feature) "\n" /* feature bit */ \
|
||||
|
@ -332,7 +332,6 @@ static __always_inline __pure bool __static_cpu_has(u16 bit)
|
||||
asm goto("1: jmp %l[t_no]\n"
|
||||
"2:\n"
|
||||
".section .altinstructions,\"a\"\n"
|
||||
_ASM_ALIGN "\n"
|
||||
" .long 1b - .\n"
|
||||
" .long 0\n" /* no replacement */
|
||||
" .word %P0\n" /* feature bit */
|
||||
@ -350,7 +349,6 @@ static __always_inline __pure bool __static_cpu_has(u16 bit)
|
||||
asm volatile("1: movb $0,%0\n"
|
||||
"2:\n"
|
||||
".section .altinstructions,\"a\"\n"
|
||||
_ASM_ALIGN "\n"
|
||||
" .long 1b - .\n"
|
||||
" .long 3f - .\n"
|
||||
" .word %P1\n" /* feature bit */
|
||||
|
@ -44,7 +44,7 @@ static inline u64 pvclock_scale_delta(u64 delta, u32 mul_frac, int shift)
|
||||
: "a" ((u32)delta), "1" ((u32)(delta >> 32)), "2" (mul_frac) );
|
||||
#elif defined(__x86_64__)
|
||||
__asm__ (
|
||||
"mul %[mul_frac] ; shrd $32, %[hi], %[lo]"
|
||||
"mulq %[mul_frac] ; shrd $32, %[hi], %[lo]"
|
||||
: [lo]"=a"(product),
|
||||
[hi]"=d"(tmp)
|
||||
: "0"(delta),
|
||||
|
@ -1900,6 +1900,9 @@ perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs)
|
||||
|
||||
perf_callchain_store(entry, regs->ip);
|
||||
|
||||
if (!current->mm)
|
||||
return;
|
||||
|
||||
if (perf_callchain_user32(regs, entry))
|
||||
return;
|
||||
|
||||
|
@ -365,8 +365,13 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_pci_root *root)
|
||||
*/
|
||||
if (bus) {
|
||||
struct pci_bus *child;
|
||||
list_for_each_entry(child, &bus->children, node)
|
||||
pcie_bus_configure_settings(child, child->self->pcie_mpss);
|
||||
list_for_each_entry(child, &bus->children, node) {
|
||||
struct pci_dev *self = child->self;
|
||||
if (!self)
|
||||
continue;
|
||||
|
||||
pcie_bus_configure_settings(child, self->pcie_mpss);
|
||||
}
|
||||
}
|
||||
|
||||
if (!bus)
|
||||
|
@ -1721,10 +1721,8 @@ void __init xen_setup_machphys_mapping(void)
|
||||
machine_to_phys_nr = MACH2PHYS_NR_ENTRIES;
|
||||
}
|
||||
#ifdef CONFIG_X86_32
|
||||
if ((machine_to_phys_mapping + machine_to_phys_nr)
|
||||
< machine_to_phys_mapping)
|
||||
machine_to_phys_nr = (unsigned long *)NULL
|
||||
- machine_to_phys_mapping;
|
||||
WARN_ON((machine_to_phys_mapping + (machine_to_phys_nr - 1))
|
||||
< machine_to_phys_mapping);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -184,6 +184,19 @@ static unsigned long __init xen_set_identity(const struct e820entry *list,
|
||||
PFN_UP(start_pci), PFN_DOWN(last));
|
||||
return identity;
|
||||
}
|
||||
|
||||
static unsigned long __init xen_get_max_pages(void)
|
||||
{
|
||||
unsigned long max_pages = MAX_DOMAIN_PAGES;
|
||||
domid_t domid = DOMID_SELF;
|
||||
int ret;
|
||||
|
||||
ret = HYPERVISOR_memory_op(XENMEM_maximum_reservation, &domid);
|
||||
if (ret > 0)
|
||||
max_pages = ret;
|
||||
return min(max_pages, MAX_DOMAIN_PAGES);
|
||||
}
|
||||
|
||||
/**
|
||||
* machine_specific_memory_setup - Hook for machine specific memory setup.
|
||||
**/
|
||||
@ -292,6 +305,14 @@ char * __init xen_memory_setup(void)
|
||||
|
||||
sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map);
|
||||
|
||||
extra_limit = xen_get_max_pages();
|
||||
if (max_pfn + extra_pages > extra_limit) {
|
||||
if (extra_limit > max_pfn)
|
||||
extra_pages = extra_limit - max_pfn;
|
||||
else
|
||||
extra_pages = 0;
|
||||
}
|
||||
|
||||
extra_pages += xen_return_unused_memory(xen_start_info->nr_pages, &e820);
|
||||
|
||||
/*
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include <xen/page.h>
|
||||
#include <xen/events.h>
|
||||
|
||||
#include <xen/hvc-console.h>
|
||||
#include "xen-ops.h"
|
||||
#include "mmu.h"
|
||||
|
||||
@ -207,6 +208,15 @@ static void __init xen_smp_prepare_cpus(unsigned int max_cpus)
|
||||
unsigned cpu;
|
||||
unsigned int i;
|
||||
|
||||
if (skip_ioapic_setup) {
|
||||
char *m = (max_cpus == 0) ?
|
||||
"The nosmp parameter is incompatible with Xen; " \
|
||||
"use Xen dom0_max_vcpus=1 parameter" :
|
||||
"The noapic parameter is incompatible with Xen";
|
||||
|
||||
xen_raw_printk(m);
|
||||
panic(m);
|
||||
}
|
||||
xen_init_lock_cpu(0);
|
||||
|
||||
smp_store_cpu_info(0);
|
||||
@ -522,7 +532,6 @@ static void __init xen_hvm_smp_prepare_cpus(unsigned int max_cpus)
|
||||
WARN_ON(xen_smp_intr_init(0));
|
||||
|
||||
xen_init_lock_cpu(0);
|
||||
xen_init_spinlocks();
|
||||
}
|
||||
|
||||
static int __cpuinit xen_hvm_cpu_up(unsigned int cpu)
|
||||
|
@ -168,9 +168,10 @@ cycle_t xen_clocksource_read(void)
|
||||
struct pvclock_vcpu_time_info *src;
|
||||
cycle_t ret;
|
||||
|
||||
src = &get_cpu_var(xen_vcpu)->time;
|
||||
preempt_disable_notrace();
|
||||
src = &__get_cpu_var(xen_vcpu)->time;
|
||||
ret = pvclock_clocksource_read(src);
|
||||
put_cpu_var(xen_vcpu);
|
||||
preempt_enable_notrace();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -113,11 +113,13 @@ xen_iret_start_crit:
|
||||
|
||||
/*
|
||||
* If there's something pending, mask events again so we can
|
||||
* jump back into xen_hypervisor_callback
|
||||
* jump back into xen_hypervisor_callback. Otherwise do not
|
||||
* touch XEN_vcpu_info_mask.
|
||||
*/
|
||||
sete XEN_vcpu_info_mask(%eax)
|
||||
jne 1f
|
||||
movb $1, XEN_vcpu_info_mask(%eax)
|
||||
|
||||
popl %eax
|
||||
1: popl %eax
|
||||
|
||||
/*
|
||||
* From this point on the registers are restored and the stack
|
||||
|
@ -121,7 +121,7 @@
|
||||
|
||||
/* Maximum sleep allowed via Sleep() operator */
|
||||
|
||||
#define ACPI_MAX_SLEEP 20000 /* Two seconds */
|
||||
#define ACPI_MAX_SLEEP 2000 /* Two seconds */
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
|
@ -13,6 +13,7 @@ config ACPI_APEI_GHES
|
||||
bool "APEI Generic Hardware Error Source"
|
||||
depends on ACPI_APEI && X86
|
||||
select ACPI_HED
|
||||
select IRQ_WORK
|
||||
select LLIST
|
||||
select GENERIC_ALLOCATOR
|
||||
help
|
||||
|
@ -618,7 +618,7 @@ int apei_osc_setup(void)
|
||||
};
|
||||
|
||||
capbuf[OSC_QUERY_TYPE] = OSC_QUERY_ENABLE;
|
||||
capbuf[OSC_SUPPORT_TYPE] = 0;
|
||||
capbuf[OSC_SUPPORT_TYPE] = 1;
|
||||
capbuf[OSC_CONTROL_TYPE] = 0;
|
||||
|
||||
if (ACPI_FAILURE(acpi_get_handle(NULL, "\\_SB", &handle))
|
||||
|
@ -168,13 +168,11 @@ struct regmap *regmap_init(struct device *dev,
|
||||
map->work_buf = kmalloc(map->format.buf_size, GFP_KERNEL);
|
||||
if (map->work_buf == NULL) {
|
||||
ret = -ENOMEM;
|
||||
goto err_bus;
|
||||
goto err_map;
|
||||
}
|
||||
|
||||
return map;
|
||||
|
||||
err_bus:
|
||||
module_put(map->bus->owner);
|
||||
err_map:
|
||||
kfree(map);
|
||||
err:
|
||||
@ -188,7 +186,6 @@ EXPORT_SYMBOL_GPL(regmap_init);
|
||||
void regmap_exit(struct regmap *map)
|
||||
{
|
||||
kfree(map->work_buf);
|
||||
module_put(map->bus->owner);
|
||||
kfree(map);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(regmap_exit);
|
||||
|
@ -261,6 +261,9 @@ static int pcc_get_offset(int cpu)
|
||||
pr = per_cpu(processors, cpu);
|
||||
pcc_cpu_data = per_cpu_ptr(pcc_cpu_info, cpu);
|
||||
|
||||
if (!pr)
|
||||
return -ENODEV;
|
||||
|
||||
status = acpi_evaluate_object(pr->handle, "PCCP", NULL, &buffer);
|
||||
if (ACPI_FAILURE(status))
|
||||
return -ENODEV;
|
||||
|
@ -174,8 +174,10 @@ struct d40_base;
|
||||
* @tasklet: Tasklet that gets scheduled from interrupt context to complete a
|
||||
* transfer and call client callback.
|
||||
* @client: Cliented owned descriptor list.
|
||||
* @pending_queue: Submitted jobs, to be issued by issue_pending()
|
||||
* @active: Active descriptor.
|
||||
* @queue: Queued jobs.
|
||||
* @prepare_queue: Prepared jobs.
|
||||
* @dma_cfg: The client configuration of this dma channel.
|
||||
* @configured: whether the dma_cfg configuration is valid
|
||||
* @base: Pointer to the device instance struct.
|
||||
@ -203,6 +205,7 @@ struct d40_chan {
|
||||
struct list_head pending_queue;
|
||||
struct list_head active;
|
||||
struct list_head queue;
|
||||
struct list_head prepare_queue;
|
||||
struct stedma40_chan_cfg dma_cfg;
|
||||
bool configured;
|
||||
struct d40_base *base;
|
||||
@ -477,7 +480,6 @@ static struct d40_desc *d40_desc_get(struct d40_chan *d40c)
|
||||
|
||||
list_for_each_entry_safe(d, _d, &d40c->client, node)
|
||||
if (async_tx_test_ack(&d->txd)) {
|
||||
d40_pool_lli_free(d40c, d);
|
||||
d40_desc_remove(d);
|
||||
desc = d;
|
||||
memset(desc, 0, sizeof(*desc));
|
||||
@ -644,8 +646,11 @@ static struct d40_desc *d40_first_active_get(struct d40_chan *d40c)
|
||||
return d;
|
||||
}
|
||||
|
||||
/* remove desc from current queue and add it to the pending_queue */
|
||||
static void d40_desc_queue(struct d40_chan *d40c, struct d40_desc *desc)
|
||||
{
|
||||
d40_desc_remove(desc);
|
||||
desc->is_in_client_list = false;
|
||||
list_add_tail(&desc->node, &d40c->pending_queue);
|
||||
}
|
||||
|
||||
@ -803,6 +808,7 @@ done:
|
||||
static void d40_term_all(struct d40_chan *d40c)
|
||||
{
|
||||
struct d40_desc *d40d;
|
||||
struct d40_desc *_d;
|
||||
|
||||
/* Release active descriptors */
|
||||
while ((d40d = d40_first_active_get(d40c))) {
|
||||
@ -822,6 +828,21 @@ static void d40_term_all(struct d40_chan *d40c)
|
||||
d40_desc_free(d40c, d40d);
|
||||
}
|
||||
|
||||
/* Release client owned descriptors */
|
||||
if (!list_empty(&d40c->client))
|
||||
list_for_each_entry_safe(d40d, _d, &d40c->client, node) {
|
||||
d40_desc_remove(d40d);
|
||||
d40_desc_free(d40c, d40d);
|
||||
}
|
||||
|
||||
/* Release descriptors in prepare queue */
|
||||
if (!list_empty(&d40c->prepare_queue))
|
||||
list_for_each_entry_safe(d40d, _d,
|
||||
&d40c->prepare_queue, node) {
|
||||
d40_desc_remove(d40d);
|
||||
d40_desc_free(d40c, d40d);
|
||||
}
|
||||
|
||||
d40c->pending_tx = 0;
|
||||
d40c->busy = false;
|
||||
}
|
||||
@ -1208,7 +1229,6 @@ static void dma_tasklet(unsigned long data)
|
||||
|
||||
if (!d40d->cyclic) {
|
||||
if (async_tx_test_ack(&d40d->txd)) {
|
||||
d40_pool_lli_free(d40c, d40d);
|
||||
d40_desc_remove(d40d);
|
||||
d40_desc_free(d40c, d40d);
|
||||
} else {
|
||||
@ -1595,21 +1615,10 @@ static int d40_free_dma(struct d40_chan *d40c)
|
||||
u32 event;
|
||||
struct d40_phy_res *phy = d40c->phy_chan;
|
||||
bool is_src;
|
||||
struct d40_desc *d;
|
||||
struct d40_desc *_d;
|
||||
|
||||
|
||||
/* Terminate all queued and active transfers */
|
||||
d40_term_all(d40c);
|
||||
|
||||
/* Release client owned descriptors */
|
||||
if (!list_empty(&d40c->client))
|
||||
list_for_each_entry_safe(d, _d, &d40c->client, node) {
|
||||
d40_pool_lli_free(d40c, d);
|
||||
d40_desc_remove(d);
|
||||
d40_desc_free(d40c, d);
|
||||
}
|
||||
|
||||
if (phy == NULL) {
|
||||
chan_err(d40c, "phy == null\n");
|
||||
return -EINVAL;
|
||||
@ -1911,6 +1920,12 @@ d40_prep_sg(struct dma_chan *dchan, struct scatterlist *sg_src,
|
||||
goto err;
|
||||
}
|
||||
|
||||
/*
|
||||
* add descriptor to the prepare queue in order to be able
|
||||
* to free them later in terminate_all
|
||||
*/
|
||||
list_add_tail(&desc->node, &chan->prepare_queue);
|
||||
|
||||
spin_unlock_irqrestore(&chan->lock, flags);
|
||||
|
||||
return &desc->txd;
|
||||
@ -2400,6 +2415,7 @@ static void __init d40_chan_init(struct d40_base *base, struct dma_device *dma,
|
||||
INIT_LIST_HEAD(&d40c->queue);
|
||||
INIT_LIST_HEAD(&d40c->pending_queue);
|
||||
INIT_LIST_HEAD(&d40c->client);
|
||||
INIT_LIST_HEAD(&d40c->prepare_queue);
|
||||
|
||||
tasklet_init(&d40c->tasklet, dma_tasklet,
|
||||
(unsigned long) d40c);
|
||||
|
@ -290,6 +290,9 @@ static const struct {
|
||||
{PCI_VENDOR_ID_NEC, PCI_ANY_ID, PCI_ANY_ID,
|
||||
QUIRK_CYCLE_TIMER},
|
||||
|
||||
{PCI_VENDOR_ID_O2, PCI_ANY_ID, PCI_ANY_ID,
|
||||
QUIRK_NO_MSI},
|
||||
|
||||
{PCI_VENDOR_ID_RICOH, PCI_ANY_ID, PCI_ANY_ID,
|
||||
QUIRK_CYCLE_TIMER},
|
||||
|
||||
|
@ -351,7 +351,7 @@ static int bgpio_setup_direction(struct bgpio_chip *bgc,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int __devexit bgpio_remove(struct bgpio_chip *bgc)
|
||||
int bgpio_remove(struct bgpio_chip *bgc)
|
||||
{
|
||||
int err = gpiochip_remove(&bgc->gc);
|
||||
|
||||
@ -361,15 +361,10 @@ int __devexit bgpio_remove(struct bgpio_chip *bgc)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(bgpio_remove);
|
||||
|
||||
int __devinit bgpio_init(struct bgpio_chip *bgc,
|
||||
struct device *dev,
|
||||
unsigned long sz,
|
||||
void __iomem *dat,
|
||||
void __iomem *set,
|
||||
void __iomem *clr,
|
||||
void __iomem *dirout,
|
||||
void __iomem *dirin,
|
||||
bool big_endian)
|
||||
int bgpio_init(struct bgpio_chip *bgc, struct device *dev,
|
||||
unsigned long sz, void __iomem *dat, void __iomem *set,
|
||||
void __iomem *clr, void __iomem *dirout, void __iomem *dirin,
|
||||
bool big_endian)
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
@ -256,7 +256,6 @@ int drm_fb_helper_panic(struct notifier_block *n, unsigned long ununsed,
|
||||
{
|
||||
printk(KERN_ERR "panic occurred, switching back to text console\n");
|
||||
return drm_fb_helper_force_kernel_mode();
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(drm_fb_helper_panic);
|
||||
|
||||
|
@ -530,7 +530,8 @@ nouveau_fence_channel_init(struct nouveau_channel *chan)
|
||||
nouveau_gpuobj_ref(NULL, &obj);
|
||||
if (ret)
|
||||
return ret;
|
||||
} else {
|
||||
} else
|
||||
if (USE_SEMA(dev)) {
|
||||
/* map fence bo into channel's vm */
|
||||
ret = nouveau_bo_vma_add(dev_priv->fence.bo, chan->vm,
|
||||
&chan->fence.vma);
|
||||
|
@ -37,8 +37,11 @@ nouveau_sgdma_populate(struct ttm_backend *be, unsigned long num_pages,
|
||||
return -ENOMEM;
|
||||
|
||||
nvbe->ttm_alloced = kmalloc(sizeof(bool) * num_pages, GFP_KERNEL);
|
||||
if (!nvbe->ttm_alloced)
|
||||
if (!nvbe->ttm_alloced) {
|
||||
kfree(nvbe->pages);
|
||||
nvbe->pages = NULL;
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
nvbe->nr_pages = 0;
|
||||
while (num_pages--) {
|
||||
@ -126,7 +129,7 @@ nv04_sgdma_bind(struct ttm_backend *be, struct ttm_mem_reg *mem)
|
||||
|
||||
for (j = 0; j < PAGE_SIZE / NV_CTXDMA_PAGE_SIZE; j++, pte++) {
|
||||
nv_wo32(gpuobj, (pte * 4) + 0, offset_l | 3);
|
||||
dma_offset += NV_CTXDMA_PAGE_SIZE;
|
||||
offset_l += NV_CTXDMA_PAGE_SIZE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -781,11 +781,20 @@ nv04_crtc_do_mode_set_base(struct drm_crtc *crtc,
|
||||
struct drm_device *dev = crtc->dev;
|
||||
struct drm_nouveau_private *dev_priv = dev->dev_private;
|
||||
struct nv04_crtc_reg *regp = &dev_priv->mode_reg.crtc_reg[nv_crtc->index];
|
||||
struct drm_framebuffer *drm_fb = nv_crtc->base.fb;
|
||||
struct nouveau_framebuffer *fb = nouveau_framebuffer(drm_fb);
|
||||
struct drm_framebuffer *drm_fb;
|
||||
struct nouveau_framebuffer *fb;
|
||||
int arb_burst, arb_lwm;
|
||||
int ret;
|
||||
|
||||
NV_DEBUG_KMS(dev, "index %d\n", nv_crtc->index);
|
||||
|
||||
/* no fb bound */
|
||||
if (!atomic && !crtc->fb) {
|
||||
NV_DEBUG_KMS(dev, "No FB bound\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* If atomic, we want to switch to the fb we were passed, so
|
||||
* now we update pointers to do that. (We don't pin; just
|
||||
* assume we're already pinned and update the base address.)
|
||||
@ -794,6 +803,8 @@ nv04_crtc_do_mode_set_base(struct drm_crtc *crtc,
|
||||
drm_fb = passed_fb;
|
||||
fb = nouveau_framebuffer(passed_fb);
|
||||
} else {
|
||||
drm_fb = crtc->fb;
|
||||
fb = nouveau_framebuffer(crtc->fb);
|
||||
/* If not atomic, we can go ahead and pin, and unpin the
|
||||
* old fb we were passed.
|
||||
*/
|
||||
|
@ -519,12 +519,18 @@ nv50_crtc_do_mode_set_base(struct drm_crtc *crtc,
|
||||
struct drm_device *dev = nv_crtc->base.dev;
|
||||
struct drm_nouveau_private *dev_priv = dev->dev_private;
|
||||
struct nouveau_channel *evo = nv50_display(dev)->master;
|
||||
struct drm_framebuffer *drm_fb = nv_crtc->base.fb;
|
||||
struct nouveau_framebuffer *fb = nouveau_framebuffer(drm_fb);
|
||||
struct drm_framebuffer *drm_fb;
|
||||
struct nouveau_framebuffer *fb;
|
||||
int ret;
|
||||
|
||||
NV_DEBUG_KMS(dev, "index %d\n", nv_crtc->index);
|
||||
|
||||
/* no fb bound */
|
||||
if (!atomic && !crtc->fb) {
|
||||
NV_DEBUG_KMS(dev, "No FB bound\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* If atomic, we want to switch to the fb we were passed, so
|
||||
* now we update pointers to do that. (We don't pin; just
|
||||
* assume we're already pinned and update the base address.)
|
||||
@ -533,6 +539,8 @@ nv50_crtc_do_mode_set_base(struct drm_crtc *crtc,
|
||||
drm_fb = passed_fb;
|
||||
fb = nouveau_framebuffer(passed_fb);
|
||||
} else {
|
||||
drm_fb = crtc->fb;
|
||||
fb = nouveau_framebuffer(crtc->fb);
|
||||
/* If not atomic, we can go ahead and pin, and unpin the
|
||||
* old fb we were passed.
|
||||
*/
|
||||
|
@ -41,6 +41,31 @@ static void evergreen_gpu_init(struct radeon_device *rdev);
|
||||
void evergreen_fini(struct radeon_device *rdev);
|
||||
static void evergreen_pcie_gen2_enable(struct radeon_device *rdev);
|
||||
|
||||
void evergreen_fix_pci_max_read_req_size(struct radeon_device *rdev)
|
||||
{
|
||||
u16 ctl, v;
|
||||
int cap, err;
|
||||
|
||||
cap = pci_pcie_cap(rdev->pdev);
|
||||
if (!cap)
|
||||
return;
|
||||
|
||||
err = pci_read_config_word(rdev->pdev, cap + PCI_EXP_DEVCTL, &ctl);
|
||||
if (err)
|
||||
return;
|
||||
|
||||
v = (ctl & PCI_EXP_DEVCTL_READRQ) >> 12;
|
||||
|
||||
/* if bios or OS sets MAX_READ_REQUEST_SIZE to an invalid value, fix it
|
||||
* to avoid hangs or perfomance issues
|
||||
*/
|
||||
if ((v == 0) || (v == 6) || (v == 7)) {
|
||||
ctl &= ~PCI_EXP_DEVCTL_READRQ;
|
||||
ctl |= (2 << 12);
|
||||
pci_write_config_word(rdev->pdev, cap + PCI_EXP_DEVCTL, ctl);
|
||||
}
|
||||
}
|
||||
|
||||
void evergreen_pre_page_flip(struct radeon_device *rdev, int crtc)
|
||||
{
|
||||
/* enable the pflip int */
|
||||
@ -1379,7 +1404,8 @@ int evergreen_cp_resume(struct radeon_device *rdev)
|
||||
/* Initialize the ring buffer's read and write pointers */
|
||||
WREG32(CP_RB_CNTL, tmp | RB_RPTR_WR_ENA);
|
||||
WREG32(CP_RB_RPTR_WR, 0);
|
||||
WREG32(CP_RB_WPTR, 0);
|
||||
rdev->cp.wptr = 0;
|
||||
WREG32(CP_RB_WPTR, rdev->cp.wptr);
|
||||
|
||||
/* set the wb address wether it's enabled or not */
|
||||
WREG32(CP_RB_RPTR_ADDR,
|
||||
@ -1401,7 +1427,6 @@ int evergreen_cp_resume(struct radeon_device *rdev)
|
||||
WREG32(CP_DEBUG, (1 << 27) | (1 << 28));
|
||||
|
||||
rdev->cp.rptr = RREG32(CP_RB_RPTR);
|
||||
rdev->cp.wptr = RREG32(CP_RB_WPTR);
|
||||
|
||||
evergreen_cp_start(rdev);
|
||||
rdev->cp.ready = true;
|
||||
@ -1863,6 +1888,8 @@ static void evergreen_gpu_init(struct radeon_device *rdev)
|
||||
|
||||
WREG32(GRBM_CNTL, GRBM_READ_TIMEOUT(0xff));
|
||||
|
||||
evergreen_fix_pci_max_read_req_size(rdev);
|
||||
|
||||
cc_gc_shader_pipe_config = RREG32(CC_GC_SHADER_PIPE_CONFIG) & ~2;
|
||||
|
||||
cc_gc_shader_pipe_config |=
|
||||
@ -3144,21 +3171,23 @@ int evergreen_suspend(struct radeon_device *rdev)
|
||||
}
|
||||
|
||||
int evergreen_copy_blit(struct radeon_device *rdev,
|
||||
uint64_t src_offset, uint64_t dst_offset,
|
||||
unsigned num_pages, struct radeon_fence *fence)
|
||||
uint64_t src_offset,
|
||||
uint64_t dst_offset,
|
||||
unsigned num_gpu_pages,
|
||||
struct radeon_fence *fence)
|
||||
{
|
||||
int r;
|
||||
|
||||
mutex_lock(&rdev->r600_blit.mutex);
|
||||
rdev->r600_blit.vb_ib = NULL;
|
||||
r = evergreen_blit_prepare_copy(rdev, num_pages * RADEON_GPU_PAGE_SIZE);
|
||||
r = evergreen_blit_prepare_copy(rdev, num_gpu_pages * RADEON_GPU_PAGE_SIZE);
|
||||
if (r) {
|
||||
if (rdev->r600_blit.vb_ib)
|
||||
radeon_ib_free(rdev, &rdev->r600_blit.vb_ib);
|
||||
mutex_unlock(&rdev->r600_blit.mutex);
|
||||
return r;
|
||||
}
|
||||
evergreen_kms_blit_copy(rdev, src_offset, dst_offset, num_pages * RADEON_GPU_PAGE_SIZE);
|
||||
evergreen_kms_blit_copy(rdev, src_offset, dst_offset, num_gpu_pages * RADEON_GPU_PAGE_SIZE);
|
||||
evergreen_blit_done_copy(rdev, fence);
|
||||
mutex_unlock(&rdev->r600_blit.mutex);
|
||||
return 0;
|
||||
|
@ -39,6 +39,7 @@ extern int evergreen_mc_wait_for_idle(struct radeon_device *rdev);
|
||||
extern void evergreen_mc_program(struct radeon_device *rdev);
|
||||
extern void evergreen_irq_suspend(struct radeon_device *rdev);
|
||||
extern int evergreen_mc_init(struct radeon_device *rdev);
|
||||
extern void evergreen_fix_pci_max_read_req_size(struct radeon_device *rdev);
|
||||
|
||||
#define EVERGREEN_PFP_UCODE_SIZE 1120
|
||||
#define EVERGREEN_PM4_UCODE_SIZE 1376
|
||||
@ -669,6 +670,8 @@ static void cayman_gpu_init(struct radeon_device *rdev)
|
||||
|
||||
WREG32(GRBM_CNTL, GRBM_READ_TIMEOUT(0xff));
|
||||
|
||||
evergreen_fix_pci_max_read_req_size(rdev);
|
||||
|
||||
mc_shared_chmap = RREG32(MC_SHARED_CHMAP);
|
||||
mc_arb_ramcfg = RREG32(MC_ARB_RAMCFG);
|
||||
|
||||
@ -1184,7 +1187,8 @@ int cayman_cp_resume(struct radeon_device *rdev)
|
||||
|
||||
/* Initialize the ring buffer's read and write pointers */
|
||||
WREG32(CP_RB0_CNTL, tmp | RB_RPTR_WR_ENA);
|
||||
WREG32(CP_RB0_WPTR, 0);
|
||||
rdev->cp.wptr = 0;
|
||||
WREG32(CP_RB0_WPTR, rdev->cp.wptr);
|
||||
|
||||
/* set the wb address wether it's enabled or not */
|
||||
WREG32(CP_RB0_RPTR_ADDR, (rdev->wb.gpu_addr + RADEON_WB_CP_RPTR_OFFSET) & 0xFFFFFFFC);
|
||||
@ -1204,7 +1208,6 @@ int cayman_cp_resume(struct radeon_device *rdev)
|
||||
WREG32(CP_RB0_BASE, rdev->cp.gpu_addr >> 8);
|
||||
|
||||
rdev->cp.rptr = RREG32(CP_RB0_RPTR);
|
||||
rdev->cp.wptr = RREG32(CP_RB0_WPTR);
|
||||
|
||||
/* ring1 - compute only */
|
||||
/* Set ring buffer size */
|
||||
@ -1217,7 +1220,8 @@ int cayman_cp_resume(struct radeon_device *rdev)
|
||||
|
||||
/* Initialize the ring buffer's read and write pointers */
|
||||
WREG32(CP_RB1_CNTL, tmp | RB_RPTR_WR_ENA);
|
||||
WREG32(CP_RB1_WPTR, 0);
|
||||
rdev->cp1.wptr = 0;
|
||||
WREG32(CP_RB1_WPTR, rdev->cp1.wptr);
|
||||
|
||||
/* set the wb address wether it's enabled or not */
|
||||
WREG32(CP_RB1_RPTR_ADDR, (rdev->wb.gpu_addr + RADEON_WB_CP1_RPTR_OFFSET) & 0xFFFFFFFC);
|
||||
@ -1229,7 +1233,6 @@ int cayman_cp_resume(struct radeon_device *rdev)
|
||||
WREG32(CP_RB1_BASE, rdev->cp1.gpu_addr >> 8);
|
||||
|
||||
rdev->cp1.rptr = RREG32(CP_RB1_RPTR);
|
||||
rdev->cp1.wptr = RREG32(CP_RB1_WPTR);
|
||||
|
||||
/* ring2 - compute only */
|
||||
/* Set ring buffer size */
|
||||
@ -1242,7 +1245,8 @@ int cayman_cp_resume(struct radeon_device *rdev)
|
||||
|
||||
/* Initialize the ring buffer's read and write pointers */
|
||||
WREG32(CP_RB2_CNTL, tmp | RB_RPTR_WR_ENA);
|
||||
WREG32(CP_RB2_WPTR, 0);
|
||||
rdev->cp2.wptr = 0;
|
||||
WREG32(CP_RB2_WPTR, rdev->cp2.wptr);
|
||||
|
||||
/* set the wb address wether it's enabled or not */
|
||||
WREG32(CP_RB2_RPTR_ADDR, (rdev->wb.gpu_addr + RADEON_WB_CP2_RPTR_OFFSET) & 0xFFFFFFFC);
|
||||
@ -1254,7 +1258,6 @@ int cayman_cp_resume(struct radeon_device *rdev)
|
||||
WREG32(CP_RB2_BASE, rdev->cp2.gpu_addr >> 8);
|
||||
|
||||
rdev->cp2.rptr = RREG32(CP_RB2_RPTR);
|
||||
rdev->cp2.wptr = RREG32(CP_RB2_WPTR);
|
||||
|
||||
/* start the rings */
|
||||
cayman_cp_start(rdev);
|
||||
|
@ -721,11 +721,11 @@ void r100_fence_ring_emit(struct radeon_device *rdev,
|
||||
int r100_copy_blit(struct radeon_device *rdev,
|
||||
uint64_t src_offset,
|
||||
uint64_t dst_offset,
|
||||
unsigned num_pages,
|
||||
unsigned num_gpu_pages,
|
||||
struct radeon_fence *fence)
|
||||
{
|
||||
uint32_t cur_pages;
|
||||
uint32_t stride_bytes = PAGE_SIZE;
|
||||
uint32_t stride_bytes = RADEON_GPU_PAGE_SIZE;
|
||||
uint32_t pitch;
|
||||
uint32_t stride_pixels;
|
||||
unsigned ndw;
|
||||
@ -737,7 +737,7 @@ int r100_copy_blit(struct radeon_device *rdev,
|
||||
/* radeon pitch is /64 */
|
||||
pitch = stride_bytes / 64;
|
||||
stride_pixels = stride_bytes / 4;
|
||||
num_loops = DIV_ROUND_UP(num_pages, 8191);
|
||||
num_loops = DIV_ROUND_UP(num_gpu_pages, 8191);
|
||||
|
||||
/* Ask for enough room for blit + flush + fence */
|
||||
ndw = 64 + (10 * num_loops);
|
||||
@ -746,12 +746,12 @@ int r100_copy_blit(struct radeon_device *rdev,
|
||||
DRM_ERROR("radeon: moving bo (%d) asking for %u dw.\n", r, ndw);
|
||||
return -EINVAL;
|
||||
}
|
||||
while (num_pages > 0) {
|
||||
cur_pages = num_pages;
|
||||
while (num_gpu_pages > 0) {
|
||||
cur_pages = num_gpu_pages;
|
||||
if (cur_pages > 8191) {
|
||||
cur_pages = 8191;
|
||||
}
|
||||
num_pages -= cur_pages;
|
||||
num_gpu_pages -= cur_pages;
|
||||
|
||||
/* pages are in Y direction - height
|
||||
page width in X direction - width */
|
||||
@ -773,8 +773,8 @@ int r100_copy_blit(struct radeon_device *rdev,
|
||||
radeon_ring_write(rdev, (0x1fff) | (0x1fff << 16));
|
||||
radeon_ring_write(rdev, 0);
|
||||
radeon_ring_write(rdev, (0x1fff) | (0x1fff << 16));
|
||||
radeon_ring_write(rdev, num_pages);
|
||||
radeon_ring_write(rdev, num_pages);
|
||||
radeon_ring_write(rdev, cur_pages);
|
||||
radeon_ring_write(rdev, cur_pages);
|
||||
radeon_ring_write(rdev, cur_pages | (stride_pixels << 16));
|
||||
}
|
||||
radeon_ring_write(rdev, PACKET0(RADEON_DSTCACHE_CTLSTAT, 0));
|
||||
@ -990,7 +990,8 @@ int r100_cp_init(struct radeon_device *rdev, unsigned ring_size)
|
||||
/* Force read & write ptr to 0 */
|
||||
WREG32(RADEON_CP_RB_CNTL, tmp | RADEON_RB_RPTR_WR_ENA | RADEON_RB_NO_UPDATE);
|
||||
WREG32(RADEON_CP_RB_RPTR_WR, 0);
|
||||
WREG32(RADEON_CP_RB_WPTR, 0);
|
||||
rdev->cp.wptr = 0;
|
||||
WREG32(RADEON_CP_RB_WPTR, rdev->cp.wptr);
|
||||
|
||||
/* set the wb address whether it's enabled or not */
|
||||
WREG32(R_00070C_CP_RB_RPTR_ADDR,
|
||||
@ -1007,9 +1008,6 @@ int r100_cp_init(struct radeon_device *rdev, unsigned ring_size)
|
||||
WREG32(RADEON_CP_RB_CNTL, tmp);
|
||||
udelay(10);
|
||||
rdev->cp.rptr = RREG32(RADEON_CP_RB_RPTR);
|
||||
rdev->cp.wptr = RREG32(RADEON_CP_RB_WPTR);
|
||||
/* protect against crazy HW on resume */
|
||||
rdev->cp.wptr &= rdev->cp.ptr_mask;
|
||||
/* Set cp mode to bus mastering & enable cp*/
|
||||
WREG32(RADEON_CP_CSQ_MODE,
|
||||
REG_SET(RADEON_INDIRECT2_START, indirect2_start) |
|
||||
|
@ -84,7 +84,7 @@ static int r200_get_vtx_size_0(uint32_t vtx_fmt_0)
|
||||
int r200_copy_dma(struct radeon_device *rdev,
|
||||
uint64_t src_offset,
|
||||
uint64_t dst_offset,
|
||||
unsigned num_pages,
|
||||
unsigned num_gpu_pages,
|
||||
struct radeon_fence *fence)
|
||||
{
|
||||
uint32_t size;
|
||||
@ -93,7 +93,7 @@ int r200_copy_dma(struct radeon_device *rdev,
|
||||
int r = 0;
|
||||
|
||||
/* radeon pitch is /64 */
|
||||
size = num_pages << PAGE_SHIFT;
|
||||
size = num_gpu_pages << RADEON_GPU_PAGE_SHIFT;
|
||||
num_loops = DIV_ROUND_UP(size, 0x1FFFFF);
|
||||
r = radeon_ring_lock(rdev, num_loops * 4 + 64);
|
||||
if (r) {
|
||||
|
@ -2209,7 +2209,8 @@ int r600_cp_resume(struct radeon_device *rdev)
|
||||
/* Initialize the ring buffer's read and write pointers */
|
||||
WREG32(CP_RB_CNTL, tmp | RB_RPTR_WR_ENA);
|
||||
WREG32(CP_RB_RPTR_WR, 0);
|
||||
WREG32(CP_RB_WPTR, 0);
|
||||
rdev->cp.wptr = 0;
|
||||
WREG32(CP_RB_WPTR, rdev->cp.wptr);
|
||||
|
||||
/* set the wb address whether it's enabled or not */
|
||||
WREG32(CP_RB_RPTR_ADDR,
|
||||
@ -2231,7 +2232,6 @@ int r600_cp_resume(struct radeon_device *rdev)
|
||||
WREG32(CP_DEBUG, (1 << 27) | (1 << 28));
|
||||
|
||||
rdev->cp.rptr = RREG32(CP_RB_RPTR);
|
||||
rdev->cp.wptr = RREG32(CP_RB_WPTR);
|
||||
|
||||
r600_cp_start(rdev);
|
||||
rdev->cp.ready = true;
|
||||
@ -2353,21 +2353,23 @@ void r600_fence_ring_emit(struct radeon_device *rdev,
|
||||
}
|
||||
|
||||
int r600_copy_blit(struct radeon_device *rdev,
|
||||
uint64_t src_offset, uint64_t dst_offset,
|
||||
unsigned num_pages, struct radeon_fence *fence)
|
||||
uint64_t src_offset,
|
||||
uint64_t dst_offset,
|
||||
unsigned num_gpu_pages,
|
||||
struct radeon_fence *fence)
|
||||
{
|
||||
int r;
|
||||
|
||||
mutex_lock(&rdev->r600_blit.mutex);
|
||||
rdev->r600_blit.vb_ib = NULL;
|
||||
r = r600_blit_prepare_copy(rdev, num_pages * RADEON_GPU_PAGE_SIZE);
|
||||
r = r600_blit_prepare_copy(rdev, num_gpu_pages * RADEON_GPU_PAGE_SIZE);
|
||||
if (r) {
|
||||
if (rdev->r600_blit.vb_ib)
|
||||
radeon_ib_free(rdev, &rdev->r600_blit.vb_ib);
|
||||
mutex_unlock(&rdev->r600_blit.mutex);
|
||||
return r;
|
||||
}
|
||||
r600_kms_blit_copy(rdev, src_offset, dst_offset, num_pages * RADEON_GPU_PAGE_SIZE);
|
||||
r600_kms_blit_copy(rdev, src_offset, dst_offset, num_gpu_pages * RADEON_GPU_PAGE_SIZE);
|
||||
r600_blit_done_copy(rdev, fence);
|
||||
mutex_unlock(&rdev->r600_blit.mutex);
|
||||
return 0;
|
||||
|
@ -322,6 +322,7 @@ union radeon_gart_table {
|
||||
|
||||
#define RADEON_GPU_PAGE_SIZE 4096
|
||||
#define RADEON_GPU_PAGE_MASK (RADEON_GPU_PAGE_SIZE - 1)
|
||||
#define RADEON_GPU_PAGE_SHIFT 12
|
||||
|
||||
struct radeon_gart {
|
||||
dma_addr_t table_addr;
|
||||
@ -914,17 +915,17 @@ struct radeon_asic {
|
||||
int (*copy_blit)(struct radeon_device *rdev,
|
||||
uint64_t src_offset,
|
||||
uint64_t dst_offset,
|
||||
unsigned num_pages,
|
||||
unsigned num_gpu_pages,
|
||||
struct radeon_fence *fence);
|
||||
int (*copy_dma)(struct radeon_device *rdev,
|
||||
uint64_t src_offset,
|
||||
uint64_t dst_offset,
|
||||
unsigned num_pages,
|
||||
unsigned num_gpu_pages,
|
||||
struct radeon_fence *fence);
|
||||
int (*copy)(struct radeon_device *rdev,
|
||||
uint64_t src_offset,
|
||||
uint64_t dst_offset,
|
||||
unsigned num_pages,
|
||||
unsigned num_gpu_pages,
|
||||
struct radeon_fence *fence);
|
||||
uint32_t (*get_engine_clock)(struct radeon_device *rdev);
|
||||
void (*set_engine_clock)(struct radeon_device *rdev, uint32_t eng_clock);
|
||||
|
@ -75,7 +75,7 @@ uint32_t r100_pll_rreg(struct radeon_device *rdev, uint32_t reg);
|
||||
int r100_copy_blit(struct radeon_device *rdev,
|
||||
uint64_t src_offset,
|
||||
uint64_t dst_offset,
|
||||
unsigned num_pages,
|
||||
unsigned num_gpu_pages,
|
||||
struct radeon_fence *fence);
|
||||
int r100_set_surface_reg(struct radeon_device *rdev, int reg,
|
||||
uint32_t tiling_flags, uint32_t pitch,
|
||||
@ -143,7 +143,7 @@ extern void r100_post_page_flip(struct radeon_device *rdev, int crtc);
|
||||
extern int r200_copy_dma(struct radeon_device *rdev,
|
||||
uint64_t src_offset,
|
||||
uint64_t dst_offset,
|
||||
unsigned num_pages,
|
||||
unsigned num_gpu_pages,
|
||||
struct radeon_fence *fence);
|
||||
void r200_set_safe_registers(struct radeon_device *rdev);
|
||||
|
||||
@ -311,7 +311,7 @@ void r600_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib);
|
||||
int r600_ring_test(struct radeon_device *rdev);
|
||||
int r600_copy_blit(struct radeon_device *rdev,
|
||||
uint64_t src_offset, uint64_t dst_offset,
|
||||
unsigned num_pages, struct radeon_fence *fence);
|
||||
unsigned num_gpu_pages, struct radeon_fence *fence);
|
||||
void r600_hpd_init(struct radeon_device *rdev);
|
||||
void r600_hpd_fini(struct radeon_device *rdev);
|
||||
bool r600_hpd_sense(struct radeon_device *rdev, enum radeon_hpd_id hpd);
|
||||
@ -403,7 +403,7 @@ void evergreen_bandwidth_update(struct radeon_device *rdev);
|
||||
void evergreen_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib);
|
||||
int evergreen_copy_blit(struct radeon_device *rdev,
|
||||
uint64_t src_offset, uint64_t dst_offset,
|
||||
unsigned num_pages, struct radeon_fence *fence);
|
||||
unsigned num_gpu_pages, struct radeon_fence *fence);
|
||||
void evergreen_hpd_init(struct radeon_device *rdev);
|
||||
void evergreen_hpd_fini(struct radeon_device *rdev);
|
||||
bool evergreen_hpd_sense(struct radeon_device *rdev, enum radeon_hpd_id hpd);
|
||||
|
@ -219,6 +219,9 @@ void radeon_get_clock_info(struct drm_device *dev)
|
||||
} else {
|
||||
DRM_INFO("Using generic clock info\n");
|
||||
|
||||
/* may need to be per card */
|
||||
rdev->clock.max_pixel_clock = 35000;
|
||||
|
||||
if (rdev->flags & RADEON_IS_IGP) {
|
||||
p1pll->reference_freq = 1432;
|
||||
p2pll->reference_freq = 1432;
|
||||
|
@ -1297,12 +1297,33 @@ radeon_dp_detect(struct drm_connector *connector, bool force)
|
||||
if (!radeon_dig_connector->edp_on)
|
||||
atombios_set_edp_panel_power(connector,
|
||||
ATOM_TRANSMITTER_ACTION_POWER_OFF);
|
||||
} else {
|
||||
/* need to setup ddc on the bridge */
|
||||
if (radeon_connector_encoder_is_dp_bridge(connector)) {
|
||||
} else if (radeon_connector_encoder_is_dp_bridge(connector)) {
|
||||
/* DP bridges are always DP */
|
||||
radeon_dig_connector->dp_sink_type = CONNECTOR_OBJECT_ID_DISPLAYPORT;
|
||||
/* get the DPCD from the bridge */
|
||||
radeon_dp_getdpcd(radeon_connector);
|
||||
|
||||
if (radeon_hpd_sense(rdev, radeon_connector->hpd.hpd))
|
||||
ret = connector_status_connected;
|
||||
else {
|
||||
/* need to setup ddc on the bridge */
|
||||
if (encoder)
|
||||
radeon_atom_ext_encoder_setup_ddc(encoder);
|
||||
if (radeon_ddc_probe(radeon_connector,
|
||||
radeon_connector->requires_extended_probe))
|
||||
ret = connector_status_connected;
|
||||
}
|
||||
|
||||
if ((ret == connector_status_disconnected) &&
|
||||
radeon_connector->dac_load_detect) {
|
||||
struct drm_encoder *encoder = radeon_best_single_encoder(connector);
|
||||
struct drm_encoder_helper_funcs *encoder_funcs;
|
||||
if (encoder) {
|
||||
encoder_funcs = encoder->helper_private;
|
||||
ret = encoder_funcs->detect(encoder, connector);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
radeon_dig_connector->dp_sink_type = radeon_dp_getsinktype(radeon_connector);
|
||||
if (radeon_hpd_sense(rdev, radeon_connector->hpd.hpd)) {
|
||||
ret = connector_status_connected;
|
||||
@ -1318,16 +1339,6 @@ radeon_dp_detect(struct drm_connector *connector, bool force)
|
||||
ret = connector_status_connected;
|
||||
}
|
||||
}
|
||||
|
||||
if ((ret == connector_status_disconnected) &&
|
||||
radeon_connector->dac_load_detect) {
|
||||
struct drm_encoder *encoder = radeon_best_single_encoder(connector);
|
||||
struct drm_encoder_helper_funcs *encoder_funcs;
|
||||
if (encoder) {
|
||||
encoder_funcs = encoder->helper_private;
|
||||
ret = encoder_funcs->detect(encoder, connector);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
radeon_connector_update_scratch_regs(connector, ret);
|
||||
|
@ -473,8 +473,8 @@ pflip_cleanup:
|
||||
spin_lock_irqsave(&dev->event_lock, flags);
|
||||
radeon_crtc->unpin_work = NULL;
|
||||
unlock_free:
|
||||
drm_gem_object_unreference_unlocked(old_radeon_fb->obj);
|
||||
spin_unlock_irqrestore(&dev->event_lock, flags);
|
||||
drm_gem_object_unreference_unlocked(old_radeon_fb->obj);
|
||||
radeon_fence_unref(&work->fence);
|
||||
kfree(work);
|
||||
|
||||
@ -707,16 +707,21 @@ int radeon_ddc_get_modes(struct radeon_connector *radeon_connector)
|
||||
radeon_router_select_ddc_port(radeon_connector);
|
||||
|
||||
if ((radeon_connector->base.connector_type == DRM_MODE_CONNECTOR_DisplayPort) ||
|
||||
(radeon_connector->base.connector_type == DRM_MODE_CONNECTOR_eDP)) {
|
||||
(radeon_connector->base.connector_type == DRM_MODE_CONNECTOR_eDP) ||
|
||||
radeon_connector_encoder_is_dp_bridge(&radeon_connector->base)) {
|
||||
struct radeon_connector_atom_dig *dig = radeon_connector->con_priv;
|
||||
|
||||
if ((dig->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT ||
|
||||
dig->dp_sink_type == CONNECTOR_OBJECT_ID_eDP) && dig->dp_i2c_bus)
|
||||
radeon_connector->edid = drm_get_edid(&radeon_connector->base, &dig->dp_i2c_bus->adapter);
|
||||
}
|
||||
if (!radeon_connector->ddc_bus)
|
||||
return -1;
|
||||
if (!radeon_connector->edid) {
|
||||
radeon_connector->edid = drm_get_edid(&radeon_connector->base, &radeon_connector->ddc_bus->adapter);
|
||||
radeon_connector->edid = drm_get_edid(&radeon_connector->base,
|
||||
&dig->dp_i2c_bus->adapter);
|
||||
else if (radeon_connector->ddc_bus && !radeon_connector->edid)
|
||||
radeon_connector->edid = drm_get_edid(&radeon_connector->base,
|
||||
&radeon_connector->ddc_bus->adapter);
|
||||
} else {
|
||||
if (radeon_connector->ddc_bus && !radeon_connector->edid)
|
||||
radeon_connector->edid = drm_get_edid(&radeon_connector->base,
|
||||
&radeon_connector->ddc_bus->adapter);
|
||||
}
|
||||
|
||||
if (!radeon_connector->edid) {
|
||||
|
@ -277,7 +277,12 @@ static int radeon_move_blit(struct ttm_buffer_object *bo,
|
||||
DRM_ERROR("Trying to move memory with CP turned off.\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
r = radeon_copy(rdev, old_start, new_start, new_mem->num_pages, fence);
|
||||
|
||||
BUILD_BUG_ON((PAGE_SIZE % RADEON_GPU_PAGE_SIZE) != 0);
|
||||
|
||||
r = radeon_copy(rdev, old_start, new_start,
|
||||
new_mem->num_pages * (PAGE_SIZE / RADEON_GPU_PAGE_SIZE), /* GPU pages */
|
||||
fence);
|
||||
/* FIXME: handle copy error */
|
||||
r = ttm_bo_move_accel_cleanup(bo, (void *)fence, NULL,
|
||||
evict, no_wait_reserve, no_wait_gpu, new_mem);
|
||||
|
@ -394,7 +394,8 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo,
|
||||
|
||||
if (!(new_man->flags & TTM_MEMTYPE_FLAG_FIXED)) {
|
||||
if (bo->ttm == NULL) {
|
||||
ret = ttm_bo_add_ttm(bo, false);
|
||||
bool zero = !(old_man->flags & TTM_MEMTYPE_FLAG_FIXED);
|
||||
ret = ttm_bo_add_ttm(bo, zero);
|
||||
if (ret)
|
||||
goto out_err;
|
||||
}
|
||||
|
@ -277,6 +277,7 @@
|
||||
#define USB_DEVICE_ID_PENPOWER 0x00f4
|
||||
|
||||
#define USB_VENDOR_ID_GREENASIA 0x0e8f
|
||||
#define USB_DEVICE_ID_GREENASIA_DUAL_USB_JOYPAD 0x3013
|
||||
|
||||
#define USB_VENDOR_ID_GRETAGMACBETH 0x0971
|
||||
#define USB_DEVICE_ID_GRETAGMACBETH_HUEY 0x2005
|
||||
|
@ -81,6 +81,28 @@ MODULE_PARM_DESC(report_undeciphered, "Report undeciphered multi-touch state fie
|
||||
#define NO_TOUCHES -1
|
||||
#define SINGLE_TOUCH_UP -2
|
||||
|
||||
/* Touch surface information. Dimension is in hundredths of a mm, min and max
|
||||
* are in units. */
|
||||
#define MOUSE_DIMENSION_X (float)9056
|
||||
#define MOUSE_MIN_X -1100
|
||||
#define MOUSE_MAX_X 1258
|
||||
#define MOUSE_RES_X ((MOUSE_MAX_X - MOUSE_MIN_X) / (MOUSE_DIMENSION_X / 100))
|
||||
#define MOUSE_DIMENSION_Y (float)5152
|
||||
#define MOUSE_MIN_Y -1589
|
||||
#define MOUSE_MAX_Y 2047
|
||||
#define MOUSE_RES_Y ((MOUSE_MAX_Y - MOUSE_MIN_Y) / (MOUSE_DIMENSION_Y / 100))
|
||||
|
||||
#define TRACKPAD_DIMENSION_X (float)13000
|
||||
#define TRACKPAD_MIN_X -2909
|
||||
#define TRACKPAD_MAX_X 3167
|
||||
#define TRACKPAD_RES_X \
|
||||
((TRACKPAD_MAX_X - TRACKPAD_MIN_X) / (TRACKPAD_DIMENSION_X / 100))
|
||||
#define TRACKPAD_DIMENSION_Y (float)11000
|
||||
#define TRACKPAD_MIN_Y -2456
|
||||
#define TRACKPAD_MAX_Y 2565
|
||||
#define TRACKPAD_RES_Y \
|
||||
((TRACKPAD_MAX_Y - TRACKPAD_MIN_Y) / (TRACKPAD_DIMENSION_Y / 100))
|
||||
|
||||
/**
|
||||
* struct magicmouse_sc - Tracks Magic Mouse-specific data.
|
||||
* @input: Input device through which we report events.
|
||||
@ -406,17 +428,31 @@ static void magicmouse_setup_input(struct input_dev *input, struct hid_device *h
|
||||
* inverse of the reported Y.
|
||||
*/
|
||||
if (input->id.product == USB_DEVICE_ID_APPLE_MAGICMOUSE) {
|
||||
input_set_abs_params(input, ABS_MT_POSITION_X, -1100,
|
||||
1358, 4, 0);
|
||||
input_set_abs_params(input, ABS_MT_POSITION_Y, -1589,
|
||||
2047, 4, 0);
|
||||
input_set_abs_params(input, ABS_MT_POSITION_X,
|
||||
MOUSE_MIN_X, MOUSE_MAX_X, 4, 0);
|
||||
input_set_abs_params(input, ABS_MT_POSITION_Y,
|
||||
MOUSE_MIN_Y, MOUSE_MAX_Y, 4, 0);
|
||||
|
||||
input_abs_set_res(input, ABS_MT_POSITION_X,
|
||||
MOUSE_RES_X);
|
||||
input_abs_set_res(input, ABS_MT_POSITION_Y,
|
||||
MOUSE_RES_Y);
|
||||
} else { /* USB_DEVICE_ID_APPLE_MAGICTRACKPAD */
|
||||
input_set_abs_params(input, ABS_X, -2909, 3167, 4, 0);
|
||||
input_set_abs_params(input, ABS_Y, -2456, 2565, 4, 0);
|
||||
input_set_abs_params(input, ABS_MT_POSITION_X, -2909,
|
||||
3167, 4, 0);
|
||||
input_set_abs_params(input, ABS_MT_POSITION_Y, -2456,
|
||||
2565, 4, 0);
|
||||
input_set_abs_params(input, ABS_X, TRACKPAD_MIN_X,
|
||||
TRACKPAD_MAX_X, 4, 0);
|
||||
input_set_abs_params(input, ABS_Y, TRACKPAD_MIN_Y,
|
||||
TRACKPAD_MAX_Y, 4, 0);
|
||||
input_set_abs_params(input, ABS_MT_POSITION_X,
|
||||
TRACKPAD_MIN_X, TRACKPAD_MAX_X, 4, 0);
|
||||
input_set_abs_params(input, ABS_MT_POSITION_Y,
|
||||
TRACKPAD_MIN_Y, TRACKPAD_MAX_Y, 4, 0);
|
||||
|
||||
input_abs_set_res(input, ABS_X, TRACKPAD_RES_X);
|
||||
input_abs_set_res(input, ABS_Y, TRACKPAD_RES_Y);
|
||||
input_abs_set_res(input, ABS_MT_POSITION_X,
|
||||
TRACKPAD_RES_X);
|
||||
input_abs_set_res(input, ABS_MT_POSITION_Y,
|
||||
TRACKPAD_RES_Y);
|
||||
}
|
||||
|
||||
input_set_events_per_packet(input, 60);
|
||||
@ -501,9 +537,17 @@ static int magicmouse_probe(struct hid_device *hdev,
|
||||
}
|
||||
report->size = 6;
|
||||
|
||||
/*
|
||||
* Some devices repond with 'invalid report id' when feature
|
||||
* report switching it into multitouch mode is sent to it.
|
||||
*
|
||||
* This results in -EIO from the _raw low-level transport callback,
|
||||
* but there seems to be no other way of switching the mode.
|
||||
* Thus the super-ugly hacky success check below.
|
||||
*/
|
||||
ret = hdev->hid_output_raw_report(hdev, feature, sizeof(feature),
|
||||
HID_FEATURE_REPORT);
|
||||
if (ret != sizeof(feature)) {
|
||||
if (ret != -EIO && ret != sizeof(feature)) {
|
||||
hid_err(hdev, "unable to request touch data (%d)\n", ret);
|
||||
goto err_stop_hw;
|
||||
}
|
||||
|
@ -353,11 +353,7 @@ static int wacom_probe(struct hid_device *hdev,
|
||||
if (ret) {
|
||||
hid_warn(hdev, "can't create sysfs battery attribute, err: %d\n",
|
||||
ret);
|
||||
/*
|
||||
* battery attribute is not critical for the tablet, but if it
|
||||
* failed then there is no need to create ac attribute
|
||||
*/
|
||||
goto move_on;
|
||||
goto err_battery;
|
||||
}
|
||||
|
||||
wdata->ac.properties = wacom_ac_props;
|
||||
@ -371,18 +367,14 @@ static int wacom_probe(struct hid_device *hdev,
|
||||
if (ret) {
|
||||
hid_warn(hdev,
|
||||
"can't create ac battery attribute, err: %d\n", ret);
|
||||
/*
|
||||
* ac attribute is not critical for the tablet, but if it
|
||||
* failed then we don't want to battery attribute to exist
|
||||
*/
|
||||
power_supply_unregister(&wdata->battery);
|
||||
goto err_ac;
|
||||
}
|
||||
|
||||
move_on:
|
||||
#endif
|
||||
hidinput = list_entry(hdev->inputs.next, struct hid_input, list);
|
||||
input = hidinput->input;
|
||||
|
||||
__set_bit(INPUT_PROP_POINTER, input->propbit);
|
||||
|
||||
/* Basics */
|
||||
input->evbit[0] |= BIT(EV_KEY) | BIT(EV_ABS) | BIT(EV_REL);
|
||||
|
||||
@ -416,6 +408,13 @@ move_on:
|
||||
|
||||
return 0;
|
||||
|
||||
#ifdef CONFIG_HID_WACOM_POWER_SUPPLY
|
||||
err_ac:
|
||||
power_supply_unregister(&wdata->battery);
|
||||
err_battery:
|
||||
device_remove_file(&hdev->dev, &dev_attr_speed);
|
||||
hid_hw_stop(hdev);
|
||||
#endif
|
||||
err_free:
|
||||
kfree(wdata);
|
||||
return ret;
|
||||
@ -426,6 +425,7 @@ static void wacom_remove(struct hid_device *hdev)
|
||||
#ifdef CONFIG_HID_WACOM_POWER_SUPPLY
|
||||
struct wacom_data *wdata = hid_get_drvdata(hdev);
|
||||
#endif
|
||||
device_remove_file(&hdev->dev, &dev_attr_speed);
|
||||
hid_hw_stop(hdev);
|
||||
|
||||
#ifdef CONFIG_HID_WACOM_POWER_SUPPLY
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user