id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
dc05980dd736bfbe5b2524b463e5f098e67a64e9
Analyze and fix the following issue in the Linux kernel code: IB/mad: Fix oopsable race on device removal
Problem Details: Fix an oopsable race debugged by Eli Cohen <eli@mellanox.co.il>: After removing the port from port_list, ib_mad_port_close flushes port_priv->wq before destroying the special QPs. This means that a completion event could arrive, and queue a new work in this work queue after flush. This patch also remo...
```diff diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c index 16549add8e8f..f7854b65fd55 100644 --- a/drivers/infiniband/core/mad.c +++ b/drivers/infiniband/core/mad.c @@ -2364,8 +2364,12 @@ static void timeout_sends(void *data) static void ib_mad_thread_completion_handler(struct ib_cq *cq, ...
bf17c1c7cc9250d7c3c01b0ae898aefa1853535a
Analyze and fix the following issue in the Linux kernel code: IB/srp: Coverity fix to srp_parse_options()
Problem Details: Fix leak found by Coverity: in the SRP_OPT_DGID case, srp_parse_options() didn't free the result of match_strdup(). Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 89ad29dc88d4..a13dcdf90a4f 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -1448,6 +1448,7 @@ static int srp_parse_options(const char *buf, struct srp_target_port *target) ...
6b63e3015a69dd8aa5534e23af9f132a021da02e
Analyze and fix the following issue in the Linux kernel code: IB/mthca: Coverity fix to mthca_init_eq_table()
Problem Details: Fix bug found by coverity: the loop body never executed, because it was doing for (i = 0; i < MTHCA_EQ_CMD; ++i), but MTHCA_EQ_CMD is 0. The correct loop bound is MTHCA_NUM_EQ, to loop over all EQs. Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/hw/mthca/mthca_eq.c b/drivers/infiniband/hw/mthca/mthca_eq.c index a44b12dd7952..cbdc348fb689 100644 --- a/drivers/infiniband/hw/mthca/mthca_eq.c +++ b/drivers/infiniband/hw/mthca/mthca_eq.c @@ -928,7 +928,7 @@ int __devinit mthca_init_eq_table(struct mthca_dev *dev) mthca_war...
048975ac580a771fc5bb96c6b454cba897ab1a73
Analyze and fix the following issue in the Linux kernel code: IB: Coverity fixes to sysfs.c
Problem Details: Fix two bugs found by coverity: - Memory leak in error path of alloc_group_attrs() - Fencepost error in state_show(): the test should be < ARRAY_SIZE(), not <= ARRAY_SIZE(). Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/core/sysfs.c b/drivers/infiniband/core/sysfs.c index 49601bb8475b..15121cb5a1f6 100644 --- a/drivers/infiniband/core/sysfs.c +++ b/drivers/infiniband/core/sysfs.c @@ -112,7 +112,7 @@ static ssize_t state_show(struct ib_port *p, struct port_attribute *unused, return ret; re...
0b3ea0829cbcdaee6e018a83a2949ef458213f3b
Analyze and fix the following issue in the Linux kernel code: IPoIB: Move ipoib_ib_dev_flush() to ipoib workqueue
Problem Details: Move ipoib_ib_dev_flush() to ipoib's workqueue. This keeps it ordered with respect to other work scheduled by the ipoib driver. This fixes problems with races, for example: - ipoib_ib_dev_flush() has started running because of an IB event - user does ifconfig ib0 down - ipoib_mcast_stop_thread() g...
```diff diff --git a/drivers/infiniband/ulp/ipoib/ipoib.h b/drivers/infiniband/ulp/ipoib/ipoib.h index 638eff745b2f..1251f86ec856 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib.h +++ b/drivers/infiniband/ulp/ipoib/ipoib.h @@ -259,7 +259,7 @@ void ipoib_ib_dev_cleanup(struct net_device *dev); int ipoib_ib_dev_open(s...
8b9ab02b690e988f19c9d740ef642d7d833d23d5
Analyze and fix the following issue in the Linux kernel code: IPoIB: Fix build now that neighbour destructor is in neigh_params
Problem Details: Fix the IPoIB build (which is broken in net-2.6.17 because of my screw-up, which left out this chunk in ipoib_multicast.c). The neighbour destructor is now in neigh_params, so we don't need to clear it in the ops structure. Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c index fde442a1996d..93c462eaf4fd 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c @@ -115,7 +115,6 @@ static void ipoib_mcast_free(struct i...
87fd1a11ae91ab42fac978467667c61fee9f01da
Analyze and fix the following issue in the Linux kernel code: IB/cm: Check cm_id state before handling a REP
Problem Details: Move checking the state of a cm_id before modifying it when handling a REP. This fixes a bug seen under MPI scale-up testing, where a NULL timewait_info pointer is dereferenced if a request times out before a REP is received. Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Drei...
```diff diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c index 2514de3480d8..7cfedb8d9bcd 100644 --- a/drivers/infiniband/core/cm.c +++ b/drivers/infiniband/core/cm.c @@ -121,7 +121,7 @@ struct cm_id_private { struct rb_node service_node; struct rb_node sidr_id_node; - spinlock_t lock; + s...
27d56300647f6e76847bc2407d7abc782fe87495
Analyze and fix the following issue in the Linux kernel code: IB/uverbs: Fix query QP return of sq_sig_all
Problem Details: The old code didn't convert from the kernel's enum correctly. Signed-off-by: Dotan Barak <dotanb@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c index b157e5ff7dad..0e0dbc9421bf 100644 --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c @@ -1084,7 +1084,7 @@ ssize_t ib_uverbs_query_qp(struct ib_uverbs_file *file, resp.max_send_sge...
4546d31d84beafe74c56651173ac4fe197c7de8b
Analyze and fix the following issue in the Linux kernel code: IB: Fix modify QP checking of "current QP state" attribute
Problem Details: According to the IB spec version 1.2, section 11.2.4.2, the current table has a couple of mistakes where it allows the current QP state (IB_QP_CUR_STATE) attribute. For the transitions: RTS -> RTS: IB_QP_CUR_STATE should be allowed for all transports SQD -> SQD: IB_QP_CUR_STATE should never be al...
```diff diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c index c69334dc8012..cae0845f472a 100644 --- a/drivers/infiniband/core/verbs.c +++ b/drivers/infiniband/core/verbs.c @@ -366,10 +366,12 @@ static const struct { .opt_param = { [IB_QPT_UD] = (IB_QP_CUR_STATE | IB_QP_...
9acf6a8570dcfc9f55724b8b71099fc8768e8c26
Analyze and fix the following issue in the Linux kernel code: IPoIB: Fix multicast race between canceling and completing
Problem Details: ipoib_mcast_stop_thread currently tests mcast->query and if it is NULL, does not perform wait_for_completion on the mcast and frees the mcast object directly. However, since both operations are done without locking, it is possible that ipoib_mcast_join_complete is in progress on this mcast object and ...
```diff diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c index e5dc2a034530..fde442a1996d 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c @@ -437,9 +437,11 @@ static void ipoib_mcast_join_complet...
8d3ef29d6be1e750512e0a9dbea6225290b81d0a
Analyze and fix the following issue in the Linux kernel code: IB/mthca: Use an enum for HCA page size
Problem Details: Use a named enum for the HCA's internal page size, rather than having magic values of 4096 and shifts by 12 all over the code. Also, fix one minor bug in EQ handling: only one HCA page is mapped to the HCA during initialization, but a full kernel page is unmapped during cleanup. This might cause prob...
```diff diff --git a/drivers/infiniband/hw/mthca/mthca_cmd.c b/drivers/infiniband/hw/mthca/mthca_cmd.c index d1e7ecb5f233..948a2861cae3 100644 --- a/drivers/infiniband/hw/mthca/mthca_cmd.c +++ b/drivers/infiniband/hw/mthca/mthca_cmd.c @@ -652,8 +652,9 @@ static int mthca_map_cmd(struct mthca_dev *dev, u16 op, struct mt...
67e7377661db4e341ed5e9a0358d11a55e532aa8
Analyze and fix the following issue in the Linux kernel code: IB/mthca: Check alternate P_Key index when setting alternate path
Problem Details: Check that the alternate P_Key index is in range when setting the alternate path for a QP. Also make a cosmetic touch up to the debug message printed when the main P_Key index is out of range. Signed-off-by: Dotan Barak <dotanb@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/hw/mthca/mthca_qp.c b/drivers/infiniband/hw/mthca/mthca_qp.c index c24260845bfd..f673c461e30b 100644 --- a/drivers/infiniband/hw/mthca/mthca_qp.c +++ b/drivers/infiniband/hw/mthca/mthca_qp.c @@ -536,8 +536,8 @@ int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int ...
4d9781c5ce1a517a07dbf03c37323c011037fe79
Analyze and fix the following issue in the Linux kernel code: IB/uverbs: Fix alignment of struct ib_uverbs_create_qp_resp
Problem Details: The size of struct ib_uverbs_create_qp_resp is not even multiple of 8 bytes. This causes problems for low-level drivers that add private data after the structure: 32-bit userspace will look in the wrong place for a response from a 64-bit kernel. Fix this by adding a reserved field. Also, bump the AB...
```diff diff --git a/include/rdma/ib_user_verbs.h b/include/rdma/ib_user_verbs.h index 0edd3a6fe8f5..3bf4402f466a 100644 --- a/include/rdma/ib_user_verbs.h +++ b/include/rdma/ib_user_verbs.h @@ -44,7 +44,7 @@ * Increment this value if any changes that break userspace ABI * compatibility are made. */ -#define IB_U...
a74cd4af0bfa9578594acbb711a958104c93b772
Analyze and fix the following issue in the Linux kernel code: IB: Whitespace cleanups
Problem Details: Remove trailing whitespace and fix indentation that with spaces instead of tabs. Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c index be1cef1b3116..398c125d908c 100644 --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c @@ -1134,8 +1134,8 @@ out: } ssize_t ib_uverbs_post_send(struct ib_uverbs_file *file, - ...
2fa5e2ebbe2d81f741ba7bed9e07dc38cc734625
Analyze and fix the following issue in the Linux kernel code: IB/mthca: Whitespace cleanups
Problem Details: Remove trailing whitespace and fix indentation that with spaces instead of tabs. Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/hw/mthca/mthca_av.c b/drivers/infiniband/hw/mthca/mthca_av.c index a19e0ed03d7c..198f1267e984 100644 --- a/drivers/infiniband/hw/mthca/mthca_av.c +++ b/drivers/infiniband/hw/mthca/mthca_av.c @@ -147,7 +147,7 @@ int mthca_destroy_ah(struct mthca_dev *dev, struct mthca_ah *ah) sw...
7abe53155b77c31028a7158883bc9aac705790da
Analyze and fix the following issue in the Linux kernel code: [ARM] Fix cosmetic typo in asm/irq.h
Problem Details: The IRQ resource flags are IORESOURCE_IRQ not IRQRESOURCE_IRQ. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/include/asm-arm/irq.h b/include/asm-arm/irq.h index 7772432d3fd7..60b5105c9c93 100644 --- a/include/asm-arm/irq.h +++ b/include/asm-arm/irq.h @@ -27,7 +27,7 @@ extern void enable_irq(unsigned int); /* * These correspond with the SA_TRIGGER_* defines, and therefore the - * IRQRESOURCE_IRQ_* def...
f6b83f070e9b7ad9075f7cc5646260e56c7d0219
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix 2 bugs in huge page support.
Problem Details: 1) huge_pte_offset() did not check the page table hierarchy elements as being empty correctly, resulting in an OOPS 2) Need platform specific hugetlb_get_unmapped_area() to handle the top-down vs. bottom-up address space allocation strategies. Signed-off-by: David S. Miller <davem@davemloft.net...
```diff diff --git a/arch/sparc64/mm/hugetlbpage.c b/arch/sparc64/mm/hugetlbpage.c index 625cbb336a23..a7a24869d045 100644 --- a/arch/sparc64/mm/hugetlbpage.c +++ b/arch/sparc64/mm/hugetlbpage.c @@ -1,7 +1,7 @@ /* * SPARC64 Huge TLB page support. * - * Copyright (C) 2002, 2003 David S. Miller (davem@redhat.com) + ...
467418f3508b426adbc7df795ebf3baaed4fbefc
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: CONFIG_BLK_DEV_RAM fix
Problem Details: init/do_mounts_rd.c depends upon CONFIG_BLK_DEV_RAM, not CONFIG_BLK_DEV_INITRD. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c index 7ae4027a9192..7d0e67c1ce50 100644 --- a/arch/sparc64/kernel/setup.c +++ b/arch/sparc64/kernel/setup.c @@ -349,7 +349,7 @@ void __init setup_arch(char **cmdline_p) if (!root_flags) root_mountflags &= ~MS_RDONLY; ROOT_DEV = old_de...
b5e7ae5dd034c2c0ed75c31fca04a805097817bc
Analyze and fix the following issue in the Linux kernel code: [SPARC64] bbc_i2c: Fix cpu check and add missing module license.
Problem Details: Should allow cheetah_plus cpu types and don't taint the kernel. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/sbus/char/bbc_i2c.c b/drivers/sbus/char/bbc_i2c.c index 1c8b612d8234..3e156e005f2e 100644 --- a/drivers/sbus/char/bbc_i2c.c +++ b/drivers/sbus/char/bbc_i2c.c @@ -440,7 +440,8 @@ static int __init bbc_i2c_init(void) struct linux_ebus_device *edev = NULL; int err, index = 0; - if (tlb_t...
7a1ac5264108fc3ed22d17a3cdd76212ed1666d1
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix and re-enable dynamic TSB sizing.
Problem Details: This is good for up to %50 performance improvement of some test cases. The problem has been the race conditions, and hopefully I've plugged them all up here. 1) There was a serious race in switch_mm() wrt. lazy TLB switching to and from kernel threads. We could erroneously skip a tsb_context_sw...
```diff diff --git a/arch/sparc64/kernel/tsb.S b/arch/sparc64/kernel/tsb.S index d738910153f6..1b154c863628 100644 --- a/arch/sparc64/kernel/tsb.S +++ b/arch/sparc64/kernel/tsb.S @@ -34,8 +34,9 @@ tsb_miss_itlb: ldxa [%g4] ASI_IMMU, %g4 /* At this point we have: - * %g4 -- missing virtual address * %g1 -- T...
a858f1ca726edc5eb7ed39722f7966d005f1c9ca
Analyze and fix the following issue in the Linux kernel code: [SUNSU]: Fix missing spinlock initialization.
Problem Details: Caught by CONFIG_DEBUG_SPINLOCK. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c index 46510e7f505c..46c44b83f57c 100644 --- a/drivers/serial/sunsu.c +++ b/drivers/serial/sunsu.c @@ -1280,6 +1280,7 @@ static int __init sunsu_kbd_ms_init(struct uart_sunsu_port *up, int channel) struct serio *serio; #endif + spin_lock_init(&up-...
90a6646bf6a1ca821f32d5510e935855612904df
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix system type in /proc/cpuinfo and remove bogus OBP check.
Problem Details: Report 'sun4v' when appropriate in /proc/cpuinfo Remove all the verifications of the OBP version string. Just make sure it's there, and report it raw in the bootup logs and via /proc/cpuinfo. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c index 2a2a8a6cd17d..7ae4027a9192 100644 --- a/arch/sparc64/kernel/setup.c +++ b/arch/sparc64/kernel/setup.c @@ -442,9 +442,8 @@ static int show_cpuinfo(struct seq_file *m, void *__unused) seq_printf(m, "cpu\t\t: %s\n" "fpu\t\t...
17b0e199a10184d8c5bbbd79a4cee993bb1fb257
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix 32-bit truncation which broke sparsemem.
Problem Details: The page->flags manipulations done by the D-cache dirty state tracking was broken because the constants were not marked with "UL" to make them 64-bit, which means we were clobbering the upper 32-bits of page->flags all the time. This doesn't jive well with sparsemem which stores the section and indexi...
```diff diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c index 5f67b53b3a5b..b40f6477dea0 100644 --- a/arch/sparc64/mm/init.c +++ b/arch/sparc64/mm/init.c @@ -205,8 +205,8 @@ inline void flush_dcache_page_impl(struct page *page) } #define PG_dcache_dirty PG_arch_1 -#define PG_dcache_cpu_shift 24 -#defi...
ee29074d3bd23848905f52c515974e0cd0219faa
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix new context version SMP handling.
Problem Details: Don't piggy back the SMP receive signal code to do the context version change handling. Instead allocate another fixed PIL number for this asynchronous cross-call. We can't use smp_call_function() because this thing is invoked with interrupts disabled and a few spinlocks held. Also, fix smp_call_fun...
```diff diff --git a/arch/sparc64/kernel/devices.c b/arch/sparc64/kernel/devices.c index 1341b99ca7aa..007e8922cd16 100644 --- a/arch/sparc64/kernel/devices.c +++ b/arch/sparc64/kernel/devices.c @@ -157,7 +157,7 @@ unsigned int sun4v_vdev_device_interrupt(unsigned int dev_node) return 0; } - return sun4v_build_i...
f7c00338cfeef125032aa12aa8ebeacf9e117e81
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix loop termination in mark_kpte_bitmap()
Problem Details: If we were aligned, but didn't have at least 256MB left to process, we would loop forever. Thanks to fabbione for the report and testing the fix. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c index 5930e87dafbc..9bbd0bf64af0 100644 --- a/arch/sparc64/mm/init.c +++ b/arch/sparc64/mm/init.c @@ -973,12 +973,15 @@ static void __init mark_kpte_bitmap(unsigned long start, unsigned long end) while (start < end) { long remains; + remains =...
3cab0c3e8636d5005041aa52224f796c3a4ef872
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: More SUN4V cpu mondo bug fixing.
Problem Details: This cpu mondo sending interface isn't all that easy to use correctly... We were clearing out the wrong bits from the "mask" after getting something other than EOK from the hypervisor. It turns out the hypervisor can just be resent the same cpu_list[] array, with the 0xffff "done" entries still in th...
```diff diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c index 6bc7fd47e443..c4548a88953c 100644 --- a/arch/sparc64/kernel/smp.c +++ b/arch/sparc64/kernel/smp.c @@ -563,7 +563,7 @@ static void hypervisor_xcall_deliver(u64 data0, u64 data1, u64 data2, cpumask_t u64 *mondo; cpumask_t error_mask; u...
bcc28ee0bf390df0d81cc9dafe980faef6b2771a
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix sun4v mna winfixup handling.
Problem Details: We were clobbering a base register before we were done using it. Fix a comment typo while we're here. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/kernel/sun4v_tlb_miss.S b/arch/sparc64/kernel/sun4v_tlb_miss.S index 3eed8db96848..ab23ddb7116e 100644 --- a/arch/sparc64/kernel/sun4v_tlb_miss.S +++ b/arch/sparc64/kernel/sun4v_tlb_miss.S @@ -18,7 +18,7 @@ /* DEST = (VADDR >> 22) * - * Branch to ZERO_CTX_LABEL is context is ze...
c4f8ef77f941e7d89a52fad1fbe04d59397e2bd1
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix mini RTC driver reading.
Problem Details: Need to subtract 1900 from year and 1 from month before giving it back to userspace. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c index d50ebeae144a..7d61f1bfd3d3 100644 --- a/arch/sparc64/kernel/time.c +++ b/arch/sparc64/kernel/time.c @@ -1363,6 +1363,8 @@ static inline void mini_get_rtc_time(struct rtc_time *time) spin_unlock_irqrestore(&rtc_lock, flags); to_tm(s...
45f791eb0f03e760183d30d3f1f18dc2b8e902fe
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix _PAGE_EXEC handling.
Problem Details: First of all, use the known _PAGE_EXEC_{4U,4V} value instead of loading _PAGE_EXEC from memory. We either know which one to use by context, or we can code patch the test. Next, we need to check executability of a PTE in the generic TSB miss handler. Signed-off-by: David S. Miller <davem@davemloft.ne...
```diff diff --git a/arch/sparc64/kernel/itlb_miss.S b/arch/sparc64/kernel/itlb_miss.S index 6dfe3968c379..ad46e2024f4b 100644 --- a/arch/sparc64/kernel/itlb_miss.S +++ b/arch/sparc64/kernel/itlb_miss.S @@ -9,18 +9,18 @@ cmp %g4, %g6 ! Compare TAG /* ITLB ** ICACHE line 2: TSB compare and TLB load */ - sethi %hi...
92daa77e9a829350fd3900ff58d9c69820ad0e3d
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix typo in SUN4V D-TLB miss handler.
Problem Details: Should put FAULT_CODE_DTLB into %g3 not FAULT_CODE_ITLB. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/kernel/sun4v_tlb_miss.S b/arch/sparc64/kernel/sun4v_tlb_miss.S index 654244a3b048..3dccbd67818a 100644 --- a/arch/sparc64/kernel/sun4v_tlb_miss.S +++ b/arch/sparc64/kernel/sun4v_tlb_miss.S @@ -107,7 +107,7 @@ sun4v_dtlb_miss: ldda [%g1] ASI_QUAD_LDD_PHYS_4V, %g2 cmp %g2, %g6 bne,...
b830ab665ad96c6b20d51a89b35cbc09ab5a2c29
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix bugs in SUN4V cpu mondo dispatch.
Problem Details: There were several bugs in the SUN4V cpu mondo dispatch code. In fact, if we ever got a EWOULDBLOCK or other error from the hypervisor call, we'd potentially send a cpu mondo multiple times to the same cpu and even worse we could loop until the timeout resending the same mondo over and over to such cp...
```diff diff --git a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S index 9f3048e64e84..6d0b3ed77a02 100644 --- a/arch/sparc64/kernel/entry.S +++ b/arch/sparc64/kernel/entry.S @@ -1795,3 +1795,31 @@ sun4v_cpu_yield: ta HV_FAST_TRAP retl nop + + /* %o0: num cpus in cpu list + * %o1: cpu list paddr + ...
aac0aadf09b98ba36eab0bb02a560ebcb82ac39f
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix bugs in SMP TLB context version expiration handling.
Problem Details: 1) We must flush the TLB, duh. 2) Even if the sw context was seen to be valid, the local cpu's hw context can be out of date, so reload it unconditionally. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c index 5ff2483e70bf..eb7c0f855ba7 100644 --- a/arch/sparc64/kernel/smp.c +++ b/arch/sparc64/kernel/smp.c @@ -909,14 +909,18 @@ void smp_receive_signal_client(int irq, struct pt_regs *regs) */ mm = current->active_mm; if (likely(mm)) { - i...
6889331a1260e42b0275f42c13d6342d6cc1a03d
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix indexing into kpte_linear_bitmap.
Problem Details: Need to shift back up by 3 bits to get 8-byte entry index. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/kernel/ktlb.S b/arch/sparc64/kernel/ktlb.S index efcf38b6e284..31da1e564c95 100644 --- a/arch/sparc64/kernel/ktlb.S +++ b/arch/sparc64/kernel/ktlb.S @@ -163,6 +163,7 @@ kvmap_dtlb_tsb4m_miss: /* Divide by 64 to get the offset into the bitmask. */ srlx %g5, 6, %g5 + sllx %g5, 3...
c4e9249b1924118693f298ee8d38f7fe43587af3
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix binfmt_aout32.c build.
Problem Details: Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/kernel/binfmt_aout32.c b/arch/sparc64/kernel/binfmt_aout32.c index 181c8cdf9541..cb9ecd0172c0 100644 --- a/arch/sparc64/kernel/binfmt_aout32.c +++ b/arch/sparc64/kernel/binfmt_aout32.c @@ -330,7 +330,7 @@ beyond_if: current->mm->start_stack = (unsigned long) create_aout32_tables...
77b838fa1ef0ab02f75afc09834c60d87b86772f
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: destroy_context() needs to disable interrupts.
Problem Details: get_new_mmu_context() can be invoked from interrupt context now for the new SMP version wrap handling. So disable interrupt while taking ctx_alloc_lock in destroy_context() so we don't deadlock. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/mm/tsb.c b/arch/sparc64/mm/tsb.c index 353cb060561b..534ac2819892 100644 --- a/arch/sparc64/mm/tsb.c +++ b/arch/sparc64/mm/tsb.c @@ -373,6 +373,7 @@ int init_new_context(struct task_struct *tsk, struct mm_struct *mm) void destroy_context(struct mm_struct *mm) { unsigned long size =...
a0663a79ad4faebe1db4a56e2e767b120b12333a
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix TLB context allocation with SMT style shared TLBs.
Problem Details: The context allocation scheme we use depends upon there being a 1<-->1 mapping from cpu to physical TLB for correctness. Chips like Niagara break this assumption. So what we do is notify all cpus with a cross call when the context version number changes, and if necessary this makes them allocate a va...
```diff diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c index 0cd9b16612e7..1ce940811492 100644 --- a/arch/sparc64/kernel/smp.c +++ b/arch/sparc64/kernel/smp.c @@ -885,26 +885,44 @@ void flush_dcache_page_all(struct mm_struct *mm, struct page *page) put_cpu(); } +static void __smp_receive_signal...
0f05da6d577b80eb00f15994c86e4812ae60f1b9
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix %tstate ASI handling in start_thread{,32}()
Problem Details: Niagara helps us find a ancient bug in the sparc64 port :-) The ASI_* values are plain constant defines, thus signed 32-bit on sparc64. To put shift this into the regs->tstate value we were doing or'ing "(ASI_PNF << 24)" into there. ASI_PNF is 0x82 and shifted left by 24 makes that topmost bit the s...
```diff diff --git a/include/asm-sparc64/processor.h b/include/asm-sparc64/processor.h index b3889f3f943a..685479fb4364 100644 --- a/include/asm-sparc64/processor.h +++ b/include/asm-sparc64/processor.h @@ -91,7 +91,8 @@ extern unsigned long thread_saved_pc(struct task_struct *); /* Do necessary setup to start up a ne...
39334a4b2c52a06960c480b1a4a05f5d5375c8bf
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix typo in dump_tl1_traplog()
Problem Details: Actually make use of the 'limit' we compute. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c index 4eb2ee1125d1..78268217b062 100644 --- a/arch/sparc64/kernel/traps.c +++ b/arch/sparc64/kernel/traps.c @@ -79,7 +79,7 @@ static void dump_tl1_traplog(struct tl1_traplog *p) "dumping track stack.\n", p->tl); limit = (tlb_typ...
24c523ecc667dfeb28ef969cfabc531709bfffb8
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix unaligned access winfxup handling on SUN4V.
Problem Details: Another case where we have to force ourselves into global register level one. Also make sure the arguments passed to sun4v_do_mna() are correct. This area actually needs some more work, for example spill fixup is not necessarily going to do the right thing for this case. Signed-off-by: David S. Mill...
```diff diff --git a/arch/sparc64/kernel/sun4v_tlb_miss.S b/arch/sparc64/kernel/sun4v_tlb_miss.S index 57ccdaec7ccb..654244a3b048 100644 --- a/arch/sparc64/kernel/sun4v_tlb_miss.S +++ b/arch/sparc64/kernel/sun4v_tlb_miss.S @@ -137,7 +137,7 @@ sun4v_dtlb_load: sun4v_dtlb_prot: SET_GL(1) - /* Load MMU Miss base into...
843dfb4d99c41116601694f314092b3b6c4511f4
Analyze and fix the following issue in the Linux kernel code: [SPARC64] sunhv: Fix locking in sunhv_start_tx()
Problem Details: Caller takes the lock already. Also, fixup the poll loop in sunhv_break_ctl(). Just like in console write, we udelay(2) and use a loop limit of 1000000 iterations. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/serial/sunhv.c b/drivers/serial/sunhv.c index 378a1784ce9a..8537839f9abb 100644 --- a/drivers/serial/sunhv.c +++ b/drivers/serial/sunhv.c @@ -210,9 +210,6 @@ static void sunhv_stop_tx(struct uart_port *port) static void sunhv_start_tx(struct uart_port *port) { struct circ_buf *xmit = &p...
f6c1fe529217788f095f6953c2b66bec1196ad3d
Analyze and fix the following issue in the Linux kernel code: [SPARC64] Fix build if CONFIG_HUGETLB_PAGE is not set
Problem Details: Signed-off-by: Fabio M. Di Nitto <fabbione@ubuntu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h index bc446f302ea4..bab7defd8b3e 100644 --- a/include/asm-sparc64/pgtable.h +++ b/include/asm-sparc64/pgtable.h @@ -354,6 +354,7 @@ static inline pgprot_t pgprot_noncached(pgprot_t prot) */ #define pgprot_noncached pgprot_noncached ...
8b234274418d6d79527c4ac3a72da446ca4cb35f
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: More TLB/TSB handling fixes.
Problem Details: The SUN4V convention with non-shared TSBs is that the context bit of the TAG is clear. So we have to choose an "invalid" bit and initialize new TSBs appropriately. Otherwise a zero TAG looks "valid". Make sure, for the window fixup cases, that we use the right global registers and that we don't pote...
```diff diff --git a/arch/sparc64/kernel/dtlb_miss.S b/arch/sparc64/kernel/dtlb_miss.S index 2ef6f6e6e72b..09a6a15a7105 100644 --- a/arch/sparc64/kernel/dtlb_miss.S +++ b/arch/sparc64/kernel/dtlb_miss.S @@ -2,10 +2,10 @@ ldxa [%g0] ASI_DMMU_TSB_8KB_PTR, %g1 ! Get TSB 8K pointer ldxa [%g0] ASI_DMMU, %g6 ! Get TAG T...
6c8927c9634e8a1bc95d5291c55205707f9fa40a
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix some SUN4V TLB handling bugs.
Problem Details: 1) Add error return checking for TLB load hypervisor calls. 2) Don't fallthru to dtlb tsb miss handler from itlb tsb miss handler, oops. 3) On window fixups, propagate fault information to fixup handler correctly. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/kernel/sun4v_tlb_miss.S b/arch/sparc64/kernel/sun4v_tlb_miss.S index df65d712dcc6..244d50de8499 100644 --- a/arch/sparc64/kernel/sun4v_tlb_miss.S +++ b/arch/sparc64/kernel/sun4v_tlb_miss.S @@ -84,8 +84,9 @@ sun4v_itlb_load: mov %g3, %o2 ! PTE mov HV_MMU_IMMU, %o3 ! flags ta HV_M...
ebd8c56c5ae154e2c6cfb7453a76a4e7265b2377
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix uniprocessor IRQ targetting on SUN4V.
Problem Details: We need to use the real hardware processor ID when targetting interrupts, not the "define to 0" thing the uniprocessor build gives us. Also, fill in the Node-ID and Agent-ID fields properly on sun4u/Safari. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S index f5c8a293979f..bd332e41532f 100644 --- a/arch/sparc64/kernel/entry.S +++ b/arch/sparc64/kernel/entry.S @@ -1692,10 +1692,12 @@ __flushw_user: #ifdef CONFIG_SMP .globl hard_smp_processor_id hard_smp_processor_id: +#endif + .globl r...
101d5c18a928ef82b6c7bf99a9eaa536b5ccf593
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix PCI IRQ probing regression.
Problem Details: If the top-level cnode had multi entries in it's "reg" property, we'd fail. The buffer wasn't large enough in such cases. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/kernel/pci_common.c b/arch/sparc64/kernel/pci_common.c index f9101966a746..1448294a2379 100644 --- a/arch/sparc64/kernel/pci_common.c +++ b/arch/sparc64/kernel/pci_common.c @@ -675,7 +675,7 @@ static int __init pci_intmap_match(struct pci_dev *pdev, unsigned int *interrupt { struct ...
af02bec66294c76fba181c665c68a31fd4392020
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix return from trap on SUN4V.
Problem Details: We need to set the global register set _AND_ disable PSTATE_IE in %pstate. The original patch sequence was leaving PSTATE_IE enabled when returning to kernel mode, oops. This fixes the random register corruption being seen on SUN4V. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/kernel/rtrap.S b/arch/sparc64/kernel/rtrap.S index 551f71982008..1e724fe172ae 100644 --- a/arch/sparc64/kernel/rtrap.S +++ b/arch/sparc64/kernel/rtrap.S @@ -234,8 +234,10 @@ rt_continue: ldx [%sp + PTREGS_OFF + PT_V9_G1], %g1 /* Normal globals are restored, go to trap globals. ...
9b6b46470cc1c52f6917b0cd8b7cf4b5cbc5acf6
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix bogus call to sun4v_mna in winfixup code.
Problem Details: The C function is named sun4v_do_mna not sun4v_mna. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/kernel/winfixup.S b/arch/sparc64/kernel/winfixup.S index aca2a98b930b..161371370e9d 100644 --- a/arch/sparc64/kernel/winfixup.S +++ b/arch/sparc64/kernel/winfixup.S @@ -121,7 +121,7 @@ fill_fixup_mna: cmp %g1, 3 bne,pt %icc, 1f add %sp, PTREGS_OFF, %o0 - call sun4v_mna + call su...
3d6395cb770b0db9135a853b1742418c99ed2148
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix tl1 trap state capture/dump on SUN4V.
Problem Details: No trap levels above 2 in privileged mode on SUN4V. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/kernel/etrap.S b/arch/sparc64/kernel/etrap.S index a0e7d480e5dc..149383835c25 100644 --- a/arch/sparc64/kernel/etrap.S +++ b/arch/sparc64/kernel/etrap.S @@ -188,6 +188,11 @@ etraptl1: /* Save tstate/tpc/tnpc of TL 1-->4 and the tl register itself. rdpr %tt, %g3 stx %g3, [%g2 + ST...
db33f9bc09aaf68db7866374f9219c676787b4a2
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix OOPS on sunhv interrupts.
Problem Details: Until the uart is openned, port->info is NULL. Also, init the port->irq properly and give a non-zero port->membase so that the uart device reporting is done. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/serial/sunhv.c b/drivers/serial/sunhv.c index cc46206a1065..7f73907db7b6 100644 --- a/drivers/serial/sunhv.c +++ b/drivers/serial/sunhv.c @@ -136,8 +136,12 @@ static struct tty_struct *receive_chars(struct uart_port *port, struct pt_regs * static void transmit_chars(struct uart_port *por...
de635d833f61ce0f2ad0b3431e6a3323a1c4fed5
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix flush_tsb_user() on SUN4V.
Problem Details: Needs to use physical addressing just like cheetah_plus. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/mm/tsb.c b/arch/sparc64/mm/tsb.c index 975242ab88ee..3c1ff05038b1 100644 --- a/arch/sparc64/mm/tsb.c +++ b/arch/sparc64/mm/tsb.c @@ -58,7 +58,7 @@ void flush_tsb_user(struct mmu_gather *mp) ctx = CTX_HWBITS(mm->context); - if (tlb_type == cheetah_plus) + if (tlb_type == cheetah_p...
1daef08a12157923d90ec7a47ead8a97e0d243cc
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix comment typo in __flush_tlb_kernel_range.
Problem Details: Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/mm/ultra.S b/arch/sparc64/mm/ultra.S index 8c244932b1c2..725f8b34af49 100644 --- a/arch/sparc64/mm/ultra.S +++ b/arch/sparc64/mm/ultra.S @@ -86,7 +86,7 @@ __flush_tlb_pending: /* 26 insns */ .align 32 .globl __flush_tlb_kernel_range -__flush_tlb_kernel_range: /* 14 insns */ +__...
63c2a0e598c2fa769a08a6e9ad124bf270b4436e
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix pci_intmap_match().
Problem Details: When crawling up the PCI bus chain, stop at the first node that has an interrupt-map property before we hit the root. Also, if we use a bus interrupt-{map,mask} do not forget to update the 'intmask' pointer as we do for the 'intmap' pointer. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/kernel/pci_common.c b/arch/sparc64/kernel/pci_common.c index b2d21b11a232..ab6a2e1b76fb 100644 --- a/arch/sparc64/kernel/pci_common.c +++ b/arch/sparc64/kernel/pci_common.c @@ -581,18 +581,23 @@ static int __init pci_intmap_match(struct pci_dev *pdev, unsigned int *interrupt int ple...
ab66a50e31deb48b0444c248e67e5aa3217efda5
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Two IRQ handling fixes.
Problem Details: On SUN4V, force IRQ state to idle in enable_irq(). However, I'm still not sure this is %100 correct. Call add_interrupt_randomness() on SUN4V too. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c index c786d2549bce..4d9931d124ab 100644 --- a/arch/sparc64/kernel/irq.c +++ b/arch/sparc64/kernel/irq.c @@ -164,6 +164,10 @@ void enable_irq(unsigned int irq) if (err != HV_EOK) printk("sun4v_intr_setenabled(%x): err(%d)\n", in...
abd92b2d21899d42a60c3c1ac995768c76774608
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix sun4v_intr_setenabled() return value check in enable_irq().
Problem Details: Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c index 72e626b54ba5..c786d2549bce 100644 --- a/arch/sparc64/kernel/irq.c +++ b/arch/sparc64/kernel/irq.c @@ -160,7 +160,7 @@ void enable_irq(unsigned int irq) if (err != HV_EOK) printk("sun4v_intr_settarget(%x,%d): err(%d)\n", i...
9f8a5b843fc47ea150525f912574677483e1a5ac
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix C-function name called by sun4v_mna trap code.
Problem Details: The trap code was calling itself :-) Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/kernel/sun4v_tlb_miss.S b/arch/sparc64/kernel/sun4v_tlb_miss.S index 950ca74b4a58..b3844ee3844a 100644 --- a/arch/sparc64/kernel/sun4v_tlb_miss.S +++ b/arch/sparc64/kernel/sun4v_tlb_miss.S @@ -265,7 +265,7 @@ sun4v_mna: rd %pc, %g7 mov %l4, %o1 mov %l5, %o2 - call sun4v_mna + ca...
50f4f23c3bd95afc82e931254a71e7b1b3699fd2
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix gcc-3.3.x warnings.
Problem Details: It doesn't like const variables being passed into "i" constraing asm operations. It's a bug, but there is nothing we can really do but work around it. Based upon a report from Andrew Morton. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h index 00eecbb52f95..bc446f302ea4 100644 --- a/include/asm-sparc64/pgtable.h +++ b/include/asm-sparc64/pgtable.h @@ -232,13 +232,8 @@ static inline pte_t pfn_pte(unsigned long pfn, pgprot_t prot) unsigned long paddr = pfn << PAGE_SHIFT;...
7c8f486ae7fe90d7bb99a70a42d71c9a40688ec2
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix IOMMU mapping on sun4v.
Problem Details: We should dynamically allocate the per-cpu pglist not use an in-kernel-image datum, since __pa() does not work on such addresses. Also, consistently use "u32" for devhandle. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/kernel/pci_sun4v.c b/arch/sparc64/kernel/pci_sun4v.c index 17080a61ad6c..ac311d3dbc5c 100644 --- a/arch/sparc64/kernel/pci_sun4v.c +++ b/arch/sparc64/kernel/pci_sun4v.c @@ -24,10 +24,10 @@ #include "pci_sun4v.h" -#define PGLIST_NENTS 2048 +#define PGLIST_NENTS (PAGE_SIZE / sizeof(...
d5a2aa241aa0babf382d42d6033b30a5112e4c1e
Analyze and fix the following issue in the Linux kernel code: [SPARC64] sunhv: Bug fixes.
Problem Details: Add udelay to polling console write loop, and increment the loop limit. Name the device "ttyHV" and pass that to add_preferred_console() when we're using hypervisor console. Kill sunhv_console_setup(), it's empty. Handle the case where we don't want to use hypervisor console. (ie. we have a head att...
```diff diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c index 4f253a0755b0..06807cf95ee1 100644 --- a/arch/sparc64/kernel/setup.c +++ b/arch/sparc64/kernel/setup.c @@ -410,6 +410,7 @@ static int __init set_preferred_console(void) * value anyways... */ serial_console = 4; + return add_...
5259d5bfaf5b2953b130e9a500277a905bd37823
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix comment typo in asm/hypervisor.h
Problem Details: Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/include/asm-sparc64/hypervisor.h b/include/asm-sparc64/hypervisor.h index 587a0f6a0a74..76a9d0fa2724 100644 --- a/include/asm-sparc64/hypervisor.h +++ b/include/asm-sparc64/hypervisor.h @@ -912,7 +912,7 @@ struct hv_fault_status { * ARG0: character * RET0: status * ERRORS: EINVAL Illegal cha...
3833789bb2e15eb85fad296d8fb40f1437925645
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: PCI-SUN4V fixes.
Problem Details: Clear top 8-bits of physical addresses in "ranges" property. This gives the actual physical address. Detect PBM-A vs. PBM-B by checking bit 0x40 of the devhandle. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/kernel/pci_sun4v.c b/arch/sparc64/kernel/pci_sun4v.c index 699e91e3e429..19a07f0115ca 100644 --- a/arch/sparc64/kernel/pci_sun4v.c +++ b/arch/sparc64/kernel/pci_sun4v.c @@ -776,22 +776,22 @@ static void pci_sun4v_iommu_init(struct pci_pbm_info *pbm) probe_existing_entries(pbm, iommu)...
6241e5cc6afe2c5b75b51e1c890df18f05838cf6
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix branch signedness bug in all code patching.
Problem Details: The bug that hit SUN4V TLB patching exists elsewhere. Make sure we cure all such cases. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/lib/NGpage.S b/arch/sparc64/lib/NGpage.S index 0e6152c28b01..7d7c3bb8dcbf 100644 --- a/arch/sparc64/lib/NGpage.S +++ b/arch/sparc64/lib/NGpage.S @@ -75,7 +75,8 @@ NGclear_user_page: /* %o0=dest, %o1=vaddr */ or %g2, %lo(OLD), %g2; \ sub %g1, %g2, %g1; \ sethi %hi(BRANCH_ALWAYS), ...
b5a37e96b8dc067b979e44c4e109c9bc49c2f4d8
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix mondo queue allocations.
Problem Details: We have to use bootmem during init_IRQ and page alloc for sibling cpu calls. Also, fix incorrect hypervisor call return value checks in the hypervisor SMP cpu mondo send code. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c index c5dd6daf127f..51f65054bf18 100644 --- a/arch/sparc64/kernel/irq.c +++ b/arch/sparc64/kernel/irq.c @@ -21,6 +21,7 @@ #include <linux/delay.h> #include <linux/proc_fs.h> #include <linux/seq_file.h> +#include <linux/bootmem.h> #include ...
459b6e621e0e15315c25bac47fa7113e5818d45d
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix some SUN4V TLB miss bugs.
Problem Details: Code patching did not sign extend negative branch offsets correctly. Kernel TLB miss path needs patching and %g4 register preservation in order to handle SUN4V correctly. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/kernel/ktlb.S b/arch/sparc64/kernel/ktlb.S index f6bb2e08964a..2d333ab4b91b 100644 --- a/arch/sparc64/kernel/ktlb.S +++ b/arch/sparc64/kernel/ktlb.S @@ -48,7 +48,7 @@ kvmap_itlb_tsb_miss: kvmap_itlb_vmalloc_addr: KERN_PGTABLE_WALK(%g4, %g5, %g2, kvmap_itlb_longpath) - KTSB_LOCK_TA...
fd05068d7b22b64211f9202aa67ad44b51d44242
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix typo in sun4v_patch().
Problem Details: Second instruction offset is '4' not '3'. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c index cec921f6cdbf..f36b257b2e44 100644 --- a/arch/sparc64/kernel/setup.c +++ b/arch/sparc64/kernel/setup.c @@ -583,7 +583,7 @@ static void __init sun4v_patch(void) wmb(); __asm__ __volatile__("flush %0" : : "r" (addr + 0)); - *(un...
6cebb52094baddd4c167bb5100a7cf6f7bee6910
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix sun4v early bootup.
Problem Details: prom_sun4v_name should be "sun4v" not "SUNW,sun4v" Also, this is too early to make use of the .sun4v_Xinsn_patch code patching, so just check things manually. This gets us at least to prom_init() on Niagara. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/kernel/head.S b/arch/sparc64/kernel/head.S index f581f0e917f7..3222c8205b57 100644 --- a/arch/sparc64/kernel/head.S +++ b/arch/sparc64/kernel/head.S @@ -123,7 +123,7 @@ prom_map_name: prom_unmap_name: .asciz "unmap" prom_sun4v_name: - .asciz "SUNW,sun4v" + .asciz "sun4v" .align 4...
0d4bc95b9c205a7374afbe93b38d9c2757a45862
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix some Niagara memcpy() bugs.
Problem Details: We need to restore the %asi register properly. For the kernel this means get_fs(), for user this means ASI_PNF. Also, NGcopy_to_user.S was including U3memcpy.S instead of NGmemcpy.S, oops :-) Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/lib/NGcopy_to_user.S b/arch/sparc64/lib/NGcopy_to_user.S index 4a12395b4502..34112d5054ef 100644 --- a/arch/sparc64/lib/NGcopy_to_user.S +++ b/arch/sparc64/lib/NGcopy_to_user.S @@ -37,4 +37,4 @@ nop #endif -#include "U3memcpy.S" +#include "NGmemcpy.S" diff --git a/arch/sparc64/li...
36a68e77c554f1ef1c206fd618e6daf82d3e38a3
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Simplify sun4v TLB handling using macros.
Problem Details: There was also a bug in sun4v_itlb_miss, it loaded the MMU Fault Status base into %g3 instead of %g2. This pointed out a fast path for TSB miss processing, since we have %g2 with the MMU Fault Status base, we can use that to quickly load up the PGD phys address. Signed-off-by: David S. Miller <davem@...
```diff diff --git a/arch/sparc64/kernel/sun4v_tlb_miss.S b/arch/sparc64/kernel/sun4v_tlb_miss.S index f6222623de38..f7129137f9a4 100644 --- a/arch/sparc64/kernel/sun4v_tlb_miss.S +++ b/arch/sparc64/kernel/sun4v_tlb_miss.S @@ -6,48 +6,55 @@ .text .align 32 -sun4v_itlb_miss: - /* Load MMU Miss base into %g2. */ -...
164c220fa3947abbada65329d168f421b461a2a7
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix hypervisor call arg passing.
Problem Details: Function goes in %o5, args go in %o0 --> %o5. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c index 1f6455503f24..c5dd6daf127f 100644 --- a/arch/sparc64/kernel/irq.c +++ b/arch/sparc64/kernel/irq.c @@ -863,10 +863,10 @@ void init_irqwork_curcpu(void) static void __cpuinit init_one_mondo(unsigned long *pa_ptr, unsigned long type) { - ...
3bfd6f3e77f58479ec53aa91d0b078abbb4c0868
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix some comment typos in asm/hypervisor.h
Problem Details: Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/include/asm-sparc64/hypervisor.h b/include/asm-sparc64/hypervisor.h index 9c8e453abe97..b4e0d52acd5c 100644 --- a/include/asm-sparc64/hypervisor.h +++ b/include/asm-sparc64/hypervisor.h @@ -272,17 +272,19 @@ * EBADALIGN Base real address is not correctly aligned * for size. * - * Configur...
92704a1c63c3b481870d02636d0b5a70c7e21cd1
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Refine code sequences to get the cpu id.
Problem Details: On uniprocessor, it's always zero for optimize that. On SMP, the jmpl to the stub kills the return address stack in the cpu branch prediction logic, so expand the code sequence inline and use a code patching section to fix things up. This also always better and explicit register selection, which will...
```diff diff --git a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S index 563fa4ec33f8..b3511ff5d04a 100644 --- a/arch/sparc64/kernel/entry.S +++ b/arch/sparc64/kernel/entry.S @@ -1628,84 +1628,10 @@ __flushw_user: 2: retl nop - /* Read cpu ID from hardware, return in %g6. - * (callers_pc - 4) is in %...
f4e841da30b4bcbb8f1cc20a01157a788ff58b21
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Turn off TSB growing for now.
Problem Details: There are several tricky races involved with growing the TSB. So just use base-size TSBs for user contexts and we can revisit enabling this later. One part of the SMP problems is that tsb_context_switch() can see partially updated TSB configuration state if tsb_grow() is running in parallel. That's ...
```diff diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c index 4893f3e2c336..1af63307b24f 100644 --- a/arch/sparc64/mm/init.c +++ b/arch/sparc64/mm/init.c @@ -261,7 +261,6 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t p struct page *page; unsigned long pfn; unsigned...
86b818687d4894063ecd1190e54717a0cce8c009
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix race in LOAD_PER_CPU_BASE()
Problem Details: Since we use %g5 itself as a temporary, it can get clobbered if we take an interrupt mid-stream and thus cause end up with the final %g5 value too early as a result of rtrap processing. Set %g5 at the very end, atomically, to avoid this problem. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/kernel/etrap.S b/arch/sparc64/kernel/etrap.S index db7681017299..d974d18b15be 100644 --- a/arch/sparc64/kernel/etrap.S +++ b/arch/sparc64/kernel/etrap.S @@ -100,7 +100,7 @@ etrap_irq: stx %i7, [%sp + PTREGS_OFF + PT_V9_I7] wrpr %g0, ETRAP_PSTATE2, %pstate mov %l6, %g6 - LOAD_...
9bc657b28eba22e36efcdf3afa08100f92971eb4
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix too early reference to %g6
Problem Details: %g6 is not necessarily set to current_thread_info() at sparc64_realfault_common. So store the fault code and address after we invoke etrap and %g6 is properly set up. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/kernel/tsb.S b/arch/sparc64/kernel/tsb.S index c4e7740d5e82..e1dd37f5e535 100644 --- a/arch/sparc64/kernel/tsb.S +++ b/arch/sparc64/kernel/tsb.S @@ -110,10 +110,13 @@ tsb_do_itlb_fault: .globl sparc64_realfault_common sparc64_realfault_common: - stb %g4, [%g6 + TI_FAULT_CODE] ! Sa...
4da808c352c290d3f762933d44d4ab90c2fd65f3
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix bogus flush instruction usage.
Problem Details: Some of the trap code was still assuming that alternate global %g6 was hard coded with current_thread_info(). Let's just consistently flush at KERNBASE when we need a pipeline synchronization. That's locked into the TLB and will always work. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/kernel/etrap.S b/arch/sparc64/kernel/etrap.S index 8b3b6d720ed5..db7681017299 100644 --- a/arch/sparc64/kernel/etrap.S +++ b/arch/sparc64/kernel/etrap.S @@ -72,7 +72,8 @@ etrap_irq: sethi %hi(sparc64_kern_pri_context), %g2 ldx [%g2 + %lo(sparc64_kern_pri_context)], %g3 stxa %g...
4753eb2ac7022b999e5e484f1a5dc001dba22bd3
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix incorrect TSB lock bit handling.
Problem Details: The TSB_LOCK_BIT define is actually a special value shifted down by 32-bits for the assembler code macros. In C code, this isn't what we want. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/mm/tsb.c b/arch/sparc64/mm/tsb.c index 707af4b84a0e..e605478217c2 100644 --- a/arch/sparc64/mm/tsb.c +++ b/arch/sparc64/mm/tsb.c @@ -184,7 +184,7 @@ static void copy_tsb(struct tsb *old_tsb, unsigned long old_size, : "=r" (tag), "=r" (pte) : "r" (&old_tsb[i]), "i" (ASI_NUCLEUS_...
30d4d1ffed7098afe2641536d67eef150499da02
Analyze and fix the following issue in the Linux kernel code: [SPARC]: BUG_ON() Conversion in arch/sparc/kernel/ioport.c
Problem Details: this changes if() BUG(); constructs to BUG_ON() which is cleaner and can better optimized away Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c index d39c9f206271..460f72e640e6 100644 --- a/arch/sparc/kernel/ioport.c +++ b/arch/sparc/kernel/ioport.c @@ -217,7 +217,7 @@ static void _sparc_free_io(struct resource *res) unsigned long plen; plen = res->end - res->start + 1; - if ((p...
94bbc1763b6b6d20d5cfa70c41cda23af27f8b55
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: fix sparc_floppy_irq's auxio_register reseting
Problem Details: The patch "[SPARC64]: Get rid of fast IRQ feature" moved the the code from arch/sparc64/kernel/entry.S: lduba [%g7] ASI_PHYS_BYPASS_EC_E, %g5 or %g5, AUXIO_AUX1_FTCNT, %g5 stba %g5, [%g7] ASI_PHYS_BYPASS_EC_E andn %g5, AUXIO_AUX1_FTCN...
```diff diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c index 233526ba3abe..f7490ef629b9 100644 --- a/arch/sparc64/kernel/irq.c +++ b/arch/sparc64/kernel/irq.c @@ -694,7 +694,7 @@ irqreturn_t sparc_floppy_irq(int irq, void *dev_cookie, struct pt_regs *regs) val = readb(auxio_register); val |= A...
6cc8fef4cbeb0b65d225d7b599c75eb5b40a6534
Analyze and fix the following issue in the Linux kernel code: [XFS] Fix compiler warning from xfs_file_compat_invis_ioctl prototype.
Problem Details: SGI-PV: 904196 SGI-Modid: xfs-linux-melb:xfs-kern:25509a Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Nathan Scott <nathans@sgi.com>
```diff diff --git a/fs/xfs/linux-2.6/xfs_ioctl32.h b/fs/xfs/linux-2.6/xfs_ioctl32.h index 8bdb33ffc032..02de6e62ee37 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl32.h +++ b/fs/xfs/linux-2.6/xfs_ioctl32.h @@ -19,6 +19,6 @@ #define __XFS_IOCTL32_H__ extern long xfs_file_compat_ioctl(struct file *, unsigned, unsigned long)...
c7c694d196a39af6e644e24279953d04f30362db
Analyze and fix the following issue in the Linux kernel code: [AX.25]: Fix potencial memory hole.
Problem Details: If the AX.25 dialect chosen by the sysadmin is set to DAMA master / 3 (or DAMA slave / 2, if CONFIG_AX25_DAMA_SLAVE=n) ax25_kick() will fall through the switch statement without calling ax25_send_iframe() or any other function that would eventually free skbn thus leaking the packet. Fix by restricting...
```diff diff --git a/include/net/ax25.h b/include/net/ax25.h index 2250a18b0cbb..d052b221dbcd 100644 --- a/include/net/ax25.h +++ b/include/net/ax25.h @@ -110,8 +110,15 @@ enum { enum { AX25_PROTO_STD_SIMPLEX, AX25_PROTO_STD_DUPLEX, +#ifdef CONFIG_AX25_DAMA_SLAVE AX25_PROTO_DAMA_SLAVE, - AX25_PROTO_DAMA_MASTER +...
75913d9bb8328c4eca54cad39a5fb665b48383eb
Analyze and fix the following issue in the Linux kernel code: [SCSI] 3ware 9000 add big endian support
Problem Details: The attached patch updates the 3ware 9000 driver: - Fix 9550SX pchip reset timeout. - Add big endian support. Signed-off-by: Adam Radford <linuxraid@amcc.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
```diff diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c index d9152d02088c..0ab26d01877b 100644 --- a/drivers/scsi/3w-9xxx.c +++ b/drivers/scsi/3w-9xxx.c @@ -2,8 +2,9 @@ 3w-9xxx.c -- 3ware 9000 Storage Controller device driver for Linux. Written By: Adam Radford <linuxraid@amcc.com> + Modificat...
e572ec7e4e432de7ecf7bd2e62117646fa64e518
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix rmmod problems with elevator attributes, clean them up
Problem Details:
```diff diff --git a/block/as-iosched.c b/block/as-iosched.c index 3fb60eb7093b..296708ceceb2 100644 --- a/block/as-iosched.c +++ b/block/as-iosched.c @@ -1725,7 +1725,7 @@ as_var_store(unsigned long *var, const char *page, size_t count) return count; } -static ssize_t as_est_show(elevator_t *e, char *page) +stati...
3d1ab40f4c20767afbd361b258a531d73e3e6fc2
Analyze and fix the following issue in the Linux kernel code: [PATCH] elevator_t lifetime rules and sysfs fixes
Problem Details:
```diff diff --git a/block/as-iosched.c b/block/as-iosched.c index 55a997fc4bb4..3fb60eb7093b 100644 --- a/block/as-iosched.c +++ b/block/as-iosched.c @@ -1709,11 +1709,6 @@ static int as_init_queue(request_queue_t *q, elevator_t *e) /* * sysfs parts below */ -struct as_fs_entry { - struct attribute attr; - ssize_...
483f4afc421435b7cfe5e88f74eea0b73a476d75
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix sysfs interaction and lifetime rules handling for queues
Problem Details:
```diff diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c index 6dc769182052..6c793b196aa9 100644 --- a/block/ll_rw_blk.c +++ b/block/ll_rw_blk.c @@ -1740,16 +1740,11 @@ EXPORT_SYMBOL(blk_run_queue); * Hopefully the low level driver will have finished any * outstanding requests first... **/ -void blk_cle...
6f325a13442d4e4a6c93d06d8e6deff79b6540b1
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix cfq_get_queue()/ioprio_set(2) races
Problem Details: Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
```diff diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 3cd985bece3a..2949920df45d 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -296,6 +296,7 @@ CFQ_CRQ_FNS(is_sync); static struct cfq_queue *cfq_find_cfq_hash(struct cfq_data *, unsigned int, unsigned short); static void cfq_dispatch_ins...
e17a9489b4a686bb5e9615e1d375c67619cb99c5
Analyze and fix the following issue in the Linux kernel code: [PATCH] stop elv_unregister() from rogering other iosched's data, fix locking
Problem Details: Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
```diff diff --git a/block/as-iosched.c b/block/as-iosched.c index 8da3cf66894c..d2ee2af44b58 100644 --- a/block/as-iosched.c +++ b/block/as-iosched.c @@ -195,6 +195,12 @@ static void free_as_io_context(struct as_io_context *aic) kfree(aic); } +static void as_trim(struct io_context *ioc) +{ + kfree(ioc->aic); + io...
a6a0763a60eef374d4f02f82a6ecb6a74f380fcb
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix the exclusion for ioprio_set()
Problem Details: Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
```diff diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 63bfe4b494ba..3bacf4bb7dd2 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -47,6 +47,8 @@ static int cfq_slice_idle = HZ / 100; */ static const int cfq_max_depth = 2; +static DEFINE_RWLOCK(cfq_exit_lock); + /* * for the hash of c...
b0a6916bcc48f46996d54b8451591a2f2b7b2f64
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix cfq hash lookups
Problem Details: If somebody does a hash lookup for cfq_queue while ioprio of an async queue is elevated, they shouldn't end up stuck with lowered ioprio when we go back. Fix is to use ->org_ioprio{,class} in hash lookups. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
```diff diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index c8dbe38c81c8..37a2a772498c 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -1179,7 +1179,7 @@ __cfq_find_cfq_hash(struct cfq_data *cfqd, unsigned int key, unsigned int prio, hlist_for_each_safe(entry, next, hash_list) { struct cfq...
c981ff9f893b9ab229a809f8ad287ae43fc17a64
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix locking in queue_requests_store()
Problem Details: Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
```diff diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c index 5fac138a5be1..caa8fcf5474b 100644 --- a/block/ll_rw_blk.c +++ b/block/ll_rw_blk.c @@ -3614,10 +3614,13 @@ static ssize_t queue_requests_store(struct request_queue *q, const char *page, size_t count) { struct request_list *rl = &q->rq; + unsigned long ...
8669aafdb5a46a57366dd1540fc475544071a9c9
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix double-free in blk_init_queue_node()
Problem Details: Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
```diff diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c index 0ef2971a9e82..5fac138a5be1 100644 --- a/block/ll_rw_blk.c +++ b/block/ll_rw_blk.c @@ -1854,8 +1854,10 @@ blk_init_queue_node(request_fn_proc *rfn, spinlock_t *lock, int node_id) return NULL; q->node = node_id; - if (blk_init_free_list(q)) - goto o...
60a6dc55b93b3321afa52f650a149fb7e87fa85a
Analyze and fix the following issue in the Linux kernel code: [PATCH] Kconfig: swap VIDEO_CX88_ALSA and VIDEO_CX88_DVB
Problem Details: VIDEO_CX88_ALSA should not be between VIDEO_CX88_DVB and VIDEO_CX88_DVB_ALL_FRONTENDS When cx88-alsa was added to cx88/Kconfig, it was added in between VIDEO_CX88_DVB and VIDEO_CX88_DVB_ALL_FRONTENDS. This caused undesireable effects to the appearance of the menu options in menuconfig. This fix reor...
```diff diff --git a/drivers/media/video/cx88/Kconfig b/drivers/media/video/cx88/Kconfig index e99dfbbf3e95..87d79df05336 100644 --- a/drivers/media/video/cx88/Kconfig +++ b/drivers/media/video/cx88/Kconfig @@ -15,20 +15,6 @@ config VIDEO_CX88 To compile this driver as a module, choose M here: the module will b...
2d61b86775a5676a8fba2ba2f0f869564e35c630
Analyze and fix the following issue in the Linux kernel code: [PATCH] disable unshare(CLONE_VM) for now
Problem Details: sys_unshare() does mmput(new_mm). This is not enough if we have mm->core_waiters. This patch is a temporary fix for soon to be released 2.6.16. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> [ Checked with Uli: "I'm not planning to use unshare(CLONE_VM). It's not needed for any functionality plan...
```diff diff --git a/kernel/fork.c b/kernel/fork.c index 46060cb24af0..b373322ca497 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -1478,9 +1478,7 @@ static int unshare_vm(unsigned long unshare_flags, struct mm_struct **new_mmp) if ((unshare_flags & CLONE_VM) && (mm && atomic_read(&mm->mm_users) > 1)) { - ...
9007c9a2b03ea325ee593a161dbf01dbb8222d7e
Analyze and fix the following issue in the Linux kernel code: [MIPS] SB1: Check for -mno-sched-prolog if building corelis debug kernel.
Problem Details: Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/Makefile b/arch/mips/Makefile index fe9da16f3a40..3d8dac681c63 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -108,7 +108,8 @@ MODFLAGS += -mlong-calls cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' && echo -EB) cflags-$(CONFIG_CPU_L...
a904f7478561464f9fe74929b81fec237b6ff4c3
Analyze and fix the following issue in the Linux kernel code: [MIPS] Sibyte: Fix race in sb1250_gettimeoffset().
Problem Details: From Dave Johnson <djohnson+linuxmips@sw.starentnetworks.com>: sb1250_gettimeoffset() simply reads the current cpu 0 timer remaining value, however once this counter reaches 0 and the interrupt is raised, it immediately resets and begins to count down again. If sb1250_gettimeoffset() is calle...
```diff diff --git a/arch/mips/sibyte/sb1250/time.c b/arch/mips/sibyte/sb1250/time.c index adc0b5271a06..1588f6debd90 100644 --- a/arch/mips/sibyte/sb1250/time.c +++ b/arch/mips/sibyte/sb1250/time.c @@ -47,23 +47,51 @@ #define IMR_IP3_VAL K_INT_MAP_I1 #define IMR_IP4_VAL K_INT_MAP_I2 +#define SB1250_HPT_NUM 3 +#de...
4308cb16286c96d980570cc5319173b524220c06
Analyze and fix the following issue in the Linux kernel code: [MIPS] Sibyte: Fix interrupt timer off by one bug.
Problem Details: From Dave Johnson <djohnson+linuxmips@sw.starentnetworks.com>: The timers need to be loaded with 1 less than the desired interval not the interval itself. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/sibyte/sb1250/time.c b/arch/mips/sibyte/sb1250/time.c index 511c89d65f38..adc0b5271a06 100644 --- a/arch/mips/sibyte/sb1250/time.c +++ b/arch/mips/sibyte/sb1250/time.c @@ -75,10 +75,10 @@ void sb1250_time_init(void) /* Disable the timer and set up the count */ __raw_writeq(0, IOADDR(A...
a77f124294822203660b0926392b963cfa72fcf4
Analyze and fix the following issue in the Linux kernel code: [MIPS] Sibyte: Fix M_SCD_TIMER_INIT and M_SCD_TIMER_CNT wrong field width.
Problem Details: From Dave Johnson <djohnson+linuxmips@sw.starentnetworks.com>: Field width should be 23 bits not 20 bits. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/include/asm-mips/sibyte/sb1250_scd.h b/include/asm-mips/sibyte/sb1250_scd.h index a667bc14a7cd..f4178bdcfcb0 100644 --- a/include/asm-mips/sibyte/sb1250_scd.h +++ b/include/asm-mips/sibyte/sb1250_scd.h @@ -359,14 +359,15 @@ */ #define V_SCD_TIMER_FREQ 1000000 +#define V_SCD_TIMER_WI...
86dde15b3dc36dda4bbc32a8da607675ce63ef23
Analyze and fix the following issue in the Linux kernel code: [MIPS] Fix DBAu1550 software power off.
Problem Details: Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/au1000/common/reset.c b/arch/mips/au1000/common/reset.c index 4ffccedf5967..96a211400f34 100644 --- a/arch/mips/au1000/common/reset.c +++ b/arch/mips/au1000/common/reset.c @@ -164,13 +164,13 @@ void au1000_restart(char *command) void au1000_halt(void) { -#if defined(CONFIG_MIPS_PB1550...
de62893bc0725f8b5f0445250577cd7a10b2d8f8
Analyze and fix the following issue in the Linux kernel code: [MIPS] local_r4k_flush_cache_page fix
Problem Details: If dcache_size != icache_size or dcache_size != scache_size, or set-associative cache, icache/scache does not flushed properly. Make blast_?cache_page_indexed() masks its index value correctly. Also, use physical address for physically indexed pcache/scache. Signed-off-by: Atsushi Nemoto <anemo@...
```diff diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c index 0668e9bfce41..9572ed44f0d5 100644 --- a/arch/mips/mm/c-r4k.c +++ b/arch/mips/mm/c-r4k.c @@ -375,6 +375,7 @@ static void r4k_flush_cache_mm(struct mm_struct *mm) struct flush_cache_page_args { struct vm_area_struct *vma; unsigned long addr; + un...
a3c4946db4fe64cb21b66a09e89890678aac6d65
Analyze and fix the following issue in the Linux kernel code: [MIPS] SB1: Fix interrupt disable hazard.
Problem Details: The SB1 core has a three cycle interrupt disable hazard but we were wrongly treating it as fully interlocked. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/include/asm-mips/hazards.h b/include/asm-mips/hazards.h index 6111a0ce58c4..feb29a793888 100644 --- a/include/asm-mips/hazards.h +++ b/include/asm-mips/hazards.h @@ -3,7 +3,9 @@ * License. See the file "COPYING" in the main directory of this archive * for more details. * - * Copyright (C) 20...
265a92856b17524c87da0258ac0d3cec80ae1d35
Analyze and fix the following issue in the Linux kernel code: [NET]: Fix race condition in sk_wait_event().
Problem Details: It is broken, the condition is checked out of socket lock. It is wonderful the bug survived for so long time. [ This fixes bugzilla #6233: race condition in tcp_sendmsg when connection became established ] Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/include/net/sock.h b/include/net/sock.h index 30758035d616..f63d0d56712c 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -478,9 +478,9 @@ static inline void sk_add_backlog(struct sock *sk, struct sk_buff *skb) rc = __condition; \ if (!rc) { \ *(__timeo) = schedule_timeou...
cae1629515cf6d166fa20657e68b75619d563280
Analyze and fix the following issue in the Linux kernel code: [PATCH] ipw2100: Fix radiotap code gcc warning
Problem Details: Fix gcc warning: ipw2100.c:2460: ISO C90 forbids mixed declarations and code Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c index d429fd576a66..b0e23a88250f 100644 --- a/drivers/net/wireless/ipw2100.c +++ b/drivers/net/wireless/ipw2100.c @@ -2445,8 +2445,6 @@ static void isr_rx_monitor(struct ipw2100_priv *priv, int i, struct ipw2100_status *status = &pri...