From 50eca3eb89d73d9f0aa070b126c7ee6a616016ab Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Fri, 30 Sep 2005 19:03:00 -0400 Subject: [ACPI] ACPICA 20050930 Completed a major overhaul of the Resource Manager code - specifically, optimizations in the area of the AML/internal resource conversion code. The code has been optimized to simplify and eliminate duplicated code, CPU stack use has been decreased by optimizing function parameters and local variables, and naming conventions across the manager have been standardized for clarity and ease of maintenance (this includes function, parameter, variable, and struct/typedef names.) All Resource Manager dispatch and information tables have been moved to a single location for clarity and ease of maintenance. One new file was created, named "rsinfo.c". The ACPI return macros (return_ACPI_STATUS, etc.) have been modified to guarantee that the argument is not evaluated twice, making them less prone to macro side-effects. However, since there exists the possibility of additional stack use if a particular compiler cannot optimize them (such as in the debug generation case), the original macros are optionally available. Note that some invocations of the return_VALUE macro may now cause size mismatch warnings; the return_UINT8 and return_UINT32 macros are provided to eliminate these. (From Randy Dunlap) Implemented a new mechanism to enable debug tracing for individual control methods. A new external interface, acpi_debug_trace(), is provided to enable this mechanism. The intent is to allow the host OS to easily enable and disable tracing for problematic control methods. This interface can be easily exposed to a user or debugger interface if desired. See the file psxface.c for details. acpi_ut_callocate() will now return a valid pointer if a length of zero is specified - a length of one is used and a warning is issued. This matches the behavior of acpi_ut_allocate(). Signed-off-by: Bob Moore Signed-off-by: Len Brown --- include/linux/acpi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 026c3c011dc0..84d3d9f034ce 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -435,7 +435,7 @@ extern int sbf_port ; #endif /* !CONFIG_ACPI */ -int acpi_register_gsi (u32 gsi, int edge_level, int active_high_low); +int acpi_register_gsi (u32 gsi, int triggering, int polarity); int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); /* -- cgit v1.2.2 From 729b4d4ce1982c52040bbf22d6711cdf8db07ad8 Mon Sep 17 00:00:00 2001 From: Alexey Starikovskiy Date: Thu, 1 Dec 2005 04:29:00 -0500 Subject: [ACPI] fix reboot upon suspend-to-disk http://bugzilla.kernel.org/show_bug.cgi?id=4320 Signed-off-by: Alexey Starikovskiy Acked-by: Pavel Machek Signed-off-by: Len Brown --- include/linux/kernel.h | 1 + include/linux/reboot.h | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'include/linux') diff --git a/include/linux/kernel.h b/include/linux/kernel.h index b1e407a4fbda..73aa55a73334 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -181,6 +181,7 @@ extern enum system_states { SYSTEM_HALT, SYSTEM_POWER_OFF, SYSTEM_RESTART, + SYSTEM_SUSPEND_DISK, } system_state; #define TAINT_PROPRIETARY_MODULE (1<<0) diff --git a/include/linux/reboot.h b/include/linux/reboot.h index 7ab2cdb83ef0..015297ff73fa 100644 --- a/include/linux/reboot.h +++ b/include/linux/reboot.h @@ -60,8 +60,7 @@ extern void machine_crash_shutdown(struct pt_regs *); */ extern void kernel_restart_prepare(char *cmd); -extern void kernel_halt_prepare(void); -extern void kernel_power_off_prepare(void); +extern void kernel_shutdown_prepare(enum system_states state); extern void kernel_restart(char *cmd); extern void kernel_halt(void); -- cgit v1.2.2 From 168678233ca45af3f74fef60c4265fa5dd217e29 Mon Sep 17 00:00:00 2001 From: "akpm@osdl.org" Date: Fri, 13 Jan 2006 15:51:02 -0800 Subject: [AGPGART] Semaphore to Mutex conversion. Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Signed-off-by: Arjan van de Ven Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Dave Jones --- include/linux/agpgart.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/agpgart.h b/include/linux/agpgart.h index 17a17c55a17f..6d59c8efe3be 100644 --- a/include/linux/agpgart.h +++ b/include/linux/agpgart.h @@ -111,6 +111,7 @@ typedef struct _agp_unbind { } agp_unbind; #else /* __KERNEL__ */ +#include #define AGPGART_MINOR 175 @@ -201,7 +202,7 @@ struct agp_file_private { }; struct agp_front_data { - struct semaphore agp_mutex; + struct mutex agp_mutex; struct agp_controller *current_controller; struct agp_controller *controllers; struct agp_file_private *file_priv_list; -- cgit v1.2.2 From 83933af4720b282f6f6a0b6c05a2a47b4cf08819 Mon Sep 17 00:00:00 2001 From: Arjan van de Ven Date: Sat, 14 Jan 2006 16:01:49 +0100 Subject: [CPUFREQ] convert remaining cpufreq semaphore to a mutex This one fell through the automation at first because it initializes the semaphore to locked, but that's easily remedied Signed-off-by: Arjan van de Ven Signed-off-by: Dave Jones drivers/cpufreq/cpufreq.c | 37 +++++++++++++++++++------------------ include/linux/cpufreq.h | 3 ++- 2 files changed, 21 insertions(+), 19 deletions(-) --- include/linux/cpufreq.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index c31650df9241..17866d7e2b71 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -14,6 +14,7 @@ #ifndef _LINUX_CPUFREQ_H #define _LINUX_CPUFREQ_H +#include #include #include #include @@ -82,7 +83,7 @@ struct cpufreq_policy { unsigned int policy; /* see above */ struct cpufreq_governor *governor; /* see below */ - struct semaphore lock; /* CPU ->setpolicy or ->target may + struct mutex lock; /* CPU ->setpolicy or ->target may only be called once a time */ struct work_struct update; /* if update_policy() needs to be -- cgit v1.2.2 From 3b0e8eadc511eaceba6d6b8d0743359a34ee23c6 Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Thu, 19 Jan 2006 14:08:40 +0000 Subject: [AGPGART] 945GM support for agpgart Here's a very small diff for 945GM support for agpgart. Patch against 2.6.15. From: Alan Hourihane Signed-off-by: Dave Jones --- include/linux/pci_ids.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/linux') diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 5403257ae3e7..2726140a6732 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -2084,6 +2084,8 @@ #define PCI_DEVICE_ID_INTEL_82915GM_IG 0x2592 #define PCI_DEVICE_ID_INTEL_82945G_HB 0x2770 #define PCI_DEVICE_ID_INTEL_82945G_IG 0x2772 +#define PCI_DEVICE_ID_INTEL_82945GM_HB 0x27A0 +#define PCI_DEVICE_ID_INTEL_82945GM_IG 0x27A2 #define PCI_DEVICE_ID_INTEL_ICH6_0 0x2640 #define PCI_DEVICE_ID_INTEL_ICH6_1 0x2641 #define PCI_DEVICE_ID_INTEL_ICH6_2 0x2642 -- cgit v1.2.2 From 4f2d7680cb1ac5c5a70f3ba2447d5aa5c0a1643a Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Thu, 19 Jan 2006 16:58:37 -0800 Subject: [NETFILTER] x_tables: Make XT_ALIGN align as strictly as necessary. Or else we break on ppc32 and other 32-bit platforms. Based upon a patch from Harald Welte. Signed-off-by: David S. Miller --- include/linux/netfilter/x_tables.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index 472f04834809..59ff6c430cf6 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h @@ -19,7 +19,7 @@ struct xt_get_revision /* For standard target */ #define XT_RETURN (-NF_REPEAT - 1) -#define XT_ALIGN(s) (((s) + (__alignof__(void *)-1)) & ~(__alignof__(void *)-1)) +#define XT_ALIGN(s) (((s) + (__alignof__(u_int64_t)-1)) & ~(__alignof__(u_int64_t)-1)) /* Standard return verdict, or do jump. */ #define XT_STANDARD_TARGET "" -- cgit v1.2.2 From 6fbfc9688448aac064edbaccb5d30ecd565a9105 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Fri, 20 Jan 2006 11:57:07 -0800 Subject: [NETFILTER]: Unbreak x-tables on x86. x86 defines __alignof__(long long) as 8 yet it gives 4 for a struct containing a long long, ho hum... so my simplified form doesn't work everywhere. So use Harald Welte's original patch, which should work on all platforms. Signed-off-by: David S. Miller --- include/linux/netfilter/x_tables.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index 59ff6c430cf6..6500d4e59d46 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h @@ -19,7 +19,21 @@ struct xt_get_revision /* For standard target */ #define XT_RETURN (-NF_REPEAT - 1) -#define XT_ALIGN(s) (((s) + (__alignof__(u_int64_t)-1)) & ~(__alignof__(u_int64_t)-1)) +/* this is a dummy structure to find out the alignment requirement for a struct + * containing all the fundamental data types that are used in ipt_entry, + * ip6t_entry and arpt_entry. This sucks, and it is a hack. It will be my + * personal pleasure to remove it -HW + */ +struct _xt_align +{ + u_int8_t u8; + u_int16_t u16; + u_int32_t u32; + u_int64_t u64; +}; + +#define XT_ALIGN(s) (((s) + (__alignof__(struct _xt_align)-1)) \ + & ~(__alignof__(struct _xt_align)-1)) /* Standard return verdict, or do jump. */ #define XT_STANDARD_TARGET "" -- cgit v1.2.2 From ca740803856f23dbc5b1872039291231bc131ecb Mon Sep 17 00:00:00 2001 From: Russell King Date: Sat, 21 Jan 2006 20:06:14 +0000 Subject: [SERIAL] Remove UPF_AUTOPROBE and UPF_BOOT_ONLYMCA The functionality UPF_BOOT_ONLYMCA provided has been replaced by the 8250_mca module, which only registers MCA ports if MCA is present. UPF_AUTOPROBE has no functional effect - in fact, it's never tested. Only ibmasm set the flag. Signed-off-by: Russell King --- include/linux/serial_core.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include/linux') diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index ec351005bf9d..f3af47713a4e 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -245,9 +245,7 @@ struct uart_port { #define UPF_HARDPPS_CD (1 << 11) #define UPF_LOW_LATENCY (1 << 13) #define UPF_BUGGY_UART (1 << 14) -#define UPF_AUTOPROBE (1 << 15) #define UPF_MAGIC_MULTIPLIER (1 << 16) -#define UPF_BOOT_ONLYMCA (1 << 22) #define UPF_CONS_FLOW (1 << 23) #define UPF_SHARE_IRQ (1 << 24) #define UPF_BOOT_AUTOCONF (1 << 28) -- cgit v1.2.2 From ba899dbc036d24ab6b45faf64e3648a268721cc9 Mon Sep 17 00:00:00 2001 From: Russell King Date: Sat, 21 Jan 2006 22:45:50 +0000 Subject: [SERIAL] Make port->ops constant No one should write to the port->ops structure, so make it constant. Signed-off-by: Russell King --- include/linux/serial_core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index f3af47713a4e..b74ff34469b9 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -257,7 +257,7 @@ struct uart_port { unsigned int mctrl; /* current modem ctrl settings */ unsigned int timeout; /* character-based timeout */ unsigned int type; /* port type */ - struct uart_ops *ops; + const struct uart_ops *ops; unsigned int custom_divisor; unsigned int line; /* port index */ unsigned long mapbase; /* for ioremap */ -- cgit v1.2.2 From 747c8a55946ed037bf7d62454c3c599c02af2262 Mon Sep 17 00:00:00 2001 From: Russell King Date: Sat, 21 Jan 2006 22:50:36 +0000 Subject: [SERIAL] Make uart_info flags a bitwise type The potential for confusing the flags is fairly high. Make uart_info's flags a bitwise type so sparse can check that the right flag definitions are used with the right structure. Signed-off-by: Russell King --- include/linux/serial_core.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'include/linux') diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index b74ff34469b9..90f681789a64 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -287,6 +287,9 @@ struct uart_state { }; #define UART_XMIT_SIZE PAGE_SIZE + +typedef unsigned int __bitwise__ uif_t; + /* * This is the state information which is only valid when the port * is open; it may be freed by the core driver once the device has @@ -296,17 +299,16 @@ struct uart_state { struct uart_info { struct tty_struct *tty; struct circ_buf xmit; - unsigned int flags; + uif_t flags; /* - * These are the flags that specific to info->flags, and reflect our - * internal state. They can not be accessed via port->flags. Low - * level drivers must not change these, but may query them instead. + * Definitions for info->flags. These are _private_ to serial_core, and + * are specific to this structure. They may be queried by low level drivers. */ -#define UIF_CHECK_CD (1 << 25) -#define UIF_CTS_FLOW (1 << 26) -#define UIF_NORMAL_ACTIVE (1 << 29) -#define UIF_INITIALIZED (1 << 31) +#define UIF_CHECK_CD ((__force uif_t) (1 << 25)) +#define UIF_CTS_FLOW ((__force uif_t) (1 << 26)) +#define UIF_NORMAL_ACTIVE ((__force uif_t) (1 << 29)) +#define UIF_INITIALIZED ((__force uif_t) (1 << 31)) int blocked_open; -- cgit v1.2.2 From 27ae7a7435634820e7f7e2b922d8119f79cfc6e4 Mon Sep 17 00:00:00 2001 From: Russell King Date: Sat, 21 Jan 2006 22:54:06 +0000 Subject: [SERIAL] Fix UPF_ flag usage with uart_info->flags The previous change found a bug in the serial SAK handling - because we were looking for UPF_SAK set in uart_info->flags, we would never raise a SAK condition. UPF_SAK is in uart_port->flags. Signed-off-by: Russell King --- include/linux/serial_core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 90f681789a64..1a8cd0169c9a 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -430,7 +430,7 @@ static inline int uart_handle_break(struct uart_port *port) port->sysrq = 0; } #endif - if (info->flags & UPF_SAK) + if (port->flags & UPF_SAK) do_SAK(info->tty); return 0; } -- cgit v1.2.2 From 0077d45e46fe2af3aaee5813c99268afcd0e7c0e Mon Sep 17 00:00:00 2001 From: Russell King Date: Sat, 21 Jan 2006 23:03:28 +0000 Subject: [SERIAL] Make uart_port flags a bitwise type Same reasoning as commit 747c8a55946ed037bf7d62454c3c599c02af2262 but this time we're making uart_port flags a bitwise type - not all of these flags correspond with the old ASYNC_ flags, so there is the possibility for bugs if the wrong ASYNC_* constants are used. Always use UPF_* constants for uart_port->flags. Signed-off-by: Russell King --- include/linux/serial_8250.h | 2 +- include/linux/serial_core.h | 48 +++++++++++++++++++++++---------------------- 2 files changed, 26 insertions(+), 24 deletions(-) (limited to 'include/linux') diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h index cee302aefdb7..73b464f0926a 100644 --- a/include/linux/serial_8250.h +++ b/include/linux/serial_8250.h @@ -26,7 +26,7 @@ struct plat_serial8250_port { unsigned char regshift; /* register shift */ unsigned char iotype; /* UPIO_* */ unsigned char hub6; - unsigned int flags; /* UPF_* flags */ + upf_t flags; /* UPF_* flags */ }; /* diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 1a8cd0169c9a..4041122dabfc 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -203,6 +203,8 @@ struct uart_icount { __u32 buf_overrun; }; +typedef unsigned int __bitwise__ upf_t; + struct uart_port { spinlock_t lock; /* port lock */ unsigned int iobase; /* in/out[bwl] */ @@ -230,29 +232,29 @@ struct uart_port { unsigned long sysrq; /* sysrq timeout */ #endif - unsigned int flags; - -#define UPF_FOURPORT (1 << 1) -#define UPF_SAK (1 << 2) -#define UPF_SPD_MASK (0x1030) -#define UPF_SPD_HI (0x0010) -#define UPF_SPD_VHI (0x0020) -#define UPF_SPD_CUST (0x0030) -#define UPF_SPD_SHI (0x1000) -#define UPF_SPD_WARP (0x1010) -#define UPF_SKIP_TEST (1 << 6) -#define UPF_AUTO_IRQ (1 << 7) -#define UPF_HARDPPS_CD (1 << 11) -#define UPF_LOW_LATENCY (1 << 13) -#define UPF_BUGGY_UART (1 << 14) -#define UPF_MAGIC_MULTIPLIER (1 << 16) -#define UPF_CONS_FLOW (1 << 23) -#define UPF_SHARE_IRQ (1 << 24) -#define UPF_BOOT_AUTOCONF (1 << 28) -#define UPF_IOREMAP (1 << 31) - -#define UPF_CHANGE_MASK (0x17fff) -#define UPF_USR_MASK (UPF_SPD_MASK|UPF_LOW_LATENCY) + upf_t flags; + +#define UPF_FOURPORT ((__force upf_t) (1 << 1)) +#define UPF_SAK ((__force upf_t) (1 << 2)) +#define UPF_SPD_MASK ((__force upf_t) (0x1030)) +#define UPF_SPD_HI ((__force upf_t) (0x0010)) +#define UPF_SPD_VHI ((__force upf_t) (0x0020)) +#define UPF_SPD_CUST ((__force upf_t) (0x0030)) +#define UPF_SPD_SHI ((__force upf_t) (0x1000)) +#define UPF_SPD_WARP ((__force upf_t) (0x1010)) +#define UPF_SKIP_TEST ((__force upf_t) (1 << 6)) +#define UPF_AUTO_IRQ ((__force upf_t) (1 << 7)) +#define UPF_HARDPPS_CD ((__force upf_t) (1 << 11)) +#define UPF_LOW_LATENCY ((__force upf_t) (1 << 13)) +#define UPF_BUGGY_UART ((__force upf_t) (1 << 14)) +#define UPF_MAGIC_MULTIPLIER ((__force upf_t) (1 << 16)) +#define UPF_CONS_FLOW ((__force upf_t) (1 << 23)) +#define UPF_SHARE_IRQ ((__force upf_t) (1 << 24)) +#define UPF_BOOT_AUTOCONF ((__force upf_t) (1 << 28)) +#define UPF_IOREMAP ((__force upf_t) (1 << 31)) + +#define UPF_CHANGE_MASK ((__force upf_t) (0x17fff)) +#define UPF_USR_MASK ((__force upf_t) (UPF_SPD_MASK|UPF_LOW_LATENCY)) unsigned int mctrl; /* current modem ctrl settings */ unsigned int timeout; /* character-based timeout */ -- cgit v1.2.2 From 2cb2e147a6d20bffd1d6b7a79be7301560f751c3 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 17 Jan 2006 09:04:32 +0100 Subject: [BLOCK] ll_rw_blk: make max_sectors and max_hw_sectors unsigned ints IDE lba48 can support full 64k request size, which overflows the max_hw_sectors variable. Signed-off-by: Jens Axboe --- include/linux/blkdev.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/linux') diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 02a585faa62c..860e7a485a5f 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -392,8 +392,8 @@ struct request_queue unsigned int nr_congestion_off; unsigned int nr_batching; - unsigned short max_sectors; - unsigned short max_hw_sectors; + unsigned int max_sectors; + unsigned int max_hw_sectors; unsigned short max_phys_segments; unsigned short max_hw_segments; unsigned short hardsect_size; @@ -697,7 +697,7 @@ extern request_queue_t *blk_init_queue(request_fn_proc *, spinlock_t *); extern void blk_cleanup_queue(request_queue_t *); extern void blk_queue_make_request(request_queue_t *, make_request_fn *); extern void blk_queue_bounce_limit(request_queue_t *, u64); -extern void blk_queue_max_sectors(request_queue_t *, unsigned short); +extern void blk_queue_max_sectors(request_queue_t *, unsigned int); extern void blk_queue_max_phys_segments(request_queue_t *, unsigned short); extern void blk_queue_max_hw_segments(request_queue_t *, unsigned short); extern void blk_queue_max_segment_size(request_queue_t *, unsigned int); -- cgit v1.2.2 From 7ce08c93e388922e25a96a7d9895784182e4c72c Mon Sep 17 00:00:00 2001 From: Luca Risolia Date: Wed, 11 Jan 2006 02:06:59 +0000 Subject: [PATCH] USB: Add ET61X[12]51 Video4Linux2 driver This patch adds a Video4Linux2 driver giving support to ET61X151 and ET61X251 PC Camera Controllers made by Etoms Electronics. Signed-off-by: Luca Risolia Signed-off-by: Greg Kroah-Hartman --- include/linux/videodev2.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/linux') diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index ce40675324bd..6f6c69777648 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h @@ -315,6 +315,7 @@ struct v4l2_pix_format #define V4L2_PIX_FMT_SN9C10X v4l2_fourcc('S','9','1','0') /* SN9C10x compression */ #define V4L2_PIX_FMT_PWC1 v4l2_fourcc('P','W','C','1') /* pwc older webcam */ #define V4L2_PIX_FMT_PWC2 v4l2_fourcc('P','W','C','2') /* pwc newer webcam */ +#define V4L2_PIX_FMT_ET61X251 v4l2_fourcc('E','6','2','5') /* ET61X251 compression */ /* * F O R M A T E N U M E R A T I O N -- cgit v1.2.2 From c02c4bb2058587d3c012ec08268fd93fdc654ae7 Mon Sep 17 00:00:00 2001 From: David Brownell Date: Fri, 20 Jan 2006 14:44:12 -0800 Subject: [PATCH] USB: USB authentication states Another hook needed for wireless USB: there are states associated with the device authentication protocol. Wireless devices must authenticate using the host system's keystore. Note that wired connections could also use this authentication protocol, if for no other reason than to support the most secure "simple" key exchange protocols for wireless devices. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman --- include/linux/usb_ch9.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include/linux') diff --git a/include/linux/usb_ch9.h b/include/linux/usb_ch9.h index ee21e6bf3867..a2aacfc7af2f 100644 --- a/include/linux/usb_ch9.h +++ b/include/linux/usb_ch9.h @@ -535,9 +535,11 @@ enum usb_device_state { */ USB_STATE_NOTATTACHED = 0, - /* the chapter 9 device states */ + /* chapter 9 and authentication (wireless) device states */ USB_STATE_ATTACHED, - USB_STATE_POWERED, + USB_STATE_POWERED, /* wired */ + USB_STATE_UNAUTHENTICATED, /* auth */ + USB_STATE_RECONNECTING, /* auth */ USB_STATE_DEFAULT, /* limited function */ USB_STATE_ADDRESS, USB_STATE_CONFIGURED, /* most functions */ -- cgit v1.2.2 From b6ebb2659065b6e03605e7f0c69449bda382261a Mon Sep 17 00:00:00 2001 From: Jason Gaston Date: Mon, 9 Jan 2006 10:53:45 -0800 Subject: [PATCH] PCI: irq and pci_ids: patch for Intel ICH8 This patch adds the Intel ICH8 DID's to the irq.c and pci_ids.h files. Signed-off-by: Jason Gaston Signed-off-by: Greg Kroah-Hartman --- include/linux/pci_ids.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/linux') diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 4401a7e06057..9eb1983b8787 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -2106,6 +2106,13 @@ #define PCI_DEVICE_ID_INTEL_ICH7_19 0x27dd #define PCI_DEVICE_ID_INTEL_ICH7_20 0x27de #define PCI_DEVICE_ID_INTEL_ICH7_21 0x27df +#define PCI_DEVICE_ID_INTEL_ICH8_0 0x2810 +#define PCI_DEVICE_ID_INTEL_ICH8_1 0x2811 +#define PCI_DEVICE_ID_INTEL_ICH8_2 0x2812 +#define PCI_DEVICE_ID_INTEL_ICH8_3 0x2814 +#define PCI_DEVICE_ID_INTEL_ICH8_4 0x2815 +#define PCI_DEVICE_ID_INTEL_ICH8_5 0x283e +#define PCI_DEVICE_ID_INTEL_ICH8_6 0x2850 #define PCI_DEVICE_ID_INTEL_82855PM_HB 0x3340 #define PCI_DEVICE_ID_INTEL_82830_HB 0x3575 #define PCI_DEVICE_ID_INTEL_82830_CGC 0x3577 -- cgit v1.2.2 From f8d65713332cf6306889a3036142a17e01e3447e Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Fri, 6 Jan 2006 03:25:37 +0100 Subject: [PATCH] PCI: drivers/pci/pci.c: #if 0 pci_find_ext_capability() This patch #if 0's the unused global function pci_find_ext_capability(). Signed-off-by: Adrian Bunk Signed-off-by: Greg Kroah-Hartman --- include/linux/pci.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include/linux') diff --git a/include/linux/pci.h b/include/linux/pci.h index 0a44072383ec..fe1a2b02fc55 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -406,7 +406,6 @@ struct pci_dev *pci_find_device_reverse (unsigned int vendor, unsigned int devic struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn); int pci_find_capability (struct pci_dev *dev, int cap); int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); -int pci_find_ext_capability (struct pci_dev *dev, int cap); struct pci_bus * pci_find_next_bus(const struct pci_bus *from); struct pci_dev *pci_get_device (unsigned int vendor, unsigned int device, struct pci_dev *from); @@ -626,7 +625,6 @@ static inline int pci_register_driver(struct pci_driver *drv) { return 0;} static inline void pci_unregister_driver(struct pci_driver *drv) { } static inline int pci_find_capability (struct pci_dev *dev, int cap) {return 0; } static inline int pci_find_next_capability (struct pci_dev *dev, u8 post, int cap) { return 0; } -static inline int pci_find_ext_capability (struct pci_dev *dev, int cap) {return 0; } static inline const struct pci_device_id *pci_match_device(const struct pci_device_id *ids, const struct pci_dev *dev) { return NULL; } /* Power management related routines */ -- cgit v1.2.2 From 8cea8e9303d45556cb606cc8d9e41f889ff600c0 Mon Sep 17 00:00:00 2001 From: Mark Rustad Date: Thu, 5 Jan 2006 22:47:29 -0800 Subject: [PATCH] PCI: restore 2 missing pci ids Somewhere between 2.6.14 and 2.6.15-rc3, some PCI ids were apparently removed. The ecc.c module, which is not a part of the kernel.org tree, but included in some distributions, fails to compile. Signed-off-by: Mark Rustad Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- include/linux/pci_ids.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/linux') diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 9eb1983b8787..7868a8ed1906 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -2065,6 +2065,7 @@ #define PCI_DEVICE_ID_INTEL_82801EB_5 0x24d5 #define PCI_DEVICE_ID_INTEL_82801EB_6 0x24d6 #define PCI_DEVICE_ID_INTEL_82801EB_11 0x24db +#define PCI_DEVICE_ID_INTEL_82801EB_13 0x24dd #define PCI_DEVICE_ID_INTEL_ESB_1 0x25a1 #define PCI_DEVICE_ID_INTEL_ESB_2 0x25a2 #define PCI_DEVICE_ID_INTEL_ESB_4 0x25a4 @@ -2156,6 +2157,7 @@ #define PCI_DEVICE_ID_INTEL_82443GX_2 0x71a2 #define PCI_DEVICE_ID_INTEL_82372FB_1 0x7601 #define PCI_DEVICE_ID_INTEL_82454GX 0x84c4 +#define PCI_DEVICE_ID_INTEL_82450GX 0x84c5 #define PCI_DEVICE_ID_INTEL_82451NX 0x84ca #define PCI_DEVICE_ID_INTEL_82454NX 0x84cb #define PCI_DEVICE_ID_INTEL_84460GX 0x84ea -- cgit v1.2.2 From 2181c971952ec2af56cd9cc68453f7ad5a0a38d6 Mon Sep 17 00:00:00 2001 From: Grant Coady Date: Sun, 15 Jan 2006 16:21:27 +1100 Subject: [PATCH] PCI: pci_ids: remove duplicates gathered during merge period pci_ids.h: remove duplicates. Compile tested allmodconfig. Signed-off-by: Grant Coady Signed-off-by: Greg Kroah-Hartman --- include/linux/pci_ids.h | 7 ------- 1 file changed, 7 deletions(-) (limited to 'include/linux') diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 7868a8ed1906..b0b908f583c5 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -394,14 +394,9 @@ #define PCI_DEVICE_ID_NS_SC1100_SMI 0x0511 #define PCI_DEVICE_ID_NS_SC1100_XBUS 0x0515 #define PCI_DEVICE_ID_NS_87410 0xd001 -#define PCI_DEVICE_ID_NS_CS5535_IDE 0x002d #define PCI_DEVICE_ID_NS_CS5535_HOST_BRIDGE 0x0028 #define PCI_DEVICE_ID_NS_CS5535_ISA_BRIDGE 0x002b -#define PCI_DEVICE_ID_NS_CS5535_IDE 0x002d -#define PCI_DEVICE_ID_NS_CS5535_AUDIO 0x002e -#define PCI_DEVICE_ID_NS_CS5535_USB 0x002f -#define PCI_DEVICE_ID_NS_CS5535_VIDEO 0x0030 #define PCI_VENDOR_ID_TSENG 0x100c #define PCI_DEVICE_ID_TSENG_W32P_2 0x3202 @@ -511,8 +506,6 @@ #define PCI_DEVICE_ID_AMD_CS5536_UOC 0x2097 #define PCI_DEVICE_ID_AMD_CS5536_IDE 0x209A -#define PCI_DEVICE_ID_AMD_CS5536_IDE 0x209A - #define PCI_DEVICE_ID_AMD_LX_VIDEO 0x2081 #define PCI_DEVICE_ID_AMD_LX_AES 0x2082 -- cgit v1.2.2 From bd3f8f2b12bcf4ea25c89b84adeaafad232662c8 Mon Sep 17 00:00:00 2001 From: Chris Wright Date: Tue, 31 Jan 2006 19:10:23 -0800 Subject: [PATCH] Make sure to always check upper bits of tv_nsec in timespec_valid. Signed-off-by: Chris Wright Signed-off-by: Linus Torvalds --- include/linux/time.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/time.h b/include/linux/time.h index 614dd8465839..7b4dc36532bb 100644 --- a/include/linux/time.h +++ b/include/linux/time.h @@ -48,7 +48,7 @@ extern void set_normalized_timespec(struct timespec *ts, time_t sec, long nsec); * Returns true if the timespec is norm, false if denorm: */ #define timespec_valid(ts) \ - (((ts)->tv_sec >= 0) && (((unsigned) (ts)->tv_nsec) < NSEC_PER_SEC)) + (((ts)->tv_sec >= 0) && (((unsigned long) (ts)->tv_nsec) < NSEC_PER_SEC)) /* * 64-bit nanosec type. Large enough to span 292+ years in nanosecond -- cgit v1.2.2 From 3a2ca64496cc1c9aeab1076e06d092b3ec74a43d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 1 Feb 2006 03:04:33 -0800 Subject: [PATCH] prototypes for *at functions & typo fix Here's the follow-up patch which introduces the prototypes for the new syscalls. There was also a typo in one of the new symbols. Signed-off-by: Ulrich Drepper Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/syscalls.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'include/linux') diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index e666d6070569..fdbd436b24cc 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -50,6 +50,8 @@ struct timezone; struct tms; struct utimbuf; struct mq_attr; +struct compat_stat; +struct compat_timeval; #include #include @@ -534,4 +536,35 @@ asmlinkage long sys_spu_run(int fd, __u32 __user *unpc, asmlinkage long sys_spu_create(const char __user *name, unsigned int flags, mode_t mode); +asmlinkage long sys_mknodat(int dfd, const char __user * filename, int mode, + unsigned dev); +asmlinkage long sys_mkdirat(int dfd, const char __user * pathname, int mode); +asmlinkage long sys_unlinkat(int dfd, const char __user * pathname, int flag); +asmlinkage long sys_symlinkat(const char __user * oldname, + int newdfd, const char __user * newname); +asmlinkage long sys_linkat(int olddfd, const char __user *oldname, + int newdfd, const char __user *newname); +asmlinkage long sys_renameat(int olddfd, const char __user * oldname, + int newdfd, const char __user * newname); +asmlinkage long sys_futimesat(int dfd, char __user *filename, + struct timeval __user *utimes); +asmlinkage long sys_faccessat(int dfd, const char __user *filename, int mode); +asmlinkage long sys_fchmodat(int dfd, const char __user * filename, + mode_t mode); +asmlinkage long sys_fchownat(int dfd, const char __user *filename, uid_t user, + gid_t group, int flag); +asmlinkage long sys_openat(int dfd, const char __user *filename, int flags, + int mode); +asmlinkage long sys_newfstatat(int dfd, char __user *filename, + struct stat __user *statbuf, int flag); +asmlinkage long sys_readlinkat(int dfd, const char __user *path, char __user *buf, + int bufsiz); +asmlinkage long compat_sys_futimesat(int dfd, char __user *filename, + struct compat_timeval __user *t); +asmlinkage long compat_sys_newfstatat(int dfd, char __user * filename, + struct compat_stat __user *statbuf, + int flag); +asmlinkage long compat_sys_openat(int dfd, const char __user *filename, + int flags, int mode); + #endif -- cgit v1.2.2 From 9cd684551124e71630ab96d238747051463f5b56 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Wed, 1 Feb 2006 03:04:40 -0800 Subject: [PATCH] fuse: fix async read for legacy filesystems While asynchronous reads mean a performance improvement in most cases, if the filesystem assumed that reads are synchronous, then async reads may degrade performance (filesystem may receive reads out of order, which can confuse it's own readahead logic). With sshfs a 1.5 to 4 times slowdown can be measured. There's also a need for userspace filesystems to know whether asynchronous reads are supported by the kernel or not. To achive these, negotiate in the INIT request whether async reads will be used and the maximum readahead value. Update interface version to 7.6 If userspace uses a version earlier than 7.6, then disable async reads, and set maximum readahead value to the maximum read size, as done in previous versions. Signed-off-by: Miklos Szeredi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/fuse.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'include/linux') diff --git a/include/linux/fuse.h b/include/linux/fuse.h index 528959c52f1b..5425b60021e3 100644 --- a/include/linux/fuse.h +++ b/include/linux/fuse.h @@ -14,7 +14,7 @@ #define FUSE_KERNEL_VERSION 7 /** Minor version number of this interface */ -#define FUSE_KERNEL_MINOR_VERSION 5 +#define FUSE_KERNEL_MINOR_VERSION 6 /** The node ID of the root inode */ #define FUSE_ROOT_ID 1 @@ -58,6 +58,9 @@ struct fuse_kstatfs { __u32 spare[6]; }; +/** + * Bitmasks for fuse_setattr_in.valid + */ #define FATTR_MODE (1 << 0) #define FATTR_UID (1 << 1) #define FATTR_GID (1 << 2) @@ -75,6 +78,11 @@ struct fuse_kstatfs { #define FOPEN_DIRECT_IO (1 << 0) #define FOPEN_KEEP_CACHE (1 << 1) +/** + * INIT request/reply flags + */ +#define FUSE_ASYNC_READ (1 << 0) + enum fuse_opcode { FUSE_LOOKUP = 1, FUSE_FORGET = 2, /* no reply */ @@ -247,12 +255,16 @@ struct fuse_access_in { struct fuse_init_in { __u32 major; __u32 minor; + __u32 max_readahead; + __u32 flags; }; struct fuse_init_out { __u32 major; __u32 minor; - __u32 unused[3]; + __u32 max_readahead; + __u32 flags; + __u32 unused; __u32 max_write; }; -- cgit v1.2.2 From 3ee247ebce93a526f482d6bc714ce796fa85a81a Mon Sep 17 00:00:00 2001 From: Alasdair G Kergon Date: Wed, 1 Feb 2006 03:04:55 -0800 Subject: [PATCH] dm: dm-table warning fix drivers/md/dm-table.c:500: warning: comparison of distinct pointer types lacks a cast Signed-off-by: Alasdair G Kergon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/device-mapper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index 83c7d207b80e..51e0e95a421a 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h @@ -91,7 +91,7 @@ struct target_type { }; struct io_restrictions { - unsigned short max_sectors; + unsigned int max_sectors; unsigned short max_phys_segments; unsigned short max_hw_segments; unsigned short hardsect_size; -- cgit v1.2.2 From ed5a92700d3ce2646cb7763792a5f7ad1bade7e8 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Wed, 1 Feb 2006 03:05:00 -0800 Subject: [PATCH] tpm_bios: needs more securityfs_ functions tpm_bios.c needs securityfs_xyz() functions. Does include/linux/security.h need stubs for these, or should char/tpm/Makefile just be modified to say: ifdef CONFIG_ACPI ifdef CONFIG_SECURITY obj-$(CONFIG_TCG_TPM) += tpm_bios.o endif endif drivers/char/tpm/tpm_bios.c:494: warning: implicit declaration of function 'securityfs_create_dir' drivers/char/tpm/tpm_bios.c:494: warning: assignment makes pointer from integer without a cast drivers/char/tpm/tpm_bios.c:499: warning: implicit declaration of function 'securityfs_create_file' drivers/char/tpm/tpm_bios.c:501: warning: assignment makes pointer from integer without a cast drivers/char/tpm/tpm_bios.c:508: warning: assignment makes pointer from integer without a cast drivers/char/tpm/tpm_bios.c:523: warning: implicit declaration of function 'securityfs_remove' *** Warning: "securityfs_create_file" [drivers/char/tpm/tpm_bios.ko] undefined! *** Warning: "securityfs_create_dir" [drivers/char/tpm/tpm_bios.ko] undefined! *** Warning: "securityfs_remove" [drivers/char/tpm/tpm_bios.ko] undefined! There are also some gcc and sparse warnings that could be fixed. (see http://www.xenotime.net/linux/doc/build-tpm.out) Signed-off-by: Randy Dunlap Cc: Serge Hallyn Cc: Greg KH Cc: Kylene Jo Hall Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/security.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'include/linux') diff --git a/include/linux/security.h b/include/linux/security.h index ef753654daa5..bb1da86747c7 100644 --- a/include/linux/security.h +++ b/include/linux/security.h @@ -2617,6 +2617,25 @@ static inline int security_netlink_recv (struct sk_buff *skb) return cap_netlink_recv (skb); } +static inline struct dentry *securityfs_create_dir(const char *name, + struct dentry *parent) +{ + return ERR_PTR(-ENODEV); +} + +static inline struct dentry *securityfs_create_file(const char *name, + mode_t mode, + struct dentry *parent, + void *data, + struct file_operations *fops) +{ + return ERR_PTR(-ENODEV); +} + +static inline void securityfs_remove(struct dentry *dentry) +{ +} + #endif /* CONFIG_SECURITY */ #ifdef CONFIG_SECURITY_NETWORK -- cgit v1.2.2 From ff60a5dc4fa584d47022d2533bc5c53b80096fb5 Mon Sep 17 00:00:00 2001 From: "akpm@osdl.org" Date: Wed, 1 Feb 2006 03:05:10 -0800 Subject: [PATCH] hrtimers: fix posix-timer requeue race From: Steven Rostedtrostedt@goodmis.org CPU0 expires a posix-timer and runs the callback function. The signal is queued. After releasing the posix-timer lock and before returning to hrtimer_run_queue CPU0 gets interrupted. CPU1 delivers the queued signal and rearms the timer. CPU0 comes back to hrtimer_run_queue and sets the timer state to expired. The next modification of the timer can result in an oops, because the state information is wrong. Keep track of state = RUNNING and check if the state has been in the return path of hrtimer_run_queue. In case the state has been changed, ignore a restart request and do not touch the state variable. Signed-off-by: Steven Rostedt Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/hrtimer.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/linux') diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 089bfb1fa01a..c657f3d4924a 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h @@ -40,6 +40,7 @@ enum hrtimer_restart { enum hrtimer_state { HRTIMER_INACTIVE, /* Timer is inactive */ HRTIMER_EXPIRED, /* Timer is expired */ + HRTIMER_RUNNING, /* Timer is running the callback function */ HRTIMER_PENDING, /* Timer is pending */ }; -- cgit v1.2.2 From 7978672c4d9a1e6a6081de3a9d9ba5e5b24904a0 Mon Sep 17 00:00:00 2001 From: George Anzinger Date: Wed, 1 Feb 2006 03:05:11 -0800 Subject: [PATCH] hrtimers: cleanups and simplifications Clean up the interface to hrtimers by changing the init code to pass the mode as well as the clock. This allow the init code to select the correct base and eliminates extra timer re-init code in posix-timers. We also simplify the restart interface nanosleep use. Signed-off-by: George Anzinger Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/hrtimer.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'include/linux') diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index c657f3d4924a..6361544bb6ae 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h @@ -101,9 +101,8 @@ struct hrtimer_base { /* Exported timer functions: */ /* Initialize timers: */ -extern void hrtimer_init(struct hrtimer *timer, const clockid_t which_clock); -extern void hrtimer_rebase(struct hrtimer *timer, const clockid_t which_clock); - +extern void hrtimer_init(struct hrtimer *timer, clockid_t which_clock, + enum hrtimer_mode mode); /* Basic timer operations: */ extern int hrtimer_start(struct hrtimer *timer, ktime_t tim, -- cgit v1.2.2 From 66188fae3bf7f8dd951e2291d2a81888ed1b65de Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Wed, 1 Feb 2006 03:05:13 -0800 Subject: [PATCH] hrtimers: add back lost credit lines At some point we added credits to people who actively helped to bring k/hr-timers along. This was lost in the big code revamp. Add it back. Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/ktime.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/linux') diff --git a/include/linux/ktime.h b/include/linux/ktime.h index 1bd6552cc341..6aca67a569a2 100644 --- a/include/linux/ktime.h +++ b/include/linux/ktime.h @@ -10,6 +10,12 @@ * * Started by: Thomas Gleixner and Ingo Molnar * + * Credits: + * + * Roman Zippel provided the ideas and primary code snippets of + * the ktime_t union and further simplifications of the original + * code. + * * For licencing details see kernel-base/COPYING */ #ifndef _LINUX_KTIME_H -- cgit v1.2.2 From 493f01d1d0699ddafc30067d33fcc18d0b95b624 Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Wed, 1 Feb 2006 03:05:14 -0800 Subject: [PATCH] kernel/posix-timers.c: remove do_posix_clock_notimer_create() This function is neither used nor has any real contents. Signed-off-by: Adrian Bunk Acked-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/posix-timers.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/posix-timers.h b/include/linux/posix-timers.h index 54faf5236da0..95572c434bc9 100644 --- a/include/linux/posix-timers.h +++ b/include/linux/posix-timers.h @@ -84,7 +84,6 @@ struct k_clock { void register_posix_clock(const clockid_t clock_id, struct k_clock *new_clock); /* error handlers for timer_create, nanosleep and settime */ -int do_posix_clock_notimer_create(struct k_itimer *timer); int do_posix_clock_nonanosleep(const clockid_t, int flags, struct timespec *, struct timespec __user *); int do_posix_clock_nosettime(const clockid_t, struct timespec *tp); -- cgit v1.2.2 From f7589f28d7dd4586b4e90ac3b2a180409669053a Mon Sep 17 00:00:00 2001 From: Bryan O'Sullivan Date: Wed, 1 Feb 2006 03:05:15 -0800 Subject: [PATCH] Define BITS_PER_BYTE This can make the intent behind some arithmetic expressions clearer. Signed-off-by: Bryan O'Sullivan Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/types.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/linux') diff --git a/include/linux/types.h b/include/linux/types.h index 21b9ce803644..54ae2d59e71b 100644 --- a/include/linux/types.h +++ b/include/linux/types.h @@ -8,6 +8,8 @@ (((bits)+BITS_PER_LONG-1)/BITS_PER_LONG) #define DECLARE_BITMAP(name,bits) \ unsigned long name[BITS_TO_LONGS(bits)] + +#define BITS_PER_BYTE 8 #endif #include -- cgit v1.2.2 From c27a0d75b33c030965cc97d3d7f571107a673fb4 Mon Sep 17 00:00:00 2001 From: Bryan O'Sullivan Date: Wed, 1 Feb 2006 03:05:16 -0800 Subject: [PATCH] Introduce __iowrite32_copy This arch-independent routine copies data to a memory-mapped I/O region, using 32-bit accesses. The naming is double-underscored to make it clear that it does not guarantee write ordering, nor does it perform a memory barrier afterwards; the kernel doc also explicitly states this. This style of access is required by some devices. This change also introduces include/linux/io.h, at Andrew's suggestion. It only has one occupant at the moment, but is a logical destination for oft-replicated contents of include/asm-*/{io,iomap}.h to migrate to. Signed-off-by: Bryan O'Sullivan Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/io.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 include/linux/io.h (limited to 'include/linux') diff --git a/include/linux/io.h b/include/linux/io.h new file mode 100644 index 000000000000..85533ec5aaa1 --- /dev/null +++ b/include/linux/io.h @@ -0,0 +1,25 @@ +/* + * Copyright 2006 PathScale, Inc. All Rights Reserved. + * + * This file is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef _LINUX_IO_H +#define _LINUX_IO_H + +#include + +void __iowrite32_copy(void __iomem *to, const void *from, size_t count); + +#endif /* _LINUX_IO_H */ -- cgit v1.2.2 From 79046ae07ae21245520ca0aab985ee6678a879f8 Mon Sep 17 00:00:00 2001 From: Andy Whitcroft Date: Wed, 1 Feb 2006 03:05:26 -0800 Subject: [PATCH] GFP_ZONETYPES: add commentry on how to calculate GFP_ZONETYPES define using GFP_ZONEMASK and add commentry Add commentry explaining the optimisation that we can apply to GFP_ZONETYPES when the leftmost bit is a 'loaner', it can only be set in isolation. Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/mmzone.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/linux') diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 93a849f742db..88c30f844abf 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -91,6 +91,14 @@ struct per_cpu_pageset { * be 8 (2 ** 3) zonelists. GFP_ZONETYPES defines the number of possible * combinations of zone modifiers in "zone modifier space". * + * As an optimisation any zone modifier bits which are only valid when + * no other zone modifier bits are set (loners) should be placed in + * the highest order bits of this field. This allows us to reduce the + * extent of the zonelists thus saving space. For example in the case + * of three zone modifier bits, we could require up to eight zonelists. + * If the left most zone modifier is a "loner" then the highest valid + * zonelist would be four allowing us to allocate only five zonelists. + * * NOTE! Make sure this matches the zones in */ #define GFP_ZONEMASK 0x07 -- cgit v1.2.2 From ce2ea89ba101d976907128441ba3aca72a8804b9 Mon Sep 17 00:00:00 2001 From: Andy Whitcroft Date: Wed, 1 Feb 2006 03:05:27 -0800 Subject: [PATCH] GFP_ZONETYPES: calculate from GFP_ZONEMASK GFP_ZONETYPES calculate from GFP_ZONEMASK GFP_ZONETYPES's value is directly related to the value of GFP_ZONEMASK. It takes one of two forms depending whether the top bit of GFP_ZONEMASK is a 'loner'. Supply both forms, enabling the loner. Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/mmzone.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 88c30f844abf..ebfc238cc243 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -98,11 +98,14 @@ struct per_cpu_pageset { * of three zone modifier bits, we could require up to eight zonelists. * If the left most zone modifier is a "loner" then the highest valid * zonelist would be four allowing us to allocate only five zonelists. + * Use the first form for GFP_ZONETYPES when the left most bit is not + * a "loner", otherwise use the second. * * NOTE! Make sure this matches the zones in */ #define GFP_ZONEMASK 0x07 -#define GFP_ZONETYPES 5 +/* #define GFP_ZONETYPES (GFP_ZONEMASK + 1) */ /* Non-loner */ +#define GFP_ZONETYPES ((GFP_ZONEMASK + 1) / 2 + 1) /* Loner */ /* * On machines where it is needed (eg PCs) we divide physical memory -- cgit v1.2.2 From 2a11ff06d7d12be5d1bbcf592fff649b45ac2388 Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Wed, 1 Feb 2006 03:05:33 -0800 Subject: [PATCH] zone_reclaim: configurable off node allocation period. Currently the zone_reclaim code has a fixed window of 30 seconds of off node allocations should a local zone have no unused pagecache pages left. Reclaim will be attempted again after this timeout period to avoid repeated useless scans for memory. This is also useful to established sufficiently large off node allocation chunks to relieve the local node. It may be beneficial to adjust that time period for some special situations. For example if memory use was exceeding node capacity one may want to give up for longer periods of time. If memory spikes intermittendly then one may want to shorten the time period to reduce the number of off node allocations. This patch allows just that.... Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/swap.h | 1 + include/linux/sysctl.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/swap.h b/include/linux/swap.h index 4a99e4a7fbf3..e53fef7051e6 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -178,6 +178,7 @@ extern int vm_swappiness; #ifdef CONFIG_NUMA extern int zone_reclaim_mode; +extern int zone_reclaim_interval; extern int zone_reclaim(struct zone *, gfp_t, unsigned int); #else #define zone_reclaim_mode 0 diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 8352a7ce5895..32a4139c4ad8 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -182,7 +182,8 @@ enum VM_SWAP_TOKEN_TIMEOUT=28, /* default time for token time out */ VM_DROP_PAGECACHE=29, /* int: nuke lots of pagecache */ VM_PERCPU_PAGELIST_FRACTION=30,/* int: fraction of pages in each percpu_pagelist */ - VM_ZONE_RECLAIM_MODE=31,/* reclaim local zone memory before going off node */ + VM_ZONE_RECLAIM_MODE=31, /* reclaim local zone memory before going off node */ + VM_ZONE_RECLAIM_INTERVAL=32, /* time period to wait after reclaim failure */ }; -- cgit v1.2.2 From a48d07afdf18212de22b959715b16793c5a6e57a Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Wed, 1 Feb 2006 03:05:38 -0800 Subject: [PATCH] Direct Migration V9: migrate_pages() extension Add direct migration support with fall back to swap. Direct migration support on top of the swap based page migration facility. This allows the direct migration of anonymous pages and the migration of file backed pages by dropping the associated buffers (requires writeout). Fall back to swap out if necessary. The patch is based on lots of patches from the hotplug project but the code was restructured, documented and simplified as much as possible. Note that an additional patch that defines the migrate_page() method for filesystems is necessary in order to avoid writeback for anonymous and file backed pages. Signed-off-by: KAMEZAWA Hiroyuki Signed-off-by: Mike Kravetz Signed-off-by: Christoph Lameter Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/rmap.h | 4 ++-- include/linux/swap.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'include/linux') diff --git a/include/linux/rmap.h b/include/linux/rmap.h index 9d6fbeef2104..0f1ea2d6ed86 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h @@ -91,7 +91,7 @@ static inline void page_dup_rmap(struct page *page) * Called from mm/vmscan.c to handle paging out */ int page_referenced(struct page *, int is_locked); -int try_to_unmap(struct page *); +int try_to_unmap(struct page *, int ignore_refs); /* * Called from mm/filemap_xip.c to unmap empty zero page @@ -111,7 +111,7 @@ unsigned long page_address_in_vma(struct page *, struct vm_area_struct *); #define anon_vma_link(vma) do {} while (0) #define page_referenced(page,l) TestClearPageReferenced(page) -#define try_to_unmap(page) SWAP_FAIL +#define try_to_unmap(page, refs) SWAP_FAIL #endif /* CONFIG_MMU */ diff --git a/include/linux/swap.h b/include/linux/swap.h index e53fef7051e6..d359fc022433 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -191,6 +191,8 @@ static inline int zone_reclaim(struct zone *z, gfp_t mask, unsigned int order) #ifdef CONFIG_MIGRATION extern int isolate_lru_page(struct page *p); extern int putback_lru_pages(struct list_head *l); +extern int migrate_page(struct page *, struct page *); +extern void migrate_page_copy(struct page *, struct page *); extern int migrate_pages(struct list_head *l, struct list_head *t, struct list_head *moved, struct list_head *failed); #else -- cgit v1.2.2 From a3351e525e4768c29aa5d22ef59b5b38e0361e53 Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Wed, 1 Feb 2006 03:05:39 -0800 Subject: [PATCH] Direct Migration V9: remove_from_swap() to remove swap ptes Add remove_from_swap remove_from_swap() allows the restoration of the pte entries that existed before page migration occurred for anonymous pages by walking the reverse maps. This reduces swap use and establishes regular pte's without the need for page faults. Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/rmap.h | 1 + include/linux/swap.h | 1 + 2 files changed, 2 insertions(+) (limited to 'include/linux') diff --git a/include/linux/rmap.h b/include/linux/rmap.h index 0f1ea2d6ed86..d6b9bcd1384c 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h @@ -92,6 +92,7 @@ static inline void page_dup_rmap(struct page *page) */ int page_referenced(struct page *, int is_locked); int try_to_unmap(struct page *, int ignore_refs); +void remove_from_swap(struct page *page); /* * Called from mm/filemap_xip.c to unmap empty zero page diff --git a/include/linux/swap.h b/include/linux/swap.h index d359fc022433..229b6d04b4b6 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -248,6 +248,7 @@ extern int remove_exclusive_swap_page(struct page *); struct backing_dev_info; extern spinlock_t swap_lock; +extern int remove_vma_swap(struct vm_area_struct *vma, struct page *page); /* linux/mm/thrash.c */ extern struct mm_struct * swap_token_mm; -- cgit v1.2.2 From e965f9630c651fa4249039fd4b80c9392d07a856 Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Wed, 1 Feb 2006 03:05:41 -0800 Subject: [PATCH] Direct Migration V9: Avoid writeback / page_migrate() method Migrate a page with buffers without requiring writeback This introduces a new address space operation migratepage() that may be used by a filesystem to implement its own version of page migration. A version is provided that migrates buffers attached to pages. Some filesystems (ext2, ext3, xfs) are modified to utilize this feature. The swapper address space operation are modified so that a regular migrate_page() will occur for anonymous pages without writeback (migrate_pages forces every anonymous page to have a swap entry). Signed-off-by: Mike Kravetz Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/fs.h | 8 ++++++++ include/linux/swap.h | 5 +++++ 2 files changed, 13 insertions(+) (limited to 'include/linux') diff --git a/include/linux/fs.h b/include/linux/fs.h index 84bb449b9b01..e059da947007 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -363,6 +363,8 @@ struct address_space_operations { loff_t offset, unsigned long nr_segs); struct page* (*get_xip_page)(struct address_space *, sector_t, int); + /* migrate the contents of a page to the specified target */ + int (*migratepage) (struct page *, struct page *); }; struct backing_dev_info; @@ -1719,6 +1721,12 @@ extern void simple_release_fs(struct vfsmount **mount, int *count); extern ssize_t simple_read_from_buffer(void __user *, size_t, loff_t *, const void *, size_t); +#ifdef CONFIG_MIGRATION +extern int buffer_migrate_page(struct page *, struct page *); +#else +#define buffer_migrate_page NULL +#endif + extern int inode_change_ok(struct inode *, struct iattr *); extern int __must_check inode_setattr(struct inode *, struct iattr *); diff --git a/include/linux/swap.h b/include/linux/swap.h index 229b6d04b4b6..f3e17d5963c3 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -193,13 +193,18 @@ extern int isolate_lru_page(struct page *p); extern int putback_lru_pages(struct list_head *l); extern int migrate_page(struct page *, struct page *); extern void migrate_page_copy(struct page *, struct page *); +extern int migrate_page_remove_references(struct page *, struct page *, int); extern int migrate_pages(struct list_head *l, struct list_head *t, struct list_head *moved, struct list_head *failed); +extern int fail_migrate_page(struct page *, struct page *); #else static inline int isolate_lru_page(struct page *p) { return -ENOSYS; } static inline int putback_lru_pages(struct list_head *l) { return 0; } static inline int migrate_pages(struct list_head *l, struct list_head *t, struct list_head *moved, struct list_head *failed) { return -ENOSYS; } +/* Possible settings for the migrate_page() method in address_operations */ +#define migrate_page NULL +#define fail_migrate_page NULL #endif #ifdef CONFIG_MMU -- cgit v1.2.2 From 7fd6b1413082c303613fc137aca9a004740cacf0 Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Wed, 1 Feb 2006 03:05:52 -0800 Subject: [PATCH] slab: fix kzalloc and kstrdup caller report for CONFIG_DEBUG_SLAB Fix kzalloc() and kstrdup() caller report for CONFIG_DEBUG_SLAB. We must pass the caller to __cache_alloc() instead of directly doing __builtin_return_address(0) there; otherwise kzalloc() and kstrdup() are reported as the allocation site instead of the real one. Thanks to Valdis Kletnieks for reporting the problem and Steven Rostedt for the original idea. Signed-off-by: Pekka Enberg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/slab.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/linux') diff --git a/include/linux/slab.h b/include/linux/slab.h index 1fb77a9cc148..8cf52939d0ab 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h @@ -76,7 +76,14 @@ struct cache_sizes { kmem_cache_t *cs_dmacachep; }; extern struct cache_sizes malloc_sizes[]; + +#ifndef CONFIG_DEBUG_SLAB extern void *__kmalloc(size_t, gfp_t); +#else +extern void *__kmalloc_track_caller(size_t, gfp_t, void*); +#define __kmalloc(size, flags) \ + __kmalloc_track_caller(size, flags, __builtin_return_address(0)) +#endif static inline void *kmalloc(size_t size, gfp_t flags) { -- cgit v1.2.2 From d739b42b82773206297db1fc0d96ef895a5d9688 Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Wed, 1 Feb 2006 03:06:43 -0800 Subject: [PATCH] reiserfs: remove kmalloc wrapper Remove kmalloc() wrapper from fs/reiserfs/. Please note that a reiserfs /proc entry format is changed because kmalloc statistics is removed. Signed-off-by: Pekka Enberg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/reiserfs_fs.h | 16 ---------------- include/linux/reiserfs_fs_sb.h | 1 - 2 files changed, 17 deletions(-) (limited to 'include/linux') diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index e276c5ba2bb7..7d51149bd793 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h @@ -1971,22 +1971,6 @@ extern struct file_operations reiserfs_file_operations; extern struct address_space_operations reiserfs_address_space_operations; /* fix_nodes.c */ -#ifdef CONFIG_REISERFS_CHECK -void *reiserfs_kmalloc(size_t size, gfp_t flags, struct super_block *s); -void reiserfs_kfree(const void *vp, size_t size, struct super_block *s); -#else -static inline void *reiserfs_kmalloc(size_t size, int flags, - struct super_block *s) -{ - return kmalloc(size, flags); -} - -static inline void reiserfs_kfree(const void *vp, size_t size, - struct super_block *s) -{ - kfree(vp); -} -#endif int fix_nodes(int n_op_mode, struct tree_balance *p_s_tb, struct item_head *p_s_ins_ih, const void *); diff --git a/include/linux/reiserfs_fs_sb.h b/include/linux/reiserfs_fs_sb.h index 3e68592e52e9..31b4c0bd4fa0 100644 --- a/include/linux/reiserfs_fs_sb.h +++ b/include/linux/reiserfs_fs_sb.h @@ -382,7 +382,6 @@ struct reiserfs_sb_info { on-disk FS format */ /* session statistics */ - int s_kmallocs; int s_disk_reads; int s_disk_writes; int s_fix_nodes; -- cgit v1.2.2 From c87d0c07ea198db1ce451421904edd60b7d385ee Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Wed, 1 Feb 2006 03:06:45 -0800 Subject: [PATCH] reiserfs: remove reiserfs_permission_locked This function is completely unused since the xattr permission checking changes. Remove it and fold __reiserfs_permission into reiserfs_permission. Signed-off-by: Christoph Hellwig Cc: Jeff Mahoney Cc: Chris Mason Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/reiserfs_xattr.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include/linux') diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h index c84354e8374c..87280eb6083d 100644 --- a/include/linux/reiserfs_xattr.h +++ b/include/linux/reiserfs_xattr.h @@ -43,8 +43,6 @@ int reiserfs_delete_xattrs(struct inode *inode); int reiserfs_chown_xattrs(struct inode *inode, struct iattr *attrs); int reiserfs_xattr_init(struct super_block *sb, int mount_flags); int reiserfs_permission(struct inode *inode, int mask, struct nameidata *nd); -int reiserfs_permission_locked(struct inode *inode, int mask, - struct nameidata *nd); int reiserfs_xattr_del(struct inode *, const char *); int reiserfs_xattr_get(const struct inode *, const char *, void *, size_t); -- cgit v1.2.2 From 16fb24252a8170799e7adf14d8fc31b817fcaf53 Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Wed, 1 Feb 2006 12:18:22 -0500 Subject: NLM: Fix arguments to NLM_CANCEL call The OpenGroup docs state that the arguments "block", "exclusive" and "alock" must exactly match the arguments for the lock call that we are trying to cancel. Currently, "block" is always set to false, which is wrong. See bug# 5956 on bugzilla.kernel.org. Signed-off-by: Trond Myklebust --- include/linux/lockd/lockd.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index 95c8fea293ba..afe9a8f5c5ae 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h @@ -148,7 +148,6 @@ struct nlm_rqst * nlmclnt_alloc_call(void); int nlmclnt_prepare_block(struct nlm_rqst *req, struct nlm_host *host, struct file_lock *fl); void nlmclnt_finish_block(struct nlm_rqst *req); long nlmclnt_block(struct nlm_rqst *req, long timeout); -int nlmclnt_cancel(struct nlm_host *, struct file_lock *); u32 nlmclnt_grant(struct nlm_lock *); void nlmclnt_recovery(struct nlm_host *, u32); int nlmclnt_reclaim(struct nlm_host *, struct file_lock *); -- cgit v1.2.2 From aaaa99423b4b1f9cfd33ea5643d9274c25f62491 Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Wed, 1 Feb 2006 12:18:25 -0500 Subject: NLM: Ensure that nlmclnt_cancel_callback() doesn't loop forever If the server returns NLM_LCK_DENIED_NOLOCKS, we currently retry the entire NLM_CANCEL request. This may end up looping forever unless the server changes its mind (why would it do that, though?). Ensure that we limit the number of retries (to 3). See bug# 5957 in bugzilla.kernel.org. Signed-off-by: Trond Myklebust --- include/linux/lockd/lockd.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/linux') diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index afe9a8f5c5ae..920766cea79c 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h @@ -84,6 +84,7 @@ struct nlm_rqst { struct nlm_args a_args; /* arguments */ struct nlm_res a_res; /* result */ struct nlm_wait * a_block; + unsigned int a_retries; /* Retry count */ char a_owner[NLMCLNT_OHSIZE]; }; -- cgit v1.2.2 From 8a3177604b729ec3b80e43790ee978863ac7551b Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Wed, 1 Feb 2006 12:18:36 -0500 Subject: SUNRPC: Fix a lock recursion in the auth_gss downcall When we look up a new cred in the auth_gss downcall so that we can stuff the credcache, we do not want that lookup to queue up an upcall in order to initialise it. To do an upcall here not only redundant, but since we are already holding the inode->i_mutex, it will trigger a lock recursion. This patch allows rpcauth cache searches to indicate that they can cope with uninitialised credentials. Signed-off-by: Trond Myklebust --- include/linux/sunrpc/auth.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/linux') diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h index b68c11a2d6dd..bfc5fb279539 100644 --- a/include/linux/sunrpc/auth.h +++ b/include/linux/sunrpc/auth.h @@ -50,6 +50,7 @@ struct rpc_cred { }; #define RPCAUTH_CRED_LOCKED 0x0001 #define RPCAUTH_CRED_UPTODATE 0x0002 +#define RPCAUTH_CRED_NEW 0x0004 #define RPCAUTH_CRED_MAGIC 0x0f4aa4f0 @@ -87,6 +88,10 @@ struct rpc_auth { * uid/gid, fs[ug]id, gids) */ +/* Flags for rpcauth_lookupcred() */ +#define RPCAUTH_LOOKUP_NEW 0x01 /* Accept an uninitialised cred */ +#define RPCAUTH_LOOKUP_ROOTCREDS 0x02 /* This really ought to go! */ + /* * Client authentication ops */ -- cgit v1.2.2 From fba3bad488a2eec2d76c067edb7a5ff92ef42431 Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Wed, 1 Feb 2006 12:19:27 -0500 Subject: SUNRPC: Move upcall out of auth->au_ops->crcreate() This fixes a bug whereby if two processes try to look up the same auth_gss credential, they may end up creating two creds, and triggering two upcalls because the upcall is performed before the credential is added to the credcache. Signed-off-by: Trond Myklebust --- include/linux/sunrpc/auth.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/linux') diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h index bfc5fb279539..2647798b72c7 100644 --- a/include/linux/sunrpc/auth.h +++ b/include/linux/sunrpc/auth.h @@ -110,6 +110,7 @@ struct rpc_authops { struct rpc_credops { const char * cr_name; /* Name of the auth flavour */ + int (*cr_init)(struct rpc_auth *, struct rpc_cred *); void (*crdestroy)(struct rpc_cred *); int (*crmatch)(struct auth_cred *, struct rpc_cred *, int); -- cgit v1.2.2 From 00b464debf0038b1628996065f0be564ccfbfd86 Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Wed, 1 Feb 2006 12:49:28 -0500 Subject: SUNRPC: Remove obsolete rpcauth #defines RPCAUTH_CRED_LOCKED, and RPC_AUTH_PROC_CREDS are unused. Kill them. Signed-off-by: Trond Myklebust --- include/linux/sunrpc/auth.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'include/linux') diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h index 2647798b72c7..be4772ed43c0 100644 --- a/include/linux/sunrpc/auth.h +++ b/include/linux/sunrpc/auth.h @@ -48,9 +48,8 @@ struct rpc_cred { /* per-flavor data */ }; -#define RPCAUTH_CRED_LOCKED 0x0001 +#define RPCAUTH_CRED_NEW 0x0001 #define RPCAUTH_CRED_UPTODATE 0x0002 -#define RPCAUTH_CRED_NEW 0x0004 #define RPCAUTH_CRED_MAGIC 0x0f4aa4f0 @@ -84,9 +83,6 @@ struct rpc_auth { struct rpc_cred_cache * au_credcache; /* per-flavor data */ }; -#define RPC_AUTH_PROC_CREDS 0x0010 /* process creds (including - * uid/gid, fs[ug]id, gids) - */ /* Flags for rpcauth_lookupcred() */ #define RPCAUTH_LOOKUP_NEW 0x01 /* Accept an uninitialised cred */ -- cgit v1.2.2 From 9ad11ab48b1ad618bf47076e9e579f267f5306c2 Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Thu, 2 Feb 2006 16:11:51 +1100 Subject: [PATCH] compat: fix compat_sys_openat and friends Most of the 64 bit architectures will zero extend the first argument to compat_sys_{openat,newfstatat,futimesat} which will fail if the 32 bit syscall was passed AT_FDCWD (which is a small negative number). Declare the first argument to be an unsigned int which will force the correct sign extension when the internal functions are called in each case. Also, do some small white space cleanups in fs/compat.c. Signed-off-by: Stephen Rothwell Acked-by: David S. Miller Signed-off-by: Linus Torvalds --- include/linux/syscalls.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/linux') diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index fdbd436b24cc..3877209d23c3 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -559,12 +559,12 @@ asmlinkage long sys_newfstatat(int dfd, char __user *filename, struct stat __user *statbuf, int flag); asmlinkage long sys_readlinkat(int dfd, const char __user *path, char __user *buf, int bufsiz); -asmlinkage long compat_sys_futimesat(int dfd, char __user *filename, +asmlinkage long compat_sys_futimesat(unsigned int dfd, char __user *filename, struct compat_timeval __user *t); -asmlinkage long compat_sys_newfstatat(int dfd, char __user * filename, +asmlinkage long compat_sys_newfstatat(unsigned int dfd, char __user * filename, struct compat_stat __user *statbuf, int flag); -asmlinkage long compat_sys_openat(int dfd, const char __user *filename, +asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename, int flags, int mode); #endif -- cgit v1.2.2 From c0c1633bdb844ec5b4ac15c97ab8927d80550c42 Mon Sep 17 00:00:00 2001 From: Dave Jones Date: Fri, 3 Feb 2006 03:03:44 -0800 Subject: [PATCH] Fix build failure in recent pm_prepare_* changes. kernel/power/power.h:49: error: static declaration of 'pm_prepare_console' follows non-static declaration include/linux/suspend.h:46: error: previous declaration of 'pm_prepare_console' was here kernel/power/power.h:50: error: static declaration of 'pm_restore_console' follows non-static declaration include/linux/suspend.h:47: error: previous declaration of 'pm_restore_console' was here Signed-off-by: Dave Jones Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/suspend.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'include/linux') diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 5dc94e777fab..43bcd13eb1ec 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h @@ -42,10 +42,6 @@ extern void mark_free_pages(struct zone *zone); #ifdef CONFIG_PM /* kernel/power/swsusp.c */ extern int software_suspend(void); - -extern int pm_prepare_console(void); -extern void pm_restore_console(void); - #else static inline int software_suspend(void) { -- cgit v1.2.2 From f434baf4c6ae4a392b7c34843825af0894c89db2 Mon Sep 17 00:00:00 2001 From: Akinobu Mita Date: Fri, 3 Feb 2006 03:03:46 -0800 Subject: [PATCH] fix generic_fls64() Noticed by Rune Torgersen. Fix generic_fls64(). tcp_cubic is using fls64(). Signed-off-by: Akinobu Mita Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/bitops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/bitops.h b/include/linux/bitops.h index 6a2a19f14bb2..208650b1ad3a 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h @@ -81,7 +81,7 @@ static inline int generic_fls64(__u64 x) { __u32 h = x >> 32; if (h) - return fls(x) + 32; + return fls(h) + 32; return fls(x); } -- cgit v1.2.2 From 490d6ab170c94a7a59870f528d765131b8963e79 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Fri, 3 Feb 2006 03:03:56 -0800 Subject: [PATCH] list.h: don't evaluate macro args multiple times I noticed that list.h init functions were evaluating macro arguments multiple times and thought it might be nice to protect the unsuspecting caller. Converting the macros to inline functions seems to reduce code size, too. A i386 defconfig build with gcc 3.3.3 from fc4: text data bss dec hex filename 3573148 565664 188828 4327640 4208d8 vmlinux.before 3572177 565664 188828 4326669 42050d vmlinux add/remove: 0/0 grow/shrink: 11/144 up/down: 88/-1016 (-928) There was no difference in checkstack output. Signed-off-by: Zach Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/list.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'include/linux') diff --git a/include/linux/list.h b/include/linux/list.h index 945daa1f13dd..47208bd99f9e 100644 --- a/include/linux/list.h +++ b/include/linux/list.h @@ -34,9 +34,11 @@ struct list_head { #define LIST_HEAD(name) \ struct list_head name = LIST_HEAD_INIT(name) -#define INIT_LIST_HEAD(ptr) do { \ - (ptr)->next = (ptr); (ptr)->prev = (ptr); \ -} while (0) +static inline void INIT_LIST_HEAD(struct list_head *list) +{ + list->next = list; + list->prev = list; +} /* * Insert a new entry between two known consecutive entries. @@ -534,7 +536,11 @@ struct hlist_node { #define HLIST_HEAD_INIT { .first = NULL } #define HLIST_HEAD(name) struct hlist_head name = { .first = NULL } #define INIT_HLIST_HEAD(ptr) ((ptr)->first = NULL) -#define INIT_HLIST_NODE(ptr) ((ptr)->next = NULL, (ptr)->pprev = NULL) +static inline void INIT_HLIST_NODE(struct hlist_node *h) +{ + h->next = NULL; + h->pprev = NULL; +} static inline int hlist_unhashed(const struct hlist_node *h) { -- cgit v1.2.2 From e295cfcb2907ae4c5df57f5d4ada1ce6f3ae4657 Mon Sep 17 00:00:00 2001 From: Evgeniy Dushistov Date: Fri, 3 Feb 2006 03:04:04 -0800 Subject: [PATCH] ufs: fix oops with `ufs1' type "rm" command, on file system with "ufs1" type cause system hang up. This is, in fact, not so bad as it seems to be, because of after that in "kernel control path" there are 3-4 places which may cause "oops". So the first patch fix oopses, and the second patch fix "kernel hang up". "oops" appears because of reading of group's summary info partly wrong, and access to not first group's summary info cause "oops". Signed-off-by: Evgeniy Dushistov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/ufs_fs.h | 3 +-- include/linux/ufs_fs_sb.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'include/linux') diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h index 7a6babeca256..f26118ea1c58 100644 --- a/include/linux/ufs_fs.h +++ b/include/linux/ufs_fs.h @@ -502,8 +502,7 @@ struct ufs_super_block { /* * Convert cylinder group to base address of its global summary info. */ -#define fs_cs(indx) \ - s_csp[(indx) >> uspi->s_csshift][(indx) & ~uspi->s_csmask] +#define fs_cs(indx) s_csp[(indx)] /* * Cylinder group block for a file system. diff --git a/include/linux/ufs_fs_sb.h b/include/linux/ufs_fs_sb.h index c1be4c226486..8ff13c160f3d 100644 --- a/include/linux/ufs_fs_sb.h +++ b/include/linux/ufs_fs_sb.h @@ -25,7 +25,7 @@ struct ufs_csum; struct ufs_sb_info { struct ufs_sb_private_info * s_uspi; - struct ufs_csum * s_csp[UFS_MAXCSBUFS]; + struct ufs_csum * s_csp; unsigned s_bytesex; unsigned s_flags; struct buffer_head ** s_ucg; -- cgit v1.2.2 From 09114eb8c53d2d3b2ff9523e011cb68b2e245dce Mon Sep 17 00:00:00 2001 From: Evgeniy Dushistov Date: Fri, 3 Feb 2006 03:04:06 -0800 Subject: [PATCH] ufs: fix hang during `rm' This fixes the code like this: bh = sb_find_get_block (sb, tmp + j); if ((bh && DATA_BUFFER_USED(bh)) || tmp != fs32_to_cpu(sb, *p)) { retry = 1; brelse (bh); goto next1; } bforget (bh); sb_find_get_block() ordinarily returns a buffer_head with b_count>=2, and this code assume that in case if "b_count>1" buffer is used, so this caused infinite loop. (akpm: that is-the-buffer-busy code is incomprehensible. Good riddance. Use of block_truncate_page() seems sane). Signed-off-by: Evgeniy Dushistov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/ufs_fs.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/linux') diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h index f26118ea1c58..74aaf298b40d 100644 --- a/include/linux/ufs_fs.h +++ b/include/linux/ufs_fs.h @@ -912,6 +912,7 @@ extern int ufs_sync_inode (struct inode *); extern void ufs_delete_inode (struct inode *); extern struct buffer_head * ufs_getfrag (struct inode *, unsigned, int, int *); extern struct buffer_head * ufs_bread (struct inode *, unsigned, int, int *); +extern int ufs_getfrag_block (struct inode *inode, sector_t fragment, struct buffer_head *bh_result, int create); /* namei.c */ extern struct file_operations ufs_dir_operations; -- cgit v1.2.2 From 47ba87e0b1269698801310bfd1716b0538282405 Mon Sep 17 00:00:00 2001 From: Marcelo Tosatti Date: Fri, 3 Feb 2006 03:04:06 -0800 Subject: [PATCH] make "struct d_cookie" depend on CONFIG_PROFILING Shrinks "struct dentry" from 128 bytes to 124 on x86, allowing 31 objects per slab instead of 30. Cc: John Levon Cc: Philippe Elie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/dcache.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/linux') diff --git a/include/linux/dcache.h b/include/linux/dcache.h index a3ed5e059d47..a3f09947940e 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -108,7 +108,9 @@ struct dentry { struct dentry_operations *d_op; struct super_block *d_sb; /* The root of the dentry tree */ void *d_fsdata; /* fs-specific data */ +#ifdef CONFIG_PROFILING struct dcookie_struct *d_cookie; /* cookie, if any */ +#endif int d_mounted; unsigned char d_iname[DNAME_INLINE_LEN_MIN]; /* small names */ }; -- cgit v1.2.2 From 9d923a0603b5909a6758cfaec503955775cb7ab1 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 3 Feb 2006 03:04:12 -0800 Subject: [PATCH] ufs: fix char vs. __s8 clash in ufs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix this warning: fs/ufs/super.c: In function ‘ufs_fill_super’: fs/ufs/super.c:858: warning: case label value exceeds maximum value for type which happens because __s8 != char. These macros are used for struct ufs_super_block.fs_clean which is declared as __s8. Signed-off-by: Andreas Schwab Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/ufs_fs.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include/linux') diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h index 74aaf298b40d..b0ffe4356e5a 100644 --- a/include/linux/ufs_fs.h +++ b/include/linux/ufs_fs.h @@ -148,11 +148,11 @@ typedef __u16 __bitwise __fs16; #define UFS_USEEFT ((__u16)65535) #define UFS_FSOK 0x7c269d38 -#define UFS_FSACTIVE ((char)0x00) -#define UFS_FSCLEAN ((char)0x01) -#define UFS_FSSTABLE ((char)0x02) -#define UFS_FSOSF1 ((char)0x03) /* is this correct for DEC OSF/1? */ -#define UFS_FSBAD ((char)0xff) +#define UFS_FSACTIVE ((__s8)0x00) +#define UFS_FSCLEAN ((__s8)0x01) +#define UFS_FSSTABLE ((__s8)0x02) +#define UFS_FSOSF1 ((__s8)0x03) /* is this correct for DEC OSF/1? */ +#define UFS_FSBAD ((__s8)0xff) /* From here to next blank line, s_flags for ufs_sb_info */ /* directory entry encoding */ -- cgit v1.2.2 From 8e75f744289f0a1c38b669e39a489af460640881 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Fri, 3 Feb 2006 03:04:16 -0800 Subject: [PATCH] parport: add parallel port support for SGI O2 Add support for the built-in parallel port on SGI O2 (a.k.a. IP32). Define a new configuration option: PARPORT_IP32. The module is named parport_ip32. Hardware support for SPP, EPP and ECP modes along with DMA support when available are currently implemented. Signed-off-by: Arnaud Giersch Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/parport.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/linux') diff --git a/include/linux/parport.h b/include/linux/parport.h index f67f838a3a1f..008d736a6c9a 100644 --- a/include/linux/parport.h +++ b/include/linux/parport.h @@ -128,6 +128,11 @@ struct amiga_parport_state { unsigned char statusdir;/* ciab.ddrb & 7 */ }; +struct ip32_parport_state { + unsigned int dcr; + unsigned int ecr; +}; + struct parport_state { union { struct pc_parport_state pc; @@ -135,6 +140,7 @@ struct parport_state { struct ax_parport_state ax; struct amiga_parport_state amiga; /* Atari has not state. */ + struct ip32_parport_state ip32; void *misc; } u; }; -- cgit v1.2.2 From 8b3e09e19932835fb77c63aaf3b1af6117e78871 Mon Sep 17 00:00:00 2001 From: Markus Lidel Date: Fri, 3 Feb 2006 03:04:29 -0800 Subject: [PATCH] I2O: fix and workaround for Motorola/Freescale controller - This controller violates the I2O spec for the I/O registers. The patch contains a workaround which moves the registers to the proper location. (originally author: Matthew Starzewski) - If a message frame is beyond the mapped address range a error is returned. Signed-off-by: Markus Lidel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/i2o.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include/linux') diff --git a/include/linux/i2o.h b/include/linux/i2o.h index 9ba806796667..5a9d8c599171 100644 --- a/include/linux/i2o.h +++ b/include/linux/i2o.h @@ -1115,9 +1115,11 @@ static inline struct i2o_message *i2o_msg_get(struct i2o_controller *c) return ERR_PTR(-ENOMEM); mmsg->mfa = readl(c->in_port); - if (mmsg->mfa == I2O_QUEUE_EMPTY) { + if (unlikely(mmsg->mfa >= c->in_queue.len)) { mempool_free(mmsg, c->in_msg.mempool); - return ERR_PTR(-EBUSY); + if(mmsg->mfa == I2O_QUEUE_EMPTY) + return ERR_PTR(-EBUSY); + return ERR_PTR(-EFAULT); } return &mmsg->msg; -- cgit v1.2.2 From 6bf8d889ed453f709dedacabdcf5db47470fdae9 Mon Sep 17 00:00:00 2001 From: Herbert Poetzl Date: Fri, 3 Feb 2006 03:04:32 -0800 Subject: [PATCH] quota: remove unused sync_dquots_dev() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The already removed sync_dquots_dev(dev,type) is still defined in the no-quota case. Signed-off-by: Herbert Pötzl Acked-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/quotaops.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h index 4f34d3d60f2e..21e5a9124856 100644 --- a/include/linux/quotaops.h +++ b/include/linux/quotaops.h @@ -190,7 +190,6 @@ static __inline__ int DQUOT_OFF(struct super_block *sb) */ #define sb_dquot_ops (NULL) #define sb_quotactl_ops (NULL) -#define sync_dquots_dev(dev,type) (NULL) #define DQUOT_INIT(inode) do { } while(0) #define DQUOT_DROP(inode) do { } while(0) #define DQUOT_ALLOC_INODE(inode) (0) -- cgit v1.2.2 From bb3b9cf122eb097ed9fe8ae50e1b0dbba9bbe447 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 3 Feb 2006 03:04:38 -0800 Subject: [PATCH] Fix comment to synchronize_sched() Fix to broken comment to synchronize_rcu() noted by Keith Owens. Also add sentence noting that synchronize_sched() and synchronize_rcu() are not necessarily identical. Signed-off-by: Paul E. McKenney Cc: Keith Owens Cc: Stephen Hemminger Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/rcupdate.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 981f9aa43353..b87aefa082e2 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h @@ -240,11 +240,14 @@ extern int rcu_pending(int cpu); * This means that all preempt_disable code sequences, including NMI and * hardware-interrupt handlers, in progress on entry will have completed * before this primitive returns. However, this does not guarantee that - * softirq handlers will have completed, since in some kernels + * softirq handlers will have completed, since in some kernels, these + * handlers can run in process context, and can block. * * This primitive provides the guarantees made by the (deprecated) * synchronize_kernel() API. In contrast, synchronize_rcu() only * guarantees that rcu_read_lock() sections will have completed. + * In "classic RCU", these two guarantees happen to be one and + * the same, but can differ in realtime RCU implementations. */ #define synchronize_sched() synchronize_rcu() -- cgit v1.2.2 From 2c5d81a58106fa333467beab5f11dafab07b3e66 Mon Sep 17 00:00:00 2001 From: Fernando Luis Vazquez Cao Date: Fri, 3 Feb 2006 03:04:39 -0800 Subject: [PATCH] Compilation of kexec/kdump broken The compilation of kexec/kdump seems to be broken for x86_64. Remove the dependency of kexec on CONFIG_IA32_EMULATION. Signed-off-by: Fernando Vazquez Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/elfcore.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/linux') diff --git a/include/linux/elfcore.h b/include/linux/elfcore.h index dbd7bb4a33b7..0cf0bea010fe 100644 --- a/include/linux/elfcore.h +++ b/include/linux/elfcore.h @@ -5,6 +5,7 @@ #include #include #include +#include struct elf_siginfo { -- cgit v1.2.2 From 808249ceba49cdb3054c0aa5b75a61862d6cab94 Mon Sep 17 00:00:00 2001 From: Paul Fulghum Date: Fri, 3 Feb 2006 03:04:41 -0800 Subject: [PATCH] new tty buffering locking fix Change locking in the new tty buffering facility from using tty->read_lock, which is currently ignored by drivers and thus ineffective. New locking uses a new tty buffering specific lock enforced centrally in the tty buffering code. Two drivers (esp and cyclades) are updated to use the tty buffering functions instead of accessing tty buffering internals directly. This is required for the new locking to work. Minor checks for NULL buffers added to tty_prepare_flip_string/tty_prepare_flip_string_flags Signed-off-by: Paul Fulghum Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/kbd_kern.h | 5 +++++ include/linux/tty.h | 2 ++ include/linux/tty_flip.h | 7 ++++++- 3 files changed, 13 insertions(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/kbd_kern.h b/include/linux/kbd_kern.h index 45f625d7d0b2..3aed37314ab8 100644 --- a/include/linux/kbd_kern.h +++ b/include/linux/kbd_kern.h @@ -151,6 +151,11 @@ extern unsigned int keymap_count; static inline void con_schedule_flip(struct tty_struct *t) { + unsigned long flags; + spin_lock_irqsave(&t->buf.lock, flags); + if (t->buf.tail != NULL) + t->buf.tail->active = 0; + spin_unlock_irqrestore(&t->buf.lock, flags); schedule_work(&t->buf.work); } diff --git a/include/linux/tty.h b/include/linux/tty.h index 3787102e4b12..a7bd3b4558d2 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h @@ -57,6 +57,7 @@ struct tty_buffer { unsigned char *flag_buf_ptr; int used; int size; + int active; /* Data points here */ unsigned long data[0]; }; @@ -64,6 +65,7 @@ struct tty_buffer { struct tty_bufhead { struct work_struct work; struct semaphore pty_sem; + spinlock_t lock; struct tty_buffer *head; /* Queue head */ struct tty_buffer *tail; /* Active buffer */ struct tty_buffer *free; /* Free queue head */ diff --git a/include/linux/tty_flip.h b/include/linux/tty_flip.h index be1400e82482..82961eb19888 100644 --- a/include/linux/tty_flip.h +++ b/include/linux/tty_flip.h @@ -17,7 +17,7 @@ _INLINE_ int tty_insert_flip_char(struct tty_struct *tty, unsigned char ch, char flag) { struct tty_buffer *tb = tty->buf.tail; - if (tb && tb->used < tb->size) { + if (tb && tb->active && tb->used < tb->size) { tb->flag_buf_ptr[tb->used] = flag; tb->char_buf_ptr[tb->used++] = ch; return 1; @@ -27,6 +27,11 @@ _INLINE_ int tty_insert_flip_char(struct tty_struct *tty, _INLINE_ void tty_schedule_flip(struct tty_struct *tty) { + unsigned long flags; + spin_lock_irqsave(&tty->buf.lock, flags); + if (tty->buf.tail != NULL) + tty->buf.tail->active = 0; + spin_unlock_irqrestore(&tty->buf.lock, flags); schedule_delayed_work(&tty->buf.work, 1); } -- cgit v1.2.2 From 9810933701a09f9c4dd0ad963d5ec2efb7df07b7 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 3 Feb 2006 03:04:55 -0800 Subject: [PATCH] stop CompactFlash devices being marked as removable This patch stops CompactFlash devices being marked as removable. They are not removable (as defined by Linux) as the media and device are inseparable. When a card is removed, the whole device is removed from the system and never sits in a media-less state. This stops some nasty udev device creation/destruction loops. Further, once this change is made, there is no need for ide to can be removed from ide_drive_t. Signed-off-by: Richard Purdie Acked-by: Bartlomiej Zolnierkiewicz Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/ide.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/ide.h b/include/linux/ide.h index 110b3cfac021..274d15287181 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h @@ -582,7 +582,6 @@ typedef struct ide_drive_s { unsigned noprobe : 1; /* from: hdx=noprobe */ unsigned removable : 1; /* 1 if need to do check_media_change */ unsigned attach : 1; /* needed for removable devices */ - unsigned is_flash : 1; /* 1 if probed as flash */ unsigned forced_geom : 1; /* 1 if hdx=c,h,s was given at boot */ unsigned no_unmask : 1; /* disallow setting unmask bit */ unsigned no_io_32bit : 1; /* disallow enabling 32bit I/O */ -- cgit v1.2.2 From a7ff7d41fec06c518caa82a818a70610a29d0e75 Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Fri, 3 Feb 2006 03:04:56 -0800 Subject: [PATCH] drivers/ide/ide-io.c: make __ide_end_request() static Since there's no longer any external user, we can make __ide_end_request() static. Signed-off-by: Adrian Bunk Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/ide.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/ide.h b/include/linux/ide.h index 274d15287181..a7fc4cc79b23 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h @@ -1005,7 +1005,6 @@ extern ide_hwif_t ide_hwifs[]; /* master data repository */ extern int noautodma; extern int ide_end_request (ide_drive_t *drive, int uptodate, int nrsecs); -extern int __ide_end_request (ide_drive_t *drive, struct request *rq, int uptodate, int nrsecs); /* * This is used on exit from the driver to designate the next irq handler -- cgit v1.2.2