mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-24 19:40:21 +09:00
Merge branch 'rpi-3.12.y' of https://github.com/raspberrypi/linux into HEAD
This commit is contained in:
@@ -101,14 +101,23 @@ style to do this even if your device holds the default setting,
|
||||
because this shows that you did think about these issues wrt. your
|
||||
device.
|
||||
|
||||
The query is performed via a call to dma_set_mask():
|
||||
The query is performed via a call to dma_set_mask_and_coherent():
|
||||
|
||||
int dma_set_mask(struct device *dev, u64 mask);
|
||||
int dma_set_mask_and_coherent(struct device *dev, u64 mask);
|
||||
|
||||
The query for consistent allocations is performed via a call to
|
||||
dma_set_coherent_mask():
|
||||
which will query the mask for both streaming and coherent APIs together.
|
||||
If you have some special requirements, then the following two separate
|
||||
queries can be used instead:
|
||||
|
||||
int dma_set_coherent_mask(struct device *dev, u64 mask);
|
||||
The query for streaming mappings is performed via a call to
|
||||
dma_set_mask():
|
||||
|
||||
int dma_set_mask(struct device *dev, u64 mask);
|
||||
|
||||
The query for consistent allocations is performed via a call
|
||||
to dma_set_coherent_mask():
|
||||
|
||||
int dma_set_coherent_mask(struct device *dev, u64 mask);
|
||||
|
||||
Here, dev is a pointer to the device struct of your device, and mask
|
||||
is a bit mask describing which bits of an address your device
|
||||
@@ -137,7 +146,7 @@ exactly why.
|
||||
|
||||
The standard 32-bit addressing device would do something like this:
|
||||
|
||||
if (dma_set_mask(dev, DMA_BIT_MASK(32))) {
|
||||
if (dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32))) {
|
||||
printk(KERN_WARNING
|
||||
"mydev: No suitable DMA available.\n");
|
||||
goto ignore_this_device;
|
||||
@@ -171,22 +180,20 @@ the case would look like this:
|
||||
|
||||
int using_dac, consistent_using_dac;
|
||||
|
||||
if (!dma_set_mask(dev, DMA_BIT_MASK(64))) {
|
||||
if (!dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64))) {
|
||||
using_dac = 1;
|
||||
consistent_using_dac = 1;
|
||||
dma_set_coherent_mask(dev, DMA_BIT_MASK(64));
|
||||
} else if (!dma_set_mask(dev, DMA_BIT_MASK(32))) {
|
||||
} else if (!dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32))) {
|
||||
using_dac = 0;
|
||||
consistent_using_dac = 0;
|
||||
dma_set_coherent_mask(dev, DMA_BIT_MASK(32));
|
||||
} else {
|
||||
printk(KERN_WARNING
|
||||
"mydev: No suitable DMA available.\n");
|
||||
goto ignore_this_device;
|
||||
}
|
||||
|
||||
dma_set_coherent_mask() will always be able to set the same or a
|
||||
smaller mask as dma_set_mask(). However for the rare case that a
|
||||
The coherent coherent mask will always be able to set the same or a
|
||||
smaller mask as the streaming mask. However for the rare case that a
|
||||
device driver only uses consistent allocations, one would have to
|
||||
check the return value from dma_set_coherent_mask().
|
||||
|
||||
@@ -199,9 +206,9 @@ address you might do something like:
|
||||
goto ignore_this_device;
|
||||
}
|
||||
|
||||
When dma_set_mask() is successful, and returns zero, the kernel saves
|
||||
away this mask you have provided. The kernel will use this
|
||||
information later when you make DMA mappings.
|
||||
When dma_set_mask() or dma_set_mask_and_coherent() is successful, and
|
||||
returns zero, the kernel saves away this mask you have provided. The
|
||||
kernel will use this information later when you make DMA mappings.
|
||||
|
||||
There is a case which we are aware of at this time, which is worth
|
||||
mentioning in this documentation. If your device supports multiple
|
||||
|
||||
@@ -141,6 +141,14 @@ won't change the current mask settings. It is more intended as an
|
||||
internal API for use by the platform than an external API for use by
|
||||
driver writers.
|
||||
|
||||
int
|
||||
dma_set_mask_and_coherent(struct device *dev, u64 mask)
|
||||
|
||||
Checks to see if the mask is possible and updates the device
|
||||
streaming and coherent DMA mask parameters if it is.
|
||||
|
||||
Returns: 0 if successful and a negative error if not.
|
||||
|
||||
int
|
||||
dma_set_mask(struct device *dev, u64 mask)
|
||||
|
||||
|
||||
@@ -2026,8 +2026,8 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
||||
-------------------
|
||||
|
||||
Module for sound cards based on the Asus AV66/AV100/AV200 chips,
|
||||
i.e., Xonar D1, DX, D2, D2X, DS, Essence ST (Deluxe), Essence STX,
|
||||
HDAV1.3 (Deluxe), and HDAV1.3 Slim.
|
||||
i.e., Xonar D1, DX, D2, D2X, DS, DSX, Essence ST (Deluxe),
|
||||
Essence STX (II), HDAV1.3 (Deluxe), and HDAV1.3 Slim.
|
||||
|
||||
This module supports autoprobe and multiple cards.
|
||||
|
||||
|
||||
@@ -12,6 +12,8 @@ ffffc90000000000 - ffffe8ffffffffff (=45 bits) vmalloc/ioremap space
|
||||
ffffe90000000000 - ffffe9ffffffffff (=40 bits) hole
|
||||
ffffea0000000000 - ffffeaffffffffff (=40 bits) virtual memory map (1TB)
|
||||
... unused hole ...
|
||||
ffffff0000000000 - ffffff7fffffffff (=39 bits) %esp fixup stacks
|
||||
... unused hole ...
|
||||
ffffffff80000000 - ffffffffa0000000 (=512 MB) kernel text mapping, from phys 0
|
||||
ffffffffa0000000 - ffffffffff5fffff (=1525 MB) module mapping space
|
||||
ffffffffff600000 - ffffffffffdfffff (=8 MB) vsyscalls
|
||||
|
||||
4
Makefile
4
Makefile
@@ -1,6 +1,6 @@
|
||||
VERSION = 3
|
||||
PATCHLEVEL = 12
|
||||
SUBLEVEL = 25
|
||||
SUBLEVEL = 28
|
||||
EXTRAVERSION =
|
||||
NAME = One Giant Leap for Frogkind
|
||||
|
||||
@@ -614,6 +614,8 @@ KBUILD_CFLAGS += -fomit-frame-pointer
|
||||
endif
|
||||
endif
|
||||
|
||||
KBUILD_CFLAGS += $(call cc-option, -fno-var-tracking-assignments)
|
||||
|
||||
ifdef CONFIG_DEBUG_INFO
|
||||
KBUILD_CFLAGS += -g
|
||||
KBUILD_AFLAGS += -gdwarf-2
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#ifndef _UAPI__ASM_ARC_PTRACE_H
|
||||
#define _UAPI__ASM_ARC_PTRACE_H
|
||||
|
||||
#define PTRACE_GET_THREAD_AREA 25
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
/*
|
||||
|
||||
@@ -146,6 +146,10 @@ long arch_ptrace(struct task_struct *child, long request,
|
||||
pr_debug("REQ=%ld: ADDR =0x%lx, DATA=0x%lx)\n", request, addr, data);
|
||||
|
||||
switch (request) {
|
||||
case PTRACE_GET_THREAD_AREA:
|
||||
ret = put_user(task_thread_info(child)->thr_ptr,
|
||||
(unsigned long __user *)data);
|
||||
break;
|
||||
default:
|
||||
ret = ptrace_request(child, request, addr, data);
|
||||
break;
|
||||
|
||||
@@ -5,6 +5,7 @@ config ARM
|
||||
select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
|
||||
select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
|
||||
select ARCH_HAVE_CUSTOM_GPIO_H
|
||||
select ARCH_SUPPORTS_ATOMIC_RMW
|
||||
select ARCH_WANT_IPC_PARSE_VERSION
|
||||
select BUILDTIME_EXTABLE_SORT if MMU
|
||||
select CLONE_BACKWARDS
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
spi2 = &spi3;
|
||||
usb0 = &usbotg;
|
||||
usb1 = &usbhost1;
|
||||
ethernet0 = &fec;
|
||||
};
|
||||
|
||||
cpus {
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
spi0 = &cspi1;
|
||||
spi1 = &cspi2;
|
||||
spi2 = &cspi3;
|
||||
ethernet0 = &fec;
|
||||
};
|
||||
|
||||
aitc: aitc-interrupt-controller@e0000000 {
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
spi0 = &ecspi1;
|
||||
spi1 = &ecspi2;
|
||||
spi2 = &cspi;
|
||||
ethernet0 = &fec;
|
||||
};
|
||||
|
||||
tzic: tz-interrupt-controller@e0000000 {
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
spi0 = &ecspi1;
|
||||
spi1 = &ecspi2;
|
||||
spi2 = &cspi;
|
||||
ethernet0 = &fec;
|
||||
};
|
||||
|
||||
cpus {
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
# CONFIG_LOCALVERSION_AUTO is not set
|
||||
CONFIG_SYSVIPC=y
|
||||
CONFIG_POSIX_MQUEUE=y
|
||||
CONFIG_NO_HZ=y
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
CONFIG_IKCONFIG=y
|
||||
CONFIG_IKCONFIG_PROC=y
|
||||
# CONFIG_UID16 is not set
|
||||
@@ -15,9 +16,9 @@ CONFIG_MODULE_UNLOAD=y
|
||||
CONFIG_MODVERSIONS=y
|
||||
CONFIG_MODULE_SRCVERSION_ALL=y
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
CONFIG_PARTITION_ADVANCED=y
|
||||
CONFIG_MAC_PARTITION=y
|
||||
CONFIG_ARCH_BCM2708=y
|
||||
CONFIG_NO_HZ=y
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
CONFIG_AEABI=y
|
||||
CONFIG_ZBOOT_ROM_TEXT=0x0
|
||||
CONFIG_ZBOOT_ROM_BSS=0x0
|
||||
@@ -57,8 +58,6 @@ CONFIG_USB_IRDA=m
|
||||
CONFIG_SIGMATEL_FIR=m
|
||||
CONFIG_MCS_FIR=m
|
||||
CONFIG_BT=m
|
||||
CONFIG_BT_L2CAP=y
|
||||
CONFIG_BT_SCO=y
|
||||
CONFIG_BT_RFCOMM=m
|
||||
CONFIG_BT_RFCOMM_TTY=y
|
||||
CONFIG_BT_BNEP=m
|
||||
@@ -87,7 +86,6 @@ CONFIG_BLK_DEV_CRYPTOLOOP=m
|
||||
CONFIG_BLK_DEV_NBD=m
|
||||
CONFIG_BLK_DEV_RAM=y
|
||||
CONFIG_CDROM_PKTCDVD=m
|
||||
CONFIG_MISC_DEVICES=y
|
||||
CONFIG_SCSI=y
|
||||
# CONFIG_SCSI_PROC_FS is not set
|
||||
CONFIG_BLK_DEV_SD=m
|
||||
@@ -95,44 +93,16 @@ CONFIG_BLK_DEV_SR=m
|
||||
CONFIG_SCSI_MULTI_LUN=y
|
||||
# CONFIG_SCSI_LOWLEVEL is not set
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_NETCONSOLE=m
|
||||
CONFIG_TUN=m
|
||||
CONFIG_PHYLIB=m
|
||||
CONFIG_MDIO_BITBANG=m
|
||||
CONFIG_NET_ETHERNET=y
|
||||
# CONFIG_NETDEV_1000 is not set
|
||||
# CONFIG_NETDEV_10000 is not set
|
||||
CONFIG_LIBERTAS_THINFIRM=m
|
||||
CONFIG_LIBERTAS_THINFIRM_USB=m
|
||||
CONFIG_AT76C50X_USB=m
|
||||
CONFIG_USB_ZD1201=m
|
||||
CONFIG_USB_NET_RNDIS_WLAN=m
|
||||
CONFIG_RTL8187=m
|
||||
CONFIG_MAC80211_HWSIM=m
|
||||
CONFIG_ATH_COMMON=m
|
||||
CONFIG_ATH9K=m
|
||||
CONFIG_ATH9K_HTC=m
|
||||
CONFIG_CARL9170=m
|
||||
CONFIG_B43=m
|
||||
CONFIG_B43LEGACY=m
|
||||
CONFIG_HOSTAP=m
|
||||
CONFIG_IWM=m
|
||||
CONFIG_LIBERTAS=m
|
||||
CONFIG_LIBERTAS_USB=m
|
||||
CONFIG_LIBERTAS_SDIO=m
|
||||
CONFIG_P54_COMMON=m
|
||||
CONFIG_P54_USB=m
|
||||
CONFIG_RT2X00=m
|
||||
CONFIG_RT2500USB=m
|
||||
CONFIG_RT73USB=m
|
||||
CONFIG_RT2800USB=m
|
||||
CONFIG_RT2800USB_RT53XX=y
|
||||
CONFIG_RTL8192CU=m
|
||||
CONFIG_WL1251=m
|
||||
CONFIG_WL12XX_MENU=m
|
||||
CONFIG_ZD1211RW=m
|
||||
CONFIG_MWIFIEX=m
|
||||
CONFIG_MWIFIEX_SDIO=m
|
||||
CONFIG_WIMAX_I2400M_USB=m
|
||||
CONFIG_PPP=m
|
||||
CONFIG_PPP_BSDCOMP=m
|
||||
CONFIG_PPP_DEFLATE=m
|
||||
CONFIG_PPP_ASYNC=m
|
||||
CONFIG_PPP_SYNC_TTY=m
|
||||
CONFIG_SLIP=m
|
||||
CONFIG_SLIP_COMPRESSED=y
|
||||
CONFIG_USB_CATC=m
|
||||
CONFIG_USB_KAWETH=m
|
||||
CONFIG_USB_PEGASUS=m
|
||||
@@ -159,14 +129,31 @@ CONFIG_USB_NET_INT51X1=m
|
||||
CONFIG_USB_IPHETH=m
|
||||
CONFIG_USB_SIERRA_NET=m
|
||||
CONFIG_USB_VL600=m
|
||||
CONFIG_PPP=m
|
||||
CONFIG_PPP_ASYNC=m
|
||||
CONFIG_PPP_SYNC_TTY=m
|
||||
CONFIG_PPP_DEFLATE=m
|
||||
CONFIG_PPP_BSDCOMP=m
|
||||
CONFIG_SLIP=m
|
||||
CONFIG_SLIP_COMPRESSED=y
|
||||
CONFIG_NETCONSOLE=m
|
||||
CONFIG_LIBERTAS_THINFIRM=m
|
||||
CONFIG_LIBERTAS_THINFIRM_USB=m
|
||||
CONFIG_AT76C50X_USB=m
|
||||
CONFIG_USB_ZD1201=m
|
||||
CONFIG_USB_NET_RNDIS_WLAN=m
|
||||
CONFIG_RTL8187=m
|
||||
CONFIG_MAC80211_HWSIM=m
|
||||
CONFIG_B43=m
|
||||
CONFIG_B43LEGACY=m
|
||||
CONFIG_HOSTAP=m
|
||||
CONFIG_LIBERTAS=m
|
||||
CONFIG_LIBERTAS_USB=m
|
||||
CONFIG_LIBERTAS_SDIO=m
|
||||
CONFIG_P54_COMMON=m
|
||||
CONFIG_P54_USB=m
|
||||
CONFIG_RT2X00=m
|
||||
CONFIG_RT2500USB=m
|
||||
CONFIG_RT73USB=m
|
||||
CONFIG_RT2800USB=m
|
||||
CONFIG_RT2800USB_RT53XX=y
|
||||
CONFIG_RTL8192CU=m
|
||||
CONFIG_ZD1211RW=m
|
||||
CONFIG_MWIFIEX=m
|
||||
CONFIG_MWIFIEX_SDIO=m
|
||||
CONFIG_WIMAX_I2400M_USB=m
|
||||
CONFIG_INPUT_POLLDEV=m
|
||||
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
|
||||
CONFIG_INPUT_JOYDEV=m
|
||||
@@ -175,7 +162,6 @@ CONFIG_INPUT_EVDEV=m
|
||||
# CONFIG_INPUT_MOUSE is not set
|
||||
CONFIG_INPUT_MISC=y
|
||||
CONFIG_INPUT_AD714X=m
|
||||
CONFIG_INPUT_ATI_REMOTE=m
|
||||
CONFIG_INPUT_ATI_REMOTE2=m
|
||||
CONFIG_INPUT_KEYSPAN_REMOTE=m
|
||||
CONFIG_INPUT_POWERMATE=m
|
||||
@@ -190,18 +176,21 @@ CONFIG_SERIO_RAW=m
|
||||
CONFIG_GAMEPORT=m
|
||||
CONFIG_GAMEPORT_NS558=m
|
||||
CONFIG_GAMEPORT_L4=m
|
||||
CONFIG_VT_HW_CONSOLE_BINDING=y
|
||||
# CONFIG_LEGACY_PTYS is not set
|
||||
# CONFIG_DEVKMEM is not set
|
||||
CONFIG_SERIAL_AMBA_PL011=y
|
||||
CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
|
||||
# CONFIG_HW_RANDOM is not set
|
||||
CONFIG_RAW_DRIVER=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_CHARDEV=m
|
||||
CONFIG_I2C_BCM2708=m
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_BCM2708=m
|
||||
CONFIG_GPIO_SYSFS=y
|
||||
# CONFIG_HWMON is not set
|
||||
CONFIG_WATCHDOG=y
|
||||
CONFIG_BCM2708_WDT=m
|
||||
# CONFIG_MFD_SUPPORT is not set
|
||||
CONFIG_FB=y
|
||||
CONFIG_FB_BCM2708=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||
@@ -228,8 +217,6 @@ CONFIG_SND_USB_UA101=m
|
||||
CONFIG_SND_USB_CAIAQ=m
|
||||
CONFIG_SND_USB_6FIRE=m
|
||||
CONFIG_SOUND_PRIME=m
|
||||
CONFIG_HID_PID=y
|
||||
CONFIG_USB_HIDDEV=y
|
||||
CONFIG_HID_A4TECH=m
|
||||
CONFIG_HID_ACRUX=m
|
||||
CONFIG_HID_APPLE=m
|
||||
@@ -260,20 +247,18 @@ CONFIG_HID_ORTEK=m
|
||||
CONFIG_HID_PANTHERLORD=m
|
||||
CONFIG_HID_PETALYNX=m
|
||||
CONFIG_HID_PICOLCD=m
|
||||
CONFIG_HID_QUANTA=m
|
||||
CONFIG_HID_ROCCAT=m
|
||||
CONFIG_HID_SAMSUNG=m
|
||||
CONFIG_HID_SONY=m
|
||||
CONFIG_HID_SPEEDLINK=m
|
||||
CONFIG_HID_SUNPLUS=m
|
||||
CONFIG_HID_GREENASIA=m
|
||||
CONFIG_HID_SMARTJOYPLUS=m
|
||||
CONFIG_HID_TOPSEED=m
|
||||
CONFIG_HID_THRUSTMASTER=m
|
||||
CONFIG_HID_WACOM=m
|
||||
CONFIG_HID_WIIMOTE=m
|
||||
CONFIG_HID_ZEROPLUS=m
|
||||
CONFIG_HID_ZYDACRON=m
|
||||
CONFIG_HID_PID=y
|
||||
CONFIG_USB_HIDDEV=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
|
||||
CONFIG_USB_MON=m
|
||||
@@ -292,8 +277,6 @@ CONFIG_USB_STORAGE_ONETOUCH=m
|
||||
CONFIG_USB_STORAGE_KARMA=m
|
||||
CONFIG_USB_STORAGE_CYPRESS_ATACB=m
|
||||
CONFIG_USB_STORAGE_ENE_UB6250=m
|
||||
CONFIG_USB_UAS=m
|
||||
CONFIG_USB_LIBUSUAL=y
|
||||
CONFIG_USB_MDC800=m
|
||||
CONFIG_USB_MICROTEK=m
|
||||
CONFIG_USB_SERIAL=m
|
||||
@@ -308,7 +291,6 @@ CONFIG_USB_SERIAL_CP210X=m
|
||||
CONFIG_USB_SERIAL_CYPRESS_M8=m
|
||||
CONFIG_USB_SERIAL_EMPEG=m
|
||||
CONFIG_USB_SERIAL_FTDI_SIO=m
|
||||
CONFIG_USB_SERIAL_FUNSOFT=m
|
||||
CONFIG_USB_SERIAL_VISOR=m
|
||||
CONFIG_USB_SERIAL_IPAQ=m
|
||||
CONFIG_USB_SERIAL_IR=m
|
||||
@@ -324,16 +306,13 @@ CONFIG_USB_SERIAL_KOBIL_SCT=m
|
||||
CONFIG_USB_SERIAL_MCT_U232=m
|
||||
CONFIG_USB_SERIAL_MOS7720=m
|
||||
CONFIG_USB_SERIAL_MOS7840=m
|
||||
CONFIG_USB_SERIAL_MOTOROLA=m
|
||||
CONFIG_USB_SERIAL_NAVMAN=m
|
||||
CONFIG_USB_SERIAL_PL2303=m
|
||||
CONFIG_USB_SERIAL_OTI6858=m
|
||||
CONFIG_USB_SERIAL_QCAUX=m
|
||||
CONFIG_USB_SERIAL_QUALCOMM=m
|
||||
CONFIG_USB_SERIAL_SPCP8X5=m
|
||||
CONFIG_USB_SERIAL_HP4X=m
|
||||
CONFIG_USB_SERIAL_SAFE=m
|
||||
CONFIG_USB_SERIAL_SIEMENS_MPI=m
|
||||
CONFIG_USB_SERIAL_SIERRAWIRELESS=m
|
||||
CONFIG_USB_SERIAL_SYMBOL=m
|
||||
CONFIG_USB_SERIAL_TI=m
|
||||
@@ -342,8 +321,6 @@ CONFIG_USB_SERIAL_XIRCOM=m
|
||||
CONFIG_USB_SERIAL_OPTION=m
|
||||
CONFIG_USB_SERIAL_OMNINET=m
|
||||
CONFIG_USB_SERIAL_OPTICON=m
|
||||
CONFIG_USB_SERIAL_VIVOPAY_SERIAL=m
|
||||
CONFIG_USB_SERIAL_ZIO=m
|
||||
CONFIG_USB_SERIAL_SSU100=m
|
||||
CONFIG_USB_SERIAL_DEBUG=m
|
||||
CONFIG_USB_EMI62=m
|
||||
@@ -370,12 +347,9 @@ CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
CONFIG_MMC_SDHCI_BCM2708=y
|
||||
CONFIG_MMC_SDHCI_BCM2708_DMA=y
|
||||
CONFIG_LEDS_GPIO=y
|
||||
CONFIG_LEDS_TRIGGER_TIMER=m
|
||||
CONFIG_LEDS_TRIGGER_HEARTBEAT=m
|
||||
CONFIG_LEDS_TRIGGER_DEFAULT_ON=m
|
||||
CONFIG_MMC_BCM2835=y
|
||||
CONFIG_MMC_BCM2835_DMA=y
|
||||
CONFIG_UIO=m
|
||||
CONFIG_UIO_PDRV=m
|
||||
CONFIG_UIO_PDRV_GENIRQ=m
|
||||
# CONFIG_IOMMU_SUPPORT is not set
|
||||
CONFIG_EXT4_FS=y
|
||||
@@ -418,7 +392,6 @@ CONFIG_SQUASHFS_XATTR=y
|
||||
CONFIG_SQUASHFS_LZO=y
|
||||
CONFIG_SQUASHFS_XZ=y
|
||||
CONFIG_NFS_FS=y
|
||||
CONFIG_NFS_V3=y
|
||||
CONFIG_NFS_V3_ACL=y
|
||||
CONFIG_NFS_V4=y
|
||||
CONFIG_ROOT_NFS=y
|
||||
@@ -428,9 +401,6 @@ CONFIG_CIFS_WEAK_PW_HASH=y
|
||||
CONFIG_CIFS_XATTR=y
|
||||
CONFIG_CIFS_POSIX=y
|
||||
CONFIG_9P_FS=m
|
||||
CONFIG_PARTITION_ADVANCED=y
|
||||
CONFIG_MAC_PARTITION=y
|
||||
CONFIG_EFI_PARTITION=y
|
||||
CONFIG_NLS_DEFAULT="utf8"
|
||||
CONFIG_NLS_CODEPAGE_437=y
|
||||
CONFIG_NLS_CODEPAGE_737=m
|
||||
@@ -481,7 +451,6 @@ CONFIG_CRYPTO_HMAC=y
|
||||
CONFIG_CRYPTO_XCBC=m
|
||||
CONFIG_CRYPTO_MD5=y
|
||||
CONFIG_CRYPTO_SHA1=y
|
||||
CONFIG_CRYPTO_SHA256=m
|
||||
CONFIG_CRYPTO_SHA512=m
|
||||
CONFIG_CRYPTO_TGR192=m
|
||||
CONFIG_CRYPTO_WP512=m
|
||||
@@ -492,12 +461,3 @@ CONFIG_CRYPTO_DEFLATE=m
|
||||
# CONFIG_CRYPTO_HW is not set
|
||||
CONFIG_CRC_ITU_T=y
|
||||
CONFIG_LIBCRC32C=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_BOARDINFO=y
|
||||
CONFIG_I2C_COMPAT=y
|
||||
CONFIG_I2C_CHARDEV=m
|
||||
CONFIG_I2C_HELPER_AUTO=y
|
||||
CONFIG_I2C_BCM2708=m
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_MASTER=y
|
||||
CONFIG_SPI_BCM2708=m
|
||||
|
||||
@@ -752,9 +752,12 @@ CONFIG_SND_USB_6FIRE=m
|
||||
CONFIG_SND_SOC=m
|
||||
CONFIG_SND_BCM2708_SOC_I2S=m
|
||||
CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC=m
|
||||
CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS=m
|
||||
CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI=m
|
||||
CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP=m
|
||||
CONFIG_SND_BCM2708_SOC_RPI_DAC=m
|
||||
CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m
|
||||
CONFIG_SND_SIMPLE_CARD=m
|
||||
CONFIG_SOUND_PRIME=m
|
||||
CONFIG_HIDRAW=y
|
||||
CONFIG_HID_A4TECH=m
|
||||
@@ -767,6 +770,7 @@ CONFIG_HID_CYPRESS=m
|
||||
CONFIG_HID_DRAGONRISE=m
|
||||
CONFIG_HID_EMS_FF=m
|
||||
CONFIG_HID_ELECOM=m
|
||||
CONFIG_HID_ELO=m
|
||||
CONFIG_HID_EZKEY=m
|
||||
CONFIG_HID_HOLTEK=m
|
||||
CONFIG_HID_KEYTOUCH=m
|
||||
@@ -900,6 +904,8 @@ CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
CONFIG_MMC_SDHCI_BCM2708=y
|
||||
CONFIG_MMC_SDHCI_BCM2708_DMA=y
|
||||
CONFIG_MMC_BCM2835=y
|
||||
CONFIG_MMC_BCM2835_DMA=y
|
||||
CONFIG_MMC_SPI=m
|
||||
CONFIG_LEDS_GPIO=m
|
||||
CONFIG_LEDS_TRIGGER_TIMER=y
|
||||
@@ -945,7 +951,7 @@ CONFIG_RTC_DRV_DS3234=m
|
||||
CONFIG_RTC_DRV_PCF2123=m
|
||||
CONFIG_RTC_DRV_RX4581=m
|
||||
CONFIG_DMADEVICES=y
|
||||
CONFIG_DMA_BCM2708=m
|
||||
CONFIG_DMA_BCM2708=y
|
||||
CONFIG_UIO=m
|
||||
CONFIG_UIO_PDRV_GENIRQ=m
|
||||
CONFIG_STAGING=y
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
# CONFIG_LOCALVERSION_AUTO is not set
|
||||
CONFIG_SYSVIPC=y
|
||||
CONFIG_POSIX_MQUEUE=y
|
||||
CONFIG_BSD_PROCESS_ACCT=y
|
||||
CONFIG_BSD_PROCESS_ACCT_V3=y
|
||||
CONFIG_FHANDLE=y
|
||||
CONFIG_AUDIT=y
|
||||
CONFIG_NO_HZ=y
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
CONFIG_BSD_PROCESS_ACCT=y
|
||||
CONFIG_BSD_PROCESS_ACCT_V3=y
|
||||
CONFIG_IKCONFIG=y
|
||||
CONFIG_IKCONFIG_PROC=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_INITRAMFS_SOURCE="../target_fs"
|
||||
CONFIG_CGROUP_FREEZER=y
|
||||
CONFIG_CGROUP_DEVICE=y
|
||||
CONFIG_CGROUP_CPUACCT=y
|
||||
@@ -17,6 +16,8 @@ CONFIG_RESOURCE_COUNTERS=y
|
||||
CONFIG_BLK_CGROUP=y
|
||||
CONFIG_NAMESPACES=y
|
||||
CONFIG_SCHED_AUTOGROUP=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_INITRAMFS_SOURCE="../target_fs"
|
||||
CONFIG_EMBEDDED=y
|
||||
# CONFIG_COMPAT_BRK is not set
|
||||
CONFIG_SLAB=y
|
||||
@@ -29,10 +30,10 @@ CONFIG_MODVERSIONS=y
|
||||
CONFIG_MODULE_SRCVERSION_ALL=y
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
CONFIG_BLK_DEV_THROTTLING=y
|
||||
CONFIG_PARTITION_ADVANCED=y
|
||||
CONFIG_MAC_PARTITION=y
|
||||
CONFIG_CFQ_GROUP_IOSCHED=y
|
||||
CONFIG_ARCH_BCM2708=y
|
||||
CONFIG_NO_HZ=y
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
CONFIG_AEABI=y
|
||||
CONFIG_SECCOMP=y
|
||||
CONFIG_CC_STACKPROTECTOR=y
|
||||
@@ -75,8 +76,6 @@ CONFIG_USB_IRDA=m
|
||||
CONFIG_SIGMATEL_FIR=m
|
||||
CONFIG_MCS_FIR=m
|
||||
CONFIG_BT=m
|
||||
CONFIG_BT_L2CAP=y
|
||||
CONFIG_BT_SCO=y
|
||||
CONFIG_BT_RFCOMM=m
|
||||
CONFIG_BT_RFCOMM_TTY=y
|
||||
CONFIG_BT_BNEP=m
|
||||
@@ -105,7 +104,6 @@ CONFIG_BLK_DEV_CRYPTOLOOP=m
|
||||
CONFIG_BLK_DEV_NBD=m
|
||||
CONFIG_BLK_DEV_RAM=y
|
||||
CONFIG_CDROM_PKTCDVD=m
|
||||
CONFIG_MISC_DEVICES=y
|
||||
CONFIG_SCSI=y
|
||||
# CONFIG_SCSI_PROC_FS is not set
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
@@ -114,44 +112,16 @@ CONFIG_SCSI_MULTI_LUN=y
|
||||
# CONFIG_SCSI_LOWLEVEL is not set
|
||||
CONFIG_MD=y
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_NETCONSOLE=m
|
||||
CONFIG_TUN=m
|
||||
CONFIG_PHYLIB=m
|
||||
CONFIG_MDIO_BITBANG=m
|
||||
CONFIG_NET_ETHERNET=y
|
||||
# CONFIG_NETDEV_1000 is not set
|
||||
# CONFIG_NETDEV_10000 is not set
|
||||
CONFIG_LIBERTAS_THINFIRM=m
|
||||
CONFIG_LIBERTAS_THINFIRM_USB=m
|
||||
CONFIG_AT76C50X_USB=m
|
||||
CONFIG_USB_ZD1201=m
|
||||
CONFIG_USB_NET_RNDIS_WLAN=m
|
||||
CONFIG_RTL8187=m
|
||||
CONFIG_MAC80211_HWSIM=m
|
||||
CONFIG_ATH_COMMON=m
|
||||
CONFIG_ATH9K=m
|
||||
CONFIG_ATH9K_HTC=m
|
||||
CONFIG_CARL9170=m
|
||||
CONFIG_B43=m
|
||||
CONFIG_B43LEGACY=m
|
||||
CONFIG_HOSTAP=m
|
||||
CONFIG_IWM=m
|
||||
CONFIG_LIBERTAS=m
|
||||
CONFIG_LIBERTAS_USB=m
|
||||
CONFIG_LIBERTAS_SDIO=m
|
||||
CONFIG_P54_COMMON=m
|
||||
CONFIG_P54_USB=m
|
||||
CONFIG_RT2X00=m
|
||||
CONFIG_RT2500USB=m
|
||||
CONFIG_RT73USB=m
|
||||
CONFIG_RT2800USB=m
|
||||
CONFIG_RT2800USB_RT53XX=y
|
||||
CONFIG_RTL8192CU=m
|
||||
CONFIG_WL1251=m
|
||||
CONFIG_WL12XX_MENU=m
|
||||
CONFIG_ZD1211RW=m
|
||||
CONFIG_MWIFIEX=m
|
||||
CONFIG_MWIFIEX_SDIO=m
|
||||
CONFIG_WIMAX_I2400M_USB=m
|
||||
CONFIG_PPP=m
|
||||
CONFIG_PPP_BSDCOMP=m
|
||||
CONFIG_PPP_DEFLATE=m
|
||||
CONFIG_PPP_ASYNC=m
|
||||
CONFIG_PPP_SYNC_TTY=m
|
||||
CONFIG_SLIP=m
|
||||
CONFIG_SLIP_COMPRESSED=y
|
||||
CONFIG_USB_CATC=m
|
||||
CONFIG_USB_KAWETH=m
|
||||
CONFIG_USB_PEGASUS=m
|
||||
@@ -178,14 +148,31 @@ CONFIG_USB_NET_INT51X1=m
|
||||
CONFIG_USB_IPHETH=m
|
||||
CONFIG_USB_SIERRA_NET=m
|
||||
CONFIG_USB_VL600=m
|
||||
CONFIG_PPP=m
|
||||
CONFIG_PPP_ASYNC=m
|
||||
CONFIG_PPP_SYNC_TTY=m
|
||||
CONFIG_PPP_DEFLATE=m
|
||||
CONFIG_PPP_BSDCOMP=m
|
||||
CONFIG_SLIP=m
|
||||
CONFIG_SLIP_COMPRESSED=y
|
||||
CONFIG_NETCONSOLE=m
|
||||
CONFIG_LIBERTAS_THINFIRM=m
|
||||
CONFIG_LIBERTAS_THINFIRM_USB=m
|
||||
CONFIG_AT76C50X_USB=m
|
||||
CONFIG_USB_ZD1201=m
|
||||
CONFIG_USB_NET_RNDIS_WLAN=m
|
||||
CONFIG_RTL8187=m
|
||||
CONFIG_MAC80211_HWSIM=m
|
||||
CONFIG_B43=m
|
||||
CONFIG_B43LEGACY=m
|
||||
CONFIG_HOSTAP=m
|
||||
CONFIG_LIBERTAS=m
|
||||
CONFIG_LIBERTAS_USB=m
|
||||
CONFIG_LIBERTAS_SDIO=m
|
||||
CONFIG_P54_COMMON=m
|
||||
CONFIG_P54_USB=m
|
||||
CONFIG_RT2X00=m
|
||||
CONFIG_RT2500USB=m
|
||||
CONFIG_RT73USB=m
|
||||
CONFIG_RT2800USB=m
|
||||
CONFIG_RT2800USB_RT53XX=y
|
||||
CONFIG_RTL8192CU=m
|
||||
CONFIG_ZD1211RW=m
|
||||
CONFIG_MWIFIEX=m
|
||||
CONFIG_MWIFIEX_SDIO=m
|
||||
CONFIG_WIMAX_I2400M_USB=m
|
||||
CONFIG_INPUT_POLLDEV=m
|
||||
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
|
||||
CONFIG_INPUT_JOYDEV=m
|
||||
@@ -194,7 +181,6 @@ CONFIG_INPUT_EVDEV=m
|
||||
# CONFIG_INPUT_MOUSE is not set
|
||||
CONFIG_INPUT_MISC=y
|
||||
CONFIG_INPUT_AD714X=m
|
||||
CONFIG_INPUT_ATI_REMOTE=m
|
||||
CONFIG_INPUT_ATI_REMOTE2=m
|
||||
CONFIG_INPUT_KEYSPAN_REMOTE=m
|
||||
CONFIG_INPUT_POWERMATE=m
|
||||
@@ -209,7 +195,6 @@ CONFIG_SERIO_RAW=m
|
||||
CONFIG_GAMEPORT=m
|
||||
CONFIG_GAMEPORT_NS558=m
|
||||
CONFIG_GAMEPORT_L4=m
|
||||
CONFIG_VT_HW_CONSOLE_BINDING=y
|
||||
# CONFIG_LEGACY_PTYS is not set
|
||||
# CONFIG_DEVKMEM is not set
|
||||
CONFIG_SERIAL_AMBA_PL011=y
|
||||
@@ -220,7 +205,6 @@ CONFIG_GPIO_SYSFS=y
|
||||
# CONFIG_HWMON is not set
|
||||
CONFIG_WATCHDOG=y
|
||||
CONFIG_BCM2708_WDT=m
|
||||
# CONFIG_MFD_SUPPORT is not set
|
||||
CONFIG_FB=y
|
||||
CONFIG_FB_BCM2708=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||
@@ -247,8 +231,6 @@ CONFIG_SND_USB_UA101=m
|
||||
CONFIG_SND_USB_CAIAQ=m
|
||||
CONFIG_SND_USB_6FIRE=m
|
||||
CONFIG_SOUND_PRIME=m
|
||||
CONFIG_HID_PID=y
|
||||
CONFIG_USB_HIDDEV=y
|
||||
CONFIG_HID_A4TECH=m
|
||||
CONFIG_HID_ACRUX=m
|
||||
CONFIG_HID_APPLE=m
|
||||
@@ -279,20 +261,18 @@ CONFIG_HID_ORTEK=m
|
||||
CONFIG_HID_PANTHERLORD=m
|
||||
CONFIG_HID_PETALYNX=m
|
||||
CONFIG_HID_PICOLCD=m
|
||||
CONFIG_HID_QUANTA=m
|
||||
CONFIG_HID_ROCCAT=m
|
||||
CONFIG_HID_SAMSUNG=m
|
||||
CONFIG_HID_SONY=m
|
||||
CONFIG_HID_SPEEDLINK=m
|
||||
CONFIG_HID_SUNPLUS=m
|
||||
CONFIG_HID_GREENASIA=m
|
||||
CONFIG_HID_SMARTJOYPLUS=m
|
||||
CONFIG_HID_TOPSEED=m
|
||||
CONFIG_HID_THRUSTMASTER=m
|
||||
CONFIG_HID_WACOM=m
|
||||
CONFIG_HID_WIIMOTE=m
|
||||
CONFIG_HID_ZEROPLUS=m
|
||||
CONFIG_HID_ZYDACRON=m
|
||||
CONFIG_HID_PID=y
|
||||
CONFIG_USB_HIDDEV=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
|
||||
CONFIG_USB_MON=m
|
||||
@@ -311,8 +291,6 @@ CONFIG_USB_STORAGE_ONETOUCH=m
|
||||
CONFIG_USB_STORAGE_KARMA=m
|
||||
CONFIG_USB_STORAGE_CYPRESS_ATACB=m
|
||||
CONFIG_USB_STORAGE_ENE_UB6250=m
|
||||
CONFIG_USB_UAS=y
|
||||
CONFIG_USB_LIBUSUAL=y
|
||||
CONFIG_USB_MDC800=m
|
||||
CONFIG_USB_MICROTEK=m
|
||||
CONFIG_USB_SERIAL=m
|
||||
@@ -327,7 +305,6 @@ CONFIG_USB_SERIAL_CP210X=m
|
||||
CONFIG_USB_SERIAL_CYPRESS_M8=m
|
||||
CONFIG_USB_SERIAL_EMPEG=m
|
||||
CONFIG_USB_SERIAL_FTDI_SIO=m
|
||||
CONFIG_USB_SERIAL_FUNSOFT=m
|
||||
CONFIG_USB_SERIAL_VISOR=m
|
||||
CONFIG_USB_SERIAL_IPAQ=m
|
||||
CONFIG_USB_SERIAL_IR=m
|
||||
@@ -343,16 +320,13 @@ CONFIG_USB_SERIAL_KOBIL_SCT=m
|
||||
CONFIG_USB_SERIAL_MCT_U232=m
|
||||
CONFIG_USB_SERIAL_MOS7720=m
|
||||
CONFIG_USB_SERIAL_MOS7840=m
|
||||
CONFIG_USB_SERIAL_MOTOROLA=m
|
||||
CONFIG_USB_SERIAL_NAVMAN=m
|
||||
CONFIG_USB_SERIAL_PL2303=m
|
||||
CONFIG_USB_SERIAL_OTI6858=m
|
||||
CONFIG_USB_SERIAL_QCAUX=m
|
||||
CONFIG_USB_SERIAL_QUALCOMM=m
|
||||
CONFIG_USB_SERIAL_SPCP8X5=m
|
||||
CONFIG_USB_SERIAL_HP4X=m
|
||||
CONFIG_USB_SERIAL_SAFE=m
|
||||
CONFIG_USB_SERIAL_SIEMENS_MPI=m
|
||||
CONFIG_USB_SERIAL_SIERRAWIRELESS=m
|
||||
CONFIG_USB_SERIAL_SYMBOL=m
|
||||
CONFIG_USB_SERIAL_TI=m
|
||||
@@ -361,8 +335,6 @@ CONFIG_USB_SERIAL_XIRCOM=m
|
||||
CONFIG_USB_SERIAL_OPTION=m
|
||||
CONFIG_USB_SERIAL_OMNINET=m
|
||||
CONFIG_USB_SERIAL_OPTICON=m
|
||||
CONFIG_USB_SERIAL_VIVOPAY_SERIAL=m
|
||||
CONFIG_USB_SERIAL_ZIO=m
|
||||
CONFIG_USB_SERIAL_SSU100=m
|
||||
CONFIG_USB_SERIAL_DEBUG=m
|
||||
CONFIG_USB_EMI62=m
|
||||
@@ -389,12 +361,9 @@ CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
CONFIG_MMC_SDHCI_BCM2708=y
|
||||
CONFIG_MMC_SDHCI_BCM2708_DMA=y
|
||||
CONFIG_LEDS_GPIO=y
|
||||
CONFIG_LEDS_TRIGGER_TIMER=m
|
||||
CONFIG_LEDS_TRIGGER_HEARTBEAT=m
|
||||
CONFIG_LEDS_TRIGGER_DEFAULT_ON=m
|
||||
CONFIG_MMC_BCM2835=y
|
||||
CONFIG_MMC_BCM2835_DMA=y
|
||||
CONFIG_UIO=m
|
||||
CONFIG_UIO_PDRV=m
|
||||
CONFIG_UIO_PDRV_GENIRQ=m
|
||||
# CONFIG_IOMMU_SUPPORT is not set
|
||||
CONFIG_EXT4_FS=y
|
||||
@@ -441,7 +410,6 @@ CONFIG_SQUASHFS_XATTR=y
|
||||
CONFIG_SQUASHFS_LZO=y
|
||||
CONFIG_SQUASHFS_XZ=y
|
||||
CONFIG_NFS_FS=y
|
||||
CONFIG_NFS_V3=y
|
||||
CONFIG_NFS_V3_ACL=y
|
||||
CONFIG_NFS_V4=y
|
||||
CONFIG_ROOT_NFS=y
|
||||
@@ -452,9 +420,6 @@ CONFIG_CIFS_XATTR=y
|
||||
CONFIG_CIFS_POSIX=y
|
||||
CONFIG_9P_FS=m
|
||||
CONFIG_9P_FS_POSIX_ACL=y
|
||||
CONFIG_PARTITION_ADVANCED=y
|
||||
CONFIG_MAC_PARTITION=y
|
||||
CONFIG_EFI_PARTITION=y
|
||||
CONFIG_NLS_DEFAULT="utf8"
|
||||
CONFIG_NLS_CODEPAGE_437=y
|
||||
CONFIG_NLS_CODEPAGE_737=m
|
||||
@@ -495,14 +460,13 @@ CONFIG_NLS_KOI8_R=m
|
||||
CONFIG_NLS_KOI8_U=m
|
||||
CONFIG_NLS_UTF8=m
|
||||
CONFIG_PRINTK_TIME=y
|
||||
CONFIG_BOOT_PRINTK_DELAY=y
|
||||
CONFIG_DEBUG_INFO=y
|
||||
CONFIG_DEBUG_STACK_USAGE=y
|
||||
CONFIG_DEBUG_MEMORY_INIT=y
|
||||
CONFIG_DETECT_HUNG_TASK=y
|
||||
CONFIG_TIMER_STATS=y
|
||||
CONFIG_DEBUG_STACK_USAGE=y
|
||||
CONFIG_DEBUG_INFO=y
|
||||
CONFIG_DEBUG_MEMORY_INIT=y
|
||||
CONFIG_BOOT_PRINTK_DELAY=y
|
||||
CONFIG_LATENCYTOP=y
|
||||
CONFIG_SYSCTL_SYSCALL_CHECK=y
|
||||
CONFIG_IRQSOFF_TRACER=y
|
||||
CONFIG_SCHED_TRACER=y
|
||||
CONFIG_STACK_TRACER=y
|
||||
@@ -519,7 +483,6 @@ CONFIG_CRYPTO_HMAC=y
|
||||
CONFIG_CRYPTO_XCBC=m
|
||||
CONFIG_CRYPTO_MD5=y
|
||||
CONFIG_CRYPTO_SHA1=y
|
||||
CONFIG_CRYPTO_SHA256=m
|
||||
CONFIG_CRYPTO_SHA512=m
|
||||
CONFIG_CRYPTO_TGR192=m
|
||||
CONFIG_CRYPTO_WP512=m
|
||||
|
||||
@@ -82,7 +82,6 @@ CONFIG_INPUT_EVDEV=y
|
||||
# CONFIG_INPUT_KEYBOARD is not set
|
||||
# CONFIG_INPUT_MOUSE is not set
|
||||
# CONFIG_SERIO is not set
|
||||
CONFIG_VT_HW_CONSOLE_BINDING=y
|
||||
# CONFIG_LEGACY_PTYS is not set
|
||||
# CONFIG_DEVKMEM is not set
|
||||
CONFIG_SERIAL_AMBA_PL011=y
|
||||
@@ -118,6 +117,8 @@ CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
CONFIG_MMC_SDHCI_BCM2708=y
|
||||
CONFIG_MMC_SDHCI_BCM2708_DMA=y
|
||||
CONFIG_MMC_BCM2835=y
|
||||
CONFIG_MMC_BCM2835_DMA=y
|
||||
CONFIG_NEW_LEDS=y
|
||||
CONFIG_LEDS_CLASS=y
|
||||
CONFIG_LEDS_TRIGGERS=y
|
||||
|
||||
@@ -98,6 +98,8 @@ static unsigned disk_led_active_low = 1;
|
||||
static unsigned reboot_part = 0;
|
||||
static unsigned w1_gpio_pin = W1_GPIO;
|
||||
static unsigned w1_gpio_pullup = W1_PULLUP;
|
||||
static unsigned bcm2835_mmc = 1;
|
||||
static bool vc_i2c_override = false;
|
||||
|
||||
static void __init bcm2708_init_led(void);
|
||||
|
||||
@@ -460,6 +462,34 @@ struct platform_device bcm2708_emmc_device = {
|
||||
};
|
||||
#endif /* CONFIG_MMC_SDHCI_BCM2708 */
|
||||
|
||||
#ifdef CONFIG_MMC_BCM2835 /* Arasan emmc SD (new) */
|
||||
static struct resource bcm2835_emmc_resources[] = {
|
||||
[0] = {
|
||||
.start = EMMC_BASE,
|
||||
.end = EMMC_BASE + SZ_256 - 1, /* we only need this area */
|
||||
/* the memory map actually makes SZ_4K available */
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = IRQ_ARASANSDIO,
|
||||
.end = IRQ_ARASANSDIO,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static u64 bcm2835_emmc_dmamask = 0xffffffffUL;
|
||||
|
||||
struct platform_device bcm2835_emmc_device = {
|
||||
.name = "mmc-bcm2835",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(bcm2835_emmc_resources),
|
||||
.resource = bcm2835_emmc_resources,
|
||||
.dev = {
|
||||
.dma_mask = &bcm2835_emmc_dmamask,
|
||||
.coherent_dma_mask = 0xffffffffUL},
|
||||
};
|
||||
#endif /* CONFIG_MMC_BCM2835 */
|
||||
|
||||
static struct resource bcm2708_powerman_resources[] = {
|
||||
[0] = {
|
||||
.start = PM_BASE,
|
||||
@@ -659,6 +689,20 @@ static struct platform_device snd_pcm5102a_codec_device = {
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS) || defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS_MODULE)
|
||||
static struct platform_device snd_rpi_hifiberry_dacplus_device = {
|
||||
.name = "snd-rpi-hifiberry-dacplus",
|
||||
.id = 0,
|
||||
.num_resources = 0,
|
||||
};
|
||||
|
||||
static struct i2c_board_info __initdata snd_pcm512x_hbdacplus_i2c_devices[] = {
|
||||
{
|
||||
I2C_BOARD_INFO("pcm5122", 0x4d)
|
||||
},
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI) || defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI_MODULE)
|
||||
static struct platform_device snd_hifiberry_digi_device = {
|
||||
.name = "snd-hifiberry-digi",
|
||||
@@ -674,6 +718,20 @@ static struct i2c_board_info __initdata snd_wm8804_i2c_devices[] = {
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP) || defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP_MODULE)
|
||||
static struct platform_device snd_hifiberry_amp_device = {
|
||||
.name = "snd-hifiberry-amp",
|
||||
.id = 0,
|
||||
.num_resources = 0,
|
||||
};
|
||||
|
||||
static struct i2c_board_info __initdata snd_tas5713_i2c_devices[] = {
|
||||
{
|
||||
I2C_BOARD_INFO("tas5713", 0x1b)
|
||||
},
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SND_BCM2708_SOC_RPI_DAC) || defined(CONFIG_SND_BCM2708_SOC_RPI_DAC_MODULE)
|
||||
static struct platform_device snd_rpi_dac_device = {
|
||||
.name = "snd-rpi-dac",
|
||||
@@ -1058,15 +1116,27 @@ void __init bcm2708_init(void)
|
||||
bcm_register_device(&bcm2708_powerman_device);
|
||||
|
||||
#ifdef CONFIG_MMC_SDHCI_BCM2708
|
||||
bcm_register_device(&bcm2708_emmc_device);
|
||||
if (!bcm2835_mmc)
|
||||
bcm_register_device(&bcm2708_emmc_device);
|
||||
#endif
|
||||
#ifdef CONFIG_MMC_BCM2835
|
||||
if (bcm2835_mmc)
|
||||
bcm_register_device(&bcm2835_emmc_device);
|
||||
#endif
|
||||
bcm2708_init_led();
|
||||
for (i = 0; i < ARRAY_SIZE(bcm2708_alsa_devices); i++)
|
||||
bcm_register_device(&bcm2708_alsa_devices[i]);
|
||||
|
||||
bcm_register_device(&bcm2708_spi_device);
|
||||
bcm_register_device(&bcm2708_bsc0_device);
|
||||
bcm_register_device(&bcm2708_bsc1_device);
|
||||
|
||||
if (vc_i2c_override) {
|
||||
bcm_register_device(&bcm2708_bsc0_device);
|
||||
bcm_register_device(&bcm2708_bsc1_device);
|
||||
} else if ((boardrev & 0xffffff) == 0x2 || (boardrev & 0xffffff) == 0x3) {
|
||||
bcm_register_device(&bcm2708_bsc0_device);
|
||||
} else {
|
||||
bcm_register_device(&bcm2708_bsc1_device);
|
||||
}
|
||||
|
||||
bcm_register_device(&bcm2835_hwmon_device);
|
||||
bcm_register_device(&bcm2835_thermal_device);
|
||||
@@ -1080,11 +1150,22 @@ void __init bcm2708_init(void)
|
||||
bcm_register_device(&snd_pcm5102a_codec_device);
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS) || defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS_MODULE)
|
||||
bcm_register_device(&snd_rpi_hifiberry_dacplus_device);
|
||||
i2c_register_board_info(1, snd_pcm512x_hbdacplus_i2c_devices, ARRAY_SIZE(snd_pcm512x_hbdacplus_i2c_devices));
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI) || defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI_MODULE)
|
||||
bcm_register_device(&snd_hifiberry_digi_device);
|
||||
i2c_register_board_info(1, snd_wm8804_i2c_devices, ARRAY_SIZE(snd_wm8804_i2c_devices));
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP) || defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP_MODULE)
|
||||
bcm_register_device(&snd_hifiberry_amp_device);
|
||||
i2c_register_board_info(1, snd_tas5713_i2c_devices, ARRAY_SIZE(snd_tas5713_i2c_devices));
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(CONFIG_SND_BCM2708_SOC_RPI_DAC) || defined(CONFIG_SND_BCM2708_SOC_RPI_DAC_MODULE)
|
||||
bcm_register_device(&snd_rpi_dac_device);
|
||||
bcm_register_device(&snd_pcm1794a_codec_device);
|
||||
@@ -1285,3 +1366,6 @@ module_param(disk_led_active_low, uint, 0644);
|
||||
module_param(reboot_part, uint, 0644);
|
||||
module_param(w1_gpio_pin, uint, 0644);
|
||||
module_param(w1_gpio_pullup, uint, 0644);
|
||||
module_param(bcm2835_mmc, uint, 0644);
|
||||
module_param(vc_i2c_override, bool, 0644);
|
||||
MODULE_PARM_DESC(vc_i2c_override, "Allow the use of VC's I2C peripheral.");
|
||||
|
||||
@@ -56,10 +56,10 @@ struct bcm2708_gpio {
|
||||
struct list_head list;
|
||||
void __iomem *base;
|
||||
struct gpio_chip gc;
|
||||
unsigned long rising;
|
||||
unsigned long falling;
|
||||
unsigned long high;
|
||||
unsigned long low;
|
||||
unsigned long rising[(BCM2708_NR_GPIOS + 31) / 32];
|
||||
unsigned long falling[(BCM2708_NR_GPIOS + 31) / 32];
|
||||
unsigned long high[(BCM2708_NR_GPIOS + 31) / 32];
|
||||
unsigned long low[(BCM2708_NR_GPIOS + 31) / 32];
|
||||
};
|
||||
|
||||
static int bcm2708_set_function(struct gpio_chip *gc, unsigned offset,
|
||||
@@ -146,23 +146,26 @@ static int bcm2708_gpio_irq_set_type(struct irq_data *d, unsigned type)
|
||||
{
|
||||
unsigned irq = d->irq;
|
||||
struct bcm2708_gpio *gpio = irq_get_chip_data(irq);
|
||||
unsigned gn = irq_to_gpio(irq);
|
||||
unsigned gb = gn / 32;
|
||||
unsigned go = gn % 32;
|
||||
|
||||
gpio->rising &= ~(1 << irq_to_gpio(irq));
|
||||
gpio->falling &= ~(1 << irq_to_gpio(irq));
|
||||
gpio->high &= ~(1 << irq_to_gpio(irq));
|
||||
gpio->low &= ~(1 << irq_to_gpio(irq));
|
||||
gpio->rising[gb] &= ~(1 << go);
|
||||
gpio->falling[gb] &= ~(1 << go);
|
||||
gpio->high[gb] &= ~(1 << go);
|
||||
gpio->low[gb] &= ~(1 << go);
|
||||
|
||||
if (type & ~(IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING | IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH))
|
||||
return -EINVAL;
|
||||
|
||||
if (type & IRQ_TYPE_EDGE_RISING)
|
||||
gpio->rising |= (1 << irq_to_gpio(irq));
|
||||
gpio->rising[gb] |= (1 << go);
|
||||
if (type & IRQ_TYPE_EDGE_FALLING)
|
||||
gpio->falling |= (1 << irq_to_gpio(irq));
|
||||
gpio->falling[gb] |= (1 << go);
|
||||
if (type & IRQ_TYPE_LEVEL_HIGH)
|
||||
gpio->high |= (1 << irq_to_gpio(irq));
|
||||
gpio->high[gb] |= (1 << go);
|
||||
if (type & IRQ_TYPE_LEVEL_LOW)
|
||||
gpio->low |= (1 << irq_to_gpio(irq));
|
||||
gpio->low[gb] |= (1 << go);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -191,37 +194,36 @@ static void bcm2708_gpio_irq_unmask(struct irq_data *d)
|
||||
struct bcm2708_gpio *gpio = irq_get_chip_data(irq);
|
||||
unsigned gn = irq_to_gpio(irq);
|
||||
unsigned gb = gn / 32;
|
||||
unsigned go = gn % 32;
|
||||
unsigned long rising = readl(gpio->base + GPIOREN(gb));
|
||||
unsigned long falling = readl(gpio->base + GPIOFEN(gb));
|
||||
unsigned long high = readl(gpio->base + GPIOHEN(gb));
|
||||
unsigned long low = readl(gpio->base + GPIOLEN(gb));
|
||||
|
||||
gn = gn % 32;
|
||||
writel(1 << go, gpio->base + GPIOEDS(gb));
|
||||
|
||||
writel(1 << gn, gpio->base + GPIOEDS(gb));
|
||||
|
||||
if (gpio->rising & (1 << gn)) {
|
||||
writel(rising | (1 << gn), gpio->base + GPIOREN(gb));
|
||||
if (gpio->rising[gb] & (1 << go)) {
|
||||
writel(rising | (1 << go), gpio->base + GPIOREN(gb));
|
||||
} else {
|
||||
writel(rising & ~(1 << gn), gpio->base + GPIOREN(gb));
|
||||
writel(rising & ~(1 << go), gpio->base + GPIOREN(gb));
|
||||
}
|
||||
|
||||
if (gpio->falling & (1 << gn)) {
|
||||
writel(falling | (1 << gn), gpio->base + GPIOFEN(gb));
|
||||
if (gpio->falling[gb] & (1 << go)) {
|
||||
writel(falling | (1 << go), gpio->base + GPIOFEN(gb));
|
||||
} else {
|
||||
writel(falling & ~(1 << gn), gpio->base + GPIOFEN(gb));
|
||||
writel(falling & ~(1 << go), gpio->base + GPIOFEN(gb));
|
||||
}
|
||||
|
||||
if (gpio->high & (1 << gn)) {
|
||||
writel(high | (1 << gn), gpio->base + GPIOHEN(gb));
|
||||
if (gpio->high[gb] & (1 << go)) {
|
||||
writel(high | (1 << go), gpio->base + GPIOHEN(gb));
|
||||
} else {
|
||||
writel(high & ~(1 << gn), gpio->base + GPIOHEN(gb));
|
||||
writel(high & ~(1 << go), gpio->base + GPIOHEN(gb));
|
||||
}
|
||||
|
||||
if (gpio->low & (1 << gn)) {
|
||||
writel(low | (1 << gn), gpio->base + GPIOLEN(gb));
|
||||
if (gpio->low[gb] & (1 << go)) {
|
||||
writel(low | (1 << go), gpio->base + GPIOLEN(gb));
|
||||
} else {
|
||||
writel(low & ~(1 << gn), gpio->base + GPIOLEN(gb));
|
||||
writel(low & ~(1 << go), gpio->base + GPIOLEN(gb));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -156,6 +156,8 @@ static void vc_dmaman_init(struct vc_dmaman *dmaman, void __iomem *dma_base,
|
||||
dmaman->chan_available = chans_available;
|
||||
dmaman->has_feature[BCM_DMA_FEATURE_FAST_ORD] = 0x0c; /* chans 2 & 3 */
|
||||
dmaman->has_feature[BCM_DMA_FEATURE_BULK_ORD] = 0x01; /* chan 0 */
|
||||
dmaman->has_feature[BCM_DMA_FEATURE_NORMAL_ORD] = 0xfe; /* chans 1 to 7 */
|
||||
dmaman->has_feature[BCM_DMA_FEATURE_LITE_ORD] = 0x7f00; /* chans 8 to 14 */
|
||||
}
|
||||
|
||||
static int vc_dmaman_chan_alloc(struct vc_dmaman *dmaman,
|
||||
|
||||
@@ -38,6 +38,7 @@ enum {
|
||||
PREFIX(POWER_I2C2_BIT),
|
||||
PREFIX(POWER_SPI_BIT),
|
||||
PREFIX(POWER_CCP2TX_BIT),
|
||||
PREFIX(POWER_DSI_BIT),
|
||||
|
||||
PREFIX(POWER_MAX)
|
||||
};
|
||||
@@ -52,6 +53,7 @@ enum {
|
||||
PREFIX(POWER_I2C2_MASK) = (1 << PREFIX(POWER_I2C2_BIT)),
|
||||
PREFIX(POWER_SPI_MASK) = (1 << PREFIX(POWER_SPI_BIT)),
|
||||
PREFIX(POWER_CCP2TX_MASK) = (1 << PREFIX(POWER_CCP2TX_BIT)),
|
||||
PREFIX(POWER_DSI) = (1 << PREFIX(POWER_DSI_BIT)),
|
||||
|
||||
PREFIX(POWER_MASK) = (1 << PREFIX(POWER_MAX)) - 1,
|
||||
PREFIX(POWER_NONE) = 0
|
||||
|
||||
@@ -77,9 +77,13 @@ extern int /*rc*/ bcm_dma_abort(void __iomem *dma_chan_base);
|
||||
those with higher priority smaller ordinal numbers */
|
||||
#define BCM_DMA_FEATURE_FAST_ORD 0
|
||||
#define BCM_DMA_FEATURE_BULK_ORD 1
|
||||
#define BCM_DMA_FEATURE_NORMAL_ORD 2
|
||||
#define BCM_DMA_FEATURE_LITE_ORD 3
|
||||
#define BCM_DMA_FEATURE_FAST (1<<BCM_DMA_FEATURE_FAST_ORD)
|
||||
#define BCM_DMA_FEATURE_BULK (1<<BCM_DMA_FEATURE_BULK_ORD)
|
||||
#define BCM_DMA_FEATURE_COUNT 2
|
||||
#define BCM_DMA_FEATURE_NORMAL (1<<BCM_DMA_FEATURE_NORMAL_ORD)
|
||||
#define BCM_DMA_FEATURE_LITE (1<<BCM_DMA_FEATURE_LITE_ORD)
|
||||
#define BCM_DMA_FEATURE_COUNT 4
|
||||
|
||||
/* return channel no or -ve error */
|
||||
extern int bcm_dma_chan_alloc(unsigned preferred_feature_set,
|
||||
|
||||
@@ -33,17 +33,24 @@
|
||||
#define MBOX_CHAN_PROPERTY 8 /* for use by the property channel */
|
||||
#define MBOX_CHAN_COUNT 9
|
||||
|
||||
enum {
|
||||
VCMSG_PROCESS_REQUEST = 0x00000000
|
||||
};
|
||||
enum {
|
||||
VCMSG_REQUEST_SUCCESSFUL = 0x80000000,
|
||||
VCMSG_REQUEST_FAILED = 0x80000001
|
||||
};
|
||||
/* Mailbox property tags */
|
||||
enum {
|
||||
VCMSG_PROPERTY_END = 0x00000000,
|
||||
VCMSG_GET_FIRMWARE_REVISION = 0x00000001,
|
||||
VCMSG_GET_BOARD_MODEL = 0x00010001,
|
||||
VCMSG_GET_BOARD_REVISION = 0x00020002,
|
||||
VCMSG_GET_BOARD_MAC_ADDRESS = 0x00020003,
|
||||
VCMSG_GET_BOARD_SERIAL = 0x00020004,
|
||||
VCMSG_GET_ARM_MEMORY = 0x00020005,
|
||||
VCMSG_GET_VC_MEMORY = 0x00020006,
|
||||
VCMSG_GET_CLOCKS = 0x00020007,
|
||||
VCMSG_GET_BOARD_REVISION = 0x00010002,
|
||||
VCMSG_GET_BOARD_MAC_ADDRESS = 0x00010003,
|
||||
VCMSG_GET_BOARD_SERIAL = 0x00010004,
|
||||
VCMSG_GET_ARM_MEMORY = 0x00010005,
|
||||
VCMSG_GET_VC_MEMORY = 0x00010006,
|
||||
VCMSG_GET_CLOCKS = 0x00010007,
|
||||
VCMSG_GET_COMMAND_LINE = 0x00050001,
|
||||
VCMSG_GET_DMA_CHANNELS = 0x00060001,
|
||||
VCMSG_GET_POWER_STATE = 0x00020001,
|
||||
@@ -61,7 +68,20 @@ enum {
|
||||
VCMSG_GET_MIN_CLOCK = 0x00030007,
|
||||
VCMSG_GET_MIN_VOLTAGE = 0x00030008,
|
||||
VCMSG_GET_TURBO = 0x00030009,
|
||||
VCMSG_GET_MAX_TEMPERATURE = 0x0003000a,
|
||||
VCMSG_GET_STC = 0x0003000b,
|
||||
VCMSG_SET_TURBO = 0x00038009,
|
||||
VCMSG_SET_ALLOCATE_MEM = 0x0003000c,
|
||||
VCMSG_SET_LOCK_MEM = 0x0003000d,
|
||||
VCMSG_SET_UNLOCK_MEM = 0x0003000e,
|
||||
VCMSG_SET_RELEASE_MEM = 0x0003000f,
|
||||
VCMSG_SET_EXECUTE_CODE = 0x00030010,
|
||||
VCMSG_SET_EXECUTE_QPU = 0x00030011,
|
||||
VCMSG_SET_ENABLE_QPU = 0x00030012,
|
||||
VCMSG_GET_RESOURCE_HANDLE = 0x00030014,
|
||||
VCMSG_GET_EDID_BLOCK = 0x00030020,
|
||||
VCMSG_GET_CUSTOMER_OTP = 0x00030021,
|
||||
VCMSG_SET_CUSTOMER_OTP = 0x00038021,
|
||||
VCMSG_SET_ALLOCATE_BUFFER = 0x00040001,
|
||||
VCMSG_SET_RELEASE_BUFFER = 0x00048001,
|
||||
VCMSG_SET_BLANK_SCREEN = 0x00040002,
|
||||
@@ -99,6 +119,10 @@ enum {
|
||||
VCMSG_GET_TRANSFORM = 0x0004000d,
|
||||
VCMSG_TST_TRANSFORM = 0x0004400d,
|
||||
VCMSG_SET_TRANSFORM = 0x0004800d,
|
||||
VCMSG_TST_VSYNC = 0x0004400e,
|
||||
VCMSG_SET_VSYNC = 0x0004800e,
|
||||
VCMSG_SET_CURSOR_INFO = 0x00008010,
|
||||
VCMSG_SET_CURSOR_STATE = 0x00008011,
|
||||
};
|
||||
|
||||
extern int /*rc*/ bcm_mailbox_read(unsigned chan, uint32_t *data28);
|
||||
@@ -136,6 +160,6 @@ extern int /*rc*/ bcm_mailbox_property(void *data, int size);
|
||||
/*
|
||||
* The name of the device file
|
||||
*/
|
||||
#define DEVICE_FILE_NAME "char_dev"
|
||||
#define DEVICE_FILE_NAME "vcio"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -324,7 +324,8 @@ void omap3_save_scratchpad_contents(void)
|
||||
scratchpad_contents.public_restore_ptr =
|
||||
virt_to_phys(omap3_restore_3630);
|
||||
else if (omap_rev() != OMAP3430_REV_ES3_0 &&
|
||||
omap_rev() != OMAP3430_REV_ES3_1)
|
||||
omap_rev() != OMAP3430_REV_ES3_1 &&
|
||||
omap_rev() != OMAP3430_REV_ES3_1_2)
|
||||
scratchpad_contents.public_restore_ptr =
|
||||
virt_to_phys(omap3_restore);
|
||||
else
|
||||
|
||||
@@ -24,6 +24,13 @@ static void idmap_add_pmd(pud_t *pud, unsigned long addr, unsigned long end,
|
||||
pr_warning("Failed to allocate identity pmd.\n");
|
||||
return;
|
||||
}
|
||||
/*
|
||||
* Copy the original PMD to ensure that the PMD entries for
|
||||
* the kernel image are preserved.
|
||||
*/
|
||||
if (!pud_none(*pud))
|
||||
memcpy(pmd, pmd_offset(pud, 0),
|
||||
PTRS_PER_PMD * sizeof(pmd_t));
|
||||
pud_populate(&init_mm, pud, pmd);
|
||||
pmd += pmd_index(addr);
|
||||
} else
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
config ARM64
|
||||
def_bool y
|
||||
select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
|
||||
select ARCH_SUPPORTS_ATOMIC_RMW
|
||||
select ARCH_WANT_OPTIONAL_GPIOLIB
|
||||
select ARCH_WANT_COMPAT_IPC_PARSE_VERSION
|
||||
select ARCH_WANT_FRAME_POINTERS
|
||||
|
||||
@@ -69,8 +69,6 @@
|
||||
#define SA_NOMASK SA_NODEFER
|
||||
#define SA_ONESHOT SA_RESETHAND
|
||||
|
||||
#define SA_RESTORER 0x04000000 /* obsolete -- ignored */
|
||||
|
||||
#define MINSIGSTKSZ 2048
|
||||
#define SIGSTKSZ 8192
|
||||
|
||||
|
||||
@@ -138,6 +138,7 @@ config PPC
|
||||
select OLD_SIGSUSPEND
|
||||
select OLD_SIGACTION if PPC32
|
||||
select HAVE_DEBUG_STACKOVERFLOW
|
||||
select ARCH_SUPPORTS_ATOMIC_RMW
|
||||
|
||||
config EARLY_PRINTK
|
||||
bool
|
||||
|
||||
@@ -322,7 +322,9 @@ static int __poke_user(struct task_struct *child, addr_t addr, addr_t data)
|
||||
* psw and gprs are stored on the stack
|
||||
*/
|
||||
if (addr == (addr_t) &dummy->regs.psw.mask &&
|
||||
((data & ~PSW_MASK_USER) != psw_user_bits ||
|
||||
(((data^psw_user_bits) & ~PSW_MASK_USER) ||
|
||||
(((data^psw_user_bits) & PSW_MASK_ASC) &&
|
||||
((data|psw_user_bits) & PSW_MASK_ASC) == PSW_MASK_ASC) ||
|
||||
((data & PSW_MASK_EA) && !(data & PSW_MASK_BA))))
|
||||
/* Invalid psw mask. */
|
||||
return -EINVAL;
|
||||
@@ -655,7 +657,10 @@ static int __poke_user_compat(struct task_struct *child,
|
||||
*/
|
||||
if (addr == (addr_t) &dummy32->regs.psw.mask) {
|
||||
/* Build a 64 bit psw mask from 31 bit mask. */
|
||||
if ((tmp & ~PSW32_MASK_USER) != psw32_user_bits)
|
||||
if (((tmp^psw32_user_bits) & ~PSW32_MASK_USER) ||
|
||||
(((tmp^psw32_user_bits) & PSW32_MASK_ASC) &&
|
||||
((tmp|psw32_user_bits) & PSW32_MASK_ASC)
|
||||
== PSW32_MASK_ASC))
|
||||
/* Invalid psw mask. */
|
||||
return -EINVAL;
|
||||
regs->psw.mask = (regs->psw.mask & ~PSW_MASK_USER) |
|
||||
|
||||
@@ -75,6 +75,7 @@ config SPARC64
|
||||
select ARCH_HAVE_NMI_SAFE_CMPXCHG
|
||||
select HAVE_C_RECORDMCOUNT
|
||||
select NO_BOOTMEM
|
||||
select ARCH_SUPPORTS_ATOMIC_RMW
|
||||
|
||||
config ARCH_DEFCONFIG
|
||||
string
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
|
||||
/* The kernel image occupies 0x4000000 to 0x6000000 (4MB --> 96MB).
|
||||
* The page copy blockops can use 0x6000000 to 0x8000000.
|
||||
* The TSB is mapped in the 0x8000000 to 0xa000000 range.
|
||||
* The 8K TSB is mapped in the 0x8000000 to 0x8400000 range.
|
||||
* The 4M TSB is mapped in the 0x8400000 to 0x8800000 range.
|
||||
* The PROM resides in an area spanning 0xf0000000 to 0x100000000.
|
||||
* The vmalloc area spans 0x100000000 to 0x200000000.
|
||||
* Since modules need to be in the lowest 32-bits of the address space,
|
||||
@@ -33,7 +34,8 @@
|
||||
* 0x400000000.
|
||||
*/
|
||||
#define TLBTEMP_BASE _AC(0x0000000006000000,UL)
|
||||
#define TSBMAP_BASE _AC(0x0000000008000000,UL)
|
||||
#define TSBMAP_8K_BASE _AC(0x0000000008000000,UL)
|
||||
#define TSBMAP_4M_BASE _AC(0x0000000008400000,UL)
|
||||
#define MODULES_VADDR _AC(0x0000000010000000,UL)
|
||||
#define MODULES_LEN _AC(0x00000000e0000000,UL)
|
||||
#define MODULES_END _AC(0x00000000f0000000,UL)
|
||||
@@ -102,9 +104,12 @@
|
||||
/* Kernel has a separate 44bit address space. */
|
||||
#define FIRST_USER_ADDRESS 0
|
||||
|
||||
#define pte_ERROR(e) __builtin_trap()
|
||||
#define pmd_ERROR(e) __builtin_trap()
|
||||
#define pgd_ERROR(e) __builtin_trap()
|
||||
#define pmd_ERROR(e) \
|
||||
pr_err("%s:%d: bad pmd %p(%016lx) seen at (%pS)\n", \
|
||||
__FILE__, __LINE__, &(e), pmd_val(e), __builtin_return_address(0))
|
||||
#define pgd_ERROR(e) \
|
||||
pr_err("%s:%d: bad pgd %p(%016lx) seen at (%pS)\n", \
|
||||
__FILE__, __LINE__, &(e), pgd_val(e), __builtin_return_address(0))
|
||||
|
||||
#endif /* !(__ASSEMBLY__) */
|
||||
|
||||
|
||||
@@ -35,6 +35,8 @@ static inline void flush_tlb_range(struct vm_area_struct *vma,
|
||||
{
|
||||
}
|
||||
|
||||
void flush_tlb_kernel_range(unsigned long start, unsigned long end);
|
||||
|
||||
#define __HAVE_ARCH_ENTER_LAZY_MMU_MODE
|
||||
|
||||
extern void flush_tlb_pending(void);
|
||||
@@ -49,11 +51,6 @@ extern void __flush_tlb_kernel_range(unsigned long start, unsigned long end);
|
||||
|
||||
#ifndef CONFIG_SMP
|
||||
|
||||
#define flush_tlb_kernel_range(start,end) \
|
||||
do { flush_tsb_kernel_range(start,end); \
|
||||
__flush_tlb_kernel_range(start,end); \
|
||||
} while (0)
|
||||
|
||||
static inline void global_flush_tlb_page(struct mm_struct *mm, unsigned long vaddr)
|
||||
{
|
||||
__flush_tlb_page(CTX_HWBITS(mm->context), vaddr);
|
||||
@@ -64,11 +61,6 @@ static inline void global_flush_tlb_page(struct mm_struct *mm, unsigned long vad
|
||||
extern void smp_flush_tlb_kernel_range(unsigned long start, unsigned long end);
|
||||
extern void smp_flush_tlb_page(struct mm_struct *mm, unsigned long vaddr);
|
||||
|
||||
#define flush_tlb_kernel_range(start, end) \
|
||||
do { flush_tsb_kernel_range(start,end); \
|
||||
smp_flush_tlb_kernel_range(start, end); \
|
||||
} while (0)
|
||||
|
||||
#define global_flush_tlb_page(mm, vaddr) \
|
||||
smp_flush_tlb_page(mm, vaddr)
|
||||
|
||||
|
||||
@@ -1336,7 +1336,7 @@ int ldc_connect(struct ldc_channel *lp)
|
||||
if (!(lp->flags & LDC_FLAG_ALLOCED_QUEUES) ||
|
||||
!(lp->flags & LDC_FLAG_REGISTERED_QUEUES) ||
|
||||
lp->hs_state != LDC_HS_OPEN)
|
||||
err = -EINVAL;
|
||||
err = ((lp->hs_state > LDC_HS_OPEN) ? 0 : -EINVAL);
|
||||
else
|
||||
err = start_handshake(lp);
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ void cpu_panic(void)
|
||||
#define NUM_ROUNDS 64 /* magic value */
|
||||
#define NUM_ITERS 5 /* likewise */
|
||||
|
||||
static DEFINE_SPINLOCK(itc_sync_lock);
|
||||
static DEFINE_RAW_SPINLOCK(itc_sync_lock);
|
||||
static unsigned long go[SLAVE + 1];
|
||||
|
||||
#define DEBUG_TICK_SYNC 0
|
||||
@@ -258,7 +258,7 @@ static void smp_synchronize_one_tick(int cpu)
|
||||
go[MASTER] = 0;
|
||||
membar_safe("#StoreLoad");
|
||||
|
||||
spin_lock_irqsave(&itc_sync_lock, flags);
|
||||
raw_spin_lock_irqsave(&itc_sync_lock, flags);
|
||||
{
|
||||
for (i = 0; i < NUM_ROUNDS*NUM_ITERS; i++) {
|
||||
while (!go[MASTER])
|
||||
@@ -269,7 +269,7 @@ static void smp_synchronize_one_tick(int cpu)
|
||||
membar_safe("#StoreLoad");
|
||||
}
|
||||
}
|
||||
spin_unlock_irqrestore(&itc_sync_lock, flags);
|
||||
raw_spin_unlock_irqrestore(&itc_sync_lock, flags);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_SUN_LDOMS) && defined(CONFIG_HOTPLUG_CPU)
|
||||
|
||||
@@ -44,7 +44,7 @@ SIGN1(sys32_timer_settime, compat_sys_timer_settime, %o1)
|
||||
SIGN1(sys32_io_submit, compat_sys_io_submit, %o1)
|
||||
SIGN1(sys32_mq_open, compat_sys_mq_open, %o1)
|
||||
SIGN1(sys32_select, compat_sys_select, %o0)
|
||||
SIGN3(sys32_futex, compat_sys_futex, %o1, %o2, %o5)
|
||||
SIGN1(sys32_futex, compat_sys_futex, %o1)
|
||||
SIGN1(sys32_recvfrom, compat_sys_recvfrom, %o0)
|
||||
SIGN1(sys32_recvmsg, compat_sys_recvmsg, %o0)
|
||||
SIGN1(sys32_sendmsg, compat_sys_sendmsg, %o0)
|
||||
|
||||
@@ -163,17 +163,23 @@ static unsigned long *fetch_reg_addr(unsigned int reg, struct pt_regs *regs)
|
||||
unsigned long compute_effective_address(struct pt_regs *regs,
|
||||
unsigned int insn, unsigned int rd)
|
||||
{
|
||||
int from_kernel = (regs->tstate & TSTATE_PRIV) != 0;
|
||||
unsigned int rs1 = (insn >> 14) & 0x1f;
|
||||
unsigned int rs2 = insn & 0x1f;
|
||||
int from_kernel = (regs->tstate & TSTATE_PRIV) != 0;
|
||||
unsigned long addr;
|
||||
|
||||
if (insn & 0x2000) {
|
||||
maybe_flush_windows(rs1, 0, rd, from_kernel);
|
||||
return (fetch_reg(rs1, regs) + sign_extend_imm13(insn));
|
||||
addr = (fetch_reg(rs1, regs) + sign_extend_imm13(insn));
|
||||
} else {
|
||||
maybe_flush_windows(rs1, rs2, rd, from_kernel);
|
||||
return (fetch_reg(rs1, regs) + fetch_reg(rs2, regs));
|
||||
addr = (fetch_reg(rs1, regs) + fetch_reg(rs2, regs));
|
||||
}
|
||||
|
||||
if (!from_kernel && test_thread_flag(TIF_32BIT))
|
||||
addr &= 0xffffffff;
|
||||
|
||||
return addr;
|
||||
}
|
||||
|
||||
/* This is just to make gcc think die_if_kernel does return... */
|
||||
|
||||
@@ -236,6 +236,7 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
|
||||
*/
|
||||
VISEntryHalf
|
||||
|
||||
membar #Sync
|
||||
alignaddr %o1, %g0, %g0
|
||||
|
||||
add %o1, (64 - 1), %o4
|
||||
|
||||
@@ -499,7 +499,7 @@ static int do_one_mathemu(u32 insn, unsigned long *pfsr, unsigned long *fregs)
|
||||
case 0: fsr = *pfsr;
|
||||
if (IR == -1) IR = 2;
|
||||
/* fcc is always fcc0 */
|
||||
fsr &= ~0xc00; fsr |= (IR << 10); break;
|
||||
fsr &= ~0xc00; fsr |= (IR << 10);
|
||||
*pfsr = fsr;
|
||||
break;
|
||||
case 1: rd->s = IR; break;
|
||||
|
||||
@@ -95,38 +95,51 @@ static unsigned int get_user_insn(unsigned long tpc)
|
||||
pte_t *ptep, pte;
|
||||
unsigned long pa;
|
||||
u32 insn = 0;
|
||||
unsigned long pstate;
|
||||
|
||||
if (pgd_none(*pgdp))
|
||||
goto outret;
|
||||
if (pgd_none(*pgdp) || unlikely(pgd_bad(*pgdp)))
|
||||
goto out;
|
||||
pudp = pud_offset(pgdp, tpc);
|
||||
if (pud_none(*pudp))
|
||||
goto outret;
|
||||
pmdp = pmd_offset(pudp, tpc);
|
||||
if (pmd_none(*pmdp))
|
||||
goto outret;
|
||||
|
||||
/* This disables preemption for us as well. */
|
||||
__asm__ __volatile__("rdpr %%pstate, %0" : "=r" (pstate));
|
||||
__asm__ __volatile__("wrpr %0, %1, %%pstate"
|
||||
: : "r" (pstate), "i" (PSTATE_IE));
|
||||
ptep = pte_offset_map(pmdp, tpc);
|
||||
pte = *ptep;
|
||||
if (!pte_present(pte))
|
||||
if (pud_none(*pudp) || unlikely(pud_bad(*pudp)))
|
||||
goto out;
|
||||
|
||||
pa = (pte_pfn(pte) << PAGE_SHIFT);
|
||||
pa += (tpc & ~PAGE_MASK);
|
||||
/* This disables preemption for us as well. */
|
||||
local_irq_disable();
|
||||
|
||||
/* Use phys bypass so we don't pollute dtlb/dcache. */
|
||||
__asm__ __volatile__("lduwa [%1] %2, %0"
|
||||
: "=r" (insn)
|
||||
: "r" (pa), "i" (ASI_PHYS_USE_EC));
|
||||
pmdp = pmd_offset(pudp, tpc);
|
||||
if (pmd_none(*pmdp) || unlikely(pmd_bad(*pmdp)))
|
||||
goto out_irq_enable;
|
||||
|
||||
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||
if (pmd_trans_huge(*pmdp)) {
|
||||
if (pmd_trans_splitting(*pmdp))
|
||||
goto out_irq_enable;
|
||||
|
||||
pa = pmd_pfn(*pmdp) << PAGE_SHIFT;
|
||||
pa += tpc & ~HPAGE_MASK;
|
||||
|
||||
/* Use phys bypass so we don't pollute dtlb/dcache. */
|
||||
__asm__ __volatile__("lduwa [%1] %2, %0"
|
||||
: "=r" (insn)
|
||||
: "r" (pa), "i" (ASI_PHYS_USE_EC));
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
ptep = pte_offset_map(pmdp, tpc);
|
||||
pte = *ptep;
|
||||
if (pte_present(pte)) {
|
||||
pa = (pte_pfn(pte) << PAGE_SHIFT);
|
||||
pa += (tpc & ~PAGE_MASK);
|
||||
|
||||
/* Use phys bypass so we don't pollute dtlb/dcache. */
|
||||
__asm__ __volatile__("lduwa [%1] %2, %0"
|
||||
: "=r" (insn)
|
||||
: "r" (pa), "i" (ASI_PHYS_USE_EC));
|
||||
}
|
||||
pte_unmap(ptep);
|
||||
}
|
||||
out_irq_enable:
|
||||
local_irq_enable();
|
||||
out:
|
||||
pte_unmap(ptep);
|
||||
__asm__ __volatile__("wrpr %0, 0x0, %%pstate" : : "r" (pstate));
|
||||
outret:
|
||||
return insn;
|
||||
}
|
||||
|
||||
@@ -152,7 +165,8 @@ show_signal_msg(struct pt_regs *regs, int sig, int code,
|
||||
}
|
||||
|
||||
static void do_fault_siginfo(int code, int sig, struct pt_regs *regs,
|
||||
unsigned int insn, int fault_code)
|
||||
unsigned long fault_addr, unsigned int insn,
|
||||
int fault_code)
|
||||
{
|
||||
unsigned long addr;
|
||||
siginfo_t info;
|
||||
@@ -160,10 +174,18 @@ static void do_fault_siginfo(int code, int sig, struct pt_regs *regs,
|
||||
info.si_code = code;
|
||||
info.si_signo = sig;
|
||||
info.si_errno = 0;
|
||||
if (fault_code & FAULT_CODE_ITLB)
|
||||
if (fault_code & FAULT_CODE_ITLB) {
|
||||
addr = regs->tpc;
|
||||
else
|
||||
addr = compute_effective_address(regs, insn, 0);
|
||||
} else {
|
||||
/* If we were able to probe the faulting instruction, use it
|
||||
* to compute a precise fault address. Otherwise use the fault
|
||||
* time provided address which may only have page granularity.
|
||||
*/
|
||||
if (insn)
|
||||
addr = compute_effective_address(regs, insn, 0);
|
||||
else
|
||||
addr = fault_addr;
|
||||
}
|
||||
info.si_addr = (void __user *) addr;
|
||||
info.si_trapno = 0;
|
||||
|
||||
@@ -238,7 +260,7 @@ static void __kprobes do_kernel_fault(struct pt_regs *regs, int si_code,
|
||||
/* The si_code was set to make clear whether
|
||||
* this was a SEGV_MAPERR or SEGV_ACCERR fault.
|
||||
*/
|
||||
do_fault_siginfo(si_code, SIGSEGV, regs, insn, fault_code);
|
||||
do_fault_siginfo(si_code, SIGSEGV, regs, address, insn, fault_code);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -258,18 +280,6 @@ static void noinline __kprobes bogus_32bit_fault_tpc(struct pt_regs *regs)
|
||||
show_regs(regs);
|
||||
}
|
||||
|
||||
static void noinline __kprobes bogus_32bit_fault_address(struct pt_regs *regs,
|
||||
unsigned long addr)
|
||||
{
|
||||
static int times;
|
||||
|
||||
if (times++ < 10)
|
||||
printk(KERN_ERR "FAULT[%s:%d]: 32-bit process "
|
||||
"reports 64-bit fault address [%lx]\n",
|
||||
current->comm, current->pid, addr);
|
||||
show_regs(regs);
|
||||
}
|
||||
|
||||
asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs)
|
||||
{
|
||||
struct mm_struct *mm = current->mm;
|
||||
@@ -298,10 +308,8 @@ asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs)
|
||||
goto intr_or_no_mm;
|
||||
}
|
||||
}
|
||||
if (unlikely((address >> 32) != 0)) {
|
||||
bogus_32bit_fault_address(regs, address);
|
||||
if (unlikely((address >> 32) != 0))
|
||||
goto intr_or_no_mm;
|
||||
}
|
||||
}
|
||||
|
||||
if (regs->tstate & TSTATE_PRIV) {
|
||||
@@ -521,7 +529,7 @@ do_sigbus:
|
||||
* Send a sigbus, regardless of whether we were in kernel
|
||||
* or user mode.
|
||||
*/
|
||||
do_fault_siginfo(BUS_ADRERR, SIGBUS, regs, insn, fault_code);
|
||||
do_fault_siginfo(BUS_ADRERR, SIGBUS, regs, address, insn, fault_code);
|
||||
|
||||
/* Kernel mode? Handle exceptions or die */
|
||||
if (regs->tstate & TSTATE_PRIV)
|
||||
|
||||
@@ -350,6 +350,10 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t *
|
||||
|
||||
mm = vma->vm_mm;
|
||||
|
||||
/* Don't insert a non-valid PTE into the TSB, we'll deadlock. */
|
||||
if (!pte_accessible(mm, pte))
|
||||
return;
|
||||
|
||||
spin_lock_irqsave(&mm->context.lock, flags);
|
||||
|
||||
#if defined(CONFIG_HUGETLB_PAGE) || defined(CONFIG_TRANSPARENT_HUGEPAGE)
|
||||
@@ -2746,3 +2750,26 @@ void hugetlb_setup(struct pt_regs *regs)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
#define do_flush_tlb_kernel_range smp_flush_tlb_kernel_range
|
||||
#else
|
||||
#define do_flush_tlb_kernel_range __flush_tlb_kernel_range
|
||||
#endif
|
||||
|
||||
void flush_tlb_kernel_range(unsigned long start, unsigned long end)
|
||||
{
|
||||
if (start < HI_OBP_ADDRESS && end > LOW_OBP_ADDRESS) {
|
||||
if (start < LOW_OBP_ADDRESS) {
|
||||
flush_tsb_kernel_range(start, LOW_OBP_ADDRESS);
|
||||
do_flush_tlb_kernel_range(start, LOW_OBP_ADDRESS);
|
||||
}
|
||||
if (end > HI_OBP_ADDRESS) {
|
||||
flush_tsb_kernel_range(end, HI_OBP_ADDRESS);
|
||||
do_flush_tlb_kernel_range(end, HI_OBP_ADDRESS);
|
||||
}
|
||||
} else {
|
||||
flush_tsb_kernel_range(start, end);
|
||||
do_flush_tlb_kernel_range(start, end);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,7 +133,19 @@ static void setup_tsb_params(struct mm_struct *mm, unsigned long tsb_idx, unsign
|
||||
mm->context.tsb_block[tsb_idx].tsb_nentries =
|
||||
tsb_bytes / sizeof(struct tsb);
|
||||
|
||||
base = TSBMAP_BASE;
|
||||
switch (tsb_idx) {
|
||||
case MM_TSB_BASE:
|
||||
base = TSBMAP_8K_BASE;
|
||||
break;
|
||||
#if defined(CONFIG_HUGETLB_PAGE) || defined(CONFIG_TRANSPARENT_HUGEPAGE)
|
||||
case MM_TSB_HUGE:
|
||||
base = TSBMAP_4M_BASE;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
BUG();
|
||||
}
|
||||
|
||||
tte = pgprot_val(PAGE_KERNEL_LOCKED);
|
||||
tsb_paddr = __pa(mm->context.tsb_block[tsb_idx].tsb);
|
||||
BUG_ON(tsb_paddr & (tsb_bytes - 1UL));
|
||||
|
||||
@@ -123,6 +123,7 @@ config X86
|
||||
select COMPAT_OLD_SIGACTION if IA32_EMULATION
|
||||
select RTC_LIB
|
||||
select HAVE_DEBUG_STACKOVERFLOW
|
||||
select ARCH_SUPPORTS_ATOMIC_RMW
|
||||
|
||||
config INSTRUCTION_DECODER
|
||||
def_bool y
|
||||
@@ -972,10 +973,27 @@ config VM86
|
||||
default y
|
||||
depends on X86_32
|
||||
---help---
|
||||
This option is required by programs like DOSEMU to run 16-bit legacy
|
||||
code on X86 processors. It also may be needed by software like
|
||||
XFree86 to initialize some video cards via BIOS. Disabling this
|
||||
option saves about 6k.
|
||||
This option is required by programs like DOSEMU to run
|
||||
16-bit real mode legacy code on x86 processors. It also may
|
||||
be needed by software like XFree86 to initialize some video
|
||||
cards via BIOS. Disabling this option saves about 6K.
|
||||
|
||||
config X86_16BIT
|
||||
bool "Enable support for 16-bit segments" if EXPERT
|
||||
default y
|
||||
---help---
|
||||
This option is required by programs like Wine to run 16-bit
|
||||
protected mode legacy code on x86 processors. Disabling
|
||||
this option saves about 300 bytes on i386, or around 6K text
|
||||
plus 16K runtime memory on x86-64,
|
||||
|
||||
config X86_ESPFIX32
|
||||
def_bool y
|
||||
depends on X86_16BIT && X86_32
|
||||
|
||||
config X86_ESPFIX64
|
||||
def_bool y
|
||||
depends on X86_16BIT && X86_64
|
||||
|
||||
config TOSHIBA
|
||||
tristate "Toshiba Laptop support"
|
||||
@@ -1590,6 +1608,7 @@ config EFI
|
||||
config EFI_STUB
|
||||
bool "EFI stub support"
|
||||
depends on EFI
|
||||
select RELOCATABLE
|
||||
---help---
|
||||
This kernel feature allows a bzImage to be loaded directly
|
||||
by EFI firmware without the use of a bootloader.
|
||||
|
||||
@@ -91,10 +91,9 @@ bs_die:
|
||||
|
||||
.section ".bsdata", "a"
|
||||
bugger_off_msg:
|
||||
.ascii "Direct floppy boot is not supported. "
|
||||
.ascii "Use a boot loader program instead.\r\n"
|
||||
.ascii "Use a boot loader.\r\n"
|
||||
.ascii "\n"
|
||||
.ascii "Remove disk and press any key to reboot ...\r\n"
|
||||
.ascii "Remove disk and press any key to reboot...\r\n"
|
||||
.byte 0
|
||||
|
||||
#ifdef CONFIG_EFI_STUB
|
||||
@@ -108,7 +107,7 @@ coff_header:
|
||||
#else
|
||||
.word 0x8664 # x86-64
|
||||
#endif
|
||||
.word 3 # nr_sections
|
||||
.word 4 # nr_sections
|
||||
.long 0 # TimeDateStamp
|
||||
.long 0 # PointerToSymbolTable
|
||||
.long 1 # NumberOfSymbols
|
||||
@@ -250,6 +249,25 @@ section_table:
|
||||
.word 0 # NumberOfLineNumbers
|
||||
.long 0x60500020 # Characteristics (section flags)
|
||||
|
||||
#
|
||||
# The offset & size fields are filled in by build.c.
|
||||
#
|
||||
.ascii ".bss"
|
||||
.byte 0
|
||||
.byte 0
|
||||
.byte 0
|
||||
.byte 0
|
||||
.long 0
|
||||
.long 0x0
|
||||
.long 0 # Size of initialized data
|
||||
# on disk
|
||||
.long 0x0
|
||||
.long 0 # PointerToRelocations
|
||||
.long 0 # PointerToLineNumbers
|
||||
.word 0 # NumberOfRelocations
|
||||
.word 0 # NumberOfLineNumbers
|
||||
.long 0xc8000080 # Characteristics (section flags)
|
||||
|
||||
#endif /* CONFIG_EFI_STUB */
|
||||
|
||||
# Kernel attributes; used by setup. This is part 1 of the
|
||||
|
||||
@@ -141,7 +141,7 @@ static void usage(void)
|
||||
|
||||
#ifdef CONFIG_EFI_STUB
|
||||
|
||||
static void update_pecoff_section_header(char *section_name, u32 offset, u32 size)
|
||||
static void update_pecoff_section_header_fields(char *section_name, u32 vma, u32 size, u32 datasz, u32 offset)
|
||||
{
|
||||
unsigned int pe_header;
|
||||
unsigned short num_sections;
|
||||
@@ -162,10 +162,10 @@ static void update_pecoff_section_header(char *section_name, u32 offset, u32 siz
|
||||
put_unaligned_le32(size, section + 0x8);
|
||||
|
||||
/* section header vma field */
|
||||
put_unaligned_le32(offset, section + 0xc);
|
||||
put_unaligned_le32(vma, section + 0xc);
|
||||
|
||||
/* section header 'size of initialised data' field */
|
||||
put_unaligned_le32(size, section + 0x10);
|
||||
put_unaligned_le32(datasz, section + 0x10);
|
||||
|
||||
/* section header 'file offset' field */
|
||||
put_unaligned_le32(offset, section + 0x14);
|
||||
@@ -177,6 +177,11 @@ static void update_pecoff_section_header(char *section_name, u32 offset, u32 siz
|
||||
}
|
||||
}
|
||||
|
||||
static void update_pecoff_section_header(char *section_name, u32 offset, u32 size)
|
||||
{
|
||||
update_pecoff_section_header_fields(section_name, offset, size, size, offset);
|
||||
}
|
||||
|
||||
static void update_pecoff_setup_and_reloc(unsigned int size)
|
||||
{
|
||||
u32 setup_offset = 0x200;
|
||||
@@ -201,9 +206,6 @@ static void update_pecoff_text(unsigned int text_start, unsigned int file_sz)
|
||||
|
||||
pe_header = get_unaligned_le32(&buf[0x3c]);
|
||||
|
||||
/* Size of image */
|
||||
put_unaligned_le32(file_sz, &buf[pe_header + 0x50]);
|
||||
|
||||
/*
|
||||
* Size of code: Subtract the size of the first sector (512 bytes)
|
||||
* which includes the header.
|
||||
@@ -218,6 +220,22 @@ static void update_pecoff_text(unsigned int text_start, unsigned int file_sz)
|
||||
update_pecoff_section_header(".text", text_start, text_sz);
|
||||
}
|
||||
|
||||
static void update_pecoff_bss(unsigned int file_sz, unsigned int init_sz)
|
||||
{
|
||||
unsigned int pe_header;
|
||||
unsigned int bss_sz = init_sz - file_sz;
|
||||
|
||||
pe_header = get_unaligned_le32(&buf[0x3c]);
|
||||
|
||||
/* Size of uninitialized data */
|
||||
put_unaligned_le32(bss_sz, &buf[pe_header + 0x24]);
|
||||
|
||||
/* Size of image */
|
||||
put_unaligned_le32(init_sz, &buf[pe_header + 0x50]);
|
||||
|
||||
update_pecoff_section_header_fields(".bss", file_sz, bss_sz, 0, 0);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_EFI_STUB */
|
||||
|
||||
|
||||
@@ -269,6 +287,9 @@ int main(int argc, char ** argv)
|
||||
int fd;
|
||||
void *kernel;
|
||||
u32 crc = 0xffffffffUL;
|
||||
#ifdef CONFIG_EFI_STUB
|
||||
unsigned int init_sz;
|
||||
#endif
|
||||
|
||||
/* Defaults for old kernel */
|
||||
#ifdef CONFIG_X86_32
|
||||
@@ -339,7 +360,9 @@ int main(int argc, char ** argv)
|
||||
put_unaligned_le32(sys_size, &buf[0x1f4]);
|
||||
|
||||
#ifdef CONFIG_EFI_STUB
|
||||
update_pecoff_text(setup_sectors * 512, sz + i + ((sys_size * 16) - sz));
|
||||
update_pecoff_text(setup_sectors * 512, i + (sys_size * 16));
|
||||
init_sz = get_unaligned_le32(&buf[0x260]);
|
||||
update_pecoff_bss(i + (sys_size * 16), init_sz);
|
||||
|
||||
#ifdef CONFIG_X86_64 /* Yes, this is really how we defined it :( */
|
||||
efi_stub_entry -= 0x200;
|
||||
|
||||
16
arch/x86/include/asm/espfix.h
Normal file
16
arch/x86/include/asm/espfix.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef _ASM_X86_ESPFIX_H
|
||||
#define _ASM_X86_ESPFIX_H
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
|
||||
#include <asm/percpu.h>
|
||||
|
||||
DECLARE_PER_CPU_READ_MOSTLY(unsigned long, espfix_stack);
|
||||
DECLARE_PER_CPU_READ_MOSTLY(unsigned long, espfix_waddr);
|
||||
|
||||
extern void init_espfix_bsp(void);
|
||||
extern void init_espfix_ap(void);
|
||||
|
||||
#endif /* CONFIG_X86_64 */
|
||||
|
||||
#endif /* _ASM_X86_ESPFIX_H */
|
||||
@@ -129,7 +129,7 @@ static inline notrace unsigned long arch_local_irq_save(void)
|
||||
|
||||
#define PARAVIRT_ADJUST_EXCEPTION_FRAME /* */
|
||||
|
||||
#define INTERRUPT_RETURN iretq
|
||||
#define INTERRUPT_RETURN jmp native_iret
|
||||
#define USERGS_SYSRET64 \
|
||||
swapgs; \
|
||||
sysretq;
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
#define KVM_REFILL_PAGES 25
|
||||
#define KVM_MAX_CPUID_ENTRIES 80
|
||||
#define KVM_NR_FIXED_MTRR_REGION 88
|
||||
#define KVM_NR_VAR_MTRR 10
|
||||
#define KVM_NR_VAR_MTRR 8
|
||||
|
||||
#define ASYNC_PF_PER_VCPU 64
|
||||
|
||||
|
||||
@@ -61,6 +61,8 @@ typedef struct { pteval_t pte; } pte_t;
|
||||
#define MODULES_VADDR _AC(0xffffffffa0000000, UL)
|
||||
#define MODULES_END _AC(0xffffffffff000000, UL)
|
||||
#define MODULES_LEN (MODULES_END - MODULES_VADDR)
|
||||
#define ESPFIX_PGD_ENTRY _AC(-2, UL)
|
||||
#define ESPFIX_BASE_ADDR (ESPFIX_PGD_ENTRY << PGDIR_SHIFT)
|
||||
|
||||
#define EARLY_DYNAMIC_PAGE_TABLES 64
|
||||
|
||||
|
||||
@@ -64,6 +64,8 @@ static inline void x86_ce4100_early_setup(void) { }
|
||||
|
||||
#ifndef _SETUP
|
||||
|
||||
#include <asm/espfix.h>
|
||||
|
||||
/*
|
||||
* This is set up by the setup-routine at boot-time
|
||||
*/
|
||||
|
||||
@@ -29,6 +29,7 @@ obj-$(CONFIG_X86_64) += sys_x86_64.o x8664_ksyms_64.o
|
||||
obj-y += syscall_$(BITS).o
|
||||
obj-$(CONFIG_X86_64) += vsyscall_64.o
|
||||
obj-$(CONFIG_X86_64) += vsyscall_emu_64.o
|
||||
obj-$(CONFIG_X86_ESPFIX64) += espfix_64.o
|
||||
obj-y += bootflag.o e820.o
|
||||
obj-y += pci-dma.o quirks.o topology.o kdebugfs.o
|
||||
obj-y += alternative.o i8253.o pci-nommu.o hw_breakpoint.o
|
||||
|
||||
@@ -1364,6 +1364,15 @@ again:
|
||||
|
||||
intel_pmu_lbr_read();
|
||||
|
||||
/*
|
||||
* CondChgd bit 63 doesn't mean any overflow status. Ignore
|
||||
* and clear the bit.
|
||||
*/
|
||||
if (__test_and_clear_bit(63, (unsigned long *)&status)) {
|
||||
if (!status)
|
||||
goto done;
|
||||
}
|
||||
|
||||
/*
|
||||
* PEBS overflow sets bit 62 in the global status register
|
||||
*/
|
||||
|
||||
@@ -436,8 +436,8 @@ sysenter_do_call:
|
||||
cmpl $(NR_syscalls), %eax
|
||||
jae sysenter_badsys
|
||||
call *sys_call_table(,%eax,4)
|
||||
movl %eax,PT_EAX(%esp)
|
||||
sysenter_after_call:
|
||||
movl %eax,PT_EAX(%esp)
|
||||
LOCKDEP_SYS_EXIT
|
||||
DISABLE_INTERRUPTS(CLBR_ANY)
|
||||
TRACE_IRQS_OFF
|
||||
@@ -517,6 +517,7 @@ ENTRY(system_call)
|
||||
jae syscall_badsys
|
||||
syscall_call:
|
||||
call *sys_call_table(,%eax,4)
|
||||
syscall_after_call:
|
||||
movl %eax,PT_EAX(%esp) # store the return value
|
||||
syscall_exit:
|
||||
LOCKDEP_SYS_EXIT
|
||||
@@ -531,6 +532,7 @@ syscall_exit:
|
||||
restore_all:
|
||||
TRACE_IRQS_IRET
|
||||
restore_all_notrace:
|
||||
#ifdef CONFIG_X86_ESPFIX32
|
||||
movl PT_EFLAGS(%esp), %eax # mix EFLAGS, SS and CS
|
||||
# Warning: PT_OLDSS(%esp) contains the wrong/random values if we
|
||||
# are returning to the kernel.
|
||||
@@ -541,6 +543,7 @@ restore_all_notrace:
|
||||
cmpl $((SEGMENT_LDT << 8) | USER_RPL), %eax
|
||||
CFI_REMEMBER_STATE
|
||||
je ldt_ss # returning to user-space with LDT SS
|
||||
#endif
|
||||
restore_nocheck:
|
||||
RESTORE_REGS 4 # skip orig_eax/error_code
|
||||
irq_return:
|
||||
@@ -553,6 +556,7 @@ ENTRY(iret_exc)
|
||||
.previous
|
||||
_ASM_EXTABLE(irq_return,iret_exc)
|
||||
|
||||
#ifdef CONFIG_X86_ESPFIX32
|
||||
CFI_RESTORE_STATE
|
||||
ldt_ss:
|
||||
#ifdef CONFIG_PARAVIRT
|
||||
@@ -596,6 +600,7 @@ ldt_ss:
|
||||
lss (%esp), %esp /* switch to espfix segment */
|
||||
CFI_ADJUST_CFA_OFFSET -8
|
||||
jmp restore_nocheck
|
||||
#endif
|
||||
CFI_ENDPROC
|
||||
ENDPROC(system_call)
|
||||
|
||||
@@ -686,12 +691,12 @@ syscall_fault:
|
||||
END(syscall_fault)
|
||||
|
||||
syscall_badsys:
|
||||
movl $-ENOSYS,PT_EAX(%esp)
|
||||
jmp syscall_exit
|
||||
movl $-ENOSYS,%eax
|
||||
jmp syscall_after_call
|
||||
END(syscall_badsys)
|
||||
|
||||
sysenter_badsys:
|
||||
movl $-ENOSYS,PT_EAX(%esp)
|
||||
movl $-ENOSYS,%eax
|
||||
jmp sysenter_after_call
|
||||
END(syscall_badsys)
|
||||
CFI_ENDPROC
|
||||
@@ -708,6 +713,7 @@ END(syscall_badsys)
|
||||
* the high word of the segment base from the GDT and swiches to the
|
||||
* normal stack and adjusts ESP with the matching offset.
|
||||
*/
|
||||
#ifdef CONFIG_X86_ESPFIX32
|
||||
/* fixup the stack */
|
||||
mov GDT_ESPFIX_SS + 4, %al /* bits 16..23 */
|
||||
mov GDT_ESPFIX_SS + 7, %ah /* bits 24..31 */
|
||||
@@ -717,8 +723,10 @@ END(syscall_badsys)
|
||||
pushl_cfi %eax
|
||||
lss (%esp), %esp /* switch to the normal stack segment */
|
||||
CFI_ADJUST_CFA_OFFSET -8
|
||||
#endif
|
||||
.endm
|
||||
.macro UNWIND_ESPFIX_STACK
|
||||
#ifdef CONFIG_X86_ESPFIX32
|
||||
movl %ss, %eax
|
||||
/* see if on espfix stack */
|
||||
cmpw $__ESPFIX_SS, %ax
|
||||
@@ -729,6 +737,7 @@ END(syscall_badsys)
|
||||
/* switch to normal stack */
|
||||
FIXUP_ESPFIX_STACK
|
||||
27:
|
||||
#endif
|
||||
.endm
|
||||
|
||||
/*
|
||||
@@ -1349,11 +1358,13 @@ END(debug)
|
||||
ENTRY(nmi)
|
||||
RING0_INT_FRAME
|
||||
ASM_CLAC
|
||||
#ifdef CONFIG_X86_ESPFIX32
|
||||
pushl_cfi %eax
|
||||
movl %ss, %eax
|
||||
cmpw $__ESPFIX_SS, %ax
|
||||
popl_cfi %eax
|
||||
je nmi_espfix_stack
|
||||
#endif
|
||||
cmpl $ia32_sysenter_target,(%esp)
|
||||
je nmi_stack_fixup
|
||||
pushl_cfi %eax
|
||||
@@ -1393,6 +1404,7 @@ nmi_debug_stack_check:
|
||||
FIX_STACK 24, nmi_stack_correct, 1
|
||||
jmp nmi_stack_correct
|
||||
|
||||
#ifdef CONFIG_X86_ESPFIX32
|
||||
nmi_espfix_stack:
|
||||
/* We have a RING0_INT_FRAME here.
|
||||
*
|
||||
@@ -1414,6 +1426,7 @@ nmi_espfix_stack:
|
||||
lss 12+4(%esp), %esp # back to espfix stack
|
||||
CFI_ADJUST_CFA_OFFSET -24
|
||||
jmp irq_return
|
||||
#endif
|
||||
CFI_ENDPROC
|
||||
END(nmi)
|
||||
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
#include <asm/asm.h>
|
||||
#include <asm/context_tracking.h>
|
||||
#include <asm/smap.h>
|
||||
#include <asm/pgtable_types.h>
|
||||
#include <linux/err.h>
|
||||
|
||||
/* Avoid __ASSEMBLER__'ifying <linux/audit.h> just for this. */
|
||||
@@ -1041,12 +1042,45 @@ restore_args:
|
||||
|
||||
irq_return:
|
||||
INTERRUPT_RETURN
|
||||
_ASM_EXTABLE(irq_return, bad_iret)
|
||||
|
||||
#ifdef CONFIG_PARAVIRT
|
||||
ENTRY(native_iret)
|
||||
/*
|
||||
* Are we returning to a stack segment from the LDT? Note: in
|
||||
* 64-bit mode SS:RSP on the exception stack is always valid.
|
||||
*/
|
||||
#ifdef CONFIG_X86_ESPFIX64
|
||||
testb $4,(SS-RIP)(%rsp)
|
||||
jnz native_irq_return_ldt
|
||||
#endif
|
||||
|
||||
native_irq_return_iret:
|
||||
iretq
|
||||
_ASM_EXTABLE(native_iret, bad_iret)
|
||||
_ASM_EXTABLE(native_irq_return_iret, bad_iret)
|
||||
|
||||
#ifdef CONFIG_X86_ESPFIX64
|
||||
native_irq_return_ldt:
|
||||
pushq_cfi %rax
|
||||
pushq_cfi %rdi
|
||||
SWAPGS
|
||||
movq PER_CPU_VAR(espfix_waddr),%rdi
|
||||
movq %rax,(0*8)(%rdi) /* RAX */
|
||||
movq (2*8)(%rsp),%rax /* RIP */
|
||||
movq %rax,(1*8)(%rdi)
|
||||
movq (3*8)(%rsp),%rax /* CS */
|
||||
movq %rax,(2*8)(%rdi)
|
||||
movq (4*8)(%rsp),%rax /* RFLAGS */
|
||||
movq %rax,(3*8)(%rdi)
|
||||
movq (6*8)(%rsp),%rax /* SS */
|
||||
movq %rax,(5*8)(%rdi)
|
||||
movq (5*8)(%rsp),%rax /* RSP */
|
||||
movq %rax,(4*8)(%rdi)
|
||||
andl $0xffff0000,%eax
|
||||
popq_cfi %rdi
|
||||
orq PER_CPU_VAR(espfix_stack),%rax
|
||||
SWAPGS
|
||||
movq %rax,%rsp
|
||||
popq_cfi %rax
|
||||
jmp native_irq_return_iret
|
||||
#endif
|
||||
|
||||
.section .fixup,"ax"
|
||||
@@ -1112,9 +1146,40 @@ ENTRY(retint_kernel)
|
||||
call preempt_schedule_irq
|
||||
jmp exit_intr
|
||||
#endif
|
||||
|
||||
CFI_ENDPROC
|
||||
END(common_interrupt)
|
||||
|
||||
/*
|
||||
* If IRET takes a fault on the espfix stack, then we
|
||||
* end up promoting it to a doublefault. In that case,
|
||||
* modify the stack to make it look like we just entered
|
||||
* the #GP handler from user space, similar to bad_iret.
|
||||
*/
|
||||
#ifdef CONFIG_X86_ESPFIX64
|
||||
ALIGN
|
||||
__do_double_fault:
|
||||
XCPT_FRAME 1 RDI+8
|
||||
movq RSP(%rdi),%rax /* Trap on the espfix stack? */
|
||||
sarq $PGDIR_SHIFT,%rax
|
||||
cmpl $ESPFIX_PGD_ENTRY,%eax
|
||||
jne do_double_fault /* No, just deliver the fault */
|
||||
cmpl $__KERNEL_CS,CS(%rdi)
|
||||
jne do_double_fault
|
||||
movq RIP(%rdi),%rax
|
||||
cmpq $native_irq_return_iret,%rax
|
||||
jne do_double_fault /* This shouldn't happen... */
|
||||
movq PER_CPU_VAR(kernel_stack),%rax
|
||||
subq $(6*8-KERNEL_STACK_OFFSET),%rax /* Reset to original stack */
|
||||
movq %rax,RSP(%rdi)
|
||||
movq $0,(%rax) /* Missing (lost) #GP error code */
|
||||
movq $general_protection,RIP(%rdi)
|
||||
retq
|
||||
CFI_ENDPROC
|
||||
END(__do_double_fault)
|
||||
#else
|
||||
# define __do_double_fault do_double_fault
|
||||
#endif
|
||||
|
||||
/*
|
||||
* End of kprobes section
|
||||
*/
|
||||
@@ -1305,7 +1370,7 @@ zeroentry overflow do_overflow
|
||||
zeroentry bounds do_bounds
|
||||
zeroentry invalid_op do_invalid_op
|
||||
zeroentry device_not_available do_device_not_available
|
||||
paranoiderrorentry double_fault do_double_fault
|
||||
paranoiderrorentry double_fault __do_double_fault
|
||||
zeroentry coprocessor_segment_overrun do_coprocessor_segment_overrun
|
||||
errorentry invalid_TSS do_invalid_TSS
|
||||
errorentry segment_not_present do_segment_not_present
|
||||
@@ -1592,7 +1657,7 @@ error_sti:
|
||||
*/
|
||||
error_kernelspace:
|
||||
incl %ebx
|
||||
leaq irq_return(%rip),%rcx
|
||||
leaq native_irq_return_iret(%rip),%rcx
|
||||
cmpq %rcx,RIP+8(%rsp)
|
||||
je error_swapgs
|
||||
movl %ecx,%eax /* zero extend */
|
||||
|
||||
208
arch/x86/kernel/espfix_64.c
Normal file
208
arch/x86/kernel/espfix_64.c
Normal file
@@ -0,0 +1,208 @@
|
||||
/* ----------------------------------------------------------------------- *
|
||||
*
|
||||
* Copyright 2014 Intel Corporation; author: H. Peter Anvin
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
* version 2, as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* ----------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* The IRET instruction, when returning to a 16-bit segment, only
|
||||
* restores the bottom 16 bits of the user space stack pointer. This
|
||||
* causes some 16-bit software to break, but it also leaks kernel state
|
||||
* to user space.
|
||||
*
|
||||
* This works around this by creating percpu "ministacks", each of which
|
||||
* is mapped 2^16 times 64K apart. When we detect that the return SS is
|
||||
* on the LDT, we copy the IRET frame to the ministack and use the
|
||||
* relevant alias to return to userspace. The ministacks are mapped
|
||||
* readonly, so if the IRET fault we promote #GP to #DF which is an IST
|
||||
* vector and thus has its own stack; we then do the fixup in the #DF
|
||||
* handler.
|
||||
*
|
||||
* This file sets up the ministacks and the related page tables. The
|
||||
* actual ministack invocation is in entry_64.S.
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/init_task.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/percpu.h>
|
||||
#include <linux/gfp.h>
|
||||
#include <linux/random.h>
|
||||
#include <asm/pgtable.h>
|
||||
#include <asm/pgalloc.h>
|
||||
#include <asm/setup.h>
|
||||
#include <asm/espfix.h>
|
||||
|
||||
/*
|
||||
* Note: we only need 6*8 = 48 bytes for the espfix stack, but round
|
||||
* it up to a cache line to avoid unnecessary sharing.
|
||||
*/
|
||||
#define ESPFIX_STACK_SIZE (8*8UL)
|
||||
#define ESPFIX_STACKS_PER_PAGE (PAGE_SIZE/ESPFIX_STACK_SIZE)
|
||||
|
||||
/* There is address space for how many espfix pages? */
|
||||
#define ESPFIX_PAGE_SPACE (1UL << (PGDIR_SHIFT-PAGE_SHIFT-16))
|
||||
|
||||
#define ESPFIX_MAX_CPUS (ESPFIX_STACKS_PER_PAGE * ESPFIX_PAGE_SPACE)
|
||||
#if CONFIG_NR_CPUS > ESPFIX_MAX_CPUS
|
||||
# error "Need more than one PGD for the ESPFIX hack"
|
||||
#endif
|
||||
|
||||
#define PGALLOC_GFP (GFP_KERNEL | __GFP_NOTRACK | __GFP_REPEAT | __GFP_ZERO)
|
||||
|
||||
/* This contains the *bottom* address of the espfix stack */
|
||||
DEFINE_PER_CPU_READ_MOSTLY(unsigned long, espfix_stack);
|
||||
DEFINE_PER_CPU_READ_MOSTLY(unsigned long, espfix_waddr);
|
||||
|
||||
/* Initialization mutex - should this be a spinlock? */
|
||||
static DEFINE_MUTEX(espfix_init_mutex);
|
||||
|
||||
/* Page allocation bitmap - each page serves ESPFIX_STACKS_PER_PAGE CPUs */
|
||||
#define ESPFIX_MAX_PAGES DIV_ROUND_UP(CONFIG_NR_CPUS, ESPFIX_STACKS_PER_PAGE)
|
||||
static void *espfix_pages[ESPFIX_MAX_PAGES];
|
||||
|
||||
static __page_aligned_bss pud_t espfix_pud_page[PTRS_PER_PUD]
|
||||
__aligned(PAGE_SIZE);
|
||||
|
||||
static unsigned int page_random, slot_random;
|
||||
|
||||
/*
|
||||
* This returns the bottom address of the espfix stack for a specific CPU.
|
||||
* The math allows for a non-power-of-two ESPFIX_STACK_SIZE, in which case
|
||||
* we have to account for some amount of padding at the end of each page.
|
||||
*/
|
||||
static inline unsigned long espfix_base_addr(unsigned int cpu)
|
||||
{
|
||||
unsigned long page, slot;
|
||||
unsigned long addr;
|
||||
|
||||
page = (cpu / ESPFIX_STACKS_PER_PAGE) ^ page_random;
|
||||
slot = (cpu + slot_random) % ESPFIX_STACKS_PER_PAGE;
|
||||
addr = (page << PAGE_SHIFT) + (slot * ESPFIX_STACK_SIZE);
|
||||
addr = (addr & 0xffffUL) | ((addr & ~0xffffUL) << 16);
|
||||
addr += ESPFIX_BASE_ADDR;
|
||||
return addr;
|
||||
}
|
||||
|
||||
#define PTE_STRIDE (65536/PAGE_SIZE)
|
||||
#define ESPFIX_PTE_CLONES (PTRS_PER_PTE/PTE_STRIDE)
|
||||
#define ESPFIX_PMD_CLONES PTRS_PER_PMD
|
||||
#define ESPFIX_PUD_CLONES (65536/(ESPFIX_PTE_CLONES*ESPFIX_PMD_CLONES))
|
||||
|
||||
#define PGTABLE_PROT ((_KERNPG_TABLE & ~_PAGE_RW) | _PAGE_NX)
|
||||
|
||||
static void init_espfix_random(void)
|
||||
{
|
||||
unsigned long rand;
|
||||
|
||||
/*
|
||||
* This is run before the entropy pools are initialized,
|
||||
* but this is hopefully better than nothing.
|
||||
*/
|
||||
if (!arch_get_random_long(&rand)) {
|
||||
/* The constant is an arbitrary large prime */
|
||||
rdtscll(rand);
|
||||
rand *= 0xc345c6b72fd16123UL;
|
||||
}
|
||||
|
||||
slot_random = rand % ESPFIX_STACKS_PER_PAGE;
|
||||
page_random = (rand / ESPFIX_STACKS_PER_PAGE)
|
||||
& (ESPFIX_PAGE_SPACE - 1);
|
||||
}
|
||||
|
||||
void __init init_espfix_bsp(void)
|
||||
{
|
||||
pgd_t *pgd_p;
|
||||
pteval_t ptemask;
|
||||
|
||||
ptemask = __supported_pte_mask;
|
||||
|
||||
/* Install the espfix pud into the kernel page directory */
|
||||
pgd_p = &init_level4_pgt[pgd_index(ESPFIX_BASE_ADDR)];
|
||||
pgd_populate(&init_mm, pgd_p, (pud_t *)espfix_pud_page);
|
||||
|
||||
/* Randomize the locations */
|
||||
init_espfix_random();
|
||||
|
||||
/* The rest is the same as for any other processor */
|
||||
init_espfix_ap();
|
||||
}
|
||||
|
||||
void init_espfix_ap(void)
|
||||
{
|
||||
unsigned int cpu, page;
|
||||
unsigned long addr;
|
||||
pud_t pud, *pud_p;
|
||||
pmd_t pmd, *pmd_p;
|
||||
pte_t pte, *pte_p;
|
||||
int n;
|
||||
void *stack_page;
|
||||
pteval_t ptemask;
|
||||
|
||||
/* We only have to do this once... */
|
||||
if (likely(this_cpu_read(espfix_stack)))
|
||||
return; /* Already initialized */
|
||||
|
||||
cpu = smp_processor_id();
|
||||
addr = espfix_base_addr(cpu);
|
||||
page = cpu/ESPFIX_STACKS_PER_PAGE;
|
||||
|
||||
/* Did another CPU already set this up? */
|
||||
stack_page = ACCESS_ONCE(espfix_pages[page]);
|
||||
if (likely(stack_page))
|
||||
goto done;
|
||||
|
||||
mutex_lock(&espfix_init_mutex);
|
||||
|
||||
/* Did we race on the lock? */
|
||||
stack_page = ACCESS_ONCE(espfix_pages[page]);
|
||||
if (stack_page)
|
||||
goto unlock_done;
|
||||
|
||||
ptemask = __supported_pte_mask;
|
||||
|
||||
pud_p = &espfix_pud_page[pud_index(addr)];
|
||||
pud = *pud_p;
|
||||
if (!pud_present(pud)) {
|
||||
pmd_p = (pmd_t *)__get_free_page(PGALLOC_GFP);
|
||||
pud = __pud(__pa(pmd_p) | (PGTABLE_PROT & ptemask));
|
||||
paravirt_alloc_pmd(&init_mm, __pa(pmd_p) >> PAGE_SHIFT);
|
||||
for (n = 0; n < ESPFIX_PUD_CLONES; n++)
|
||||
set_pud(&pud_p[n], pud);
|
||||
}
|
||||
|
||||
pmd_p = pmd_offset(&pud, addr);
|
||||
pmd = *pmd_p;
|
||||
if (!pmd_present(pmd)) {
|
||||
pte_p = (pte_t *)__get_free_page(PGALLOC_GFP);
|
||||
pmd = __pmd(__pa(pte_p) | (PGTABLE_PROT & ptemask));
|
||||
paravirt_alloc_pte(&init_mm, __pa(pte_p) >> PAGE_SHIFT);
|
||||
for (n = 0; n < ESPFIX_PMD_CLONES; n++)
|
||||
set_pmd(&pmd_p[n], pmd);
|
||||
}
|
||||
|
||||
pte_p = pte_offset_kernel(&pmd, addr);
|
||||
stack_page = (void *)__get_free_page(GFP_KERNEL);
|
||||
pte = __pte(__pa(stack_page) | (__PAGE_KERNEL_RO & ptemask));
|
||||
for (n = 0; n < ESPFIX_PTE_CLONES; n++)
|
||||
set_pte(&pte_p[n*PTE_STRIDE], pte);
|
||||
|
||||
/* Job is done for this CPU and any CPU which shares this page */
|
||||
ACCESS_ONCE(espfix_pages[page]) = stack_page;
|
||||
|
||||
unlock_done:
|
||||
mutex_unlock(&espfix_init_mutex);
|
||||
done:
|
||||
this_cpu_write(espfix_stack, addr);
|
||||
this_cpu_write(espfix_waddr, (unsigned long)stack_page
|
||||
+ (addr & ~PAGE_MASK));
|
||||
}
|
||||
@@ -20,8 +20,6 @@
|
||||
#include <asm/mmu_context.h>
|
||||
#include <asm/syscalls.h>
|
||||
|
||||
int sysctl_ldt16 = 0;
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
static void flush_ldt(void *current_mm)
|
||||
{
|
||||
@@ -231,16 +229,10 @@ static int write_ldt(void __user *ptr, unsigned long bytecount, int oldmode)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* On x86-64 we do not support 16-bit segments due to
|
||||
* IRET leaking the high bits of the kernel stack address.
|
||||
*/
|
||||
#ifdef CONFIG_X86_64
|
||||
if (!ldt_info.seg_32bit && !sysctl_ldt16) {
|
||||
if (!IS_ENABLED(CONFIG_X86_16BIT) && !ldt_info.seg_32bit) {
|
||||
error = -EINVAL;
|
||||
goto out_unlock;
|
||||
}
|
||||
#endif
|
||||
|
||||
fill_ldt(&ldt, &ldt_info);
|
||||
if (oldmode)
|
||||
|
||||
@@ -6,7 +6,6 @@ DEF_NATIVE(pv_irq_ops, irq_disable, "cli");
|
||||
DEF_NATIVE(pv_irq_ops, irq_enable, "sti");
|
||||
DEF_NATIVE(pv_irq_ops, restore_fl, "pushq %rdi; popfq");
|
||||
DEF_NATIVE(pv_irq_ops, save_fl, "pushfq; popq %rax");
|
||||
DEF_NATIVE(pv_cpu_ops, iret, "iretq");
|
||||
DEF_NATIVE(pv_mmu_ops, read_cr2, "movq %cr2, %rax");
|
||||
DEF_NATIVE(pv_mmu_ops, read_cr3, "movq %cr3, %rax");
|
||||
DEF_NATIVE(pv_mmu_ops, write_cr3, "movq %rdi, %cr3");
|
||||
@@ -50,7 +49,6 @@ unsigned native_patch(u8 type, u16 clobbers, void *ibuf,
|
||||
PATCH_SITE(pv_irq_ops, save_fl);
|
||||
PATCH_SITE(pv_irq_ops, irq_enable);
|
||||
PATCH_SITE(pv_irq_ops, irq_disable);
|
||||
PATCH_SITE(pv_cpu_ops, iret);
|
||||
PATCH_SITE(pv_cpu_ops, irq_enable_sysexit);
|
||||
PATCH_SITE(pv_cpu_ops, usergs_sysret32);
|
||||
PATCH_SITE(pv_cpu_ops, usergs_sysret64);
|
||||
|
||||
@@ -37,10 +37,12 @@ static void remove_e820_regions(struct resource *avail)
|
||||
|
||||
void arch_remove_reservations(struct resource *avail)
|
||||
{
|
||||
/* Trim out BIOS areas (low 1MB and high 2MB) and E820 regions */
|
||||
/*
|
||||
* Trim out BIOS area (high 2MB) and E820 regions. We do not remove
|
||||
* the low 1MB unconditionally, as this area is needed for some ISA
|
||||
* cards requiring a memory range, e.g. the i82365 PCMCIA controller.
|
||||
*/
|
||||
if (avail->flags & IORESOURCE_MEM) {
|
||||
if (avail->start < BIOS_END)
|
||||
avail->start = BIOS_END;
|
||||
resource_clip(avail, BIOS_ROM_BASE, BIOS_ROM_END);
|
||||
|
||||
remove_e820_regions(avail);
|
||||
|
||||
@@ -264,6 +264,13 @@ static void notrace start_secondary(void *unused)
|
||||
*/
|
||||
check_tsc_sync_target();
|
||||
|
||||
/*
|
||||
* Enable the espfix hack for this CPU
|
||||
*/
|
||||
#ifdef CONFIG_X86_ESPFIX64
|
||||
init_espfix_ap();
|
||||
#endif
|
||||
|
||||
/*
|
||||
* We need to hold vector_lock so there the set of online cpus
|
||||
* does not change while we are assigning vectors to cpus. Holding
|
||||
|
||||
@@ -125,10 +125,10 @@ static void warn_bad_vsyscall(const char *level, struct pt_regs *regs,
|
||||
if (!show_unhandled_signals)
|
||||
return;
|
||||
|
||||
pr_notice_ratelimited("%s%s[%d] %s ip:%lx cs:%lx sp:%lx ax:%lx si:%lx di:%lx\n",
|
||||
level, current->comm, task_pid_nr(current),
|
||||
message, regs->ip, regs->cs,
|
||||
regs->sp, regs->ax, regs->si, regs->di);
|
||||
printk_ratelimited("%s%s[%d] %s ip:%lx cs:%lx sp:%lx ax:%lx si:%lx di:%lx\n",
|
||||
level, current->comm, task_pid_nr(current),
|
||||
message, regs->ip, regs->cs,
|
||||
regs->sp, regs->ax, regs->si, regs->di);
|
||||
}
|
||||
|
||||
static int addr_to_vsyscall_nr(unsigned long addr)
|
||||
|
||||
@@ -2012,6 +2012,7 @@ static int em_ret_far(struct x86_emulate_ctxt *ctxt)
|
||||
{
|
||||
int rc;
|
||||
unsigned long cs;
|
||||
int cpl = ctxt->ops->cpl(ctxt);
|
||||
|
||||
rc = emulate_pop(ctxt, &ctxt->_eip, ctxt->op_bytes);
|
||||
if (rc != X86EMUL_CONTINUE)
|
||||
@@ -2021,6 +2022,9 @@ static int em_ret_far(struct x86_emulate_ctxt *ctxt)
|
||||
rc = emulate_pop(ctxt, &cs, ctxt->op_bytes);
|
||||
if (rc != X86EMUL_CONTINUE)
|
||||
return rc;
|
||||
/* Outer-privilege level return is not implemented */
|
||||
if (ctxt->mode >= X86EMUL_MODE_PROT16 && (cs & 3) > cpl)
|
||||
return X86EMUL_UNHANDLEABLE;
|
||||
rc = load_segment_descriptor(ctxt, (u16)cs, VCPU_SREG_CS);
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -30,11 +30,13 @@ struct pg_state {
|
||||
unsigned long start_address;
|
||||
unsigned long current_address;
|
||||
const struct addr_marker *marker;
|
||||
unsigned long lines;
|
||||
};
|
||||
|
||||
struct addr_marker {
|
||||
unsigned long start_address;
|
||||
const char *name;
|
||||
unsigned long max_lines;
|
||||
};
|
||||
|
||||
/* indices for address_markers; keep sync'd w/ address_markers below */
|
||||
@@ -45,6 +47,7 @@ enum address_markers_idx {
|
||||
LOW_KERNEL_NR,
|
||||
VMALLOC_START_NR,
|
||||
VMEMMAP_START_NR,
|
||||
ESPFIX_START_NR,
|
||||
HIGH_KERNEL_NR,
|
||||
MODULES_VADDR_NR,
|
||||
MODULES_END_NR,
|
||||
@@ -67,6 +70,7 @@ static struct addr_marker address_markers[] = {
|
||||
{ PAGE_OFFSET, "Low Kernel Mapping" },
|
||||
{ VMALLOC_START, "vmalloc() Area" },
|
||||
{ VMEMMAP_START, "Vmemmap" },
|
||||
{ ESPFIX_BASE_ADDR, "ESPfix Area", 16 },
|
||||
{ __START_KERNEL_map, "High Kernel Mapping" },
|
||||
{ MODULES_VADDR, "Modules" },
|
||||
{ MODULES_END, "End Modules" },
|
||||
@@ -163,7 +167,7 @@ static void note_page(struct seq_file *m, struct pg_state *st,
|
||||
pgprot_t new_prot, int level)
|
||||
{
|
||||
pgprotval_t prot, cur;
|
||||
static const char units[] = "KMGTPE";
|
||||
static const char units[] = "BKMGTPE";
|
||||
|
||||
/*
|
||||
* If we have a "break" in the series, we need to flush the state that
|
||||
@@ -178,6 +182,7 @@ static void note_page(struct seq_file *m, struct pg_state *st,
|
||||
st->current_prot = new_prot;
|
||||
st->level = level;
|
||||
st->marker = address_markers;
|
||||
st->lines = 0;
|
||||
seq_printf(m, "---[ %s ]---\n", st->marker->name);
|
||||
} else if (prot != cur || level != st->level ||
|
||||
st->current_address >= st->marker[1].start_address) {
|
||||
@@ -188,17 +193,21 @@ static void note_page(struct seq_file *m, struct pg_state *st,
|
||||
/*
|
||||
* Now print the actual finished series
|
||||
*/
|
||||
seq_printf(m, "0x%0*lx-0x%0*lx ",
|
||||
width, st->start_address,
|
||||
width, st->current_address);
|
||||
if (!st->marker->max_lines ||
|
||||
st->lines < st->marker->max_lines) {
|
||||
seq_printf(m, "0x%0*lx-0x%0*lx ",
|
||||
width, st->start_address,
|
||||
width, st->current_address);
|
||||
|
||||
delta = (st->current_address - st->start_address) >> 10;
|
||||
while (!(delta & 1023) && unit[1]) {
|
||||
delta >>= 10;
|
||||
unit++;
|
||||
delta = (st->current_address - st->start_address) >> 10;
|
||||
while (!(delta & 1023) && unit[1]) {
|
||||
delta >>= 10;
|
||||
unit++;
|
||||
}
|
||||
seq_printf(m, "%9lu%c ", delta, *unit);
|
||||
printk_prot(m, st->current_prot, st->level);
|
||||
}
|
||||
seq_printf(m, "%9lu%c ", delta, *unit);
|
||||
printk_prot(m, st->current_prot, st->level);
|
||||
st->lines++;
|
||||
|
||||
/*
|
||||
* We print markers for special areas of address space,
|
||||
|
||||
@@ -162,6 +162,10 @@ pcibios_align_resource(void *data, const struct resource *res,
|
||||
return start;
|
||||
if (start & 0x300)
|
||||
start = (start + 0x3ff) & ~0x3ff;
|
||||
} else if (res->flags & IORESOURCE_MEM) {
|
||||
/* The low 1MB range is reserved for ISA cards */
|
||||
if (start < BIOS_END)
|
||||
start = BIOS_END;
|
||||
}
|
||||
return start;
|
||||
}
|
||||
|
||||
@@ -41,7 +41,6 @@ enum {
|
||||
#ifdef CONFIG_X86_64
|
||||
#define vdso_enabled sysctl_vsyscall32
|
||||
#define arch_setup_additional_pages syscall32_setup_pages
|
||||
extern int sysctl_ldt16;
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -381,13 +380,6 @@ static struct ctl_table abi_table2[] = {
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_dointvec
|
||||
},
|
||||
{
|
||||
.procname = "ldt16",
|
||||
.data = &sysctl_ldt16,
|
||||
.maxlen = sizeof(int),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_dointvec
|
||||
},
|
||||
{}
|
||||
};
|
||||
|
||||
|
||||
@@ -445,7 +445,7 @@ void xen_setup_timer(int cpu)
|
||||
irq = bind_virq_to_irqhandler(VIRQ_TIMER, cpu, xen_timer_interrupt,
|
||||
IRQF_DISABLED|IRQF_PERCPU|
|
||||
IRQF_NOBALANCING|IRQF_TIMER|
|
||||
IRQF_FORCE_RESUME,
|
||||
IRQF_FORCE_RESUME|IRQF_EARLY_RESUME,
|
||||
name, NULL);
|
||||
|
||||
memcpy(evt, xen_clockevent, sizeof(*evt));
|
||||
|
||||
@@ -376,38 +376,42 @@ _DoubleExceptionVector_WindowOverflow:
|
||||
beqz a2, 1f # if at start of vector, don't restore
|
||||
|
||||
addi a0, a0, -128
|
||||
bbsi a0, 8, 1f # don't restore except for overflow 8 and 12
|
||||
bbsi a0, 7, 2f
|
||||
bbsi.l a0, 8, 1f # don't restore except for overflow 8 and 12
|
||||
|
||||
/*
|
||||
* This fixup handler is for the extremely unlikely case where the
|
||||
* overflow handler's reference thru a0 gets a hardware TLB refill
|
||||
* that bumps out the (distinct, aliasing) TLB entry that mapped its
|
||||
* prior references thru a9/a13, and where our reference now thru
|
||||
* a9/a13 gets a 2nd-level miss exception (not hardware TLB refill).
|
||||
*/
|
||||
movi a2, window_overflow_restore_a0_fixup
|
||||
s32i a2, a3, EXC_TABLE_FIXUP
|
||||
l32i a2, a3, EXC_TABLE_DOUBLE_SAVE
|
||||
xsr a3, excsave1
|
||||
|
||||
bbsi.l a0, 7, 2f
|
||||
|
||||
/*
|
||||
* Restore a0 as saved by _WindowOverflow8().
|
||||
*
|
||||
* FIXME: we really need a fixup handler for this L32E,
|
||||
* for the extremely unlikely case where the overflow handler's
|
||||
* reference thru a0 gets a hardware TLB refill that bumps out
|
||||
* the (distinct, aliasing) TLB entry that mapped its prior
|
||||
* references thru a9, and where our reference now thru a9
|
||||
* gets a 2nd-level miss exception (not hardware TLB refill).
|
||||
*/
|
||||
|
||||
l32e a2, a9, -16
|
||||
wsr a2, depc # replace the saved a0
|
||||
j 1f
|
||||
l32e a0, a9, -16
|
||||
wsr a0, depc # replace the saved a0
|
||||
j 3f
|
||||
|
||||
2:
|
||||
/*
|
||||
* Restore a0 as saved by _WindowOverflow12().
|
||||
*
|
||||
* FIXME: we really need a fixup handler for this L32E,
|
||||
* for the extremely unlikely case where the overflow handler's
|
||||
* reference thru a0 gets a hardware TLB refill that bumps out
|
||||
* the (distinct, aliasing) TLB entry that mapped its prior
|
||||
* references thru a13, and where our reference now thru a13
|
||||
* gets a 2nd-level miss exception (not hardware TLB refill).
|
||||
*/
|
||||
|
||||
l32e a2, a13, -16
|
||||
wsr a2, depc # replace the saved a0
|
||||
l32e a0, a13, -16
|
||||
wsr a0, depc # replace the saved a0
|
||||
3:
|
||||
xsr a3, excsave1
|
||||
movi a0, 0
|
||||
s32i a0, a3, EXC_TABLE_FIXUP
|
||||
s32i a2, a3, EXC_TABLE_DOUBLE_SAVE
|
||||
1:
|
||||
/*
|
||||
* Restore WindowBase while leaving all address registers restored.
|
||||
@@ -449,6 +453,7 @@ _DoubleExceptionVector_WindowOverflow:
|
||||
|
||||
s32i a0, a2, PT_DEPC
|
||||
|
||||
_DoubleExceptionVector_handle_exception:
|
||||
addx4 a0, a0, a3
|
||||
l32i a0, a0, EXC_TABLE_FAST_USER
|
||||
xsr a3, excsave1
|
||||
@@ -464,10 +469,119 @@ _DoubleExceptionVector_WindowOverflow:
|
||||
rotw -3
|
||||
j 1b
|
||||
|
||||
.end literal_prefix
|
||||
|
||||
ENDPROC(_DoubleExceptionVector)
|
||||
|
||||
/*
|
||||
* Fixup handler for TLB miss in double exception handler for window owerflow.
|
||||
* We get here with windowbase set to the window that was being spilled and
|
||||
* a0 trashed. a0 bit 7 determines if this is a call8 (bit clear) or call12
|
||||
* (bit set) window.
|
||||
*
|
||||
* We do the following here:
|
||||
* - go to the original window retaining a0 value;
|
||||
* - set up exception stack to return back to appropriate a0 restore code
|
||||
* (we'll need to rotate window back and there's no place to save this
|
||||
* information, use different return address for that);
|
||||
* - handle the exception;
|
||||
* - go to the window that was being spilled;
|
||||
* - set up window_overflow_restore_a0_fixup as a fixup routine;
|
||||
* - reload a0;
|
||||
* - restore the original window;
|
||||
* - reset the default fixup routine;
|
||||
* - return to user. By the time we get to this fixup handler all information
|
||||
* about the conditions of the original double exception that happened in
|
||||
* the window overflow handler is lost, so we just return to userspace to
|
||||
* retry overflow from start.
|
||||
*
|
||||
* a0: value of depc, original value in depc
|
||||
* a2: trashed, original value in EXC_TABLE_DOUBLE_SAVE
|
||||
* a3: exctable, original value in excsave1
|
||||
*/
|
||||
|
||||
ENTRY(window_overflow_restore_a0_fixup)
|
||||
|
||||
rsr a0, ps
|
||||
extui a0, a0, PS_OWB_SHIFT, PS_OWB_WIDTH
|
||||
rsr a2, windowbase
|
||||
sub a0, a2, a0
|
||||
extui a0, a0, 0, 3
|
||||
l32i a2, a3, EXC_TABLE_DOUBLE_SAVE
|
||||
xsr a3, excsave1
|
||||
|
||||
_beqi a0, 1, .Lhandle_1
|
||||
_beqi a0, 3, .Lhandle_3
|
||||
|
||||
.macro overflow_fixup_handle_exception_pane n
|
||||
|
||||
rsr a0, depc
|
||||
rotw -\n
|
||||
|
||||
xsr a3, excsave1
|
||||
wsr a2, depc
|
||||
l32i a2, a3, EXC_TABLE_KSTK
|
||||
s32i a0, a2, PT_AREG0
|
||||
|
||||
movi a0, .Lrestore_\n
|
||||
s32i a0, a2, PT_DEPC
|
||||
rsr a0, exccause
|
||||
j _DoubleExceptionVector_handle_exception
|
||||
|
||||
.endm
|
||||
|
||||
overflow_fixup_handle_exception_pane 2
|
||||
.Lhandle_1:
|
||||
overflow_fixup_handle_exception_pane 1
|
||||
.Lhandle_3:
|
||||
overflow_fixup_handle_exception_pane 3
|
||||
|
||||
.macro overflow_fixup_restore_a0_pane n
|
||||
|
||||
rotw \n
|
||||
/* Need to preserve a0 value here to be able to handle exception
|
||||
* that may occur on a0 reload from stack. It may occur because
|
||||
* TLB miss handler may not be atomic and pointer to page table
|
||||
* may be lost before we get here. There are no free registers,
|
||||
* so we need to use EXC_TABLE_DOUBLE_SAVE area.
|
||||
*/
|
||||
xsr a3, excsave1
|
||||
s32i a2, a3, EXC_TABLE_DOUBLE_SAVE
|
||||
movi a2, window_overflow_restore_a0_fixup
|
||||
s32i a2, a3, EXC_TABLE_FIXUP
|
||||
l32i a2, a3, EXC_TABLE_DOUBLE_SAVE
|
||||
xsr a3, excsave1
|
||||
bbsi.l a0, 7, 1f
|
||||
l32e a0, a9, -16
|
||||
j 2f
|
||||
1:
|
||||
l32e a0, a13, -16
|
||||
2:
|
||||
rotw -\n
|
||||
|
||||
.endm
|
||||
|
||||
.Lrestore_2:
|
||||
overflow_fixup_restore_a0_pane 2
|
||||
|
||||
.Lset_default_fixup:
|
||||
xsr a3, excsave1
|
||||
s32i a2, a3, EXC_TABLE_DOUBLE_SAVE
|
||||
movi a2, 0
|
||||
s32i a2, a3, EXC_TABLE_FIXUP
|
||||
l32i a2, a3, EXC_TABLE_DOUBLE_SAVE
|
||||
xsr a3, excsave1
|
||||
rfe
|
||||
|
||||
.Lrestore_1:
|
||||
overflow_fixup_restore_a0_pane 1
|
||||
j .Lset_default_fixup
|
||||
.Lrestore_3:
|
||||
overflow_fixup_restore_a0_pane 3
|
||||
j .Lset_default_fixup
|
||||
|
||||
ENDPROC(window_overflow_restore_a0_fixup)
|
||||
|
||||
.end literal_prefix
|
||||
/*
|
||||
* Debug interrupt vector
|
||||
*
|
||||
|
||||
@@ -262,13 +262,13 @@ SECTIONS
|
||||
.UserExceptionVector.literal)
|
||||
SECTION_VECTOR (_DoubleExceptionVector_literal,
|
||||
.DoubleExceptionVector.literal,
|
||||
DOUBLEEXC_VECTOR_VADDR - 16,
|
||||
DOUBLEEXC_VECTOR_VADDR - 40,
|
||||
SIZEOF(.UserExceptionVector.text),
|
||||
.UserExceptionVector.text)
|
||||
SECTION_VECTOR (_DoubleExceptionVector_text,
|
||||
.DoubleExceptionVector.text,
|
||||
DOUBLEEXC_VECTOR_VADDR,
|
||||
32,
|
||||
40,
|
||||
.DoubleExceptionVector.literal)
|
||||
|
||||
. = (LOADADDR( .DoubleExceptionVector.text ) + SIZEOF( .DoubleExceptionVector.text ) + 3) & ~ 3;
|
||||
|
||||
@@ -859,6 +859,13 @@ void blkcg_drain_queue(struct request_queue *q)
|
||||
{
|
||||
lockdep_assert_held(q->queue_lock);
|
||||
|
||||
/*
|
||||
* @q could be exiting and already have destroyed all blkgs as
|
||||
* indicated by NULL root_blkg. If so, don't confuse policies.
|
||||
*/
|
||||
if (!q->root_blkg)
|
||||
return;
|
||||
|
||||
blk_throtl_drain(q);
|
||||
}
|
||||
|
||||
|
||||
@@ -27,18 +27,15 @@ struct request *blk_queue_find_tag(struct request_queue *q, int tag)
|
||||
EXPORT_SYMBOL(blk_queue_find_tag);
|
||||
|
||||
/**
|
||||
* __blk_free_tags - release a given set of tag maintenance info
|
||||
* blk_free_tags - release a given set of tag maintenance info
|
||||
* @bqt: the tag map to free
|
||||
*
|
||||
* Tries to free the specified @bqt. Returns true if it was
|
||||
* actually freed and false if there are still references using it
|
||||
* Drop the reference count on @bqt and frees it when the last reference
|
||||
* is dropped.
|
||||
*/
|
||||
static int __blk_free_tags(struct blk_queue_tag *bqt)
|
||||
void blk_free_tags(struct blk_queue_tag *bqt)
|
||||
{
|
||||
int retval;
|
||||
|
||||
retval = atomic_dec_and_test(&bqt->refcnt);
|
||||
if (retval) {
|
||||
if (atomic_dec_and_test(&bqt->refcnt)) {
|
||||
BUG_ON(find_first_bit(bqt->tag_map, bqt->max_depth) <
|
||||
bqt->max_depth);
|
||||
|
||||
@@ -50,9 +47,8 @@ static int __blk_free_tags(struct blk_queue_tag *bqt)
|
||||
|
||||
kfree(bqt);
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
EXPORT_SYMBOL(blk_free_tags);
|
||||
|
||||
/**
|
||||
* __blk_queue_free_tags - release tag maintenance info
|
||||
@@ -69,27 +65,12 @@ void __blk_queue_free_tags(struct request_queue *q)
|
||||
if (!bqt)
|
||||
return;
|
||||
|
||||
__blk_free_tags(bqt);
|
||||
blk_free_tags(bqt);
|
||||
|
||||
q->queue_tags = NULL;
|
||||
queue_flag_clear_unlocked(QUEUE_FLAG_QUEUED, q);
|
||||
}
|
||||
|
||||
/**
|
||||
* blk_free_tags - release a given set of tag maintenance info
|
||||
* @bqt: the tag map to free
|
||||
*
|
||||
* For externally managed @bqt frees the map. Callers of this
|
||||
* function must guarantee to have released all the queues that
|
||||
* might have been using this tag map.
|
||||
*/
|
||||
void blk_free_tags(struct blk_queue_tag *bqt)
|
||||
{
|
||||
if (unlikely(!__blk_free_tags(bqt)))
|
||||
BUG();
|
||||
}
|
||||
EXPORT_SYMBOL(blk_free_tags);
|
||||
|
||||
/**
|
||||
* blk_queue_free_tags - release tag maintenance info
|
||||
* @q: the request queue for the device
|
||||
|
||||
@@ -690,6 +690,7 @@ long compat_blkdev_ioctl(struct file *file, unsigned cmd, unsigned long arg)
|
||||
case BLKROSET:
|
||||
case BLKDISCARD:
|
||||
case BLKSECDISCARD:
|
||||
case BLKZEROOUT:
|
||||
/*
|
||||
* the ones below are implemented in blkdev_locked_ioctl,
|
||||
* but we call blkdev_ioctl, which gets the lock for us
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/net.h>
|
||||
#include <linux/rwsem.h>
|
||||
#include <linux/security.h>
|
||||
|
||||
struct alg_type_list {
|
||||
const struct af_alg_type *type;
|
||||
@@ -243,6 +244,7 @@ int af_alg_accept(struct sock *sk, struct socket *newsock)
|
||||
|
||||
sock_init_data(newsock, sk2);
|
||||
sock_graft(sk2, newsock);
|
||||
security_sk_clone(sk, sk2);
|
||||
|
||||
err = type->accept(ask->private, sk2);
|
||||
if (err) {
|
||||
|
||||
@@ -77,7 +77,7 @@ bool acpi_dev_resource_memory(struct acpi_resource *ares, struct resource *res)
|
||||
switch (ares->type) {
|
||||
case ACPI_RESOURCE_TYPE_MEMORY24:
|
||||
memory24 = &ares->data.memory24;
|
||||
if (!memory24->address_length)
|
||||
if (!memory24->minimum && !memory24->address_length)
|
||||
return false;
|
||||
acpi_dev_get_memresource(res, memory24->minimum,
|
||||
memory24->address_length,
|
||||
@@ -85,7 +85,7 @@ bool acpi_dev_resource_memory(struct acpi_resource *ares, struct resource *res)
|
||||
break;
|
||||
case ACPI_RESOURCE_TYPE_MEMORY32:
|
||||
memory32 = &ares->data.memory32;
|
||||
if (!memory32->address_length)
|
||||
if (!memory32->minimum && !memory32->address_length)
|
||||
return false;
|
||||
acpi_dev_get_memresource(res, memory32->minimum,
|
||||
memory32->address_length,
|
||||
@@ -93,7 +93,7 @@ bool acpi_dev_resource_memory(struct acpi_resource *ares, struct resource *res)
|
||||
break;
|
||||
case ACPI_RESOURCE_TYPE_FIXED_MEMORY32:
|
||||
fixed_memory32 = &ares->data.fixed_memory32;
|
||||
if (!fixed_memory32->address_length)
|
||||
if (!fixed_memory32->address && !fixed_memory32->address_length)
|
||||
return false;
|
||||
acpi_dev_get_memresource(res, fixed_memory32->address,
|
||||
fixed_memory32->address_length,
|
||||
@@ -150,7 +150,7 @@ bool acpi_dev_resource_io(struct acpi_resource *ares, struct resource *res)
|
||||
switch (ares->type) {
|
||||
case ACPI_RESOURCE_TYPE_IO:
|
||||
io = &ares->data.io;
|
||||
if (!io->address_length)
|
||||
if (!io->minimum && !io->address_length)
|
||||
return false;
|
||||
acpi_dev_get_ioresource(res, io->minimum,
|
||||
io->address_length,
|
||||
@@ -158,7 +158,7 @@ bool acpi_dev_resource_io(struct acpi_resource *ares, struct resource *res)
|
||||
break;
|
||||
case ACPI_RESOURCE_TYPE_FIXED_IO:
|
||||
fixed_io = &ares->data.fixed_io;
|
||||
if (!fixed_io->address_length)
|
||||
if (!fixed_io->address && !fixed_io->address_length)
|
||||
return false;
|
||||
acpi_dev_get_ioresource(res, fixed_io->address,
|
||||
fixed_io->address_length,
|
||||
|
||||
@@ -455,6 +455,7 @@ static const struct pci_device_id ahci_pci_tbl[] = {
|
||||
|
||||
/* Promise */
|
||||
{ PCI_VDEVICE(PROMISE, 0x3f20), board_ahci }, /* PDC42819 */
|
||||
{ PCI_VDEVICE(PROMISE, 0x3781), board_ahci }, /* FastTrak TX8660 ahci-mode */
|
||||
|
||||
/* Asmedia */
|
||||
{ PCI_VDEVICE(ASMEDIA, 0x0601), board_ahci }, /* ASM1060 */
|
||||
|
||||
@@ -4787,6 +4787,10 @@ void swap_buf_le16(u16 *buf, unsigned int buf_words)
|
||||
* ata_qc_new - Request an available ATA command, for queueing
|
||||
* @ap: target port
|
||||
*
|
||||
* Some ATA host controllers may implement a queue depth which is less
|
||||
* than ATA_MAX_QUEUE. So we shouldn't allocate a tag which is beyond
|
||||
* the hardware limitation.
|
||||
*
|
||||
* LOCKING:
|
||||
* None.
|
||||
*/
|
||||
@@ -4794,14 +4798,15 @@ void swap_buf_le16(u16 *buf, unsigned int buf_words)
|
||||
static struct ata_queued_cmd *ata_qc_new(struct ata_port *ap)
|
||||
{
|
||||
struct ata_queued_cmd *qc = NULL;
|
||||
unsigned int max_queue = ap->host->n_tags;
|
||||
unsigned int i, tag;
|
||||
|
||||
/* no command while frozen */
|
||||
if (unlikely(ap->pflags & ATA_PFLAG_FROZEN))
|
||||
return NULL;
|
||||
|
||||
for (i = 0; i < ATA_MAX_QUEUE; i++) {
|
||||
tag = (i + ap->last_tag + 1) % ATA_MAX_QUEUE;
|
||||
for (i = 0, tag = ap->last_tag + 1; i < max_queue; i++, tag++) {
|
||||
tag = tag < max_queue ? tag : 0;
|
||||
|
||||
/* the last tag is reserved for internal command. */
|
||||
if (tag == ATA_TAG_INTERNAL)
|
||||
@@ -6103,6 +6108,7 @@ void ata_host_init(struct ata_host *host, struct device *dev,
|
||||
{
|
||||
spin_lock_init(&host->lock);
|
||||
mutex_init(&host->eh_mutex);
|
||||
host->n_tags = ATA_MAX_QUEUE - 1;
|
||||
host->dev = dev;
|
||||
host->ops = ops;
|
||||
}
|
||||
@@ -6184,6 +6190,8 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht)
|
||||
{
|
||||
int i, rc;
|
||||
|
||||
host->n_tags = clamp(sht->can_queue, 1, ATA_MAX_QUEUE - 1);
|
||||
|
||||
/* host must have been started */
|
||||
if (!(host->flags & ATA_HOST_STARTED)) {
|
||||
dev_err(host->dev, "BUG: trying to register unstarted host\n");
|
||||
|
||||
@@ -406,6 +406,7 @@ static int h5_rx_3wire_hdr(struct hci_uart *hu, unsigned char c)
|
||||
H5_HDR_PKT_TYPE(hdr) != HCI_3WIRE_LINK_PKT) {
|
||||
BT_ERR("Non-link packet received in non-active state");
|
||||
h5_reset_rx(h5);
|
||||
return 0;
|
||||
}
|
||||
|
||||
h5->rx_func = h5_rx_payload;
|
||||
|
||||
@@ -750,6 +750,7 @@ tpm_st33_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id)
|
||||
}
|
||||
|
||||
tpm_get_timeouts(chip);
|
||||
tpm_do_selftest(chip);
|
||||
|
||||
i2c_set_clientdata(client, chip);
|
||||
|
||||
|
||||
@@ -190,7 +190,7 @@ static void add_session_id(struct cryp_ctx *ctx)
|
||||
static irqreturn_t cryp_interrupt_handler(int irq, void *param)
|
||||
{
|
||||
struct cryp_ctx *ctx;
|
||||
int i;
|
||||
int count;
|
||||
struct cryp_device_data *device_data;
|
||||
|
||||
if (param == NULL) {
|
||||
@@ -215,12 +215,11 @@ static irqreturn_t cryp_interrupt_handler(int irq, void *param)
|
||||
if (cryp_pending_irq_src(device_data,
|
||||
CRYP_IRQ_SRC_OUTPUT_FIFO)) {
|
||||
if (ctx->outlen / ctx->blocksize > 0) {
|
||||
for (i = 0; i < ctx->blocksize / 4; i++) {
|
||||
*(ctx->outdata) = readl_relaxed(
|
||||
&device_data->base->dout);
|
||||
ctx->outdata += 4;
|
||||
ctx->outlen -= 4;
|
||||
}
|
||||
count = ctx->blocksize / 4;
|
||||
|
||||
readsl(&device_data->base->dout, ctx->outdata, count);
|
||||
ctx->outdata += count;
|
||||
ctx->outlen -= count;
|
||||
|
||||
if (ctx->outlen == 0) {
|
||||
cryp_disable_irq_src(device_data,
|
||||
@@ -230,12 +229,12 @@ static irqreturn_t cryp_interrupt_handler(int irq, void *param)
|
||||
} else if (cryp_pending_irq_src(device_data,
|
||||
CRYP_IRQ_SRC_INPUT_FIFO)) {
|
||||
if (ctx->datalen / ctx->blocksize > 0) {
|
||||
for (i = 0 ; i < ctx->blocksize / 4; i++) {
|
||||
writel_relaxed(ctx->indata,
|
||||
&device_data->base->din);
|
||||
ctx->indata += 4;
|
||||
ctx->datalen -= 4;
|
||||
}
|
||||
count = ctx->blocksize / 4;
|
||||
|
||||
writesl(&device_data->base->din, ctx->indata, count);
|
||||
|
||||
ctx->indata += count;
|
||||
ctx->datalen -= count;
|
||||
|
||||
if (ctx->datalen == 0)
|
||||
cryp_disable_irq_src(device_data,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -199,7 +199,7 @@ static struct dmm_txn *dmm_txn_init(struct dmm *dmm, struct tcm *tcm)
|
||||
static void dmm_txn_append(struct dmm_txn *txn, struct pat_area *area,
|
||||
struct page **pages, uint32_t npages, uint32_t roll)
|
||||
{
|
||||
dma_addr_t pat_pa = 0;
|
||||
dma_addr_t pat_pa = 0, data_pa = 0;
|
||||
uint32_t *data;
|
||||
struct pat *pat;
|
||||
struct refill_engine *engine = txn->engine_handle;
|
||||
@@ -223,7 +223,9 @@ static void dmm_txn_append(struct dmm_txn *txn, struct pat_area *area,
|
||||
.lut_id = engine->tcm->lut_id,
|
||||
};
|
||||
|
||||
data = alloc_dma(txn, 4*i, &pat->data_pa);
|
||||
data = alloc_dma(txn, 4*i, &data_pa);
|
||||
/* FIXME: what if data_pa is more than 32-bit ? */
|
||||
pat->data_pa = data_pa;
|
||||
|
||||
while (i--) {
|
||||
int n = i + roll;
|
||||
|
||||
@@ -791,7 +791,7 @@ int omap_gem_get_paddr(struct drm_gem_object *obj,
|
||||
omap_obj->paddr = tiler_ssptr(block);
|
||||
omap_obj->block = block;
|
||||
|
||||
DBG("got paddr: %08x", omap_obj->paddr);
|
||||
DBG("got paddr: %pad", &omap_obj->paddr);
|
||||
}
|
||||
|
||||
omap_obj->paddr_cnt++;
|
||||
@@ -988,9 +988,9 @@ void omap_gem_describe(struct drm_gem_object *obj, struct seq_file *m)
|
||||
|
||||
off = drm_vma_node_start(&obj->vma_node);
|
||||
|
||||
seq_printf(m, "%08x: %2d (%2d) %08llx %08Zx (%2d) %p %4d",
|
||||
seq_printf(m, "%08x: %2d (%2d) %08llx %pad (%2d) %p %4d",
|
||||
omap_obj->flags, obj->name, obj->refcount.refcount.counter,
|
||||
off, omap_obj->paddr, omap_obj->paddr_cnt,
|
||||
off, &omap_obj->paddr, omap_obj->paddr_cnt,
|
||||
omap_obj->vaddr, omap_obj->roll);
|
||||
|
||||
if (omap_obj->flags & OMAP_BO_TILED) {
|
||||
@@ -1473,8 +1473,8 @@ void omap_gem_init(struct drm_device *dev)
|
||||
entry->paddr = tiler_ssptr(block);
|
||||
entry->block = block;
|
||||
|
||||
DBG("%d:%d: %dx%d: paddr=%08x stride=%d", i, j, w, h,
|
||||
entry->paddr,
|
||||
DBG("%d:%d: %dx%d: paddr=%pad stride=%d", i, j, w, h,
|
||||
&entry->paddr,
|
||||
usergart[i].stride_pfn << PAGE_SHIFT);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,8 +142,8 @@ static void omap_plane_pre_apply(struct omap_drm_apply *apply)
|
||||
DBG("%dx%d -> %dx%d (%d)", info->width, info->height,
|
||||
info->out_width, info->out_height,
|
||||
info->screen_width);
|
||||
DBG("%d,%d %08x %08x", info->pos_x, info->pos_y,
|
||||
info->paddr, info->p_uv_addr);
|
||||
DBG("%d,%d %pad %pad", info->pos_x, info->pos_y,
|
||||
&info->paddr, &info->p_uv_addr);
|
||||
|
||||
/* TODO: */
|
||||
ilace = false;
|
||||
|
||||
@@ -33,6 +33,9 @@ irqreturn_t qxl_irq_handler(DRM_IRQ_ARGS)
|
||||
|
||||
pending = xchg(&qdev->ram_header->int_pending, 0);
|
||||
|
||||
if (!pending)
|
||||
return IRQ_NONE;
|
||||
|
||||
atomic_inc(&qdev->irq_received);
|
||||
|
||||
if (pending & QXL_INTERRUPT_DISPLAY) {
|
||||
|
||||
@@ -183,7 +183,6 @@ void radeon_atom_backlight_init(struct radeon_encoder *radeon_encoder,
|
||||
struct backlight_properties props;
|
||||
struct radeon_backlight_privdata *pdata;
|
||||
struct radeon_encoder_atom_dig *dig;
|
||||
u8 backlight_level;
|
||||
char bl_name[16];
|
||||
|
||||
/* Mac laptops with multiple GPUs use the gmux driver for backlight
|
||||
@@ -222,12 +221,17 @@ void radeon_atom_backlight_init(struct radeon_encoder *radeon_encoder,
|
||||
|
||||
pdata->encoder = radeon_encoder;
|
||||
|
||||
backlight_level = radeon_atom_get_backlight_level_from_reg(rdev);
|
||||
|
||||
dig = radeon_encoder->enc_priv;
|
||||
dig->bl_dev = bd;
|
||||
|
||||
bd->props.brightness = radeon_atom_backlight_get_brightness(bd);
|
||||
/* Set a reasonable default here if the level is 0 otherwise
|
||||
* fbdev will attempt to turn the backlight on after console
|
||||
* unblanking and it will try and restore 0 which turns the backlight
|
||||
* off again.
|
||||
*/
|
||||
if (bd->props.brightness == 0)
|
||||
bd->props.brightness = RADEON_MAX_BL_LEVEL;
|
||||
bd->props.power = FB_BLANK_UNBLANK;
|
||||
backlight_update_status(bd);
|
||||
|
||||
|
||||
@@ -2745,6 +2745,7 @@ static void cik_gpu_init(struct radeon_device *rdev)
|
||||
(rdev->pdev->device == 0x130B) ||
|
||||
(rdev->pdev->device == 0x130E) ||
|
||||
(rdev->pdev->device == 0x1315) ||
|
||||
(rdev->pdev->device == 0x1318) ||
|
||||
(rdev->pdev->device == 0x131B)) {
|
||||
rdev->config.cik.max_cu_per_sh = 4;
|
||||
rdev->config.cik.max_backends_per_se = 1;
|
||||
@@ -6554,6 +6555,7 @@ static inline u32 cik_get_ih_wptr(struct radeon_device *rdev)
|
||||
tmp = RREG32(IH_RB_CNTL);
|
||||
tmp |= IH_WPTR_OVERFLOW_CLEAR;
|
||||
WREG32(IH_RB_CNTL, tmp);
|
||||
wptr &= ~RB_OVERFLOW;
|
||||
}
|
||||
return (wptr & rdev->ih.ptr_mask);
|
||||
}
|
||||
|
||||
@@ -4664,6 +4664,7 @@ static u32 evergreen_get_ih_wptr(struct radeon_device *rdev)
|
||||
tmp = RREG32(IH_RB_CNTL);
|
||||
tmp |= IH_WPTR_OVERFLOW_CLEAR;
|
||||
WREG32(IH_RB_CNTL, tmp);
|
||||
wptr &= ~RB_OVERFLOW;
|
||||
}
|
||||
return (wptr & rdev->ih.ptr_mask);
|
||||
}
|
||||
|
||||
@@ -3657,6 +3657,7 @@ static u32 r600_get_ih_wptr(struct radeon_device *rdev)
|
||||
tmp = RREG32(IH_RB_CNTL);
|
||||
tmp |= IH_WPTR_OVERFLOW_CLEAR;
|
||||
WREG32(IH_RB_CNTL, tmp);
|
||||
wptr &= ~RB_OVERFLOW;
|
||||
}
|
||||
return (wptr & rdev->ih.ptr_mask);
|
||||
}
|
||||
|
||||
@@ -708,6 +708,10 @@ int radeon_ddc_get_modes(struct radeon_connector *radeon_connector)
|
||||
struct radeon_device *rdev = dev->dev_private;
|
||||
int ret = 0;
|
||||
|
||||
/* don't leak the edid if we already fetched it in detect() */
|
||||
if (radeon_connector->edid)
|
||||
goto got_edid;
|
||||
|
||||
/* on hw with routers, select right port */
|
||||
if (radeon_connector->router.ddc_valid)
|
||||
radeon_router_select_ddc_port(radeon_connector);
|
||||
@@ -747,6 +751,7 @@ int radeon_ddc_get_modes(struct radeon_connector *radeon_connector)
|
||||
radeon_connector->edid = radeon_bios_get_hardcoded_edid(rdev);
|
||||
}
|
||||
if (radeon_connector->edid) {
|
||||
got_edid:
|
||||
drm_mode_connector_update_edid_property(&radeon_connector->base, radeon_connector->edid);
|
||||
ret = drm_add_edid_modes(&radeon_connector->base, radeon_connector->edid);
|
||||
drm_edid_to_eld(&radeon_connector->base, radeon_connector->edid);
|
||||
|
||||
@@ -6041,6 +6041,7 @@ static inline u32 si_get_ih_wptr(struct radeon_device *rdev)
|
||||
tmp = RREG32(IH_RB_CNTL);
|
||||
tmp |= IH_WPTR_OVERFLOW_CLEAR;
|
||||
WREG32(IH_RB_CNTL, tmp);
|
||||
wptr &= ~RB_OVERFLOW;
|
||||
}
|
||||
return (wptr & rdev->ih.ptr_mask);
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
static __u8 *ch_report_fixup(struct hid_device *hdev, __u8 *rdesc,
|
||||
unsigned int *rsize)
|
||||
{
|
||||
if (*rsize >= 17 && rdesc[11] == 0x3c && rdesc[12] == 0x02) {
|
||||
if (*rsize >= 18 && rdesc[11] == 0x3c && rdesc[12] == 0x02) {
|
||||
hid_info(hdev, "fixing up Cherry Cymotion report descriptor\n");
|
||||
rdesc[11] = rdesc[16] = 0xff;
|
||||
rdesc[12] = rdesc[17] = 0x03;
|
||||
|
||||
@@ -457,6 +457,7 @@
|
||||
#define USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A067 0xa067
|
||||
#define USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A072 0xa072
|
||||
#define USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A081 0xa081
|
||||
#define USB_DEVICE_ID_HOLTEK_ALT_KEYBOARD_A096 0xa096
|
||||
|
||||
#define USB_VENDOR_ID_IMATION 0x0718
|
||||
#define USB_DEVICE_ID_DISC_STAKKA 0xd000
|
||||
|
||||
@@ -300,7 +300,7 @@ static __u8 *kye_report_fixup(struct hid_device *hdev, __u8 *rdesc,
|
||||
* - change the button usage range to 4-7 for the extra
|
||||
* buttons
|
||||
*/
|
||||
if (*rsize >= 74 &&
|
||||
if (*rsize >= 75 &&
|
||||
rdesc[61] == 0x05 && rdesc[62] == 0x08 &&
|
||||
rdesc[63] == 0x19 && rdesc[64] == 0x08 &&
|
||||
rdesc[65] == 0x29 && rdesc[66] == 0x0f &&
|
||||
|
||||
@@ -345,14 +345,14 @@ static __u8 *lg_report_fixup(struct hid_device *hdev, __u8 *rdesc,
|
||||
struct usb_device_descriptor *udesc;
|
||||
__u16 bcdDevice, rev_maj, rev_min;
|
||||
|
||||
if ((drv_data->quirks & LG_RDESC) && *rsize >= 90 && rdesc[83] == 0x26 &&
|
||||
if ((drv_data->quirks & LG_RDESC) && *rsize >= 91 && rdesc[83] == 0x26 &&
|
||||
rdesc[84] == 0x8c && rdesc[85] == 0x02) {
|
||||
hid_info(hdev,
|
||||
"fixing up Logitech keyboard report descriptor\n");
|
||||
rdesc[84] = rdesc[89] = 0x4d;
|
||||
rdesc[85] = rdesc[90] = 0x10;
|
||||
}
|
||||
if ((drv_data->quirks & LG_RDESC_REL_ABS) && *rsize >= 50 &&
|
||||
if ((drv_data->quirks & LG_RDESC_REL_ABS) && *rsize >= 51 &&
|
||||
rdesc[32] == 0x81 && rdesc[33] == 0x06 &&
|
||||
rdesc[49] == 0x81 && rdesc[50] == 0x06) {
|
||||
hid_info(hdev,
|
||||
|
||||
@@ -237,13 +237,6 @@ static void logi_dj_recv_add_djhid_device(struct dj_receiver_dev *djrcv_dev,
|
||||
return;
|
||||
}
|
||||
|
||||
if ((dj_report->device_index < DJ_DEVICE_INDEX_MIN) ||
|
||||
(dj_report->device_index > DJ_DEVICE_INDEX_MAX)) {
|
||||
dev_err(&djrcv_hdev->dev, "%s: invalid device index:%d\n",
|
||||
__func__, dj_report->device_index);
|
||||
return;
|
||||
}
|
||||
|
||||
if (djrcv_dev->paired_dj_devices[dj_report->device_index]) {
|
||||
/* The device is already known. No need to reallocate it. */
|
||||
dbg_hid("%s: device is already known\n", __func__);
|
||||
@@ -516,6 +509,14 @@ static int logi_dj_recv_switch_to_dj_mode(struct dj_receiver_dev *djrcv_dev,
|
||||
dj_report->report_params[CMD_SWITCH_PARAM_TIMEOUT_SECONDS] = (u8)timeout;
|
||||
retval = logi_dj_recv_send_report(djrcv_dev, dj_report);
|
||||
kfree(dj_report);
|
||||
|
||||
/*
|
||||
* Ugly sleep to work around a USB 3.0 bug when the receiver is still
|
||||
* processing the "switch-to-dj" command while we send an other command.
|
||||
* 50 msec should gives enough time to the receiver to be ready.
|
||||
*/
|
||||
msleep(50);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -713,6 +714,12 @@ static int logi_dj_raw_event(struct hid_device *hdev,
|
||||
* device (via hid_input_report() ) and return 1 so hid-core does not do
|
||||
* anything else with it.
|
||||
*/
|
||||
if ((dj_report->device_index < DJ_DEVICE_INDEX_MIN) ||
|
||||
(dj_report->device_index > DJ_DEVICE_INDEX_MAX)) {
|
||||
dev_err(&hdev->dev, "%s: invalid device index:%d\n",
|
||||
__func__, dj_report->device_index);
|
||||
return false;
|
||||
}
|
||||
|
||||
spin_lock_irqsave(&djrcv_dev->lock, flags);
|
||||
if (dj_report->report_id == REPORT_ID_DJ_SHORT) {
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
static __u8 *mr_report_fixup(struct hid_device *hdev, __u8 *rdesc,
|
||||
unsigned int *rsize)
|
||||
{
|
||||
if (*rsize >= 30 && rdesc[29] == 0x05 && rdesc[30] == 0x09) {
|
||||
if (*rsize >= 31 && rdesc[29] == 0x05 && rdesc[30] == 0x09) {
|
||||
hid_info(hdev, "fixing up button/consumer in HID report descriptor\n");
|
||||
rdesc[30] = 0x0c;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
static __u8 *pl_report_fixup(struct hid_device *hdev, __u8 *rdesc,
|
||||
unsigned int *rsize)
|
||||
{
|
||||
if (*rsize >= 60 && rdesc[39] == 0x2a && rdesc[40] == 0xf5 &&
|
||||
if (*rsize >= 62 && rdesc[39] == 0x2a && rdesc[40] == 0xf5 &&
|
||||
rdesc[41] == 0x00 && rdesc[59] == 0x26 &&
|
||||
rdesc[60] == 0xf9 && rdesc[61] == 0x00) {
|
||||
hid_info(hdev, "fixing up Petalynx Maxter Remote report descriptor\n");
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
static __u8 *sp_report_fixup(struct hid_device *hdev, __u8 *rdesc,
|
||||
unsigned int *rsize)
|
||||
{
|
||||
if (*rsize >= 107 && rdesc[104] == 0x26 && rdesc[105] == 0x80 &&
|
||||
if (*rsize >= 112 && rdesc[104] == 0x26 && rdesc[105] == 0x80 &&
|
||||
rdesc[106] == 0x03) {
|
||||
hid_info(hdev, "fixing up Sunplus Wireless Desktop report descriptor\n");
|
||||
rdesc[105] = rdesc[110] = 0x03;
|
||||
|
||||
@@ -120,6 +120,7 @@ static const struct hid_blacklist {
|
||||
{ USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_HD, HID_QUIRK_NO_INIT_REPORTS },
|
||||
{ USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_QUAD_HD, HID_QUIRK_NO_INIT_REPORTS },
|
||||
{ USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_TP_V103, HID_QUIRK_NO_INIT_REPORTS },
|
||||
{ USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_KEYBOARD_A096, HID_QUIRK_NO_INIT_INPUT_REPORTS },
|
||||
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
@@ -127,6 +127,15 @@ kvp_work_func(struct work_struct *dummy)
|
||||
kvp_respond_to_host(NULL, HV_E_FAIL);
|
||||
}
|
||||
|
||||
static void poll_channel(struct vmbus_channel *channel)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&channel->inbound_lock, flags);
|
||||
hv_kvp_onchannelcallback(channel);
|
||||
spin_unlock_irqrestore(&channel->inbound_lock, flags);
|
||||
}
|
||||
|
||||
static int kvp_handle_handshake(struct hv_kvp_msg *msg)
|
||||
{
|
||||
int ret = 1;
|
||||
@@ -155,7 +164,7 @@ static int kvp_handle_handshake(struct hv_kvp_msg *msg)
|
||||
kvp_register(dm_reg_value);
|
||||
kvp_transaction.active = false;
|
||||
if (kvp_transaction.kvp_context)
|
||||
hv_kvp_onchannelcallback(kvp_transaction.kvp_context);
|
||||
poll_channel(kvp_transaction.kvp_context);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@@ -568,6 +577,7 @@ response_done:
|
||||
|
||||
vmbus_sendpacket(channel, recv_buffer, buf_len, req_id,
|
||||
VM_PKT_DATA_INBAND, 0);
|
||||
poll_channel(channel);
|
||||
|
||||
}
|
||||
|
||||
@@ -603,7 +613,7 @@ void hv_kvp_onchannelcallback(void *context)
|
||||
return;
|
||||
}
|
||||
|
||||
vmbus_recvpacket(channel, recv_buffer, PAGE_SIZE * 2, &recvlen,
|
||||
vmbus_recvpacket(channel, recv_buffer, PAGE_SIZE * 4, &recvlen,
|
||||
&requestid);
|
||||
|
||||
if (recvlen > 0) {
|
||||
|
||||
@@ -312,7 +312,7 @@ static int util_probe(struct hv_device *dev,
|
||||
(struct hv_util_service *)dev_id->driver_data;
|
||||
int ret;
|
||||
|
||||
srv->recv_buffer = kmalloc(PAGE_SIZE * 2, GFP_KERNEL);
|
||||
srv->recv_buffer = kmalloc(PAGE_SIZE * 4, GFP_KERNEL);
|
||||
if (!srv->recv_buffer)
|
||||
return -ENOMEM;
|
||||
if (srv->util_init) {
|
||||
|
||||
@@ -198,7 +198,7 @@ static int ads1015_get_channels_config_of(struct i2c_client *client)
|
||||
}
|
||||
|
||||
channel = be32_to_cpup(property);
|
||||
if (channel > ADS1015_CHANNELS) {
|
||||
if (channel >= ADS1015_CHANNELS) {
|
||||
dev_err(&client->dev,
|
||||
"invalid channel index %d on %s\n",
|
||||
channel, node->full_name);
|
||||
@@ -212,6 +212,7 @@ static int ads1015_get_channels_config_of(struct i2c_client *client)
|
||||
dev_err(&client->dev,
|
||||
"invalid gain on %s\n",
|
||||
node->full_name);
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -222,6 +223,7 @@ static int ads1015_get_channels_config_of(struct i2c_client *client)
|
||||
dev_err(&client->dev,
|
||||
"invalid data_rate on %s\n",
|
||||
node->full_name);
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -515,7 +515,7 @@ static ssize_t set_temp_min(struct device *dev,
|
||||
return -EINVAL;
|
||||
|
||||
temp = DIV_ROUND_CLOSEST(temp, 1000);
|
||||
temp = clamp_val(temp, 0, 255);
|
||||
temp = clamp_val(temp, -128, 127);
|
||||
|
||||
mutex_lock(&data->lock);
|
||||
data->temp_min[attr->index] = temp;
|
||||
@@ -549,7 +549,7 @@ static ssize_t set_temp_max(struct device *dev,
|
||||
return -EINVAL;
|
||||
|
||||
temp = DIV_ROUND_CLOSEST(temp, 1000);
|
||||
temp = clamp_val(temp, 0, 255);
|
||||
temp = clamp_val(temp, -128, 127);
|
||||
|
||||
mutex_lock(&data->lock);
|
||||
data->temp_max[attr->index] = temp;
|
||||
@@ -826,7 +826,7 @@ static ssize_t set_pwm_tmin(struct device *dev,
|
||||
return -EINVAL;
|
||||
|
||||
temp = DIV_ROUND_CLOSEST(temp, 1000);
|
||||
temp = clamp_val(temp, 0, 255);
|
||||
temp = clamp_val(temp, -128, 127);
|
||||
|
||||
mutex_lock(&data->lock);
|
||||
data->pwm_tmin[attr->index] = temp;
|
||||
|
||||
@@ -360,11 +360,13 @@ static ssize_t set_pwm1_enable(
|
||||
if (config)
|
||||
return config;
|
||||
|
||||
mutex_lock(&data->update_lock);
|
||||
config = i2c_smbus_read_byte_data(client, AMC6821_REG_CONF1);
|
||||
if (config < 0) {
|
||||
dev_err(&client->dev,
|
||||
"Error reading configuration register, aborting.\n");
|
||||
return config;
|
||||
count = config;
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
switch (val) {
|
||||
@@ -381,14 +383,15 @@ static ssize_t set_pwm1_enable(
|
||||
config |= AMC6821_CONF1_FDRC1;
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
count = -EINVAL;
|
||||
goto unlock;
|
||||
}
|
||||
mutex_lock(&data->update_lock);
|
||||
if (i2c_smbus_write_byte_data(client, AMC6821_REG_CONF1, config)) {
|
||||
dev_err(&client->dev,
|
||||
"Configuration register write error, aborting.\n");
|
||||
count = -EIO;
|
||||
}
|
||||
unlock:
|
||||
mutex_unlock(&data->update_lock);
|
||||
return count;
|
||||
}
|
||||
@@ -493,8 +496,9 @@ static ssize_t set_temp_auto_point_temp(
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
data->valid = 0;
|
||||
mutex_lock(&data->update_lock);
|
||||
data->valid = 0;
|
||||
|
||||
switch (ix) {
|
||||
case 0:
|
||||
ptemp[0] = clamp_val(val / 1000, 0,
|
||||
@@ -658,13 +662,14 @@ static ssize_t set_fan1_div(
|
||||
if (config)
|
||||
return config;
|
||||
|
||||
mutex_lock(&data->update_lock);
|
||||
config = i2c_smbus_read_byte_data(client, AMC6821_REG_CONF4);
|
||||
if (config < 0) {
|
||||
dev_err(&client->dev,
|
||||
"Error reading configuration register, aborting.\n");
|
||||
return config;
|
||||
count = config;
|
||||
goto EXIT;
|
||||
}
|
||||
mutex_lock(&data->update_lock);
|
||||
switch (val) {
|
||||
case 2:
|
||||
config &= ~AMC6821_CONF4_PSPR;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user