Commit a98fe7f3 authored by Ingo Molnar's avatar Ingo Molnar

Merge branches 'x86/asm', 'x86/debug', 'x86/mm', 'x86/setup', 'x86/urgent' and...

Merge branches 'x86/asm', 'x86/debug', 'x86/mm', 'x86/setup', 'x86/urgent' and 'linus' into x86/core
...@@ -686,7 +686,7 @@ CONFIG_SERIAL_UARTLITE_CONSOLE=y ...@@ -686,7 +686,7 @@ CONFIG_SERIAL_UARTLITE_CONSOLE=y
CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_SERIAL_CORE_CONSOLE=y
# CONFIG_SERIAL_JSM is not set # CONFIG_SERIAL_JSM is not set
# CONFIG_SERIAL_OF_PLATFORM is not set CONFIG_SERIAL_OF_PLATFORM=y
# CONFIG_SERIAL_OF_PLATFORM_NWPSERIAL is not set # CONFIG_SERIAL_OF_PLATFORM_NWPSERIAL is not set
CONFIG_UNIX98_PTYS=y CONFIG_UNIX98_PTYS=y
# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
......
...@@ -691,7 +691,7 @@ CONFIG_SERIAL_UARTLITE_CONSOLE=y ...@@ -691,7 +691,7 @@ CONFIG_SERIAL_UARTLITE_CONSOLE=y
CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_SERIAL_CORE_CONSOLE=y
# CONFIG_SERIAL_JSM is not set # CONFIG_SERIAL_JSM is not set
# CONFIG_SERIAL_OF_PLATFORM is not set CONFIG_SERIAL_OF_PLATFORM=y
# CONFIG_SERIAL_OF_PLATFORM_NWPSERIAL is not set # CONFIG_SERIAL_OF_PLATFORM_NWPSERIAL is not set
CONFIG_UNIX98_PTYS=y CONFIG_UNIX98_PTYS=y
# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
......
# #
# Automatically generated make config: don't edit # Automatically generated make config: don't edit
# Linux kernel version: 2.6.29-rc2 # Linux kernel version: 2.6.29-rc6
# Mon Jan 26 15:35:29 2009 # Fri Mar 6 00:07:38 2009
# #
# CONFIG_PPC64 is not set # CONFIG_PPC64 is not set
...@@ -71,6 +71,15 @@ CONFIG_POSIX_MQUEUE=y ...@@ -71,6 +71,15 @@ CONFIG_POSIX_MQUEUE=y
# CONFIG_BSD_PROCESS_ACCT is not set # CONFIG_BSD_PROCESS_ACCT is not set
# CONFIG_TASKSTATS is not set # CONFIG_TASKSTATS is not set
# CONFIG_AUDIT is not set # CONFIG_AUDIT is not set
#
# RCU Subsystem
#
CONFIG_CLASSIC_RCU=y
# CONFIG_TREE_RCU is not set
# CONFIG_PREEMPT_RCU is not set
# CONFIG_TREE_RCU_TRACE is not set
# CONFIG_PREEMPT_RCU_TRACE is not set
CONFIG_IKCONFIG=y CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14 CONFIG_LOG_BUF_SHIFT=14
...@@ -88,6 +97,7 @@ CONFIG_NAMESPACES=y ...@@ -88,6 +97,7 @@ CONFIG_NAMESPACES=y
# CONFIG_IPC_NS is not set # CONFIG_IPC_NS is not set
# CONFIG_USER_NS is not set # CONFIG_USER_NS is not set
# CONFIG_PID_NS is not set # CONFIG_PID_NS is not set
# CONFIG_NET_NS is not set
CONFIG_BLK_DEV_INITRD=y CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE="" CONFIG_INITRAMFS_SOURCE=""
CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y
...@@ -153,11 +163,6 @@ CONFIG_DEFAULT_AS=y ...@@ -153,11 +163,6 @@ CONFIG_DEFAULT_AS=y
# CONFIG_DEFAULT_CFQ is not set # CONFIG_DEFAULT_CFQ is not set
# CONFIG_DEFAULT_NOOP is not set # CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="anticipatory" CONFIG_DEFAULT_IOSCHED="anticipatory"
CONFIG_CLASSIC_RCU=y
# CONFIG_TREE_RCU is not set
# CONFIG_PREEMPT_RCU is not set
# CONFIG_TREE_RCU_TRACE is not set
# CONFIG_PREEMPT_RCU_TRACE is not set
# CONFIG_FREEZER is not set # CONFIG_FREEZER is not set
# #
...@@ -294,7 +299,6 @@ CONFIG_NET=y ...@@ -294,7 +299,6 @@ CONFIG_NET=y
# #
# Networking options # Networking options
# #
# CONFIG_NET_NS is not set
CONFIG_COMPAT_NET_DEV_OPS=y CONFIG_COMPAT_NET_DEV_OPS=y
CONFIG_PACKET=y CONFIG_PACKET=y
CONFIG_PACKET_MMAP=y CONFIG_PACKET_MMAP=y
...@@ -508,8 +512,8 @@ CONFIG_MTD_CONCAT=y ...@@ -508,8 +512,8 @@ CONFIG_MTD_CONCAT=y
CONFIG_MTD_PARTITIONS=y CONFIG_MTD_PARTITIONS=y
# CONFIG_MTD_TESTS is not set # CONFIG_MTD_TESTS is not set
# CONFIG_MTD_REDBOOT_PARTS is not set # CONFIG_MTD_REDBOOT_PARTS is not set
# CONFIG_MTD_CMDLINE_PARTS is not set CONFIG_MTD_CMDLINE_PARTS=y
# CONFIG_MTD_OF_PARTS is not set CONFIG_MTD_OF_PARTS=y
# CONFIG_MTD_AR7_PARTS is not set # CONFIG_MTD_AR7_PARTS is not set
# #
...@@ -587,7 +591,6 @@ CONFIG_MTD_PHYSMAP=y ...@@ -587,7 +591,6 @@ CONFIG_MTD_PHYSMAP=y
# LPDDR flash memory drivers # LPDDR flash memory drivers
# #
# CONFIG_MTD_LPDDR is not set # CONFIG_MTD_LPDDR is not set
# CONFIG_MTD_QINFO_PROBE is not set
# #
# UBI - Unsorted block images # UBI - Unsorted block images
...@@ -617,13 +620,19 @@ CONFIG_BLK_DEV_RAM_SIZE=8192 ...@@ -617,13 +620,19 @@ CONFIG_BLK_DEV_RAM_SIZE=8192
# CONFIG_BLK_DEV_HD is not set # CONFIG_BLK_DEV_HD is not set
CONFIG_MISC_DEVICES=y CONFIG_MISC_DEVICES=y
# CONFIG_PHANTOM is not set # CONFIG_PHANTOM is not set
# CONFIG_EEPROM_93CX6 is not set
# CONFIG_SGI_IOC4 is not set # CONFIG_SGI_IOC4 is not set
# CONFIG_TIFM_CORE is not set # CONFIG_TIFM_CORE is not set
# CONFIG_ICS932S401 is not set # CONFIG_ICS932S401 is not set
# CONFIG_ENCLOSURE_SERVICES is not set # CONFIG_ENCLOSURE_SERVICES is not set
# CONFIG_HP_ILO is not set # CONFIG_HP_ILO is not set
# CONFIG_C2PORT is not set # CONFIG_C2PORT is not set
#
# EEPROM support
#
# CONFIG_EEPROM_AT24 is not set
CONFIG_EEPROM_LEGACY=m
# CONFIG_EEPROM_93CX6 is not set
CONFIG_HAVE_IDE=y CONFIG_HAVE_IDE=y
# CONFIG_IDE is not set # CONFIG_IDE is not set
...@@ -839,6 +848,7 @@ CONFIG_R8169=y ...@@ -839,6 +848,7 @@ CONFIG_R8169=y
# CONFIG_QLA3XXX is not set # CONFIG_QLA3XXX is not set
# CONFIG_ATL1 is not set # CONFIG_ATL1 is not set
# CONFIG_ATL1E is not set # CONFIG_ATL1E is not set
# CONFIG_ATL1C is not set
# CONFIG_JME is not set # CONFIG_JME is not set
CONFIG_NETDEV_10000=y CONFIG_NETDEV_10000=y
# CONFIG_CHELSIO_T1 is not set # CONFIG_CHELSIO_T1 is not set
...@@ -1037,8 +1047,6 @@ CONFIG_I2C_MPC=y ...@@ -1037,8 +1047,6 @@ CONFIG_I2C_MPC=y
# Miscellaneous I2C Chip support # Miscellaneous I2C Chip support
# #
# CONFIG_DS1682 is not set # CONFIG_DS1682 is not set
# CONFIG_EEPROM_AT24 is not set
CONFIG_EEPROM_LEGACY=m
# CONFIG_SENSORS_PCF8574 is not set # CONFIG_SENSORS_PCF8574 is not set
# CONFIG_PCF8575 is not set # CONFIG_PCF8575 is not set
# CONFIG_SENSORS_PCA9539 is not set # CONFIG_SENSORS_PCA9539 is not set
......
# #
# Automatically generated make config: don't edit # Automatically generated make config: don't edit
# Linux kernel version: 2.6.29-rc2 # Linux kernel version: 2.6.29-rc6
# Mon Jan 26 15:35:46 2009 # Fri Mar 6 00:09:08 2009
# #
# CONFIG_PPC64 is not set # CONFIG_PPC64 is not set
...@@ -71,6 +71,15 @@ CONFIG_SYSVIPC_SYSCTL=y ...@@ -71,6 +71,15 @@ CONFIG_SYSVIPC_SYSCTL=y
# CONFIG_BSD_PROCESS_ACCT is not set # CONFIG_BSD_PROCESS_ACCT is not set
# CONFIG_TASKSTATS is not set # CONFIG_TASKSTATS is not set
# CONFIG_AUDIT is not set # CONFIG_AUDIT is not set
#
# RCU Subsystem
#
CONFIG_CLASSIC_RCU=y
# CONFIG_TREE_RCU is not set
# CONFIG_PREEMPT_RCU is not set
# CONFIG_TREE_RCU_TRACE is not set
# CONFIG_PREEMPT_RCU_TRACE is not set
# CONFIG_IKCONFIG is not set # CONFIG_IKCONFIG is not set
CONFIG_LOG_BUF_SHIFT=14 CONFIG_LOG_BUF_SHIFT=14
CONFIG_GROUP_SCHED=y CONFIG_GROUP_SCHED=y
...@@ -144,11 +153,6 @@ CONFIG_IOSCHED_CFQ=y ...@@ -144,11 +153,6 @@ CONFIG_IOSCHED_CFQ=y
CONFIG_DEFAULT_CFQ=y CONFIG_DEFAULT_CFQ=y
# CONFIG_DEFAULT_NOOP is not set # CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="cfq" CONFIG_DEFAULT_IOSCHED="cfq"
CONFIG_CLASSIC_RCU=y
# CONFIG_TREE_RCU is not set
# CONFIG_PREEMPT_RCU is not set
# CONFIG_TREE_RCU_TRACE is not set
# CONFIG_PREEMPT_RCU_TRACE is not set
# CONFIG_FREEZER is not set # CONFIG_FREEZER is not set
# #
...@@ -377,8 +381,8 @@ CONFIG_MTD=y ...@@ -377,8 +381,8 @@ CONFIG_MTD=y
CONFIG_MTD_PARTITIONS=y CONFIG_MTD_PARTITIONS=y
# CONFIG_MTD_TESTS is not set # CONFIG_MTD_TESTS is not set
# CONFIG_MTD_REDBOOT_PARTS is not set # CONFIG_MTD_REDBOOT_PARTS is not set
# CONFIG_MTD_CMDLINE_PARTS is not set CONFIG_MTD_CMDLINE_PARTS=y
# CONFIG_MTD_OF_PARTS is not set CONFIG_MTD_OF_PARTS=y
# CONFIG_MTD_AR7_PARTS is not set # CONFIG_MTD_AR7_PARTS is not set
# #
...@@ -452,7 +456,6 @@ CONFIG_MTD_PHYSMAP=y ...@@ -452,7 +456,6 @@ CONFIG_MTD_PHYSMAP=y
# LPDDR flash memory drivers # LPDDR flash memory drivers
# #
# CONFIG_MTD_LPDDR is not set # CONFIG_MTD_LPDDR is not set
# CONFIG_MTD_QINFO_PROBE is not set
# #
# UBI - Unsorted block images # UBI - Unsorted block images
...@@ -478,13 +481,19 @@ CONFIG_BLK_DEV=y ...@@ -478,13 +481,19 @@ CONFIG_BLK_DEV=y
# CONFIG_BLK_DEV_HD is not set # CONFIG_BLK_DEV_HD is not set
CONFIG_MISC_DEVICES=y CONFIG_MISC_DEVICES=y
# CONFIG_PHANTOM is not set # CONFIG_PHANTOM is not set
# CONFIG_EEPROM_93CX6 is not set
# CONFIG_SGI_IOC4 is not set # CONFIG_SGI_IOC4 is not set
# CONFIG_TIFM_CORE is not set # CONFIG_TIFM_CORE is not set
# CONFIG_ICS932S401 is not set # CONFIG_ICS932S401 is not set
# CONFIG_ENCLOSURE_SERVICES is not set # CONFIG_ENCLOSURE_SERVICES is not set
# CONFIG_HP_ILO is not set # CONFIG_HP_ILO is not set
# CONFIG_C2PORT is not set # CONFIG_C2PORT is not set
#
# EEPROM support
#
# CONFIG_EEPROM_AT24 is not set
# CONFIG_EEPROM_LEGACY is not set
# CONFIG_EEPROM_93CX6 is not set
CONFIG_HAVE_IDE=y CONFIG_HAVE_IDE=y
CONFIG_IDE=y CONFIG_IDE=y
...@@ -677,6 +686,7 @@ CONFIG_R8169=y ...@@ -677,6 +686,7 @@ CONFIG_R8169=y
# CONFIG_QLA3XXX is not set # CONFIG_QLA3XXX is not set
# CONFIG_ATL1 is not set # CONFIG_ATL1 is not set
# CONFIG_ATL1E is not set # CONFIG_ATL1E is not set
# CONFIG_ATL1C is not set
# CONFIG_JME is not set # CONFIG_JME is not set
# CONFIG_NETDEV_10000 is not set # CONFIG_NETDEV_10000 is not set
# CONFIG_TR is not set # CONFIG_TR is not set
...@@ -818,8 +828,6 @@ CONFIG_I2C_MPC=y ...@@ -818,8 +828,6 @@ CONFIG_I2C_MPC=y
# Miscellaneous I2C Chip support # Miscellaneous I2C Chip support
# #
# CONFIG_DS1682 is not set # CONFIG_DS1682 is not set
# CONFIG_EEPROM_AT24 is not set
# CONFIG_EEPROM_LEGACY is not set
# CONFIG_SENSORS_PCF8574 is not set # CONFIG_SENSORS_PCF8574 is not set
# CONFIG_PCF8575 is not set # CONFIG_PCF8575 is not set
# CONFIG_SENSORS_PCA9539 is not set # CONFIG_SENSORS_PCA9539 is not set
...@@ -1159,6 +1167,7 @@ CONFIG_JFFS2_RTIME=y ...@@ -1159,6 +1167,7 @@ CONFIG_JFFS2_RTIME=y
# CONFIG_SYSV_FS is not set # CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set # CONFIG_UFS_FS is not set
# CONFIG_NETWORK_FILESYSTEMS is not set # CONFIG_NETWORK_FILESYSTEMS is not set
CONFIG_EXPORTFS=m
# #
# Partition Types # Partition Types
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/initrd.h> #include <linux/initrd.h>
#include <linux/mtd/physmap.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
#include <asm/time.h> #include <asm/time.h>
...@@ -22,39 +21,6 @@ ...@@ -22,39 +21,6 @@
#include "mpc10x.h" #include "mpc10x.h"
static struct mtd_partition linkstation_physmap_partitions[] = {
{
.name = "mtd_firmimg",
.offset = 0x000000,
.size = 0x300000,
},
{
.name = "mtd_bootcode",
.offset = 0x300000,
.size = 0x070000,
},
{
.name = "mtd_status",
.offset = 0x370000,
.size = 0x010000,
},
{
.name = "mtd_conf",
.offset = 0x380000,
.size = 0x080000,
},
{
.name = "mtd_allflash",
.offset = 0x000000,
.size = 0x400000,
},
{
.name = "mtd_data",
.offset = 0x310000,
.size = 0x0f0000,
},
};
static __initdata struct of_device_id of_bus_ids[] = { static __initdata struct of_device_id of_bus_ids[] = {
{ .type = "soc", }, { .type = "soc", },
{ .compatible = "simple-bus", }, { .compatible = "simple-bus", },
...@@ -99,10 +65,6 @@ static int __init linkstation_add_bridge(struct device_node *dev) ...@@ -99,10 +65,6 @@ static int __init linkstation_add_bridge(struct device_node *dev)
static void __init linkstation_setup_arch(void) static void __init linkstation_setup_arch(void)
{ {
struct device_node *np; struct device_node *np;
#ifdef CONFIG_MTD_PHYSMAP
physmap_set_partitions(linkstation_physmap_partitions,
ARRAY_SIZE(linkstation_physmap_partitions));
#endif
/* Lookup PCI host bridges */ /* Lookup PCI host bridges */
for_each_compatible_node(np, "pci", "mpc10x-pci") for_each_compatible_node(np, "pci", "mpc10x-pci")
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/initrd.h> #include <linux/initrd.h>
#include <linux/mtd/physmap.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
#include <asm/system.h> #include <asm/system.h>
...@@ -26,32 +25,6 @@ ...@@ -26,32 +25,6 @@
#include "mpc10x.h" #include "mpc10x.h"
#ifdef CONFIG_MTD_PHYSMAP
static struct mtd_partition storcenter_physmap_partitions[] = {
{
.name = "kernel",
.offset = 0x000000,
.size = 0x170000,
},
{
.name = "rootfs",
.offset = 0x170000,
.size = 0x590000,
},
{
.name = "uboot",
.offset = 0x700000,
.size = 0x040000,
},
{
.name = "config",
.offset = 0x740000,
.size = 0x0c0000,
},
};
#endif
static __initdata struct of_device_id storcenter_of_bus[] = { static __initdata struct of_device_id storcenter_of_bus[] = {
{ .name = "soc", }, { .name = "soc", },
{}, {},
...@@ -96,11 +69,6 @@ static void __init storcenter_setup_arch(void) ...@@ -96,11 +69,6 @@ static void __init storcenter_setup_arch(void)
{ {
struct device_node *np; struct device_node *np;
#ifdef CONFIG_MTD_PHYSMAP
physmap_set_partitions(storcenter_physmap_partitions,
ARRAY_SIZE(storcenter_physmap_partitions));
#endif
/* Lookup PCI host bridges */ /* Lookup PCI host bridges */
for_each_compatible_node(np, "pci", "mpc10x-pci") for_each_compatible_node(np, "pci", "mpc10x-pci")
storcenter_add_bridge(np); storcenter_add_bridge(np);
......
...@@ -931,6 +931,12 @@ config X86_CPUID ...@@ -931,6 +931,12 @@ config X86_CPUID
with major 203 and minors 0 to 31 for /dev/cpu/0/cpuid to with major 203 and minors 0 to 31 for /dev/cpu/0/cpuid to
/dev/cpu/31/cpuid. /dev/cpu/31/cpuid.
config X86_CPU_DEBUG
tristate "/sys/kernel/debug/x86/cpu/* - CPU Debug support"
---help---
If you select this option, this will provide various x86 CPUs
information through debugfs.
choice choice
prompt "High Memory Support" prompt "High Memory Support"
default HIGHMEM4G if !X86_NUMAQ default HIGHMEM4G if !X86_NUMAQ
......
...@@ -6,26 +6,23 @@ ...@@ -6,26 +6,23 @@
# for more details. # for more details.
# #
# Copyright (C) 1994 by Linus Torvalds # Copyright (C) 1994 by Linus Torvalds
# Changed by many, many contributors over the years.
# #
# ROOT_DEV specifies the default root-device when making the image. # ROOT_DEV specifies the default root-device when making the image.
# This can be either FLOPPY, CURRENT, /dev/xxxx or empty, in which case # This can be either FLOPPY, CURRENT, /dev/xxxx or empty, in which case
# the default of FLOPPY is used by 'build'. # the default of FLOPPY is used by 'build'.
ROOT_DEV := CURRENT ROOT_DEV := CURRENT
# If you want to preset the SVGA mode, uncomment the next line and # If you want to preset the SVGA mode, uncomment the next line and
# set SVGA_MODE to whatever number you want. # set SVGA_MODE to whatever number you want.
# Set it to -DSVGA_MODE=NORMAL_VGA if you just want the EGA/VGA mode. # Set it to -DSVGA_MODE=NORMAL_VGA if you just want the EGA/VGA mode.
# The number is the same as you would ordinarily press at bootup. # The number is the same as you would ordinarily press at bootup.
SVGA_MODE := -DSVGA_MODE=NORMAL_VGA SVGA_MODE := -DSVGA_MODE=NORMAL_VGA
# If you want the RAM disk device, define this to be the size in blocks. targets := vmlinux.bin setup.bin setup.elf bzImage
#RAMDISK := -DRAMDISK=512
targets := vmlinux.bin setup.bin setup.elf zImage bzImage
subdir- := compressed subdir- := compressed
setup-y += a20.o cmdline.o copy.o cpu.o cpucheck.o edd.o setup-y += a20.o cmdline.o copy.o cpu.o cpucheck.o edd.o
...@@ -71,17 +68,13 @@ KBUILD_CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \ ...@@ -71,17 +68,13 @@ KBUILD_CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \
KBUILD_CFLAGS += $(call cc-option,-m32) KBUILD_CFLAGS += $(call cc-option,-m32)
KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
$(obj)/zImage: asflags-y := $(SVGA_MODE) $(RAMDISK) $(obj)/bzImage: asflags-y := $(SVGA_MODE)
$(obj)/bzImage: ccflags-y := -D__BIG_KERNEL__
$(obj)/bzImage: asflags-y := $(SVGA_MODE) $(RAMDISK) -D__BIG_KERNEL__
$(obj)/bzImage: BUILDFLAGS := -b
quiet_cmd_image = BUILD $@ quiet_cmd_image = BUILD $@
cmd_image = $(obj)/tools/build $(BUILDFLAGS) $(obj)/setup.bin \ cmd_image = $(obj)/tools/build $(obj)/setup.bin $(obj)/vmlinux.bin \
$(obj)/vmlinux.bin $(ROOT_DEV) > $@ $(ROOT_DEV) > $@
$(obj)/zImage $(obj)/bzImage: $(obj)/setup.bin \ $(obj)/bzImage: $(obj)/setup.bin $(obj)/vmlinux.bin $(obj)/tools/build FORCE
$(obj)/vmlinux.bin $(obj)/tools/build FORCE
$(call if_changed,image) $(call if_changed,image)
@echo 'Kernel: $@ is ready' ' (#'`cat .version`')' @echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
......
...@@ -24,12 +24,8 @@ ...@@ -24,12 +24,8 @@
#include "boot.h" #include "boot.h"
#include "offsets.h" #include "offsets.h"
SETUPSECTS = 4 /* default nr of setup-sectors */
BOOTSEG = 0x07C0 /* original address of boot-sector */ BOOTSEG = 0x07C0 /* original address of boot-sector */
SYSSEG = DEF_SYSSEG /* system loaded at 0x10000 (65536) */ SYSSEG = 0x1000 /* historical load address >> 4 */
SYSSIZE = DEF_SYSSIZE /* system size: # of 16-byte clicks */
/* to be loaded */
ROOT_DEV = 0 /* ROOT_DEV is now written by "build" */
#ifndef SVGA_MODE #ifndef SVGA_MODE
#define SVGA_MODE ASK_VGA #define SVGA_MODE ASK_VGA
...@@ -97,12 +93,12 @@ bugger_off_msg: ...@@ -97,12 +93,12 @@ bugger_off_msg:
.section ".header", "a" .section ".header", "a"
.globl hdr .globl hdr
hdr: hdr:
setup_sects: .byte SETUPSECTS setup_sects: .byte 0 /* Filled in by build.c */
root_flags: .word ROOT_RDONLY root_flags: .word ROOT_RDONLY
syssize: .long SYSSIZE syssize: .long 0 /* Filled in by build.c */
ram_size: .word RAMDISK ram_size: .word 0 /* Obsolete */
vid_mode: .word SVGA_MODE vid_mode: .word SVGA_MODE
root_dev: .word ROOT_DEV root_dev: .word 0 /* Filled in by build.c */
boot_flag: .word 0xAA55 boot_flag: .word 0xAA55
# offset 512, entry point # offset 512, entry point
...@@ -123,14 +119,15 @@ _start: ...@@ -123,14 +119,15 @@ _start:
# or else old loadlin-1.5 will fail) # or else old loadlin-1.5 will fail)
.globl realmode_swtch .globl realmode_swtch
realmode_swtch: .word 0, 0 # default_switch, SETUPSEG realmode_swtch: .word 0, 0 # default_switch, SETUPSEG
start_sys_seg: .word SYSSEG start_sys_seg: .word SYSSEG # obsolete and meaningless, but just
# in case something decided to "use" it
.word kernel_version-512 # pointing to kernel version string .word kernel_version-512 # pointing to kernel version string
# above section of header is compatible # above section of header is compatible
# with loadlin-1.5 (header v1.5). Don't # with loadlin-1.5 (header v1.5). Don't
# change it. # change it.
type_of_loader: .byte 0 # = 0, old one (LILO, Loadlin, type_of_loader: .byte 0 # 0 means ancient bootloader, newer
# Bootlin, SYSLX, bootsect...) # bootloaders know to change this.
# See Documentation/i386/boot.txt for # See Documentation/i386/boot.txt for
# assigned ids # assigned ids
...@@ -142,11 +139,7 @@ CAN_USE_HEAP = 0x80 # If set, the loader also has set ...@@ -142,11 +139,7 @@ CAN_USE_HEAP = 0x80 # If set, the loader also has set
# space behind setup.S can be used for # space behind setup.S can be used for
# heap purposes. # heap purposes.
# Only the loader knows what is free # Only the loader knows what is free
#ifndef __BIG_KERNEL__
.byte 0
#else
.byte LOADED_HIGH .byte LOADED_HIGH
#endif
setup_move_size: .word 0x8000 # size to move, when setup is not setup_move_size: .word 0x8000 # size to move, when setup is not
# loaded at 0x90000. We will move setup # loaded at 0x90000. We will move setup
...@@ -157,11 +150,7 @@ setup_move_size: .word 0x8000 # size to move, when setup is not ...@@ -157,11 +150,7 @@ setup_move_size: .word 0x8000 # size to move, when setup is not
code32_start: # here loaders can put a different code32_start: # here loaders can put a different
# start address for 32-bit code. # start address for 32-bit code.
#ifndef __BIG_KERNEL__
.long 0x1000 # 0x1000 = default for zImage
#else
.long 0x100000 # 0x100000 = default for big kernel .long 0x100000 # 0x100000 = default for big kernel
#endif
ramdisk_image: .long 0 # address of loaded ramdisk image ramdisk_image: .long 0 # address of loaded ramdisk image
# Here the loader puts the 32-bit # Here the loader puts the 32-bit
......
...@@ -32,47 +32,6 @@ static void realmode_switch_hook(void) ...@@ -32,47 +32,6 @@ static void realmode_switch_hook(void)
} }
} }
/*
* A zImage kernel is loaded at 0x10000 but wants to run at 0x1000.
* A bzImage kernel is loaded and runs at 0x100000.
*/
static void move_kernel_around(void)
{
/* Note: rely on the compile-time option here rather than
the LOADED_HIGH flag. The Qemu kernel loader unconditionally
sets the loadflags to zero. */
#ifndef __BIG_KERNEL__
u16 dst_seg, src_seg;
u32 syssize;
dst_seg = 0x1000 >> 4;
src_seg = 0x10000 >> 4;
syssize = boot_params.hdr.syssize; /* Size in 16-byte paragraphs */
while (syssize) {
int paras = (syssize >= 0x1000) ? 0x1000 : syssize;
int dwords = paras << 2;
asm volatile("pushw %%es ; "
"pushw %%ds ; "
"movw %1,%%es ; "
"movw %2,%%ds ; "
"xorw %%di,%%di ; "
"xorw %%si,%%si ; "
"rep;movsl ; "
"popw %%ds ; "
"popw %%es"
: "+c" (dwords)
: "r" (dst_seg), "r" (src_seg)
: "esi", "edi");
syssize -= paras;
dst_seg += paras;
src_seg += paras;
}
#endif
}
/* /*
* Disable all interrupts at the legacy PIC. * Disable all interrupts at the legacy PIC.
*/ */
...@@ -147,9 +106,6 @@ void go_to_protected_mode(void) ...@@ -147,9 +106,6 @@ void go_to_protected_mode(void)
/* Hook before leaving real mode, also disables interrupts */ /* Hook before leaving real mode, also disables interrupts */
realmode_switch_hook(); realmode_switch_hook();
/* Move the kernel/setup to their final resting places */
move_kernel_around();
/* Enable the A20 gate */ /* Enable the A20 gate */
if (enable_a20()) { if (enable_a20()) {
puts("A20 gate not responding, unable to boot...\n"); puts("A20 gate not responding, unable to boot...\n");
......
...@@ -130,7 +130,7 @@ static void die(const char * str, ...) ...@@ -130,7 +130,7 @@ static void die(const char * str, ...)
static void usage(void) static void usage(void)
{ {
die("Usage: build [-b] setup system [rootdev] [> image]"); die("Usage: build setup system [rootdev] [> image]");
} }
int main(int argc, char ** argv) int main(int argc, char ** argv)
...@@ -145,11 +145,6 @@ int main(int argc, char ** argv) ...@@ -145,11 +145,6 @@ int main(int argc, char ** argv)
void *kernel; void *kernel;
u32 crc = 0xffffffffUL; u32 crc = 0xffffffffUL;
if (argc > 2 && !strcmp(argv[1], "-b"))
{
is_big_kernel = 1;
argc--, argv++;
}
if ((argc < 3) || (argc > 4)) if ((argc < 3) || (argc > 4))
usage(); usage();
if (argc > 3) { if (argc > 3) {
...@@ -216,8 +211,6 @@ int main(int argc, char ** argv) ...@@ -216,8 +211,6 @@ int main(int argc, char ** argv)
die("Unable to mmap '%s': %m", argv[2]); die("Unable to mmap '%s': %m", argv[2]);
/* Number of 16-byte paragraphs, including space for a 4-byte CRC */ /* Number of 16-byte paragraphs, including space for a 4-byte CRC */
sys_size = (sz + 15 + 4) / 16; sys_size = (sz + 15 + 4) / 16;
if (!is_big_kernel && sys_size > DEF_SYSSIZE)
die("System is too big. Try using bzImage or modules.");
/* Patch the setup code with the appropriate size parameters */ /* Patch the setup code with the appropriate size parameters */
buf[0x1f1] = setup_sectors-1; buf[0x1f1] = setup_sectors-1;
......
#ifndef _ASM_X86_BOOT_H #ifndef _ASM_X86_BOOT_H
#define _ASM_X86_BOOT_H #define _ASM_X86_BOOT_H
/* Don't touch these, unless you really know what you're doing. */
#define DEF_SYSSEG 0x1000
#define DEF_SYSSIZE 0x7F00
/* Internal svga startup constants */ /* Internal svga startup constants */
#define NORMAL_VGA 0xffff /* 80x25 mode */ #define NORMAL_VGA 0xffff /* 80x25 mode */
#define EXTENDED_VGA 0xfffe /* 80x50 mode */ #define EXTENDED_VGA 0xfffe /* 80x50 mode */
......
#ifndef _ASM_X86_CPU_DEBUG_H
#define _ASM_X86_CPU_DEBUG_H
/*
* CPU x86 architecture debug
*
* Copyright(C) 2009 Jaswinder Singh Rajput
*/
/* Register flags */
enum cpu_debug_bit {
/* Model Specific Registers (MSRs) */
CPU_MC_BIT, /* Machine Check */
CPU_MONITOR_BIT, /* Monitor */
CPU_TIME_BIT, /* Time */
CPU_PMC_BIT, /* Performance Monitor */
CPU_PLATFORM_BIT, /* Platform */
CPU_APIC_BIT, /* APIC */
CPU_POWERON_BIT, /* Power-on */
CPU_CONTROL_BIT, /* Control */
CPU_FEATURES_BIT, /* Features control */
CPU_LBRANCH_BIT, /* Last Branch */
CPU_BIOS_BIT, /* BIOS */
CPU_FREQ_BIT, /* Frequency */
CPU_MTTR_BIT, /* MTRR */
CPU_PERF_BIT, /* Performance */
CPU_CACHE_BIT, /* Cache */
CPU_SYSENTER_BIT, /* Sysenter */
CPU_THERM_BIT, /* Thermal */
CPU_MISC_BIT, /* Miscellaneous */
CPU_DEBUG_BIT, /* Debug */
CPU_PAT_BIT, /* PAT */
CPU_VMX_BIT, /* VMX */
CPU_CALL_BIT, /* System Call */
CPU_BASE_BIT, /* BASE Address */
CPU_SMM_BIT, /* System mgmt mode */
CPU_SVM_BIT, /*Secure Virtual Machine*/
CPU_OSVM_BIT, /* OS-Visible Workaround*/
/* Standard Registers */
CPU_TSS_BIT, /* Task Stack Segment */
CPU_CR_BIT, /* Control Registers */
CPU_DT_BIT, /* Descriptor Table */
/* End of Registers flags */
CPU_REG_ALL_BIT, /* Select all Registers */
};
#define CPU_REG_ALL (~0) /* Select all Registers */
#define CPU_MC (1 << CPU_MC_BIT)
#define CPU_MONITOR (1 << CPU_MONITOR_BIT)
#define CPU_TIME (1 << CPU_TIME_BIT)
#define CPU_PMC (1 << CPU_PMC_BIT)
#define CPU_PLATFORM (1 << CPU_PLATFORM_BIT)
#define CPU_APIC (1 << CPU_APIC_BIT)
#define CPU_POWERON (1 << CPU_POWERON_BIT)
#define CPU_CONTROL (1 << CPU_CONTROL_BIT)
#define CPU_FEATURES (1 << CPU_FEATURES_BIT)
#define CPU_LBRANCH (1 << CPU_LBRANCH_BIT)
#define CPU_BIOS (1 << CPU_BIOS_BIT)
#define CPU_FREQ (1 << CPU_FREQ_BIT)
#define CPU_MTRR (1 << CPU_MTTR_BIT)
#define CPU_PERF (1 << CPU_PERF_BIT)
#define CPU_CACHE (1 << CPU_CACHE_BIT)
#define CPU_SYSENTER (1 << CPU_SYSENTER_BIT)
#define CPU_THERM (1 << CPU_THERM_BIT)
#define CPU_MISC (1 << CPU_MISC_BIT)
#define CPU_DEBUG (1 << CPU_DEBUG_BIT)
#define CPU_PAT (1 << CPU_PAT_BIT)
#define CPU_VMX (1 << CPU_VMX_BIT)
#define CPU_CALL (1 << CPU_CALL_BIT)
#define CPU_BASE (1 << CPU_BASE_BIT)
#define CPU_SMM (1 << CPU_SMM_BIT)
#define CPU_SVM (1 << CPU_SVM_BIT)
#define CPU_OSVM (1 << CPU_OSVM_BIT)
#define CPU_TSS (1 << CPU_TSS_BIT)
#define CPU_CR (1 << CPU_CR_BIT)
#define CPU_DT (1 << CPU_DT_BIT)
/* Register file flags */
enum cpu_file_bit {
CPU_INDEX_BIT, /* index */
CPU_VALUE_BIT, /* value */
};
#define CPU_FILE_VALUE (1 << CPU_VALUE_BIT)
/*
* DisplayFamily_DisplayModel Processor Families/Processor Number Series
* -------------------------- ------------------------------------------
* 05_01, 05_02, 05_04 Pentium, Pentium with MMX
*
* 06_01 Pentium Pro
* 06_03, 06_05 Pentium II Xeon, Pentium II
* 06_07, 06_08, 06_0A, 06_0B Pentium III Xeon, Pentum III
*
* 06_09, 060D Pentium M
*
* 06_0E Core Duo, Core Solo
*
* 06_0F Xeon 3000, 3200, 5100, 5300, 7300 series,
* Core 2 Quad, Core 2 Extreme, Core 2 Duo,
* Pentium dual-core
* 06_17 Xeon 5200, 5400 series, Core 2 Quad Q9650
*
* 06_1C Atom
*
* 0F_00, 0F_01, 0F_02 Xeon, Xeon MP, Pentium 4
* 0F_03, 0F_04 Xeon, Xeon MP, Pentium 4, Pentium D
*
* 0F_06 Xeon 7100, 5000 Series, Xeon MP,
* Pentium 4, Pentium D
*/
/* Register processors bits */
enum cpu_processor_bit {
CPU_NONE,
/* Intel */
CPU_INTEL_PENTIUM_BIT,
CPU_INTEL_P6_BIT,
CPU_INTEL_PENTIUM_M_BIT,
CPU_INTEL_CORE_BIT,
CPU_INTEL_CORE2_BIT,
CPU_INTEL_ATOM_BIT,
CPU_INTEL_XEON_P4_BIT,
CPU_INTEL_XEON_MP_BIT,
};
#define CPU_ALL (~0) /* Select all CPUs */
#define CPU_INTEL_PENTIUM (1 << CPU_INTEL_PENTIUM_BIT)
#define CPU_INTEL_P6 (1 << CPU_INTEL_P6_BIT)
#define CPU_INTEL_PENTIUM_M (1 << CPU_INTEL_PENTIUM_M_BIT)
#define CPU_INTEL_CORE (1 << CPU_INTEL_CORE_BIT)
#define CPU_INTEL_CORE2 (1 << CPU_INTEL_CORE2_BIT)
#define CPU_INTEL_ATOM (1 << CPU_INTEL_ATOM_BIT)
#define CPU_INTEL_XEON_P4 (1 << CPU_INTEL_XEON_P4_BIT)
#define CPU_INTEL_XEON_MP (1 << CPU_INTEL_XEON_MP_BIT)
#define CPU_INTEL_PX (CPU_INTEL_P6 | CPU_INTEL_PENTIUM_M)
#define CPU_INTEL_COREX (CPU_INTEL_CORE | CPU_INTEL_CORE2)
#define CPU_INTEL_XEON (CPU_INTEL_XEON_P4 | CPU_INTEL_XEON_MP)
#define CPU_CO_AT (CPU_INTEL_CORE | CPU_INTEL_ATOM)
#define CPU_C2_AT (CPU_INTEL_CORE2 | CPU_INTEL_ATOM)
#define CPU_CX_AT (CPU_INTEL_COREX | CPU_INTEL_ATOM)
#define CPU_CX_XE (CPU_INTEL_COREX | CPU_INTEL_XEON)
#define CPU_P6_XE (CPU_INTEL_P6 | CPU_INTEL_XEON)
#define CPU_PM_CO_AT (CPU_INTEL_PENTIUM_M | CPU_CO_AT)
#define CPU_C2_AT_XE (CPU_C2_AT | CPU_INTEL_XEON)
#define CPU_CX_AT_XE (CPU_CX_AT | CPU_INTEL_XEON)
#define CPU_P6_CX_AT (CPU_INTEL_P6 | CPU_CX_AT)
#define CPU_P6_CX_XE (CPU_P6_XE | CPU_INTEL_COREX)
#define CPU_P6_CX_AT_XE (CPU_INTEL_P6 | CPU_CX_AT_XE)
#define CPU_PM_CX_AT_XE (CPU_INTEL_PENTIUM_M | CPU_CX_AT_XE)
#define CPU_PM_CX_AT (CPU_INTEL_PENTIUM_M | CPU_CX_AT)
#define CPU_PM_CX_XE (CPU_INTEL_PENTIUM_M | CPU_CX_XE)
#define CPU_PX_CX_AT (CPU_INTEL_PX | CPU_CX_AT)
#define CPU_PX_CX_AT_XE (CPU_INTEL_PX | CPU_CX_AT_XE)
/* Select all Intel CPUs*/
#define CPU_INTEL_ALL (CPU_INTEL_PENTIUM | CPU_PX_CX_AT_XE)
#define MAX_CPU_FILES 512
struct cpu_private {
unsigned cpu;
unsigned type;
unsigned reg;
unsigned file;
};
struct cpu_debug_base {
char *name; /* Register name */
unsigned flag; /* Register flag */
};
struct cpu_cpuX_base {
struct dentry *dentry; /* Register dentry */
int init; /* Register index file */
};
struct cpu_file_base {
char *name; /* Register file name */
unsigned flag; /* Register file flag */
};
struct cpu_debug_range {
unsigned min; /* Register range min */
unsigned max; /* Register range max */
unsigned flag; /* Supported flags */
unsigned model; /* Supported models */
};
#endif /* _ASM_X86_CPU_DEBUG_H */
...@@ -91,7 +91,6 @@ static inline int desc_empty(const void *ptr) ...@@ -91,7 +91,6 @@ static inline int desc_empty(const void *ptr)
#define store_gdt(dtr) native_store_gdt(dtr) #define store_gdt(dtr) native_store_gdt(dtr)
#define store_idt(dtr) native_store_idt(dtr) #define store_idt(dtr) native_store_idt(dtr)
#define store_tr(tr) (tr = native_store_tr()) #define store_tr(tr) (tr = native_store_tr())
#define store_ldt(ldt) asm("sldt %0":"=m" (ldt))
#define load_TLS(t, cpu) native_load_tls(t, cpu) #define load_TLS(t, cpu) native_load_tls(t, cpu)
#define set_ldt native_set_ldt #define set_ldt native_set_ldt
...@@ -112,6 +111,8 @@ static inline void paravirt_free_ldt(struct desc_struct *ldt, unsigned entries) ...@@ -112,6 +111,8 @@ static inline void paravirt_free_ldt(struct desc_struct *ldt, unsigned entries)
} }
#endif /* CONFIG_PARAVIRT */ #endif /* CONFIG_PARAVIRT */
#define store_ldt(ldt) asm("sldt %0" : "=m"(ldt))
static inline void native_write_idt_entry(gate_desc *idt, int entry, static inline void native_write_idt_entry(gate_desc *idt, int entry,
const gate_desc *gate) const gate_desc *gate)
{ {
......
...@@ -63,6 +63,7 @@ void *kmap_atomic_prot(struct page *page, enum km_type type, pgprot_t prot); ...@@ -63,6 +63,7 @@ void *kmap_atomic_prot(struct page *page, enum km_type type, pgprot_t prot);
void *kmap_atomic(struct page *page, enum km_type type); void *kmap_atomic(struct page *page, enum km_type type);
void kunmap_atomic(void *kvaddr, enum km_type type); void kunmap_atomic(void *kvaddr, enum km_type type);
void *kmap_atomic_pfn(unsigned long pfn, enum km_type type); void *kmap_atomic_pfn(unsigned long pfn, enum km_type type);
void *kmap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot);
struct page *kmap_atomic_to_page(void *ptr); struct page *kmap_atomic_to_page(void *ptr);
#ifndef CONFIG_PARAVIRT #ifndef CONFIG_PARAVIRT
......
...@@ -14,6 +14,8 @@ obj-y += vmware.o hypervisor.o ...@@ -14,6 +14,8 @@ obj-y += vmware.o hypervisor.o
obj-$(CONFIG_X86_32) += bugs.o cmpxchg.o obj-$(CONFIG_X86_32) += bugs.o cmpxchg.o
obj-$(CONFIG_X86_64) += bugs_64.o obj-$(CONFIG_X86_64) += bugs_64.o
obj-$(CONFIG_X86_CPU_DEBUG) += cpu_debug.o
obj-$(CONFIG_CPU_SUP_INTEL) += intel.o obj-$(CONFIG_CPU_SUP_INTEL) += intel.o
obj-$(CONFIG_CPU_SUP_AMD) += amd.o obj-$(CONFIG_CPU_SUP_AMD) += amd.o
obj-$(CONFIG_CPU_SUP_CYRIX_32) += cyrix.o obj-$(CONFIG_CPU_SUP_CYRIX_32) += cyrix.o
......
...@@ -1078,8 +1078,7 @@ void __cpuinit cpu_init(void) ...@@ -1078,8 +1078,7 @@ void __cpuinit cpu_init(void)
atomic_inc(&init_mm.mm_count); atomic_inc(&init_mm.mm_count);
me->active_mm = &init_mm; me->active_mm = &init_mm;
if (me->mm) BUG_ON(me->mm);
BUG();
enter_lazy_tlb(&init_mm, me); enter_lazy_tlb(&init_mm, me);
load_sp0(t, &current->thread); load_sp0(t, &current->thread);
...@@ -1145,8 +1144,7 @@ void __cpuinit cpu_init(void) ...@@ -1145,8 +1144,7 @@ void __cpuinit cpu_init(void)
*/ */
atomic_inc(&init_mm.mm_count); atomic_inc(&init_mm.mm_count);
curr->active_mm = &init_mm; curr->active_mm = &init_mm;
if (curr->mm) BUG_ON(curr->mm);
BUG();
enter_lazy_tlb(&init_mm, curr); enter_lazy_tlb(&init_mm, curr);
load_sp0(t, thread); load_sp0(t, thread);
......
This diff is collapsed.
...@@ -74,8 +74,7 @@ static void ich_force_hpet_resume(void) ...@@ -74,8 +74,7 @@ static void ich_force_hpet_resume(void)
if (!force_hpet_address) if (!force_hpet_address)
return; return;
if (rcba_base == NULL) BUG_ON(rcba_base == NULL);
BUG();
/* read the Function Disable register, dword mode only */ /* read the Function Disable register, dword mode only */
val = readl(rcba_base + 0x3404); val = readl(rcba_base + 0x3404);
......
...@@ -121,23 +121,30 @@ void kunmap_atomic(void *kvaddr, enum km_type type) ...@@ -121,23 +121,30 @@ void kunmap_atomic(void *kvaddr, enum km_type type)
pagefault_enable(); pagefault_enable();
} }
/* This is the same as kmap_atomic() but can map memory that doesn't void *kmap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot)
* have a struct page associated with it.
*/
void *kmap_atomic_pfn(unsigned long pfn, enum km_type type)
{ {
enum fixed_addresses idx; enum fixed_addresses idx;
unsigned long vaddr; unsigned long vaddr;
pagefault_disable(); pagefault_disable();
idx = type + KM_TYPE_NR*smp_processor_id(); debug_kmap_atomic_prot(type);
idx = type + KM_TYPE_NR * smp_processor_id();
vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
set_pte(kmap_pte-idx, pfn_pte(pfn, kmap_prot)); set_pte(kmap_pte - idx, pfn_pte(pfn, prot));
arch_flush_lazy_mmu_mode(); arch_flush_lazy_mmu_mode();
return (void*) vaddr; return (void*) vaddr;
} }
/* This is the same as kmap_atomic() but can map memory that doesn't
* have a struct page associated with it.
*/
void *kmap_atomic_pfn(unsigned long pfn, enum km_type type)
{
return kmap_atomic_prot_pfn(pfn, type, kmap_prot);
}
EXPORT_SYMBOL_GPL(kmap_atomic_pfn); /* temporarily in use by i915 GEM until vmap */ EXPORT_SYMBOL_GPL(kmap_atomic_pfn); /* temporarily in use by i915 GEM until vmap */
struct page *kmap_atomic_to_page(void *ptr) struct page *kmap_atomic_to_page(void *ptr)
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <asm/iomap.h> #include <asm/iomap.h>
#include <asm/pat.h> #include <asm/pat.h>
#include <asm/highmem.h>
#include <linux/module.h> #include <linux/module.h>
int is_io_mapping_possible(resource_size_t base, unsigned long size) int is_io_mapping_possible(resource_size_t base, unsigned long size)
...@@ -36,11 +37,6 @@ EXPORT_SYMBOL_GPL(is_io_mapping_possible); ...@@ -36,11 +37,6 @@ EXPORT_SYMBOL_GPL(is_io_mapping_possible);
void * void *
iomap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot) iomap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot)
{ {
enum fixed_addresses idx;
unsigned long vaddr;
pagefault_disable();
/* /*
* For non-PAT systems, promote PAGE_KERNEL_WC to PAGE_KERNEL_UC_MINUS. * For non-PAT systems, promote PAGE_KERNEL_WC to PAGE_KERNEL_UC_MINUS.
* PAGE_KERNEL_WC maps to PWT, which translates to uncached if the * PAGE_KERNEL_WC maps to PWT, which translates to uncached if the
...@@ -50,12 +46,7 @@ iomap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot) ...@@ -50,12 +46,7 @@ iomap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot)
if (!pat_enabled && pgprot_val(prot) == pgprot_val(PAGE_KERNEL_WC)) if (!pat_enabled && pgprot_val(prot) == pgprot_val(PAGE_KERNEL_WC))
prot = PAGE_KERNEL_UC_MINUS; prot = PAGE_KERNEL_UC_MINUS;
idx = type + KM_TYPE_NR*smp_processor_id(); return kmap_atomic_prot_pfn(pfn, type, prot);
vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
set_pte(kmap_pte-idx, pfn_pte(pfn, prot));
arch_flush_lazy_mmu_mode();
return (void*) vaddr;
} }
EXPORT_SYMBOL_GPL(iomap_atomic_prot_pfn); EXPORT_SYMBOL_GPL(iomap_atomic_prot_pfn);
......
...@@ -310,7 +310,7 @@ static int post_kmmio_handler(unsigned long condition, struct pt_regs *regs) ...@@ -310,7 +310,7 @@ static int post_kmmio_handler(unsigned long condition, struct pt_regs *regs)
struct kmmio_context *ctx = &get_cpu_var(kmmio_ctx); struct kmmio_context *ctx = &get_cpu_var(kmmio_ctx);
if (!ctx->active) { if (!ctx->active) {
pr_warning("kmmio: spurious debug trap on CPU %d.\n", pr_debug("kmmio: spurious debug trap on CPU %d.\n",
smp_processor_id()); smp_processor_id());
goto out; goto out;
} }
......
...@@ -522,6 +522,17 @@ static int split_large_page(pte_t *kpte, unsigned long address) ...@@ -522,6 +522,17 @@ static int split_large_page(pte_t *kpte, unsigned long address)
* primary protection behavior: * primary protection behavior:
*/ */
__set_pmd_pte(kpte, address, mk_pte(base, __pgprot(_KERNPG_TABLE))); __set_pmd_pte(kpte, address, mk_pte(base, __pgprot(_KERNPG_TABLE)));
/*
* Intel Atom errata AAH41 workaround.
*
* The real fix should be in hw or in a microcode update, but
* we also probabilistically try to reduce the window of having
* a large TLB mixed with 4K TLBs while instruction fetches are
* going on.
*/
__flush_tlb_all();
base = NULL; base = NULL;
out_unlock: out_unlock:
......
...@@ -1139,15 +1139,6 @@ static int hvcs_open(struct tty_struct *tty, struct file *filp) ...@@ -1139,15 +1139,6 @@ static int hvcs_open(struct tty_struct *tty, struct file *filp)
hvcsd->tty = tty; hvcsd->tty = tty;
tty->driver_data = hvcsd; tty->driver_data = hvcsd;
/*
* Set this driver to low latency so that we actually have a chance at
* catching a throttled TTY after we flip_buffer_push. Otherwise the
* flush_to_async may not execute until after the kernel_thread has
* yielded and resumed the next flip_buffer_push resulting in data
* loss.
*/
tty->low_latency = 1;
memset(&hvcsd->buffer[0], 0x00, HVCS_BUFF_LEN); memset(&hvcsd->buffer[0], 0x00, HVCS_BUFF_LEN);
/* /*
......
...@@ -810,7 +810,6 @@ static int hvsi_open(struct tty_struct *tty, struct file *filp) ...@@ -810,7 +810,6 @@ static int hvsi_open(struct tty_struct *tty, struct file *filp)
hp = &hvsi_ports[line]; hp = &hvsi_ports[line];
tty->driver_data = hp; tty->driver_data = hp;
tty->low_latency = 1; /* avoid throttle/tty_flip_buffer_push race */
mb(); mb();
if (hp->state == HVSI_FSP_DIED) if (hp->state == HVSI_FSP_DIED)
......
...@@ -1105,7 +1105,7 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags) ...@@ -1105,7 +1105,7 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
1024 * 1024, 1024 * 1024,
MTRR_TYPE_WRCOMB, 1); MTRR_TYPE_WRCOMB, 1);
if (dev_priv->mm.gtt_mtrr < 0) { if (dev_priv->mm.gtt_mtrr < 0) {
DRM_INFO("MTRR allocation failed\n. Graphics " DRM_INFO("MTRR allocation failed. Graphics "
"performance may suffer.\n"); "performance may suffer.\n");
} }
......
...@@ -279,7 +279,6 @@ typedef struct drm_i915_private { ...@@ -279,7 +279,6 @@ typedef struct drm_i915_private {
u8 saveAR_INDEX; u8 saveAR_INDEX;
u8 saveAR[21]; u8 saveAR[21];
u8 saveDACMASK; u8 saveDACMASK;
u8 saveDACDATA[256*3]; /* 256 3-byte colors */
u8 saveCR[37]; u8 saveCR[37];
struct { struct {
...@@ -457,6 +456,12 @@ struct drm_i915_gem_object { ...@@ -457,6 +456,12 @@ struct drm_i915_gem_object {
/** for phy allocated objects */ /** for phy allocated objects */
struct drm_i915_gem_phys_object *phys_obj; struct drm_i915_gem_phys_object *phys_obj;
/**
* Used for checking the object doesn't appear more than once
* in an execbuffer object list.
*/
int in_execbuffer;
}; };
/** /**
......
...@@ -1476,7 +1476,7 @@ static void i915_write_fence_reg(struct drm_i915_fence_reg *reg) ...@@ -1476,7 +1476,7 @@ static void i915_write_fence_reg(struct drm_i915_fence_reg *reg)
struct drm_i915_gem_object *obj_priv = obj->driver_private; struct drm_i915_gem_object *obj_priv = obj->driver_private;
int regnum = obj_priv->fence_reg; int regnum = obj_priv->fence_reg;
int tile_width; int tile_width;
uint32_t val; uint32_t fence_reg, val;
uint32_t pitch_val; uint32_t pitch_val;
if ((obj_priv->gtt_offset & ~I915_FENCE_START_MASK) || if ((obj_priv->gtt_offset & ~I915_FENCE_START_MASK) ||
...@@ -1503,7 +1503,11 @@ static void i915_write_fence_reg(struct drm_i915_fence_reg *reg) ...@@ -1503,7 +1503,11 @@ static void i915_write_fence_reg(struct drm_i915_fence_reg *reg)
val |= pitch_val << I830_FENCE_PITCH_SHIFT; val |= pitch_val << I830_FENCE_PITCH_SHIFT;
val |= I830_FENCE_REG_VALID; val |= I830_FENCE_REG_VALID;
I915_WRITE(FENCE_REG_830_0 + (regnum * 4), val); if (regnum < 8)
fence_reg = FENCE_REG_830_0 + (regnum * 4);
else
fence_reg = FENCE_REG_945_8 + ((regnum - 8) * 4);
I915_WRITE(fence_reg, val);
} }
static void i830_write_fence_reg(struct drm_i915_fence_reg *reg) static void i830_write_fence_reg(struct drm_i915_fence_reg *reg)
...@@ -1557,7 +1561,8 @@ i915_gem_object_get_fence_reg(struct drm_gem_object *obj, bool write) ...@@ -1557,7 +1561,8 @@ i915_gem_object_get_fence_reg(struct drm_gem_object *obj, bool write)
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_i915_gem_object *obj_priv = obj->driver_private; struct drm_i915_gem_object *obj_priv = obj->driver_private;
struct drm_i915_fence_reg *reg = NULL; struct drm_i915_fence_reg *reg = NULL;
int i, ret; struct drm_i915_gem_object *old_obj_priv = NULL;
int i, ret, avail;
switch (obj_priv->tiling_mode) { switch (obj_priv->tiling_mode) {
case I915_TILING_NONE: case I915_TILING_NONE:
...@@ -1580,25 +1585,46 @@ i915_gem_object_get_fence_reg(struct drm_gem_object *obj, bool write) ...@@ -1580,25 +1585,46 @@ i915_gem_object_get_fence_reg(struct drm_gem_object *obj, bool write)
} }
/* First try to find a free reg */ /* First try to find a free reg */
try_again:
avail = 0;
for (i = dev_priv->fence_reg_start; i < dev_priv->num_fence_regs; i++) { for (i = dev_priv->fence_reg_start; i < dev_priv->num_fence_regs; i++) {
reg = &dev_priv->fence_regs[i]; reg = &dev_priv->fence_regs[i];
if (!reg->obj) if (!reg->obj)
break; break;
old_obj_priv = reg->obj->driver_private;
if (!old_obj_priv->pin_count)
avail++;
} }
/* None available, try to steal one or wait for a user to finish */ /* None available, try to steal one or wait for a user to finish */
if (i == dev_priv->num_fence_regs) { if (i == dev_priv->num_fence_regs) {
struct drm_i915_gem_object *old_obj_priv = NULL; uint32_t seqno = dev_priv->mm.next_gem_seqno;
loff_t offset; loff_t offset;
try_again: if (avail == 0)
/* Could try to use LRU here instead... */ return -ENOMEM;
for (i = dev_priv->fence_reg_start; for (i = dev_priv->fence_reg_start;
i < dev_priv->num_fence_regs; i++) { i < dev_priv->num_fence_regs; i++) {
uint32_t this_seqno;
reg = &dev_priv->fence_regs[i]; reg = &dev_priv->fence_regs[i];
old_obj_priv = reg->obj->driver_private; old_obj_priv = reg->obj->driver_private;
if (!old_obj_priv->pin_count)
if (old_obj_priv->pin_count)
continue;
/* i915 uses fences for GPU access to tiled buffers */
if (IS_I965G(dev) || !old_obj_priv->active)
break; break;
/* find the seqno of the first available fence */
this_seqno = old_obj_priv->last_rendering_seqno;
if (this_seqno != 0 &&
reg->obj->write_domain == 0 &&
i915_seqno_passed(seqno, this_seqno))
seqno = this_seqno;
} }
/* /*
...@@ -1606,15 +1632,25 @@ i915_gem_object_get_fence_reg(struct drm_gem_object *obj, bool write) ...@@ -1606,15 +1632,25 @@ i915_gem_object_get_fence_reg(struct drm_gem_object *obj, bool write)
* objects to finish before trying again. * objects to finish before trying again.
*/ */
if (i == dev_priv->num_fence_regs) { if (i == dev_priv->num_fence_regs) {
ret = i915_gem_object_set_to_gtt_domain(reg->obj, 0); if (seqno == dev_priv->mm.next_gem_seqno) {
if (ret) { i915_gem_flush(dev,
WARN(ret != -ERESTARTSYS, I915_GEM_GPU_DOMAINS,
"switch to GTT domain failed: %d\n", ret); I915_GEM_GPU_DOMAINS);
return ret; seqno = i915_add_request(dev,
I915_GEM_GPU_DOMAINS);
if (seqno == 0)
return -ENOMEM;
} }
ret = i915_wait_request(dev, seqno);
if (ret)
return ret;
goto try_again; goto try_again;
} }
BUG_ON(old_obj_priv->active ||
(reg->obj->write_domain & I915_GEM_GPU_DOMAINS));
/* /*
* Zap this virtual mapping so we can set up a fence again * Zap this virtual mapping so we can set up a fence again
* for this object next time we need it. * for this object next time we need it.
...@@ -1655,8 +1691,17 @@ i915_gem_clear_fence_reg(struct drm_gem_object *obj) ...@@ -1655,8 +1691,17 @@ i915_gem_clear_fence_reg(struct drm_gem_object *obj)
if (IS_I965G(dev)) if (IS_I965G(dev))
I915_WRITE64(FENCE_REG_965_0 + (obj_priv->fence_reg * 8), 0); I915_WRITE64(FENCE_REG_965_0 + (obj_priv->fence_reg * 8), 0);
else else {
I915_WRITE(FENCE_REG_830_0 + (obj_priv->fence_reg * 4), 0); uint32_t fence_reg;
if (obj_priv->fence_reg < 8)
fence_reg = FENCE_REG_830_0 + obj_priv->fence_reg * 4;
else
fence_reg = FENCE_REG_945_8 + (obj_priv->fence_reg -
8) * 4;
I915_WRITE(fence_reg, 0);
}
dev_priv->fence_regs[obj_priv->fence_reg].obj = NULL; dev_priv->fence_regs[obj_priv->fence_reg].obj = NULL;
obj_priv->fence_reg = I915_FENCE_REG_NONE; obj_priv->fence_reg = I915_FENCE_REG_NONE;
...@@ -2469,6 +2514,7 @@ i915_gem_execbuffer(struct drm_device *dev, void *data, ...@@ -2469,6 +2514,7 @@ i915_gem_execbuffer(struct drm_device *dev, void *data,
struct drm_i915_gem_exec_object *exec_list = NULL; struct drm_i915_gem_exec_object *exec_list = NULL;
struct drm_gem_object **object_list = NULL; struct drm_gem_object **object_list = NULL;
struct drm_gem_object *batch_obj; struct drm_gem_object *batch_obj;
struct drm_i915_gem_object *obj_priv;
int ret, i, pinned = 0; int ret, i, pinned = 0;
uint64_t exec_offset; uint64_t exec_offset;
uint32_t seqno, flush_domains; uint32_t seqno, flush_domains;
...@@ -2533,6 +2579,15 @@ i915_gem_execbuffer(struct drm_device *dev, void *data, ...@@ -2533,6 +2579,15 @@ i915_gem_execbuffer(struct drm_device *dev, void *data,
ret = -EBADF; ret = -EBADF;
goto err; goto err;
} }
obj_priv = object_list[i]->driver_private;
if (obj_priv->in_execbuffer) {
DRM_ERROR("Object %p appears more than once in object list\n",
object_list[i]);
ret = -EBADF;
goto err;
}
obj_priv->in_execbuffer = true;
} }
/* Pin and relocate */ /* Pin and relocate */
...@@ -2674,8 +2729,13 @@ i915_gem_execbuffer(struct drm_device *dev, void *data, ...@@ -2674,8 +2729,13 @@ i915_gem_execbuffer(struct drm_device *dev, void *data,
for (i = 0; i < pinned; i++) for (i = 0; i < pinned; i++)
i915_gem_object_unpin(object_list[i]); i915_gem_object_unpin(object_list[i]);
for (i = 0; i < args->buffer_count; i++) for (i = 0; i < args->buffer_count; i++) {
if (object_list[i]) {
obj_priv = object_list[i]->driver_private;
obj_priv->in_execbuffer = false;
}
drm_gem_object_unreference(object_list[i]); drm_gem_object_unreference(object_list[i]);
}
mutex_unlock(&dev->struct_mutex); mutex_unlock(&dev->struct_mutex);
...@@ -2712,17 +2772,24 @@ i915_gem_object_pin(struct drm_gem_object *obj, uint32_t alignment) ...@@ -2712,17 +2772,24 @@ i915_gem_object_pin(struct drm_gem_object *obj, uint32_t alignment)
ret = i915_gem_object_bind_to_gtt(obj, alignment); ret = i915_gem_object_bind_to_gtt(obj, alignment);
if (ret != 0) { if (ret != 0) {
if (ret != -EBUSY && ret != -ERESTARTSYS) if (ret != -EBUSY && ret != -ERESTARTSYS)
DRM_ERROR("Failure to bind: %d", ret); DRM_ERROR("Failure to bind: %d\n", ret);
return ret;
}
}
/*
* Pre-965 chips need a fence register set up in order to
* properly handle tiled surfaces.
*/
if (!IS_I965G(dev) &&
obj_priv->fence_reg == I915_FENCE_REG_NONE &&
obj_priv->tiling_mode != I915_TILING_NONE) {
ret = i915_gem_object_get_fence_reg(obj, true);
if (ret != 0) {
if (ret != -EBUSY && ret != -ERESTARTSYS)
DRM_ERROR("Failure to install fence: %d\n",
ret);
return ret; return ret;
} }
/*
* Pre-965 chips need a fence register set up in order to
* properly handle tiled surfaces.
*/
if (!IS_I965G(dev) &&
obj_priv->fence_reg == I915_FENCE_REG_NONE &&
obj_priv->tiling_mode != I915_TILING_NONE)
i915_gem_object_get_fence_reg(obj, true);
} }
obj_priv->pin_count++; obj_priv->pin_count++;
......
...@@ -184,6 +184,7 @@ ...@@ -184,6 +184,7 @@
* Fence registers * Fence registers
*/ */
#define FENCE_REG_830_0 0x2000 #define FENCE_REG_830_0 0x2000
#define FENCE_REG_945_8 0x3000
#define I830_FENCE_START_MASK 0x07f80000 #define I830_FENCE_START_MASK 0x07f80000
#define I830_FENCE_TILING_Y_SHIFT 12 #define I830_FENCE_TILING_Y_SHIFT 12
#define I830_FENCE_SIZE_BITS(size) ((ffs((size) >> 19) - 1) << 8) #define I830_FENCE_SIZE_BITS(size) ((ffs((size) >> 19) - 1) << 8)
......
...@@ -119,11 +119,6 @@ static void i915_save_vga(struct drm_device *dev) ...@@ -119,11 +119,6 @@ static void i915_save_vga(struct drm_device *dev)
/* VGA color palette registers */ /* VGA color palette registers */
dev_priv->saveDACMASK = I915_READ8(VGA_DACMASK); dev_priv->saveDACMASK = I915_READ8(VGA_DACMASK);
/* DACCRX automatically increments during read */
I915_WRITE8(VGA_DACRX, 0);
/* Read 3 bytes of color data from each index */
for (i = 0; i < 256 * 3; i++)
dev_priv->saveDACDATA[i] = I915_READ8(VGA_DACDATA);
/* MSR bits */ /* MSR bits */
dev_priv->saveMSR = I915_READ8(VGA_MSR_READ); dev_priv->saveMSR = I915_READ8(VGA_MSR_READ);
...@@ -225,12 +220,6 @@ static void i915_restore_vga(struct drm_device *dev) ...@@ -225,12 +220,6 @@ static void i915_restore_vga(struct drm_device *dev)
/* VGA color palette registers */ /* VGA color palette registers */
I915_WRITE8(VGA_DACMASK, dev_priv->saveDACMASK); I915_WRITE8(VGA_DACMASK, dev_priv->saveDACMASK);
/* DACCRX automatically increments during read */
I915_WRITE8(VGA_DACWX, 0);
/* Read 3 bytes of color data from each index */
for (i = 0; i < 256 * 3; i++)
I915_WRITE8(VGA_DACDATA, dev_priv->saveDACDATA[i]);
} }
int i915_save_state(struct drm_device *dev) int i915_save_state(struct drm_device *dev)
......
...@@ -1853,13 +1853,14 @@ static void aty128_bl_exit(struct backlight_device *bd) ...@@ -1853,13 +1853,14 @@ static void aty128_bl_exit(struct backlight_device *bd)
* Initialisation * Initialisation
*/ */
#ifdef CONFIG_PPC_PMAC #ifdef CONFIG_PPC_PMAC__disabled
static void aty128_early_resume(void *data) static void aty128_early_resume(void *data)
{ {
struct aty128fb_par *par = data; struct aty128fb_par *par = data;
if (try_acquire_console_sem()) if (try_acquire_console_sem())
return; return;
pci_restore_state(par->pdev);
aty128_do_resume(par->pdev); aty128_do_resume(par->pdev);
release_console_sem(); release_console_sem();
} }
...@@ -1907,7 +1908,14 @@ static int __devinit aty128_init(struct pci_dev *pdev, const struct pci_device_i ...@@ -1907,7 +1908,14 @@ static int __devinit aty128_init(struct pci_dev *pdev, const struct pci_device_i
/* Indicate sleep capability */ /* Indicate sleep capability */
if (par->chip_gen == rage_M3) { if (par->chip_gen == rage_M3) {
pmac_call_feature(PMAC_FTR_DEVICE_CAN_WAKE, NULL, 0, 1); pmac_call_feature(PMAC_FTR_DEVICE_CAN_WAKE, NULL, 0, 1);
#if 0 /* Disable the early video resume hack for now as it's causing problems, among
* others we now rely on the PCI core restoring the config space for us, which
* isn't the case with that hack, and that code path causes various things to
* be called with interrupts off while they shouldn't. I'm leaving the code in
* as it can be useful for debugging purposes
*/
pmac_set_early_video_resume(aty128_early_resume, par); pmac_set_early_video_resume(aty128_early_resume, par);
#endif
} }
/* Find default mode */ /* Find default mode */
......
...@@ -2762,12 +2762,13 @@ int radeonfb_pci_resume(struct pci_dev *pdev) ...@@ -2762,12 +2762,13 @@ int radeonfb_pci_resume(struct pci_dev *pdev)
return rc; return rc;
} }
#ifdef CONFIG_PPC_OF #ifdef CONFIG_PPC_OF__disabled
static void radeonfb_early_resume(void *data) static void radeonfb_early_resume(void *data)
{ {
struct radeonfb_info *rinfo = data; struct radeonfb_info *rinfo = data;
rinfo->no_schedule = 1; rinfo->no_schedule = 1;
pci_restore_state(rinfo->pdev);
radeonfb_pci_resume(rinfo->pdev); radeonfb_pci_resume(rinfo->pdev);
rinfo->no_schedule = 0; rinfo->no_schedule = 0;
} }
...@@ -2834,7 +2835,14 @@ void radeonfb_pm_init(struct radeonfb_info *rinfo, int dynclk, int ignore_devlis ...@@ -2834,7 +2835,14 @@ void radeonfb_pm_init(struct radeonfb_info *rinfo, int dynclk, int ignore_devlis
*/ */
if (rinfo->pm_mode != radeon_pm_none) { if (rinfo->pm_mode != radeon_pm_none) {
pmac_call_feature(PMAC_FTR_DEVICE_CAN_WAKE, rinfo->of_node, 0, 1); pmac_call_feature(PMAC_FTR_DEVICE_CAN_WAKE, rinfo->of_node, 0, 1);
#if 0 /* Disable the early video resume hack for now as it's causing problems, among
* others we now rely on the PCI core restoring the config space for us, which
* isn't the case with that hack, and that code path causes various things to
* be called with interrupts off while they shouldn't. I'm leaving the code in
* as it can be useful for debugging purposes
*/
pmac_set_early_video_resume(radeonfb_early_resume, rinfo); pmac_set_early_video_resume(radeonfb_early_resume, rinfo);
#endif
} }
#if 0 #if 0
......
...@@ -202,9 +202,9 @@ static sector_t _fat_bmap(struct address_space *mapping, sector_t block) ...@@ -202,9 +202,9 @@ static sector_t _fat_bmap(struct address_space *mapping, sector_t block)
sector_t blocknr; sector_t blocknr;
/* fat_get_cluster() assumes the requested blocknr isn't truncated. */ /* fat_get_cluster() assumes the requested blocknr isn't truncated. */
mutex_lock(&mapping->host->i_mutex); down_read(&mapping->host->i_alloc_sem);
blocknr = generic_block_bmap(mapping, block, fat_get_block); blocknr = generic_block_bmap(mapping, block, fat_get_block);
mutex_unlock(&mapping->host->i_mutex); up_read(&mapping->host->i_alloc_sem);
return blocknr; return blocknr;
} }
......
...@@ -80,7 +80,7 @@ static const struct file_operations proc_kpagecount_operations = { ...@@ -80,7 +80,7 @@ static const struct file_operations proc_kpagecount_operations = {
#define KPF_RECLAIM 9 #define KPF_RECLAIM 9
#define KPF_BUDDY 10 #define KPF_BUDDY 10
#define kpf_copy_bit(flags, srcpos, dstpos) (((flags >> srcpos) & 1) << dstpos) #define kpf_copy_bit(flags, dstpos, srcpos) (((flags >> srcpos) & 1) << dstpos)
static ssize_t kpageflags_read(struct file *file, char __user *buf, static ssize_t kpageflags_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
......
...@@ -69,8 +69,8 @@ struct detailed_pixel_timing { ...@@ -69,8 +69,8 @@ struct detailed_pixel_timing {
u8 hborder; u8 hborder;
u8 vborder; u8 vborder;
u8 unknown0:1; u8 unknown0:1;
u8 vsync_positive:1;
u8 hsync_positive:1; u8 hsync_positive:1;
u8 vsync_positive:1;
u8 separate_sync:2; u8 separate_sync:2;
u8 stereo:1; u8 stereo:1;
u8 unknown6:1; u8 unknown6:1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment